Class ZipStream.ZipStreamEntry

java.lang.Object
org.activiti.cloud.services.common.zip.ZipStream.ZipStreamEntry
Enclosing class:
ZipStream

public class ZipStream.ZipStreamEntry extends Object
Wrapper over ZipEntry used in ZipStream
  • Method Details

    • 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 index parameter is the index of the folder name to return. The the root folder in the directory hierarchy has index 0.

      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