org.apache.commons.io
Class HexDump

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

public class HexDump
extends Object

Dumps data in hexadecimal format. Derived from a HexDump utility I wrote in June 2001. Taken from the POI project.

Version:
$Revision: 1.8 $ $Date: 2004/02/23 04:35:59 $
Author:
Scott Sanders (sanders at apache dot org), Marc Johnson

Field Summary
static String EOL
          line-separator (initializes to "line.separator" system property.
 
Constructor Summary
HexDump()
          Instances should NOT be constructed in standard programming.
 
Method Summary
static void dump(byte[] data, long offset, OutputStream stream, int index)
          dump an array of bytes to an OutputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EOL

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

Constructor Detail

HexDump

public HexDump()
Instances should NOT be constructed in standard programming.

Method Detail

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

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:
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 null


Copyright © 2002-2004 The Apache Software Foundation. All Rights Reserved.