public class HexConverter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static byte[] |
HEX_BYTES |
private static char[] |
HEX_CHARS |
| Constructor and Description |
|---|
HexConverter() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
convertFromHex(char[] toConvert)
Take the incoming character of hex encoded data and convert to the raw byte values.
|
static byte[] |
convertFromHex(java.lang.String toConvert)
Take the incoming String of hex encoded data and convert to the raw byte values.
|
static byte[] |
convertToHexBytes(byte[] toBeConverted)
Take the supplied byte array and convert it to to a byte array of the encoded
hex values.
|
static java.lang.String |
convertToHexString(byte[] toBeConverted)
Take the supplied byte array and convert it to a hex encoded String.
|
static void |
main(java.lang.String[] args) |
private static byte |
toByte(char[] toConvert,
int pos) |
private static final char[] HEX_CHARS
private static final byte[] HEX_BYTES
public static java.lang.String convertToHexString(byte[] toBeConverted)
toBeConverted - - the bytes to be converted.public static byte[] convertToHexBytes(byte[] toBeConverted)
toBeConverted - - the bytes to be encoded.public static byte[] convertFromHex(char[] toConvert)
toConvert - - the hex encoded String to convert.private static byte toByte(char[] toConvert,
int pos)
public static byte[] convertFromHex(java.lang.String toConvert)
toConvert - - the hex encoded String to convert.public static void main(java.lang.String[] args)