Class GenericZipEntry<T extends ZipEntry>

java.lang.Object
com.pnfsoftware.jeb.util.encoding.zip.GenericZipEntry<T>
Type Parameters:
T - concrete Zip entry type

public class GenericZipEntry<T extends ZipEntry> extends Object
A read-only, generic view of a Zip entry.
  • Method Details

    • getInternalEntry

      public T getInternalEntry()
      Get the implementation-specific Zip entry backing this generic view.
      Returns:
      internal Zip entry
    • getName

      public String getName()
      Retrieve the full entry name, e.g. abc/def/file.txt
      Returns:
      full entry name
    • getSimpleName

      public String getSimpleName()
      Retrieve the simple entry name, e.g. file.txt for an entry abc/def/file.txt
      Returns:
      entry name without its directory path
    • getTime

      public long getTime()
      Get the entry last-modification time.
      Returns:
      last-modification time in milliseconds since the epoch, or -1 if unavailable
    • getSize

      public long getSize()
      Get the uncompressed entry size.
      Returns:
      uncompressed size in bytes, or -1 if unavailable
    • getCompressedSize

      public long getCompressedSize()
      Get the compressed entry size.
      Returns:
      compressed size in bytes, or -1 if unavailable
    • getCrc

      public long getCrc()
      Get the entry CRC-32 value.
      Returns:
      CRC-32 value, or -1 if unavailable
    • getMethod

      public int getMethod()
      Get the Zip compression method.
      Returns:
      compression method identifier
    • getExtra

      public byte[] getExtra()
      Get the entry extra data.
      Returns:
      extra data bytes, or null if none
    • getComment

      public String getComment()
      Get the entry comment.
      Returns:
      comment string, or null if none
    • isDirectory

      public boolean isDirectory()
      Determine whether this entry represents a directory.
      Returns:
      true for directory entries