org.apache.commons.io
Class HexDump

java.lang.Object
  extended byorg.apache.commons.io.HexDump

public class HexDump
extends java.lang.Object

Dump data in hexadecimal format; derived from a HexDump utility I wrote in June 2001 Taken from the POI project

Version:
$Revision: 1.5 $ $Date: 2003/12/30 06:50:16 $
Author:
Scott Sanders (sanders at apache dot org), Marc Johnson

Field Summary
private static java.lang.StringBuffer _cbuffer
           
private static char[] _hexcodes
           
private static java.lang.StringBuffer _lbuffer
           
private static int[] _shifts
           
static java.lang.String EOL
          line-separator (initializes to "line.separator" system property.
 
Constructor Summary
HexDump()
           
 
Method Summary
private static java.lang.StringBuffer dump(byte value)
           
static void dump(byte[] data, long offset, java.io.OutputStream stream, int index)
          dump an array of bytes to an OutputStream
private static java.lang.StringBuffer dump(long value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EOL

public static final java.lang.String EOL
line-separator (initializes to "line.separator" system property.


_lbuffer

private static final java.lang.StringBuffer _lbuffer

_cbuffer

private static final java.lang.StringBuffer _cbuffer

_hexcodes

private static final char[] _hexcodes

_shifts

private static final int[] _shifts
Constructor Detail

HexDump

public HexDump()
Method Detail

dump

public static void dump(byte[] data,
                        long offset,
                        java.io.OutputStream stream,
                        int index)
                 throws java.io.IOException,
                        java.lang.ArrayIndexOutOfBoundsException,
                        java.lang.IllegalArgumentException
dump an array of bytes to an OutputStream

Parameters:
data - the byte array to be dumped
offset - its offset, whatever that might mean
stream - the OutputStream to which the data is to be written
index - initial index into the byte array
Throws:
java.io.IOException - is thrown if anything goes wrong writing the data to stream
java.lang.ArrayIndexOutOfBoundsException - if the index is outside the data array's bounds
java.lang.IllegalArgumentException - if the output stream is null

dump

private static java.lang.StringBuffer dump(long value)

dump

private static java.lang.StringBuffer dump(byte value)