Class LocalFileHeader
java.lang.Object
com.pnfsoftware.jeb.util.encoding.zip.fsr.LocalFileHeader
Representation of a local file header of a Zip file. At least 46 bytes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the entry file name decoded as UTF-8.booleanDetermine whether this local header is followed by a data descriptor.booleanDetermine whether the entry is flagged as encrypted.static LocalFileHeaderparse(SeekableByteChannel channel, int base) Parse a local file header from a channel.toString()
-
Constructor Details
-
LocalFileHeader
public LocalFileHeader()
-
-
Method Details
-
parse
Parse a local file header from a channel.- Parameters:
channel- input channelbase- offset of the header signature- Returns:
- parsed header
- Throws:
IOException- if the header cannot be read
-
getFilename
Get the entry file name decoded as UTF-8.- Returns:
- entry file name
-
isEncrypted
public boolean isEncrypted()Determine whether the entry is flagged as encrypted.- Returns:
- true if the encryption flag is set
-
hasDataDescriptor
public boolean hasDataDescriptor()Determine whether this local header is followed by a data descriptor.- Returns:
- true if bit 3 of the general-purpose flag is set
-
toString
-