Class GenericZipEntry<T extends ZipEntry>
java.lang.Object
com.pnfsoftware.jeb.util.encoding.zip.GenericZipEntry<T>
- Type Parameters:
T- concrete Zip entry type
A read-only, generic view of a Zip entry.
-
Method Summary
Modifier and TypeMethodDescriptionGet the entry comment.longGet the compressed entry size.longgetCrc()Get the entry CRC-32 value.byte[]getExtra()Get the entry extra data.Get the implementation-specific Zip entry backing this generic view.intGet the Zip compression method.getName()Retrieve the full entry name, e.g.Retrieve the simple entry name, e.g.longgetSize()Get the uncompressed entry size.longgetTime()Get the entry last-modification time.booleanDetermine whether this entry represents a directory.
-
Method Details
-
getInternalEntry
Get the implementation-specific Zip entry backing this generic view.- Returns:
- internal Zip entry
-
getName
Retrieve the full entry name, e.g.abc/def/file.txt- Returns:
- full entry name
-
getSimpleName
Retrieve the simple entry name, e.g.file.txtfor an entryabc/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
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
-