Class LocalFileHeader

java.lang.Object
com.pnfsoftware.jeb.util.encoding.zip.fsr.LocalFileHeader

public class LocalFileHeader extends Object
Representation of a local file header of a Zip file. At least 46 bytes.
  • Constructor Details

    • LocalFileHeader

      public LocalFileHeader()
  • Method Details

    • parse

      public static LocalFileHeader parse(SeekableByteChannel channel, int base) throws IOException
      Parse a local file header from a channel.
      Parameters:
      channel - input channel
      base - offset of the header signature
      Returns:
      parsed header
      Throws:
      IOException - if the header cannot be read
    • getFilename

      public String 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

      public String toString()
      Overrides:
      toString in class Object