Interface ArchiveEntry

All Known Implementing Classes:
ArArchiveEntry, ArjArchiveEntry, CpioArchiveEntry, DumpArchiveEntry, JarArchiveEntry, SevenZArchiveEntry, TarArchiveEntry, ZipArchiveEntry

public interface ArchiveEntry
An entry of an archive.
  • Field Summary

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

    Modifier and Type
    Method
    Description
    Gets the last modified date of this entry.
    Gets the name of the entry in this archive.
    long
    Gets the uncompressed size of this entry.
    boolean
    Tests whether this entry refers to a directory (true).
    default Path
    resolveIn(Path parentPath)
    Resolves this entry in the given parent Path.
  • Field Details

  • Method Details

    • getLastModifiedDate

      Gets the last modified date of this entry.
      Returns:
      the last modified date of this entry.
      Since:
      1.1
    • 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 Path resolveIn(Path parentPath) throws IOException
      Resolves this entry in the given parent Path.
      Parameters:
      parentPath - the Path.resolve(Path) receiver.
      Returns:
      a resolved and normalized Path.
      Throws:
      IOException - if this method detects a Zip slip.
      Since:
      1.26.0