Class ZipStream.ZipStreamEntry

  • Enclosing class:
    ZipStream

    public class ZipStream.ZipStreamEntry
    extends java.lang.Object
    Wrapper over ZipEntry used in ZipStream
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<byte[]> getContent()
      Get the file content for this zip entry.
      java.lang.String getFileName()
      Get the file name or the folder name corresponding to this zip entry.
      java.util.Optional<java.lang.String> getFolderName​(int index)
      Get the folder name corresponding to an index.
      java.lang.String getName()
      Get the full name of the zip entry
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getName

        public java.lang.String getName()
        Get the full name of the zip entry
        Returns:
        zip entry name
      • getFolderName

        public java.util.Optional<java.lang.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 java.lang.String getFileName()
        Get the file name or the folder name corresponding to this zip entry.
        Returns:
        the file name
      • getContent

        public java.util.Optional<byte[]> getContent()
        Get the file content for this zip entry. If this is not a file, this will retunrn Optional#empty()
        Returns:
        the file content, or Optional#empty()