public final class Hex extends Object
Modifier and Type | Field and Description |
---|---|
private static byte[] |
DECODE
Decode table which stores characters from 0 to f.
|
private static char[] |
HEX_CHARS
Hexidecimal characters.
|
Modifier | Constructor and Description |
---|---|
private |
Hex()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static byte[] |
decode(char[] value)
This will convert the supplied value from a hex encoded string.
|
protected static int |
decode(char[] hex,
int i)
Decodes the supplied character to it's corresponding nibble.
|
static char[] |
encode(byte[] value)
This will convert the supplied value to a hex encoded string.
|
private static final char[] HEX_CHARS
private static final byte[] DECODE
public static char[] encode(byte[] value)
value
- to hex encodepublic static byte[] decode(char[] value)
value
- to hex decodeIllegalArgumentException
- if value is not valid hexidecimalprotected static int decode(char[] hex, int i)
hex
- to read character fromi
- index of hex to readIllegalArgumentException
- if the character is not valid hexCopyright © 2003-2019 Virginia Tech. All Rights Reserved.