Class ZipStream.ZipStreamEntry
- java.lang.Object
-
- org.activiti.cloud.services.common.zip.ZipStream.ZipStreamEntry
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<byte[]>getContent()Get the file content for this zip entry.StringgetFileName()Get the file name or the folder name corresponding to this zip entry.Optional<String>getFolderName(int index)Get the folder name corresponding to an index.StringgetName()Get the full name of the zip entrybooleanisAtRoot()Check if the zip entry content (file or folder) is at root levelbooleanisDirectory()Check if the zip entry is a directory
-
-
-
Method Detail
-
getName
public String getName()
Get the full name of the zip entry- Returns:
- zip entry name
-
getFolderName
public Optional<String> getFolderName(int index)
Get the folder name corresponding to an index.The
indexparameter is the index of the folder name to return. The the root folder in the directory hierarchy has index0.If the zip entry is a file, will return Optional#empty() for the index value corresponding to the file name.
- Parameters:
index- the index of the folder- Returns:
- the folder name corresponding to the given index, or Optional#empty() if there is no folder for that index
-
getFileName
public String getFileName()
Get the file name or the folder name corresponding to this zip entry.- Returns:
- the file name
-
getContent
public Optional<byte[]> getContent()
Get the file content for this zip entry. If this is not a file, this will return Optional#empty()- Returns:
- the file content, or Optional#empty()
-
isDirectory
public boolean isDirectory()
Check if the zip entry is a directory- Returns:
- true if it's a directory
-
isAtRoot
public boolean isAtRoot()
Check if the zip entry content (file or folder) is at root level- Returns:
- true if at root level
-
-