public class HexDump
extends java.lang.Object
| Constructor and Description |
|---|
HexDump() |
| Modifier and Type | Method and Description |
|---|---|
static void |
hexDump(java.lang.String name,
byte[] bs)
Output a buffer in hex format.
|
static void |
hexDump(java.lang.String name,
byte[] bs,
int len)
Output a buffer in hex format.
|
static void |
hexDump(java.lang.String name,
byte[] bs,
int start,
int len)
Output a buffer in hex format.
|
static void |
hexDump(java.lang.String prologue,
java.lang.String name,
byte[] bs,
int start,
int len)
Output a buffer in hex format.
|
static char |
toAscii(byte b)
Get ASCII representation of byte, dot if non-readable.
|
static java.lang.String |
toHex(byte b)
Get hex representation of byte.
|
public static void hexDump(java.lang.String name,
byte[] bs)
name - name (description) of the message.bs - buffer to dumppublic static void hexDump(java.lang.String name,
byte[] bs,
int len)
name - name (description) of the message.bs - buffer to dumplen - first bytes (length) to dump.public static void hexDump(java.lang.String name,
byte[] bs,
int start,
int len)
name - name (description) of the message.bs - buffer to dumpstart - dump message using given offset.len - first bytes (length) to dump.public static void hexDump(java.lang.String prologue,
java.lang.String name,
byte[] bs,
int start,
int len)
prologue - string to prefixed to debug output, can be nullname - name (description) of the message.bs - buffer to dumpstart - dump message using given offset.len - first bytes (length) to dump.public static java.lang.String toHex(byte b)
b - the byte to convert.public static char toAscii(byte b)
b - the byte to convert.