Record Class TapeArchiveEntryHeader.UnixStandardEntryHeader

java.lang.Object
java.lang.Record
xyz.apollosoftware.bibliothiki.compression.formats.tar.TapeArchiveEntryHeader.UnixStandardEntryHeader
Record Components:
version - The UStar version number (should be "00").
userName - The name of the user that owns the file.
groupName - The name of the group that owns the file.
deviceMajorNumber - The major version number of the device (for special device files).
deviceMinorNumber - The minor version number of the device (for special device files).
filenamePrefix - The prefix to prepend to the filename.
Enclosing class:
TapeArchiveEntryHeader

public static record TapeArchiveEntryHeader.UnixStandardEntryHeader(short version, @Nullable String userName, @Nullable String groupName, long deviceMajorNumber, long deviceMinorNumber, @Nullable String filenamePrefix) extends Record
The UStar (UNIX Standard tar) format extends the nominal tar header to include additional fields.

These fields appear within the 255 bytes of the header record that would otherwise be NULL (when padding the header to 512 bytes).

  • Field Details

  • Constructor Details

    • UnixStandardEntryHeader

      public UnixStandardEntryHeader(short version, @Nullable String userName, @Nullable String groupName, long deviceMajorNumber, long deviceMinorNumber, @Nullable String filenamePrefix)
      Construct a UNIX Standard (UStar) header for a tar archive header.
      Parameters:
      version - The version of the header.
      userName - The name of the user that owns the entry.
      groupName - The name of the group that owns the entry.
      deviceMajorNumber - The major version number (for device files).
      deviceMinorNumber - The minor version number (for device files).
      filenamePrefix - The prefix to prepend to the name.
  • Method Details

    • builder

      Create a builder for a UStar header (TapeArchiveEntryHeader.UnixStandardEntryHeader).
      Returns:
      The TapeArchiveEntryHeader.UnixStandardEntryHeader.Builder.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • version

      public short version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • userName

      public @Nullable String userName()
      Returns the value of the userName record component.
      Returns:
      the value of the userName record component
    • groupName

      public @Nullable String groupName()
      Returns the value of the groupName record component.
      Returns:
      the value of the groupName record component
    • deviceMajorNumber

      public long deviceMajorNumber()
      Returns the value of the deviceMajorNumber record component.
      Returns:
      the value of the deviceMajorNumber record component
    • deviceMinorNumber

      public long deviceMinorNumber()
      Returns the value of the deviceMinorNumber record component.
      Returns:
      the value of the deviceMinorNumber record component
    • filenamePrefix

      public @Nullable String filenamePrefix()
      Returns the value of the filenamePrefix record component.
      Returns:
      the value of the filenamePrefix record component