public class HexConverter extends Object
Modifier and Type | Method and Description |
---|---|
static void |
appendHexString(byte b,
StringBuilder builder) |
static void |
appendHexString(StringBuilder builder,
byte[] byteArray,
int offset,
int length) |
static void |
appendShortHexString(byte b,
StringBuilder builder) |
static void |
appendShortHexString(StringBuilder builder,
byte[] bytes,
int offset,
int length) |
static byte[] |
fromShortHexString(String shortHexString) |
static String |
toHexString(byte b) |
static String |
toHexString(byte[] bytes) |
static String |
toHexString(byte[] bytes,
int offset,
int length) |
static String |
toShortHexString(byte b)
Returns the byte as a hex string.
|
static String |
toShortHexString(byte[] bytes) |
static String |
toShortHexString(byte[] bytes,
int offset,
int length) |
static String |
toShortHexString(int i)
Returns the integer value as hex string filled with leading zeros.
|
static String |
toShortHexString(long l)
Returns the long value as hex string filled with leading zeros.
|
public static String toHexString(byte b)
public static String toHexString(byte[] bytes)
public static String toHexString(byte[] bytes, int offset, int length)
public static String toShortHexString(int i)
i
- the integer value to be convertedpublic static String toShortHexString(long l)
l
- the long value to be convertedpublic static String toShortHexString(byte b)
b
- the byte to be convertedpublic static String toShortHexString(byte[] bytes)
public static String toShortHexString(byte[] bytes, int offset, int length)
public static byte[] fromShortHexString(String shortHexString) throws NumberFormatException
NumberFormatException
public static void appendShortHexString(byte b, StringBuilder builder)
public static void appendShortHexString(StringBuilder builder, byte[] bytes, int offset, int length)
public static void appendHexString(byte b, StringBuilder builder)
public static void appendHexString(StringBuilder builder, byte[] byteArray, int offset, int length)