|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.io.HexDump
public class HexDump
Dumps data in hexadecimal format.
Provides a single function to take an array of bytes and display it in hexadecimal form.
Origin of code: POI.
Field Summary | |
---|---|
private static StringBuffer |
_cbuffer
|
private static char[] |
_hexcodes
|
private static StringBuffer |
_lbuffer
|
private static int[] |
_shifts
|
static String |
EOL
The line-separator (initializes to "line.separator" system property. |
Constructor Summary | |
---|---|
HexDump()
Instances should NOT be constructed in standard programming. |
Method Summary | |
---|---|
private static StringBuffer |
dump(byte value)
Dump a byte value into a StringBuffer. |
static void |
dump(byte[] data,
long offset,
OutputStream stream,
int index)
Dump an array of bytes to an OutputStream. |
private static StringBuffer |
dump(long value)
Dump a long value into a StringBuffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EOL
private static final StringBuffer _lbuffer
private static final StringBuffer _cbuffer
private static final char[] _hexcodes
private static final int[] _shifts
Constructor Detail |
---|
public HexDump()
Method Detail |
---|
public static void dump(byte[] data, long offset, OutputStream stream, int index) throws IOException, ArrayIndexOutOfBoundsException, IllegalArgumentException
data
- the byte array to be dumpedoffset
- its offset, whatever that might meanstream
- the OutputStream to which the data is to be
writtenindex
- initial index into the byte array
IOException
- is thrown if anything goes wrong writing
the data to stream
ArrayIndexOutOfBoundsException
- if the index is
outside the data array's bounds
IllegalArgumentException
- if the output stream is nullprivate static StringBuffer dump(long value)
value
- the long value to be dumped
private static StringBuffer dump(byte value)
value
- the byte value to be dumped
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |