Class FileHeader


public class FileHeader extends BlockHeader
DOCUMENT ME
  • Constructor Details

  • Method Details

    • print

      public void print()
      Overrides:
      print in class BlockHeader
    • getArchivalTime

      public FileTime getArchivalTime()
      The time in which the file was archived. Corresponds to te arcTime field.
      Returns:
      the timestamp, or null if absent.
    • setArchivalTime

      public void setArchivalTime(FileTime archivalTime)
      Sets the time in which the file was archived. Corresponds to te arcTime field.
      Parameters:
      archivalTime - the timestamp, or null to clear it.
    • getArcTime

      public Date getArcTime()
      Gets getArchivalTime() as a Date. The maximum granularity is reduced from microseconds to milliseconds.
      Returns:
      the date, or null if absent.
    • setArcTime

      public void setArcTime(Date arcTime)
      Parameters:
      arcTime - the date, or null to clear it.
    • getLastAccessTime

      public FileTime getLastAccessTime()
      The time in which the file was last accessed. Corresponds to te aTime field.
      Returns:
      the timestamp, or null if absent.
    • setLastAccessTime

      public void setLastAccessTime(FileTime time)
      Sets the time in which the file was last accessed. Corresponds to te aTime field.
      Parameters:
      time - the timestamp, or null to clear it.
    • getATime

      public Date getATime()
      Gets getLastAccessTime() as a Date. The maximum granularity is reduced from microseconds to milliseconds.
      Returns:
      the date, or null if absent.
    • setATime

      public void setATime(Date time)
      Parameters:
      time - the date, or null to clear it.
    • getCreationTime

      public FileTime getCreationTime()
      The time in which the file was created. Corresponds to te cTime field.
      Returns:
      the timestamp, or null if absent.
    • setCreationTime

      public void setCreationTime(FileTime time)
      Sets the time in which the file was created. Corresponds to te cTime field.
      Parameters:
      time - the timestamp, or null to clear it.
    • getCTime

      public Date getCTime()
      Gets getCreationTime() as a Date. The maximum granularity is reduced from microseconds to milliseconds.
      Returns:
      the date, or null if absent.
    • setCTime

      public void setCTime(Date time)
      Parameters:
      time - the date, or null to clear it.
    • getFileAttr

      public int getFileAttr()
    • setFileAttr

      public void setFileAttr(int fileAttr)
    • getFileCRC

      public int getFileCRC()
    • getFileNameByteArray

      public byte[] getFileNameByteArray()
    • getFileNameString

      @Deprecated public String getFileNameString()
      Deprecated.
      As of 7.2.0, replaced by getFileName()
      The ASCII filename.
      Returns:
      the ASCII filename
    • setFileName

      public void setFileName(String fileName)
    • getFileNameW

      @Deprecated public String getFileNameW()
      Deprecated.
      As of 7.2.0, replaced by getFileName()
      The unicode filename.
      Returns:
      the Unicode filename, or null if the filename is ASCII only
    • setFileNameW

      public void setFileNameW(String fileNameW)
    • getHighPackSize

      public int getHighPackSize()
    • getHighUnpackSize

      public int getHighUnpackSize()
    • getHostOS

      public HostSystem getHostOS()
    • getLastModifiedTime

      public FileTime getLastModifiedTime()
      The time in which the file was last modified. Corresponds to te mTime field.
      Returns:
      the timestamp, or null if absent.
    • setLastModifiedTime

      public void setLastModifiedTime(FileTime time)
      Sets the time in which the file was last modified. Corresponds to te mTime field.
      Parameters:
      time - the timestamp, or null to clear it.
    • getMTime

      public Date getMTime()
      Gets getLastModifiedTime() as a Date. The maximum granularity is reduced from microseconds to milliseconds.
      Returns:
      the date, or null if absent.
    • setMTime

      public void setMTime(Date time)
      Parameters:
      time - the date, or null to clear it.
    • getNameSize

      public short getNameSize()
    • getRecoverySectors

      public int getRecoverySectors()
    • getSalt

      public byte[] getSalt()
    • getSubData

      public byte[] getSubData()
    • getSubFlags

      public int getSubFlags()
    • getUnpMethod

      public byte getUnpMethod()
    • getUnpSize

      public long getUnpSize()
    • getUnpVersion

      public byte getUnpVersion()
    • getFullPackSize

      public long getFullPackSize()
    • getFullUnpackSize

      public long getFullUnpackSize()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isSplitAfter

      public boolean isSplitAfter()
      the file will be continued in the next archive part
      Returns:
      isSplitAfter
    • isSplitBefore

      public boolean isSplitBefore()
      the file is continued in this archive
      Returns:
      isSplitBefore
    • isSolid

      public boolean isSolid()
      this file is compressed as solid (all files handeled as one)
      Returns:
      isSolid
    • isEncrypted

      public boolean isEncrypted()
      the file is encrypted
      Returns:
      isEncrypted
    • isUnicode

      public boolean isUnicode()
      the filename is also present in unicode
      Returns:
      isUnicode
    • isFileHeader

      public boolean isFileHeader()
    • hasSalt

      public boolean hasSalt()
    • hasExtTime

      public boolean hasExtTime()
    • isLargeBlock

      public boolean isLargeBlock()
    • isDirectory

      public boolean isDirectory()
      whether this fileheader represents a directory
      Returns:
      isDirectory
    • getFileName

      public String getFileName()
      The filename either in Unicode or ASCII.
      Returns:
      the Unicode filename if it exists, else the ASCII filename
      Since:
      7.2.0