- All Implemented Interfaces:
Serializable
,Comparable<TarHeaderField>
,Constable
Purely static structure defining our interface to the Tar Entry Header.
The fields controlled here are fields for the individual tar file entries
in an archive. There is no such thing as a Header Field at the top archive
level.
We use header field names as they are specified in the FreeBSD man page for tar in section 5 (Solaris and Linux have no such page in section 5). Where we use a constant, the constant name is just the FreeBSD field name capitalized. Since a single field is known as either "linkflag" or "typeflag", we are going with the UStar name typeflag for this field.
We purposefully define no variable for this list of fields, since we DO NOT WANT TO access or change these values, due to application goals or JVM limitations:
- gid
- uid
- linkname
- magic (UStar ID),
- magic version
- group name
- device major num
- device minor num
This class will be very elegant when refactored as an enum with enumMap(s) and using generics with auto-boxing instead of the ugly and non-validating casts.
- Author:
- Blaine Simpson (blaine dot simpson at admc dot com)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionint
getStart()
int
getStop()
static TarHeaderField
Returns the enum constant of this class with the specified name.static TarHeaderField[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
name
-
mode
-
uid
-
gid
-
size
-
mtime
-
checksum
-
typeflag
-
magic
-
uname
-
gname
-
prefix
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getStart
public int getStart() -
getStop
public int getStop()
-