| java.lang.Object org.apache.commons.vfs.provider.tar.TarUtils
TarUtils | class TarUtils (Code) | | This class provides static utility methods to work with byte streams.
author: Timothy Gerard Endres author: Stefano Mazzocchi version: $Revision: 480428 $ $Date: 2006-11-28 22:15:24 -0800 (Tue, 28 Nov 2006) $ |
Method Summary | |
public static long | computeCheckSum(byte[] buffer) Compute the checksum of a tar entry header.
Parameters: buffer - The tar entry's header buffer. | public static int | getCheckSumOctalBytes(long value, byte[] buf, int offset, int length) Parse the checksum octal integer from a header buffer. | public static int | getLongOctalBytes(long value, byte[] buf, int offset, int length) Parse an octal long integer from a header buffer. | public static int | getNameBytes(StringBuffer name, byte[] buffer, int offset, int length) Determine the number of bytes in an entry name. | public static int | getOctalBytes(long value, byte[] buffer, int offset, int length) Parse an octal integer from a header buffer.
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. |
computeCheckSum | public static long computeCheckSum(byte[] buffer)(Code) | | Compute the checksum of a tar entry header.
Parameters: buffer - The tar entry's header buffer. The computed checksum. |
getCheckSumOctalBytes | public static int getCheckSumOctalBytes(long value, byte[] buf, int offset, int length)(Code) | | Parse the checksum octal integer from a header buffer.
Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. Parameters: value - Description of Parameter Parameters: buf - Description of Parameter 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: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. Parameters: value - Description of Parameter Parameters: buf - Description of Parameter The long value of the octal bytes. |
getNameBytes | public static int getNameBytes(StringBuffer name, byte[] buffer, int offset, int length)(Code) | | Determine the number of bytes in an entry name.
Parameters: offset - The offset into the buffer from which to parse. Parameters: length - The number of header bytes to parse. Parameters: name - Description of Parameter Parameters: buffer - Description of Parameter The number of bytes in a header's entry name. |
getOctalBytes | public static int getOctalBytes(long value, byte[] buffer, int offset, int length)(Code) | | Parse an octal integer from a header buffer.
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)(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)(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. |
|
|