| java.lang.Object installer.TarHeader
TarHeader | public class TarHeader extends Object (Code) | | This class encapsulates the Tar Entry Header used in Tar Archives.
The class also holds a number of tar constants, used mostly in headers.
|
Field Summary | |
final public static int | CHKSUMLEN The length of the checksum field in a header buffer. | final public static int | DEVLEN The length of the devices field in a header buffer. | final public static int | GIDLEN The length of the group id field in a header buffer. | final public static int | GNAMELEN The length of the group name field in a header buffer. | final public static String | GNU_TMAGIC The magic tag representing a GNU tar archive. | final public static byte | LF_BLK Block device file type. | final public static byte | LF_CHR Character device file type. | final public static byte | LF_CONTIG Contiguous file type. | final public static byte | LF_DIR Directory file type. | final public static byte | LF_FIFO FIFO (pipe) file type. | final public static byte | LF_LINK Link file type. | final public static byte | LF_NORMAL Normal file type. | final public static byte | LF_OLDNORM LF_ constants represent the "link flag" of an entry, or more commonly,
the "entry type". | final public static byte | LF_SYMLINK Symbolic link file type. | final public static int | MAGICLEN The length of the magic field in a header buffer. | final public static int | MODELEN The length of the mode field in a header buffer. | final public static int | MODTIMELEN The length of the modification time field in a header buffer. | final public static int | NAMELEN The length of the name field in a header buffer. | final public static int | SIZELEN The length of the size field in a header buffer. | final public static String | TMAGIC The magic tag representing a POSIX tar archive. | final public static int | UIDLEN The length of the user id field in a header buffer. | final public static int | UNAMELEN The length of the user name field in a header buffer. | public int | checkSum The entry's checksum. | public int | devMajor The entry's major device number. | public int | devMinor The entry's minor device number. | public int | groupId The entry's group id. | public StringBuffer | groupName The entry's group name. | public byte | linkFlag The entry's link flag. | public StringBuffer | linkName The entry's link name. | public StringBuffer | magic The entry's magic tag. | public long | modTime The entry's modification time. | public int | mode The entry's permission mode. | public StringBuffer | name The entry's name. | public long | size The entry's size. | public int | userId The entry's user id. | public StringBuffer | userName The entry's user name. |
Method Summary | |
public Object | clone() TarHeaders can be cloned. | public static int | getCheckSumOctalBytes(long value, byte[] buf, int offset, int length) Parse the checksum octal integer from a header buffer.
Parameters: header - The header buffer from which to parse. Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. | public static int | getLongOctalBytes(long value, byte[] buf, int offset, int length) Parse an octal long integer from a header buffer.
Parameters: header - The header buffer from which to parse. Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. | public String | getName() Get the name of this entry. | public static int | getNameBytes(StringBuffer name, byte[] buf, int offset, int length) Determine the number of bytes in an entry name.
Parameters: header - The header buffer from which to parse. Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. | public static int | getOctalBytes(long value, byte[] buf, int offset, int length) Parse an octal integer from a header buffer.
Parameters: header - The header buffer from which to parse. Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. | public static StringBuffer | parseName(byte[] header, int offset, int length) Parse an entry name from a header buffer.
Parameters: header - The header buffer from which to parse. Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. | public static long | parseOctal(byte[] header, int offset, int length) Parse an octal string from a header buffer. |
CHKSUMLEN | final public static int CHKSUMLEN(Code) | | The length of the checksum field in a header buffer.
|
DEVLEN | final public static int DEVLEN(Code) | | The length of the devices field in a header buffer.
|
GIDLEN | final public static int GIDLEN(Code) | | The length of the group id field in a header buffer.
|
GNAMELEN | final public static int GNAMELEN(Code) | | The length of the group name field in a header buffer.
|
GNU_TMAGIC | final public static String GNU_TMAGIC(Code) | | The magic tag representing a GNU tar archive.
|
LF_BLK | final public static byte LF_BLK(Code) | | Block device file type.
|
LF_CHR | final public static byte LF_CHR(Code) | | Character device file type.
|
LF_CONTIG | final public static byte LF_CONTIG(Code) | | Contiguous file type.
|
LF_DIR | final public static byte LF_DIR(Code) | | Directory file type.
|
LF_FIFO | final public static byte LF_FIFO(Code) | | FIFO (pipe) file type.
|
LF_LINK | final public static byte LF_LINK(Code) | | Link file type.
|
LF_NORMAL | final public static byte LF_NORMAL(Code) | | Normal file type.
|
LF_OLDNORM | final public static byte LF_OLDNORM(Code) | | LF_ constants represent the "link flag" of an entry, or more commonly,
the "entry type". This is the "old way" of indicating a normal file.
|
LF_SYMLINK | final public static byte LF_SYMLINK(Code) | | Symbolic link file type.
|
MAGICLEN | final public static int MAGICLEN(Code) | | The length of the magic field in a header buffer.
|
MODELEN | final public static int MODELEN(Code) | | The length of the mode field in a header buffer.
|
MODTIMELEN | final public static int MODTIMELEN(Code) | | The length of the modification time field in a header buffer.
|
NAMELEN | final public static int NAMELEN(Code) | | The length of the name field in a header buffer.
|
SIZELEN | final public static int SIZELEN(Code) | | The length of the size field in a header buffer.
|
TMAGIC | final public static String TMAGIC(Code) | | The magic tag representing a POSIX tar archive.
|
UIDLEN | final public static int UIDLEN(Code) | | The length of the user id field in a header buffer.
|
UNAMELEN | final public static int UNAMELEN(Code) | | The length of the user name field in a header buffer.
|
checkSum | public int checkSum(Code) | | The entry's checksum.
|
devMajor | public int devMajor(Code) | | The entry's major device number.
|
devMinor | public int devMinor(Code) | | The entry's minor device number.
|
groupId | public int groupId(Code) | | The entry's group id.
|
linkFlag | public byte linkFlag(Code) | | The entry's link flag.
|
modTime | public long modTime(Code) | | The entry's modification time.
|
mode | public int mode(Code) | | The entry's permission mode.
|
size | public long size(Code) | | The entry's size.
|
userId | public int userId(Code) | | The entry's user id.
|
TarHeader | public TarHeader()(Code) | | |
getCheckSumOctalBytes | public static int getCheckSumOctalBytes(long value, byte[] buf, int offset, int length)(Code) | | Parse the checksum octal integer from a header buffer.
Parameters: header - The header buffer from which to parse. Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. The integer value of the entry's checksum. |
getLongOctalBytes | public static int getLongOctalBytes(long value, byte[] buf, int offset, int length)(Code) | | Parse an octal long integer from a header buffer.
Parameters: header - The header buffer from which to parse. Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. The long value of the octal bytes. |
getName | public String getName()(Code) | | Get the name of this entry.
Teh entry's name. |
getNameBytes | public static int getNameBytes(StringBuffer name, byte[] buf, int offset, int length)(Code) | | Determine the number of bytes in an entry name.
Parameters: header - The header buffer from which to parse. Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. The number of bytes in a header's entry name. |
getOctalBytes | public static int getOctalBytes(long value, byte[] buf, int offset, int length)(Code) | | Parse an octal integer from a header buffer.
Parameters: header - The header buffer from which to parse. Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. The integer value of the octal bytes. |
parseName | public static StringBuffer parseName(byte[] header, int offset, int length) throws InvalidHeaderException(Code) | | Parse an entry name from a header buffer.
Parameters: header - The header buffer from which to parse. Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. The header's entry name. |
parseOctal | public static long parseOctal(byte[] header, int offset, int length) throws InvalidHeaderException(Code) | | Parse an octal string from a header buffer. This is used for the
file permission mode value.
Parameters: header - The header buffer from which to parse. Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. The long value of the octal string. |
|
|