| java.lang.Object org.mortbay.io.BufferUtil
BufferUtil | public class BufferUtil (Code) | | Buffer utility methods.
author: gregw |
Field Summary | |
final static byte[] | DIGIT | final static byte | MINUS | final static byte | SPACE |
DIGIT | final static byte[] DIGIT(Code) | | |
MINUS | final static byte MINUS(Code) | | |
SPACE | final static byte SPACE(Code) | | |
prependHexInt | public static void prependHexInt(Buffer buffer, int n)(Code) | | Add hex integer BEFORE current getIndex.
Parameters: buffer - Parameters: n - |
putDecInt | public static void putDecInt(Buffer buffer, int n)(Code) | | |
putDecLong | public static void putDecLong(Buffer buffer, long n)(Code) | | |
putHexInt | public static void putHexInt(Buffer buffer, int n)(Code) | | |
toInt | public static int toInt(Buffer buffer)(Code) | | Convert buffer to an integer.
Parses up to the first non-numeric character. If no number is found an
IllegalArgumentException is thrown
Parameters: buffer - A buffer containing an integer. The position is not changed. an int |
toLong | public static long toLong(Buffer buffer)(Code) | | Convert buffer to an long.
Parses up to the first non-numeric character. If no number is found an
IllegalArgumentException is thrown
Parameters: buffer - A buffer containing an integer. The position is not changed. an int |
|
|