Package org.apache.commons.compress.archivers.tar

# Interface TarConstants

All Known Implementing Classes:
  `TarArchiveEntry`, `TarArchiveSparseEntry`

public interface TarConstants
This interface contains all the definitions used in the package. For tar formats (FORMAT_OLDGNU, FORMAT_POSIX, etc.) see GNU tar tar.h type enum archive_format

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `ATIMELEN_GNU`
  The length of the access time field in an old GNU header buffer.
  `static final int`
  `ATIMELEN_XSTAR`
  The length of the access time field in a xstar header buffer.
  `static final int`
  `CHKSUM_OFFSET`
  Offset of the checksum field within header record.
  `static final int`
  `CHKSUMLEN`
  The length of the checksum field in a header buffer.
  `static final int`
  `CTIMELEN_GNU`
  The length of the created time field in an old GNU header buffer.
  `static final int`
  `CTIMELEN_XSTAR`
  The length of the created time field in a xstar header buffer.
  `static final int`
  `DEFAULT_BLKSIZE`
  Default block size
  `static final int`
  `DEFAULT_RCDSIZE`
  Default record size
  `static final int`
  `DEVLEN`
  The length of each of the device fields (major and minor) in a header buffer.
  `static final int`
  `FORMAT_OLDGNU`
  GNU format as per before tar 1.12.
  `static final int`
  `FORMAT_POSIX`
  Pure Posix format.
  `static final int`
  `FORMAT_XSTAR`
  xstar format used by Jörg Schilling's star.
  `static final int`
  `GIDLEN`
  The length of the group id field in a header buffer.
  `static final int`
  `GNAMELEN`
  The length of the group name field in a header buffer.
  `static final String`
  `GNU_LONGLINK`
  The name of the GNU tar entry which contains a long name.
  `static final int`
  `ISEXTENDEDLEN_GNU`
  The length of the is extension field in an old GNU header buffer.
  `static final int`
  `ISEXTENDEDLEN_GNU_SPARSE`
  The length of the is extension field in a sparse header buffer.
  `static final byte`
  `LF_BLK`
  Block device file type.
  `static final byte`
  `LF_CHR`
  Character device file type.
  `static final byte`
  `LF_CONTIG`
  Contiguous file type.
  `static final byte`
  `LF_DIR`
  Directory file type.
  `static final byte`
  `LF_FIFO`
  FIFO (pipe) file type.
  `static final byte`
  `LF_GNUTYPE_LONGLINK`
  Identifies the *next* file on the tape as having a long link name.
  `static final byte`
  `LF_GNUTYPE_LONGNAME`
  Identifies the *next* file on the tape as having a long name.
  `static final byte`
  `LF_GNUTYPE_SPARSE`
  Sparse file type.
  `static final byte`
  `LF_LINK`
  Link file type.
  `static final byte`
  `LF_MULTIVOLUME`
  Identifies the entry as a multi-volume past volume #0
  `static final byte`
  `LF_NORMAL`
  Normal file type.
  `static final int`
  `LF_OFFSET`
  Offset inside the header for the "link flag" field.
  `static final byte`
  `LF_OLDNORM`
  LF_ constants represent the "link flag" of an entry, or more commonly, the "entry type".
  `static final byte`
  `LF_PAX_EXTENDED_HEADER_LC`
  Identifies the entry as a Pax extended header.
  `static final byte`
  `LF_PAX_EXTENDED_HEADER_UC`
  Identifies the entry as a Pax extended header (SunOS tar -E).
  `static final byte`
  `LF_PAX_GLOBAL_EXTENDED_HEADER`
  Identifies the entry as a Pax global extended header.
  `static final byte`
  `LF_SYMLINK`
  Symbolic link file type.
  `static final int`
  `LONGNAMESLEN_GNU`
  The length of the long names field in an old GNU header buffer.
  `static final String`
  `MAGIC_ANT`
  The magic tag representing an Ant tar archive.
  `static final String`
  `MAGIC_GNU`
  The magic tag representing a GNU tar archive.
  `static final int`
  `MAGIC_OFFSET`
  Offset of start of magic field within header record
  `static final String`
  `MAGIC_POSIX`
  The magic tag representing a POSIX tar archive.
  `static final String`
  `MAGIC_XSTAR`
  The magix string used in the last four bytes of the header to identify the xstar format.
  `static final int`
  `MAGICLEN`
  The length of the magic field in a header buffer.
  `static final long`
  `MAXID`
  The maximum value of gid/uid in a tar archive which can be expressed in octal char notation (that's 7 sevens, octal).
  `static final long`
  `MAXSIZE`
  The maximum size of a file in a tar archive which can be expressed in octal char notation (that's 11 sevens, octal).
  `static final int`
  `MODELEN`
  The length of the mode field in a header buffer.
  `static final int`
  `MODTIMELEN`
  The length of the modification time field in a header buffer.
  `static final int`
  `NAMELEN`
  The length of the name field in a header buffer.
  `static final int`
  `OFFSETLEN_GNU`
  The length of the multivolume start offset field in an old GNU header buffer.
  `static final int`
  `PAD2LEN_GNU`
  The length of the padding field in an old GNU header buffer.
  `static final int`
  `PREFIXLEN`
  Length of the prefix field.
  `static final int`
  `PREFIXLEN_XSTAR`
  Length of the prefix field in xstar archives.
  `static final int`
  `REALSIZELEN_GNU`
  The length of the real size field in an old GNU header buffer.
  `static final int`
  `SIZELEN`
  The length of the size field in a header buffer.
  `static final int`
  `SPARSE_HEADERS_IN_EXTENSION_HEADER`
  The number of sparse headers in an extension header
  `static final int`
  `SPARSE_HEADERS_IN_OLDGNU_HEADER`
  The number of sparse headers in an old GNU header
  `static final int`
  `SPARSE_NUMBYTES_LEN`
  The length of numbytes in struct sparse
  `static final int`
  `SPARSE_OFFSET_LEN`
  The length of offset in struct sparse
  `static final int`
  `SPARSELEN_GNU`
  The sum of the length of all sparse headers in an old GNU header buffer.
  `static final int`
  `SPARSELEN_GNU_SPARSE`
  The sum of the length of all sparse headers in a sparse header buffer.
  `static final int`
  `UIDLEN`
  The length of the user id field in a header buffer.
  `static final int`
  `UNAMELEN`
  The length of the user name field in a header buffer.
  `static final String`
  `VERSION_ANT`
  The "version" representing an Ant tar archive.
  `static final String`
  `VERSION_GNU_SPACE`
  One of two possible GNU versions
  `static final String`
  `VERSION_GNU_ZERO`
  One of two possible GNU versions
  `static final int`
  `VERSION_OFFSET`
  Offset of start of magic field within header record
  `static final String`
  `VERSION_POSIX`
  `static final int`
  `VERSIONLEN`
  Previously this was regarded as part of "magic" field, but it is separate.
  `static final int`
  `XSTAR_ATIME_OFFSET`
  Offset inside the header for the atime field in xstar archives.
  `static final int`
  `XSTAR_CTIME_OFFSET`
  Offset inside the header for the ctime field in xstar archives.
  `static final int`
  `XSTAR_MAGIC_LEN`
  Length of the XSTAR magic.
  `static final int`
  `XSTAR_MAGIC_OFFSET`
  Offset inside the header for the xstar magic bytes.
  `static final int`
  `XSTAR_MULTIVOLUME_OFFSET`
  Offset inside the header for the xtar multivolume data
  `static final int`
  `XSTAR_PREFIX_OFFSET`
  Offset inside the header for the prefix field in xstar archives.

- ## Field Details

  - ### DEFAULT_RCDSIZE

    static final int DEFAULT_RCDSIZE
    Default record size
    See Also:
      - Constant Field Values

  - ### DEFAULT_BLKSIZE

    static final int DEFAULT_BLKSIZE
    Default block size
    See Also:
      - Constant Field Values

  - ### FORMAT_OLDGNU

    static final int FORMAT_OLDGNU
    GNU format as per before tar 1.12.
    See Also:
      - Constant Field Values

  - ### FORMAT_POSIX

    static final int FORMAT_POSIX
    Pure Posix format.
    See Also:
      - Constant Field Values

  - ### FORMAT_XSTAR

    static final int FORMAT_XSTAR
    xstar format used by Jörg Schilling's star.
    See Also:
      - Constant Field Values

  - ### NAMELEN

    static final int NAMELEN
    The length of the name field in a header buffer.
    See Also:
      - Constant Field Values

  - ### MODELEN

    static final int MODELEN
    The length of the mode field in a header buffer.
    See Also:
      - Constant Field Values

  - ### UIDLEN

    static final int UIDLEN
    The length of the user id field in a header buffer.
    See Also:
      - Constant Field Values

  - ### GIDLEN

    static final int GIDLEN
    The length of the group id field in a header buffer.
    See Also:
      - Constant Field Values

  - ### MAXID

    static final long MAXID
    The maximum value of gid/uid in a tar archive which can be expressed in octal char notation (that's 7 sevens, octal).
    See Also:
      - Constant Field Values

  - ### CHKSUMLEN

    static final int CHKSUMLEN
    The length of the checksum field in a header buffer.
    See Also:
      - Constant Field Values

  - ### CHKSUM_OFFSET

    static final int CHKSUM_OFFSET
    Offset of the checksum field within header record.
    Since:
      1.5
    See Also:
      - Constant Field Values

  - ### SIZELEN

    static final int SIZELEN
    The length of the size field in a header buffer. Includes the trailing space or NUL.
    See Also:
      - Constant Field Values

  - ### MAXSIZE

    static final long MAXSIZE
    The maximum size of a file in a tar archive which can be expressed in octal char notation (that's 11 sevens, octal).
    See Also:
      - Constant Field Values

  - ### MAGIC_OFFSET

    static final int MAGIC_OFFSET
    Offset of start of magic field within header record
    See Also:
      - Constant Field Values

  - ### MAGICLEN

    static final int MAGICLEN
    The length of the magic field in a header buffer.
    See Also:
      - Constant Field Values

  - ### VERSION_OFFSET

    static final int VERSION_OFFSET
    Offset of start of magic field within header record
    See Also:
      - Constant Field Values

  - ### VERSIONLEN

    static final int VERSIONLEN
    Previously this was regarded as part of "magic" field, but it is separate.
    See Also:
      - Constant Field Values

  - ### MODTIMELEN

    static final int MODTIMELEN
    The length of the modification time field in a header buffer.
    See Also:
      - Constant Field Values

  - ### UNAMELEN

    static final int UNAMELEN
    The length of the user name field in a header buffer.
    See Also:
      - Constant Field Values

  - ### GNAMELEN

    static final int GNAMELEN
    The length of the group name field in a header buffer.
    See Also:
      - Constant Field Values

  - ### DEVLEN

    static final int DEVLEN
    The length of each of the device fields (major and minor) in a header buffer.
    See Also:
      - Constant Field Values

  - ### PREFIXLEN

    static final int PREFIXLEN
    Length of the prefix field.
    See Also:
      - Constant Field Values

  - ### ATIMELEN_GNU

    static final int ATIMELEN_GNU
    The length of the access time field in an old GNU header buffer.
    See Also:
      - Constant Field Values

  - ### CTIMELEN_GNU

    static final int CTIMELEN_GNU
    The length of the created time field in an old GNU header buffer.
    See Also:
      - Constant Field Values

  - ### OFFSETLEN_GNU

    static final int OFFSETLEN_GNU
    The length of the multivolume start offset field in an old GNU header buffer.
    See Also:
      - Constant Field Values

  - ### LONGNAMESLEN_GNU

    static final int LONGNAMESLEN_GNU
    The length of the long names field in an old GNU header buffer.
    See Also:
      - Constant Field Values

  - ### PAD2LEN_GNU

    static final int PAD2LEN_GNU
    The length of the padding field in an old GNU header buffer.
    See Also:
      - Constant Field Values

  - ### SPARSELEN_GNU

    static final int SPARSELEN_GNU
    The sum of the length of all sparse headers in an old GNU header buffer.
    See Also:
      - Constant Field Values

  - ### ISEXTENDEDLEN_GNU

    static final int ISEXTENDEDLEN_GNU
    The length of the is extension field in an old GNU header buffer.
    See Also:
      - Constant Field Values

  - ### REALSIZELEN_GNU

    static final int REALSIZELEN_GNU
    The length of the real size field in an old GNU header buffer.
    See Also:
      - Constant Field Values

  - ### SPARSE_OFFSET_LEN

    static final int SPARSE_OFFSET_LEN
    The length of offset in struct sparse
    Since:
      1.20
    See Also:
      - Constant Field Values

  - ### SPARSE_NUMBYTES_LEN

    static final int SPARSE_NUMBYTES_LEN
    The length of numbytes in struct sparse
    Since:
      1.20
    See Also:
      - Constant Field Values

  - ### SPARSE_HEADERS_IN_OLDGNU_HEADER

    static final int SPARSE_HEADERS_IN_OLDGNU_HEADER
    The number of sparse headers in an old GNU header
    Since:
      1.20
    See Also:
      - Constant Field Values

  - ### SPARSE_HEADERS_IN_EXTENSION_HEADER

    static final int SPARSE_HEADERS_IN_EXTENSION_HEADER
    The number of sparse headers in an extension header
    Since:
      1.20
    See Also:
      - Constant Field Values

  - ### SPARSELEN_GNU_SPARSE

    static final int SPARSELEN_GNU_SPARSE
    The sum of the length of all sparse headers in a sparse header buffer.
    See Also:
      - Constant Field Values

  - ### ISEXTENDEDLEN_GNU_SPARSE

    static final int ISEXTENDEDLEN_GNU_SPARSE
    The length of the is extension field in a sparse header buffer.
    See Also:
      - Constant Field Values

  - ### LF_OLDNORM

    static final byte LF_OLDNORM
    LF_ constants represent the "link flag" of an entry, or more commonly, the "entry type". This is the "old way" of indicating a normal file.
    See Also:
      - Constant Field Values

  - ### LF_OFFSET

    static final int LF_OFFSET
    Offset inside the header for the "link flag" field.
    Since:
      1.22
    See Also:
      - `TarArchiveEntry`
      - Constant Field Values

  - ### LF_NORMAL

    static final byte LF_NORMAL
    Normal file type.
    See Also:
      - Constant Field Values

  - ### LF_LINK

    static final byte LF_LINK
    Link file type.
    See Also:
      - Constant Field Values

  - ### LF_SYMLINK

    static final byte LF_SYMLINK
    Symbolic link file type.
    See Also:
      - Constant Field Values

  - ### LF_CHR

    static final byte LF_CHR
    Character device file type.
    See Also:
      - Constant Field Values

  - ### LF_BLK

    static final byte LF_BLK
    Block device file type.
    See Also:
      - Constant Field Values

  - ### LF_DIR

    static final byte LF_DIR
    Directory file type.
    See Also:
      - Constant Field Values

  - ### LF_FIFO

    static final byte LF_FIFO
    FIFO (pipe) file type.
    See Also:
      - Constant Field Values

  - ### LF_CONTIG

    static final byte LF_CONTIG
    Contiguous file type.
    See Also:
      - Constant Field Values

  - ### LF_GNUTYPE_LONGLINK

    static final byte LF_GNUTYPE_LONGLINK
    Identifies the *next* file on the tape as having a long link name.
    See Also:
      - Constant Field Values

  - ### LF_GNUTYPE_LONGNAME

    static final byte LF_GNUTYPE_LONGNAME
    Identifies the *next* file on the tape as having a long name.
    See Also:
      - Constant Field Values

  - ### LF_GNUTYPE_SPARSE

    static final byte LF_GNUTYPE_SPARSE
    Sparse file type.
    Since:
      1.1.1
    See Also:
      - Constant Field Values

  - ### LF_PAX_EXTENDED_HEADER_LC

    static final byte LF_PAX_EXTENDED_HEADER_LC
    Identifies the entry as a Pax extended header.
    Since:
      1.1
    See Also:
      - Constant Field Values

  - ### LF_PAX_EXTENDED_HEADER_UC

    static final byte LF_PAX_EXTENDED_HEADER_UC
    Identifies the entry as a Pax extended header (SunOS tar -E).
    Since:
      1.1
    See Also:
      - Constant Field Values

  - ### LF_PAX_GLOBAL_EXTENDED_HEADER

    static final byte LF_PAX_GLOBAL_EXTENDED_HEADER
    Identifies the entry as a Pax global extended header.
    Since:
      1.1
    See Also:
      - Constant Field Values

  - ### LF_MULTIVOLUME

    static final byte LF_MULTIVOLUME
    Identifies the entry as a multi-volume past volume #0
    Since:
      1.22
    See Also:
      - Constant Field Values

  - ### MAGIC_POSIX

    static final String MAGIC_POSIX
    The magic tag representing a POSIX tar archive.
    See Also:
      - Constant Field Values

  - ### VERSION_POSIX

    static final String VERSION_POSIX
    See Also:
      - Constant Field Values

  - ### MAGIC_GNU

    static final String MAGIC_GNU
    The magic tag representing a GNU tar archive.
    See Also:
      - Constant Field Values

  - ### VERSION_GNU_SPACE

    static final String VERSION_GNU_SPACE
    One of two possible GNU versions
    See Also:
      - Constant Field Values

  - ### VERSION_GNU_ZERO

    static final String VERSION_GNU_ZERO
    One of two possible GNU versions
    See Also:
      - Constant Field Values

  - ### MAGIC_ANT

    static final String MAGIC_ANT
    The magic tag representing an Ant tar archive.
    Since:
      1.1
    See Also:
      - Constant Field Values

  - ### VERSION_ANT

    static final String VERSION_ANT
    The "version" representing an Ant tar archive.
    Since:
      1.1
    See Also:
      - Constant Field Values

  - ### GNU_LONGLINK

    static final String GNU_LONGLINK
    The name of the GNU tar entry which contains a long name.
    See Also:
      - Constant Field Values

  - ### MAGIC_XSTAR

    static final String MAGIC_XSTAR
    The magix string used in the last four bytes of the header to identify the xstar format.
    Since:
      1.11
    See Also:
      - Constant Field Values

  - ### XSTAR_MULTIVOLUME_OFFSET

    static final int XSTAR_MULTIVOLUME_OFFSET
    Offset inside the header for the xtar multivolume data
    Since:
      1.22
    See Also:
      - `TarArchiveEntry`
      - Constant Field Values

  - ### XSTAR_MAGIC_OFFSET

    static final int XSTAR_MAGIC_OFFSET
    Offset inside the header for the xstar magic bytes.
    Since:
      1.11
    See Also:
      - Constant Field Values

  - ### XSTAR_MAGIC_LEN

    static final int XSTAR_MAGIC_LEN
    Length of the XSTAR magic.
    Since:
      1.11
    See Also:
      - Constant Field Values

  - ### PREFIXLEN_XSTAR

    static final int PREFIXLEN_XSTAR
    Length of the prefix field in xstar archives.
    Since:
      1.11
    See Also:
      - Constant Field Values

  - ### XSTAR_PREFIX_OFFSET

    static final int XSTAR_PREFIX_OFFSET
    Offset inside the header for the prefix field in xstar archives.
    Since:
      1.22
    See Also:
      - `TarArchiveEntry`
      - Constant Field Values

  - ### XSTAR_ATIME_OFFSET

    static final int XSTAR_ATIME_OFFSET
    Offset inside the header for the atime field in xstar archives.
    Since:
      1.22
    See Also:
      - `TarArchiveEntry`
      - Constant Field Values

  - ### ATIMELEN_XSTAR

    static final int ATIMELEN_XSTAR
    The length of the access time field in a xstar header buffer.
    Since:
      1.11
    See Also:
      - Constant Field Values

  - ### XSTAR_CTIME_OFFSET

    static final int XSTAR_CTIME_OFFSET
    Offset inside the header for the ctime field in xstar archives.
    Since:
      1.22
    See Also:
      - `TarArchiveEntry`
      - Constant Field Values

  - ### CTIMELEN_XSTAR

    static final int CTIMELEN_XSTAR
    The length of the created time field in a xstar header buffer.
    Since:
      1.11
    See Also:
      - Constant Field Values