de.intarsys.tools.hex
public class HexTools extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static byte[][] |
ByteToHex
ASCII byte values for the hex strings.
|
static byte[][] |
byteToHexLower
ASCII byte values for the hex strings.
|
Constructor and Description |
---|
HexTools() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
bytesToHexString(byte[] data) |
static java.lang.String |
bytesToHexString(byte[] data,
int offset,
int length) |
static java.lang.String |
bytesToHexString(byte[] data,
int offset,
int length,
boolean space) |
static int |
hexDigitToInt(char c)
The numeric value for the hex digit, return -1 if not valid digit
|
static byte[] |
hexStringToBytes(java.lang.String hexString) |
static int |
hexStringToInt(java.lang.String hexString) |
static boolean |
isHexDigit(char i)
Evaluate to
true if i is a valid hex digit |
public static final byte[][] ByteToHex
public static final byte[][] byteToHexLower
public static java.lang.String bytesToHexString(byte[] data)
public static java.lang.String bytesToHexString(byte[] data, int offset, int length)
public static java.lang.String bytesToHexString(byte[] data, int offset, int length, boolean space)
public static int hexDigitToInt(char c)
c
- A char representing a hex digit.public static byte[] hexStringToBytes(java.lang.String hexString)
public static int hexStringToInt(java.lang.String hexString)
public static boolean isHexDigit(char i)
true
if i
is a valid hex digiti
- A char representing a hex digit.true
if i
is a valid hex digit.