Class ZipStream.ZipStreamEntry
java.lang.Object
org.activiti.cloud.services.common.zip.ZipStream.ZipStreamEntry
- Enclosing class:
ZipStream
-
Method Summary
Modifier and TypeMethodDescriptionOptional<byte[]> Get the file content for this zip entry.Get the file name or the folder name corresponding to this zip entry.getFolderName(int index) Get the folder name corresponding to an index.getName()Get the full name of the zip entrybooleanisAtRoot()Check if the zip entry content (file or folder) is at root levelbooleanCheck if the zip entry is a directory
-
Method Details
-
getName
Get the full name of the zip entry- Returns:
- zip entry name
-
getFolderName
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
Get the file name or the folder name corresponding to this zip entry.- Returns:
- the file name
-
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
-