Class FastZipEntry
java.lang.Object
nonapi.io.github.classgraph.fastzipfilereader.FastZipEntry
- All Implemented Interfaces:
Comparable<FastZipEntry>
A zip entry within a
LogicalZipFile.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal longThe compressed size of the zip entry, in bytes.final StringThe zip entry path.final StringThe unversioned entry name (i.e. entryName with "META_INF/versions/{versionInt}/" stripped)final intThe file attributes for this resource, or 0 if unknown.final longThe uncompressed size of the zip entry, in bytes. -
Method Summary
Modifier and TypeMethodDescriptionintSort in decreasing order of version number, then lexicographically increasing order of unversioned entry path.booleanlongGet the last modified time in Epoch millis, or 0L if unknown.getPath()Get the path to this zip entry, using "!getSlice()Lazily get zip entry slice -- this is deferred until zip entry data needs to be read, in order to avoid randomly seeking within zipfile for every entry as the central directory is read.inthashCode()toString()
-
Field Details
-
entryName
The zip entry path. -
compressedSize
public final long compressedSizeThe compressed size of the zip entry, in bytes. -
uncompressedSize
public final long uncompressedSizeThe uncompressed size of the zip entry, in bytes. -
fileAttributes
public final int fileAttributesThe file attributes for this resource, or 0 if unknown. -
entryNameUnversioned
The unversioned entry name (i.e. entryName with "META_INF/versions/{versionInt}/" stripped)
-
-
Method Details
-
getSlice
Lazily get zip entry slice -- this is deferred until zip entry data needs to be read, in order to avoid randomly seeking within zipfile for every entry as the central directory is read.- Returns:
- the offset within the physical zip file of the entry's start offset.
- Throws:
IOException- If an I/O exception occurs.
-
getPath
Get the path to this zip entry, using "!/" as a separator between the parent logical zipfile and the entry name.- Returns:
- the path of the entry
-
getLastModifiedTimeMillis
public long getLastModifiedTimeMillis()Get the last modified time in Epoch millis, or 0L if unknown.- Returns:
- the last modified time in Epoch millis.
-
compareTo
Sort in decreasing order of version number, then lexicographically increasing order of unversioned entry path.- Specified by:
compareToin interfaceComparable<FastZipEntry>- Parameters:
o- the object to compare to- Returns:
- the result of comparison
-
hashCode
-
equals
-
toString
-