Class CentralDirFileHeader

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

public class CentralDirFileHeader extends Object
Representation of the central directory header of a Zip file. At least 46 bytes.
  • Constructor Details

    • CentralDirFileHeader

      public CentralDirFileHeader()
  • Method Details

    • parse

      public static CentralDirFileHeader parse(SeekableByteChannel channel, int base) throws IOException
      Parse a central directory 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
    • toString

      public String toString()
      Overrides:
      toString in class Object