Package org.fusesource.hawtbuf
Class HexSupport
- java.lang.Object
-
- org.fusesource.hawtbuf.HexSupport
-
public final class HexSupport extends java.lang.Object
Used 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_TABLE
private static int[]
INT_OFFSETS
-
Constructor Summary
Constructors Modifier Constructor Description private
HexSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Buffer
toBufferFromHex(java.lang.String hex)
static java.lang.String
toHexFromBuffer(Buffer buffer)
static java.lang.String
toHexFromInt(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:
-
-