|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mindbright.util.HexDump
Utility routines for creating readable dumps of binary data.
| Constructor Summary | |
HexDump()
|
|
| Method Summary | |
static java.lang.String |
formatHex(int i,
int sz)
Format an integer to a hex string with a minimum length |
static java.lang.String |
intToString(int n)
Returns a string of 8 hexadecimal digits (most significant digit first) corresponding to the given integer |
static void |
print(java.math.BigInteger bi)
Print an hex-dump of the given big integer to System.err |
static void |
print(byte[] buf)
Dump the given array to System.err |
static void |
print(byte[] buf,
int off,
int len)
Print a nice looking hex-dump of the given data on System.err |
static void |
print(java.io.OutputStream out,
byte[] buf,
int off,
int len)
Print a nice looking hex-dump of the given data to the given stream. |
static void |
print(java.io.OutputStream out,
java.lang.String header,
boolean showAddr,
byte[] buf,
int off,
int len)
Generate and print a nice looking hex-dump of the given data. |
static void |
print(java.lang.String header,
boolean showAddr,
byte[] buf,
int off,
int len)
Print a nice looking hex-dump of the given data on System.err |
static java.lang.String |
toString(byte[] ba)
Returns a string of hexadecimal digits from a byte array. |
static java.lang.String |
toString(byte[] ba,
int offset,
int length)
Returns a string of hexadecimal digits from a byte array. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HexDump()
| Method Detail |
public static java.lang.String intToString(int n)
n - an unsigned integerpublic static java.lang.String toString(byte[] ba)
ba - array to convert
public static java.lang.String toString(byte[] ba,
int offset,
int length)
ba - array containing data to convertoffset - offset of first byte to convertlength - number of bytes to convert
public static java.lang.String formatHex(int i,
int sz)
i - integer to convertsz - minimum number of digits in output.
public static void print(byte[] buf,
int off,
int len)
buf - array containing data to dumpoff - offset of fist byte to dumplen - number of bytes to dump
public static void print(java.io.OutputStream out,
byte[] buf,
int off,
int len)
out - stream to output the hex-dump onbuf - array containing data to dumpoff - offset of fist byte to dumplen - number of bytes to dump
public static void print(java.lang.String header,
boolean showAddr,
byte[] buf,
int off,
int len)
header - header to print before the actual dumpshowAddr - if true the offset from the start is shown
first on every line.buf - array containing data to dumpoff - offset of fist byte to dumplen - number of bytes to dump
public static void print(java.io.OutputStream out,
java.lang.String header,
boolean showAddr,
byte[] buf,
int off,
int len)
out - stream to output the hex-dump onheader - header to print before the actual dumpshowAddr - if true the offset from the start is shown
first on every line.buf - array containing data to dumpoff - offset of fist byte to dumplen - number of bytes to dumppublic static void print(byte[] buf)
buf - array to dump, may be null.public static void print(java.math.BigInteger bi)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||