Package net.sf.eBus.util
Class HexDump
- java.lang.Object
-
- net.sf.eBus.util.HexDump
-
public final class HexDump extends Object
dump(byte[], String)generates a standard hexdump textual representation of binary data.- Author:
- Charles Rapp
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringdump(byte[] data, int offset, int size, String indent)Returns a text representation of the given byte array.static Stringdump(byte[] data, String indent)Dump outdata's entire contents starting at byte zero.
-
-
-
Method Detail
-
dump
public static String dump(byte[] data, String indent)
Dump outdata's entire contents starting at byte zero.- Parameters:
data- Generate hex dump for this data region.indent- Prefix each line with this text.- Returns:
- a text representation of the given byte array.
-
dump
public static String dump(byte[] data, int offset, int size, String indent)
Returns a text representation of the given byte array. The output format is:0x00000000: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx "........ ........"- Parameters:
data- Generate hex dump for this data region.offset- Offset into the data array.size- Out these many bytes in data array.indent- Prefix each line with this text.- Returns:
- a text representation of the given byte array.
-
-