org.apache.commons.io
Class HexDump
java.lang.Objectorg.apache.commons.io.HexDump
public class HexDump
extends java.lang.Object
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.
$Id: HexDump.java 596667 2007-11-20 13:50:14Z niallp $- Scott Sanders
- Marc Johnson
static String | EOL- The line-separator (initializes to "line.separator" system property.
|
private static char[] | _hexcodes
|
private static int[] | _shifts
|
HexDump()- Instances should NOT be constructed in standard programming.
|
private static StringBuffer | dump(StringBuffer _cbuffer, byte value)- Dump a byte value into a StringBuffer.
|
private static StringBuffer | dump(StringBuffer _lbuffer, long value)- Dump a long value into a StringBuffer.
|
static void | dump(byte[] data, long offset, OutputStream stream, int index)- Dump an array of bytes to an OutputStream.
|
EOL
public static final String EOL
The line-separator (initializes to "line.separator" system property.
_hexcodes
private static final char[] _hexcodes
_shifts
private static final int[] _shifts
HexDump
public HexDump()
Instances should NOT be constructed in standard programming.
dump
private static StringBuffer dump(StringBuffer _cbuffer,
byte value) Dump a byte value into a StringBuffer.
_cbuffer - the StringBuffer to dump the value invalue - the byte value to be dumped
- StringBuffer containing the dumped value.
dump
private static StringBuffer dump(StringBuffer _lbuffer,
long value) Dump a long value into a StringBuffer.
_lbuffer - the StringBuffer to dump the value invalue - the long value to be dumped
- StringBuffer containing the dumped value.
dump
public static void dump(byte[] data,
long offset,
OutputStream stream,
int index)
throws IOException,
ArrayIndexOutOfBoundsException,
IllegalArgumentException Dump an array of bytes to an OutputStream.
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
Copyright (c) 2002-2010 Apache Software Foundation