public class HexDump extends Object
| Constructor and Description |
|---|
HexDump() |
| Modifier and Type | Method and Description |
|---|---|
static String |
decodeHex(byte[] data)
Transform the given byte array that contains the binary data decoded to a String object.
|
static byte[] |
decodeHex(char[] data)
Transform the given array of characters representing hexadecimal values into an array of
bytes.
|
static String |
decodeHexToString(char[] data)
Transform the given array of characters representing hexadecimal values into a String object.
|
static char[] |
encodeHex(byte[] data)
Transform the given array of bytes into an array of characters representing the hexadecimal
values of each byte in order.
|
static char[] |
encodeHex(byte[] data,
boolean lowerCase)
Transform the given array of bytes into an array of characters representing the hexadecimal
values of each byte in order.
|
static char[] |
encodeHex(String data)
Transform the given String into an array of characters representing the hexadecimal values of
each byte in order.
|
static char |
toHex(int i)
Transform the given
int to a hexadecimal value. |
public static char[] encodeHex(String data)
data - the byte arraypublic static char[] encodeHex(byte[] data)
data - the byte arraypublic static char[] encodeHex(byte[] data,
boolean lowerCase)
data - the byte arraylowerCase - the flag if the result shell be transform in lower case. If true the result is
lowercase otherwise uppercase.public static byte[] decodeHex(char[] data)
throws org.apache.commons.codec.DecoderException
data - the array of charactersorg.apache.commons.codec.DecoderException - is thrown if an odd number or illegal of characters is suppliedpublic static String decodeHex(byte[] data)
decodeHex(char[]) method.data - the given byte array that contains the binary data decodedpublic static String decodeHexToString(char[] data) throws org.apache.commons.codec.DecoderException
data - the array of charactersorg.apache.commons.codec.DecoderException - is thrown if an odd number or illegal of characters is suppliedpublic static char toHex(int i)
int to a hexadecimal value.i - the integer value to transformCopyright © 2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.