Modifier and Type | Field and Description |
---|---|
int |
checkSum
The entry's checksum.
|
static int |
CHKSUMLEN
The length of the checksum field in a header buffer.
|
static int |
DEVLEN
The length of the devices field in a header buffer.
|
int |
devMajor
The entry's major device number.
|
int |
devMinor
The entry's minor device number.
|
static int |
GIDLEN
The length of the group id field in a header buffer.
|
static int |
GNAMELEN
The length of the group name field in a header buffer.
|
static String |
GNU_TMAGIC
The magic tag representing a GNU tar archive.
|
int |
groupId
The entry's group id.
|
StringBuffer |
groupName
The entry's group name.
|
static byte |
LF_BLK
Block device file type.
|
static byte |
LF_CHR
Character device file type.
|
static byte |
LF_CONTIG
Contiguous file type.
|
static byte |
LF_DIR
Directory file type.
|
static byte |
LF_FIFO
FIFO (pipe) file type.
|
static byte |
LF_LINK
Link file type.
|
static byte |
LF_NORMAL
Normal file type.
|
static byte |
LF_OLDNORM
LF_ constants represent the "link flag" of an entry, or more commonly, the "entry type".
|
static byte |
LF_SYMLINK
Symbolic link file type.
|
byte |
linkFlag
The entry's link flag.
|
StringBuffer |
linkName
The entry's link name.
|
StringBuffer |
magic
The entry's magic tag.
|
static int |
MAGICLEN
The length of the magic field in a header buffer.
|
int |
mode
The entry's permission mode.
|
static int |
MODELEN
The length of the mode field in a header buffer.
|
long |
modTime
The entry's modification time.
|
static int |
MODTIMELEN
The length of the modification time field in a header buffer.
|
StringBuffer |
name
The entry's name.
|
static int |
NAMELEN
The length of the name field in a header buffer.
|
static int |
NAMEOFFSET
The offset of the name field in a header buffer.
|
static int |
PREFIXLEN
The length of the name prefix field in a header buffer.
|
static int |
PREFIXOFFSET
The offset of the name prefix field in a header buffer.
|
long |
size
The entry's size.
|
static int |
SIZELEN
The length of the size field in a header buffer.
|
static String |
TMAGIC
The magic tag representing a POSIX tar archive.
|
static int |
UIDLEN
The length of the user id field in a header buffer.
|
static int |
UNAMELEN
The length of the user name field in a header buffer.
|
int |
userId
The entry's user id.
|
StringBuffer |
userName
The entry's user name.
|
Constructor and Description |
---|
TarHeader() |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
TarHeaders can be cloned.
|
static int |
getCheckSumOctalBytes(long value,
byte[] buf,
int offset,
int length)
Parse the checksum octal integer from a header buffer.
|
static int |
getFileNameBytes(String newName,
byte[] outbuf)
This method, like getNameBytes(), is intended to place a name into a TarHeader's buffer.
|
static int |
getLongOctalBytes(long value,
byte[] buf,
int offset,
int length)
Parse an octal long integer from a header buffer.
|
String |
getName()
Get the name of this entry.
|
static int |
getNameBytes(StringBuffer name,
byte[] buf,
int offset,
int length)
Move the bytes from the name StringBuffer into the header's buffer.
|
static int |
getOctalBytes(long value,
byte[] buf,
int offset,
int length)
Parse an octal integer from a header buffer.
|
static StringBuffer |
parseFileName(byte[] header)
Parse a file name from a header buffer.
|
static StringBuffer |
parseName(byte[] header,
int offset,
int length)
Parse an entry name from a header buffer.
|
static long |
parseOctal(byte[] header,
int offset,
int length)
Parse an octal string from a header buffer.
|
public static final int NAMELEN
public static final int NAMEOFFSET
public static final int PREFIXLEN
public static final int PREFIXOFFSET
public static final int MODELEN
public static final int UIDLEN
public static final int GIDLEN
public static final int CHKSUMLEN
public static final int SIZELEN
public static final int MAGICLEN
public static final int MODTIMELEN
public static final int UNAMELEN
public static final int GNAMELEN
public static final int DEVLEN
public static final byte LF_OLDNORM
public static final byte LF_NORMAL
public static final byte LF_LINK
public static final byte LF_SYMLINK
public static final byte LF_CHR
public static final byte LF_BLK
public static final byte LF_DIR
public static final byte LF_FIFO
public static final byte LF_CONTIG
public static final String TMAGIC
public static final String GNU_TMAGIC
public StringBuffer name
public int mode
public int userId
public int groupId
public long size
public long modTime
public int checkSum
public byte linkFlag
public StringBuffer linkName
public StringBuffer magic
public StringBuffer userName
public StringBuffer groupName
public int devMajor
public int devMinor
public String getName()
public static long parseOctal(byte[] header, int offset, int length) throws InvalidHeaderException
header
- The header buffer from which to parse.offset
- The offset into the buffer from which to parse.length
- The number of header bytes to parse.InvalidHeaderException
public static StringBuffer parseFileName(byte[] header)
header
- The header buffer from which to parse.offset
- The offset into the buffer from which to parse.length
- The number of header bytes to parse.public static StringBuffer parseName(byte[] header, int offset, int length) throws InvalidHeaderException
header
- The header buffer from which to parse.offset
- The offset into the buffer from which to parse.length
- The number of header bytes to parse.InvalidHeaderException
public static int getFileNameBytes(String newName, byte[] outbuf) throws InvalidHeaderException
outbuf
- The buffer containing the entry header to modify.newName
- The new name to place into the header buffer.InvalidHeaderException
- If the name will not fit in the header.public static int getNameBytes(StringBuffer name, byte[] buf, int offset, int length)
header
- The header buffer into which to copy the name.offset
- The offset into the buffer at which to store.length
- The number of header bytes to store.public static int getOctalBytes(long value, byte[] buf, int offset, int length)
header
- The header buffer from which to parse.offset
- The offset into the buffer from which to parse.length
- The number of header bytes to parse.public static int getLongOctalBytes(long value, byte[] buf, int offset, int length)
header
- The header buffer from which to parse.offset
- The offset into the buffer from which to parse.length
- The number of header bytes to parse.public static int getCheckSumOctalBytes(long value, byte[] buf, int offset, int length)
header
- The header buffer from which to parse.offset
- The offset into the buffer from which to parse.length
- The number of header bytes to parse.Copyright © 2013 JBoss by Red Hat. All Rights Reserved.