Module org.hsqldb

Enum Class TarHeaderField

java.lang.Object
java.lang.Enum<TarHeaderField>
org.hsqldb.lib.tar.TarHeaderField
All Implemented Interfaces:
Serializable, Comparable<TarHeaderField>, Constable

public enum TarHeaderField extends Enum<TarHeaderField>
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
Our application has no use for these, or Java has no ability to work with them.

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)
  • Enum Constant Details

  • Method Details

    • values

      public static TarHeaderField[] 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

      public static TarHeaderField valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getStart

      public int getStart()
    • getStop

      public int getStop()