uk.org.retep.util.io.tar
Enum TarHeaderType

java.lang.Object
  extended by java.lang.Enum<TarHeaderType>
      extended by uk.org.retep.util.io.tar.TarHeaderType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TarHeaderType>

public enum TarHeaderType
extends java.lang.Enum<TarHeaderType>

The header block type. These are grouped into four types, the standard ones, GNU extensions, known but unsupported types and user types.

Technically, the standards committee defines the standard ones to be of types other than 'A'..'Z' so unless they are known, the user types are of the format USER_# where # is the upper case letter. Only if we know the usual use for the extension do we break this, i.e. GNU_LONGNAME instead of USER_L

An entry below documented as unsupported simply means that this library does not support that entry

Author:
peter

Enum Constant Summary
AREGULAR_FILE
          Regular file (Standard POSIX)
BLOCK_SPECIAL
          Block special (Standard POSIX)
CHARACTER_SPECIAL
          Character special (Standard POSIX)
CONTTYPE
          Reserved in standard POSIX, Contiguous file in GNU
DIRECTORY
          Directory (Standard POSIX)
FIFO
          FIFO special (Standard POSIX)
GNU_DUMPDIR
          This is a dir entry that contains the names of files that were in the dir at the time the dump was made.
GNU_LONGLINK
          Identifies the *next* file on the tape as having a long linkname.
GNU_LONGNAME
          Identifies the *next* file on the tape as having a long name.
GNU_MULTIVOL
          This is the continuation of a file that began on another volume.
GNU_SPARSE
          Sparse files
GNU_VOLUME_HEADER
          This file is a tape/volume header.
INODE_ONLY
          Inode only, as in 'star'
LINK
          link (Standard POSIX)
OBSOLETE_GNU
          Obsolete GNU tar, for file names that do not fit into the main header
POSIX_SOALRIS_EXTENDED
          POSIX 1003.1-2001 eXtended (VU version), Solaris extended header.
REGULAR_FILE
          Regular file (Standard POSIX)
SOLARIS_ACL
          Solaris Access Control List
SOLARIS_EAF
          Solaris Extended Attribute File
SYM
          Reserved in standard POSIX, Symbolic link in GNU
USER_B
          User extension B
USER_C
          User extension C
USER_F
          User extension F
USER_G
          User extension G
USER_H
          User extension H
USER_J
          User extension J
USER_O
          User extension O
USER_P
          User extension P
USER_Q
          User extension Q
USER_R
          User extension R
USER_T
          User extension T
USER_U
          User extension U
USER_W
          User extension W
USER_Y
          User extension Y
USER_Z
          User extension Z
XGLTYPE
          Global extended header (Standard POSIX)
XHDTYPE
          Extended header referring to the next file in the archive (Standard POSIX)
 
Method Summary
 char getType()
           
 void put(java.nio.ByteBuffer buffer)
           
static void skip(java.nio.ByteBuffer buffer)
          Move the Buffer.position() ahead to skip this value
static TarHeaderType valueOf(java.nio.ByteBuffer buffer)
           
static TarHeaderType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TarHeaderType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

REGULAR_FILE

public static final TarHeaderType REGULAR_FILE
Regular file (Standard POSIX)


AREGULAR_FILE

public static final TarHeaderType AREGULAR_FILE
Regular file (Standard POSIX)


LINK

public static final TarHeaderType LINK
link (Standard POSIX)


SYM

public static final TarHeaderType SYM
Reserved in standard POSIX, Symbolic link in GNU


CHARACTER_SPECIAL

public static final TarHeaderType CHARACTER_SPECIAL
Character special (Standard POSIX)


BLOCK_SPECIAL

public static final TarHeaderType BLOCK_SPECIAL
Block special (Standard POSIX)


DIRECTORY

public static final TarHeaderType DIRECTORY
Directory (Standard POSIX)


FIFO

public static final TarHeaderType FIFO
FIFO special (Standard POSIX)


CONTTYPE

public static final TarHeaderType CONTTYPE
Reserved in standard POSIX, Contiguous file in GNU


XHDTYPE

public static final TarHeaderType XHDTYPE
Extended header referring to the next file in the archive (Standard POSIX)


XGLTYPE

public static final TarHeaderType XGLTYPE
Global extended header (Standard POSIX)


SOLARIS_ACL

@Unsupported
public static final TarHeaderType SOLARIS_ACL
Solaris Access Control List


USER_B

@Unsupported
public static final TarHeaderType USER_B
User extension B


USER_C

@Unsupported
public static final TarHeaderType USER_C
User extension C


GNU_DUMPDIR

public static final TarHeaderType GNU_DUMPDIR
This is a dir entry that contains the names of files that were in the dir at the time the dump was made.


SOLARIS_EAF

@Unsupported
public static final TarHeaderType SOLARIS_EAF
Solaris Extended Attribute File


USER_F

@Unsupported
public static final TarHeaderType USER_F
User extension F


USER_G

@Unsupported
public static final TarHeaderType USER_G
User extension G


USER_H

@Unsupported
public static final TarHeaderType USER_H
User extension H


INODE_ONLY

@Unsupported
public static final TarHeaderType INODE_ONLY
Inode only, as in 'star'


USER_J

@Unsupported
public static final TarHeaderType USER_J
User extension J


GNU_LONGLINK

public static final TarHeaderType GNU_LONGLINK
Identifies the *next* file on the tape as having a long linkname.


GNU_LONGNAME

public static final TarHeaderType GNU_LONGNAME
Identifies the *next* file on the tape as having a long name.


GNU_MULTIVOL

public static final TarHeaderType GNU_MULTIVOL
This is the continuation of a file that began on another volume.


OBSOLETE_GNU

public static final TarHeaderType OBSOLETE_GNU
Obsolete GNU tar, for file names that do not fit into the main header


USER_O

@Unsupported
public static final TarHeaderType USER_O
User extension O


USER_P

@Unsupported
public static final TarHeaderType USER_P
User extension P


USER_Q

@Unsupported
public static final TarHeaderType USER_Q
User extension Q


USER_R

@Unsupported
public static final TarHeaderType USER_R
User extension R


GNU_SPARSE

public static final TarHeaderType GNU_SPARSE
Sparse files


USER_T

@Unsupported
public static final TarHeaderType USER_T
User extension T


USER_U

@Unsupported
public static final TarHeaderType USER_U
User extension U


GNU_VOLUME_HEADER

public static final TarHeaderType GNU_VOLUME_HEADER
This file is a tape/volume header. Ignore it on extraction.


USER_W

@Unsupported
public static final TarHeaderType USER_W
User extension W


POSIX_SOALRIS_EXTENDED

@Unsupported
public static final TarHeaderType POSIX_SOALRIS_EXTENDED
POSIX 1003.1-2001 eXtended (VU version), Solaris extended header.


USER_Y

@Unsupported
public static final TarHeaderType USER_Y
User extension Y


USER_Z

@Unsupported
public static final TarHeaderType USER_Z
User extension Z

Method Detail

values

public static TarHeaderType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TarHeaderType c : TarHeaderType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TarHeaderType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getType

public char getType()

put

public void put(java.nio.ByteBuffer buffer)

skip

public static void skip(java.nio.ByteBuffer buffer)
Move the Buffer.position() ahead to skip this value

Parameters:
buffer -

valueOf

public static TarHeaderType valueOf(java.nio.ByteBuffer buffer)


Copyright © 1998-2010 Retep Development Group. All Rights Reserved.