public final class HexDumper extends Object
| Constructor and Description |
|---|
HexDumper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
format(byte[] bytes)
Returns a string constructed with the contents of the byte
array converted to hex format.
|
static String |
format(byte[] bytes,
int limit)
Returns a string constructed with the contents of the byte
array converted to hex format.
|
static String |
format(ByteBuffer buf)
Returns a string constructed with the contents of the ByteBuffer
converted to hex format.
|
static String |
format(ByteBuffer buf,
int limit)
Returns a string constructed with the contents of the ByteBuffer
converted to hex format.
|
static byte[] |
fromHexString(String hexString)
Returns a byte array constructed with the contents of the given
string, which contains a series of byte values in hex format.
|
static String |
toHexString(byte[] bytes)
Returns a string constructed with the contents of the byte
array converted to hex format.
|
public static String format(byte[] bytes)
bytes - a byte array to formatpublic static String format(byte[] bytes, int limit)
bytes - a byte array to formatlimit - the maximum number of bytes to format, or 0
meaning unlimitedpublic static String format(ByteBuffer buf)
buf - a buffer to formatpublic static String format(ByteBuffer buf, int limit)
buf - a buffer to formatlimit - the maximum number of bytes to format, or 0
meaning unlimitedpublic static String toHexString(byte[] bytes)
bytes - a byte array to convertpublic static byte[] fromHexString(String hexString)
hexString - a string to convertNumberFormatException - if the String
does not contain a parsable series of hex-formatted
values intCopyright © 2007-2013. All Rights Reserved.