public class BinaryDump extends Object
Modifier and Type | Field and Description |
---|---|
private static char[] |
_hexcodes |
private static int[] |
_shifts |
static String |
EOL |
Constructor and Description |
---|
BinaryDump() |
Modifier and Type | Method and Description |
---|---|
private static String |
dump(byte value) |
static String |
dump(byte[] data,
long offset,
int index)
dump an array of bytes to a String
|
private static String |
dump(long value) |
static String |
toHex(byte value)
Converts the parameter to a hex value.
|
static String |
toHex(byte[] value)
Dumps the byte array in hexadecimal format.
|
static String |
toHex(byte[] value,
int bytesPerLine)
Converts the parameter to a hex value breaking the results into lines.
|
static String |
toHex(byte[] value,
int offset,
int length)
dump an array of bytes to a String
|
private static String |
toHex(long value,
int digits) |
public static final String EOL
private static final char[] _hexcodes
private static final int[] _shifts
public static String dump(byte[] data, long offset, int index)
data
- the byte array to be dumpedoffset
- its offset, whatever that might meanindex
- initial index into the byte arrayArrayIndexOutOfBoundsException
- if the index is
outside the data array's boundsprivate static String dump(long value)
private static String dump(byte value)
public static String toHex(byte[] value)
value
- The value to convertpublic static String toHex(byte[] value, int offset, int length)
data
- the byte array to be dumpedoffset
- its offset, whatever that might meanindex
- initial index into the byte arrayArrayIndexOutOfBoundsException
- if the index is
outside the data array's boundspublic static String toHex(byte[] value, int bytesPerLine)
value
- The value to convertbytesPerLine
- The maximum number of bytes per line. The next byte
will be written to a new linepublic static String toHex(byte value)
value
- The value to convertprivate static String toHex(long value, int digits)
Copyright © 2016 ScalAgent D.T.. All Rights Reserved.