| java.lang.Object de.masters_of_disaster.ant.tasks.ar.ArUtils
ArUtils | public class ArUtils (Code) | | This class provides static utility methods to work with byte streams.
|
Method Summary | |
public static int | getIntegerBytes(int value, byte[] buf, int offset, int length) Write an int value into a byte array.
Parameters: value - The value to write. Parameters: buf - The byte array into which to write. Parameters: offset - The offset into the buffer from which to write. Parameters: length - The number of header bytes to write. | public static int | getLongBytes(long value, byte[] buf, int offset, int length) Write a long value into a byte array.
Parameters: value - The value to write. Parameters: buf - The byte array into which to write. Parameters: offset - The offset into the buffer from which to write. Parameters: length - The number of header bytes to write. | public static int | getNameBytes(StringBuffer name, byte[] buf, int offset, int length) Write a name into a byte array.
Parameters: name - The name to write. Parameters: buf - The byte array into which to write. Parameters: offset - The offset into the buffer from which to write. Parameters: length - The number of header bytes to write. | public static int | getOctalBytes(long value, byte[] buf, int offset, int length) Write an octal value into a byte array.
Parameters: value - The value to write. Parameters: buf - The byte array into which to write. Parameters: offset - The offset into the buffer from which to write. Parameters: length - The number of header bytes to write. | 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. |
getIntegerBytes | public static int getIntegerBytes(int value, byte[] buf, int offset, int length)(Code) | | Write an int value into a byte array.
Parameters: value - The value to write. Parameters: buf - The byte array into which to write. Parameters: offset - The offset into the buffer from which to write. Parameters: length - The number of header bytes to write. The number of bytes written to the buffer. |
getLongBytes | public static int getLongBytes(long value, byte[] buf, int offset, int length)(Code) | | Write a long value into a byte array.
Parameters: value - The value to write. Parameters: buf - The byte array into which to write. Parameters: offset - The offset into the buffer from which to write. Parameters: length - The number of header bytes to write. The number of bytes written to the buffer. |
getNameBytes | public static int getNameBytes(StringBuffer name, byte[] buf, int offset, int length)(Code) | | Write a name into a byte array.
Parameters: name - The name to write. Parameters: buf - The byte array into which to write. Parameters: offset - The offset into the buffer from which to write. Parameters: length - The number of header bytes to write. The number of bytes written to the buffer. |
getOctalBytes | public static int getOctalBytes(long value, byte[] buf, int offset, int length)(Code) | | Write an octal value into a byte array.
Parameters: value - The value to write. Parameters: buf - The byte array into which to write. Parameters: offset - The offset into the buffer from which to write. Parameters: length - The number of header bytes to write. The number of bytes written to the buffer. |
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. |
|
|