Package org.fusesource.hawtbuf
Class HexSupport
- java.lang.Object
-
- org.fusesource.hawtbuf.HexSupport
-
public final class HexSupport extends java.lang.ObjectUsed to convert to hex from byte arrays and back.- Version:
- $Revision: 1.2 $
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String[]HEX_TABLEprivate static int[]INT_OFFSETS
-
Constructor Summary
Constructors Modifier Constructor Description privateHexSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BuffertoBufferFromHex(java.lang.String hex)static java.lang.StringtoHexFromBuffer(Buffer buffer)static java.lang.StringtoHexFromInt(int value, boolean trim)
-
-
-
Method Detail
-
toBufferFromHex
public static Buffer toBufferFromHex(java.lang.String hex)
- Parameters:
hex-- Returns:
-
toHexFromBuffer
public static java.lang.String toHexFromBuffer(Buffer buffer)
-
toHexFromInt
public static java.lang.String toHexFromInt(int value, boolean trim)- Parameters:
value-trim- if the leading 0's should be trimmed off.- Returns:
-
-