|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.compress.archivers.tar.TarUtils
public class TarUtils
This class provides static utility methods to work with byte streams.
Constructor Summary | |
---|---|
TarUtils()
|
Method Summary | |
---|---|
static long |
computeCheckSum(byte[] buffer)
Compute the checksum of a tar entry header. |
static int |
getCheckSumOctalBytes(long value,
byte[] buf,
int offset,
int length)
Parse the checksum octal integer from a header buffer. |
static int |
getLongOctalBytes(long value,
byte[] buf,
int offset,
int length)
Parse an octal long integer from a header buffer. |
static int |
getNameBytes(StringBuffer name,
byte[] buffer,
int offset,
int length)
Determine the number of bytes in an entry name. |
static int |
getOctalBytes(long value,
byte[] buffer,
int offset,
int length)
Parse an octal integer 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TarUtils()
Method Detail |
---|
public static int getCheckSumOctalBytes(long value, byte[] buf, int offset, int length)
offset
- The offset into the buffer from which to parse.length
- The number of header bytes to parse.value
- Description of Parameterbuf
- Description of Parameter
public static int getLongOctalBytes(long value, byte[] buf, int offset, int length)
offset
- The offset into the buffer from which to parse.length
- The number of header bytes to parse.value
- Description of Parameterbuf
- Description of Parameter
public static int getNameBytes(StringBuffer name, byte[] buffer, int offset, int length)
offset
- The offset into the buffer from which to parse.length
- The number of header bytes to parse.name
- Description of Parameterbuffer
- Description of Parameter
public static int getOctalBytes(long value, byte[] buffer, int offset, int length)
offset
- The offset into the buffer from which to parse.length
- The number of header bytes to parse.
public static long computeCheckSum(byte[] buffer)
buffer
- The tar entry's header buffer.
public static StringBuffer parseName(byte[] header, 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 long parseOctal(byte[] header, 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |