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).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe builder forTapeArchiveEntryHeader.UnixStandardEntryHeader. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe ASCII bytes for 'ustar' are used as the indicator for aTapeArchiveEntryHeader.UnixStandardEntryHeader. -
Constructor Summary
ConstructorsConstructorDescriptionUnixStandardEntryHeader(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. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull TapeArchiveEntryHeader.UnixStandardEntryHeader.Builderbuilder()Create a builder for a UStar header (TapeArchiveEntryHeader.UnixStandardEntryHeader).longReturns the value of thedeviceMajorNumberrecord component.longReturns the value of thedeviceMinorNumberrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable StringReturns the value of thefilenamePrefixrecord component.@Nullable StringReturns the value of thegroupNamerecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.@Nullable StringuserName()Returns the value of theuserNamerecord component.shortversion()Returns the value of theversionrecord component.
-
Field Details
-
INDICATOR
The ASCII bytes for 'ustar' are used as the indicator for aTapeArchiveEntryHeader.UnixStandardEntryHeader.- See Also:
-
-
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
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
version
-
userName
-
groupName
-
deviceMajorNumber
public long deviceMajorNumber()Returns the value of thedeviceMajorNumberrecord component.- Returns:
- the value of the
deviceMajorNumberrecord component
-
deviceMinorNumber
public long deviceMinorNumber()Returns the value of thedeviceMinorNumberrecord component.- Returns:
- the value of the
deviceMinorNumberrecord component
-
filenamePrefix
Returns the value of thefilenamePrefixrecord component.- Returns:
- the value of the
filenamePrefixrecord component
-