com.objectwave.tools
Class DumpHex

java.lang.Object
  |
  +--com.objectwave.tools.DumpHex

public class DumpHex
extends java.lang.Object


Constructor Summary
DumpHex()
           
 
Method Summary
static void hexDump(byte[] bytes, int read, java.io.Writer writer)
          This method will print a hex dump of the given byte array to the given output stream.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DumpHex

public DumpHex()
Method Detail

main

public static void main(java.lang.String[] args)

hexDump

public static void hexDump(byte[] bytes,
                           int read,
                           java.io.Writer writer)
                    throws java.io.IOException
This method will print a hex dump of the given byte array to the given output stream. Each line of the output will be 2-digit hex numbers, separated by single spaces, followed by the characters corresponding to those hex numbers, or a '.' if the given character is unprintable. Each of these numbers will correspond to a byte of the byte array.

Parameters:
bytes - the byte array to write
writer - the destination for the output.
Throws:
java.io.IOException - thrown if there's an error writing strings to the writer.