Interface ArchiveEntry

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long SIZE_UNKNOWN
      Special value (-1L) indicating that the size is unknown.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.nio.file.attribute.FileTime getLastModifiedTime()
      Gets the last modified time of this entry.
      java.lang.String getName()
      Gets the name of the entry in this archive.
      long getSize()
      Gets the uncompressed size of this entry.
      boolean isDirectory()
      Tests whether this entry refers to a directory (true).
      default java.nio.file.Path resolveIn​(java.nio.file.Path parentPath)
      Resolves this entry in the given parent Path.
    • Field Detail

      • SIZE_UNKNOWN

        static final long SIZE_UNKNOWN
        Special value (-1L) indicating that the size is unknown.
        See Also:
        Constant Field Values
    • Method Detail

      • getLastModifiedTime

        java.nio.file.attribute.FileTime getLastModifiedTime()
        Gets the last modified time of this entry.
        Returns:
        the last modified time of this entry.
        Since:
        1.27.1-0
      • getName

        java.lang.String getName()
        Gets the name of the entry in this archive. May refer to a file or directory or other item.

        This method returns the raw name as it is stored inside of the archive.

        Returns:
        The name of this entry in the archive.
      • getSize

        long getSize()
        Gets the uncompressed size of this entry. May be -1 (SIZE_UNKNOWN) if the size is unknown
        Returns:
        the uncompressed size of this entry.
      • isDirectory

        boolean isDirectory()
        Tests whether this entry refers to a directory (true).
        Returns:
        true if this entry refers to a directory.
      • resolveIn

        default java.nio.file.Path resolveIn​(java.nio.file.Path parentPath)
                                      throws java.io.IOException
        Resolves this entry in the given parent Path.
        Parameters:
        parentPath - the Path.resolve(Path) receiver.
        Returns:
        a resolved and normalized Path.
        Throws:
        java.io.IOException - if this method detects a Zip slip.
        Since:
        1.26.0