Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.anotherbigidea.util
Class Hex  view Hex download Hex.java

java.lang.Object
  extended bycom.anotherbigidea.util.Hex

public class Hex
extends java.lang.Object

Hex dump conversion utilities


Constructor Summary
Hex()
           
 
Method Summary
static java.lang.String dump(byte[] data, long startAddress, java.lang.String indent)
           
static void dump(java.io.PrintWriter out, byte[] data, int startIndex, int length, long startAddress, java.lang.String indent, boolean includeBinary)
           
static void dump(java.io.PrintWriter out, byte[] data, long startAddress, java.lang.String indent, boolean includeBinary)
           
static java.lang.String dumpWithBinary(byte[] data, long startAddress, java.lang.String indent)
           
protected static int getByte(byte b)
          Get unsigned byte
static java.lang.String leadingZeros(java.lang.String string, int size)
          Pad the string with leading zeros until it it reached the given size
static void main(java.lang.String[] args)
          Dump the named file to System.out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hex

public Hex()
Method Detail

dump

public static java.lang.String dump(byte[] data,
                                    long startAddress,
                                    java.lang.String indent)

dumpWithBinary

public static java.lang.String dumpWithBinary(byte[] data,
                                              long startAddress,
                                              java.lang.String indent)

dump

public static void dump(java.io.PrintWriter out,
                        byte[] data,
                        long startAddress,
                        java.lang.String indent,
                        boolean includeBinary)

dump

public static void dump(java.io.PrintWriter out,
                        byte[] data,
                        int startIndex,
                        int length,
                        long startAddress,
                        java.lang.String indent,
                        boolean includeBinary)

leadingZeros

public static java.lang.String leadingZeros(java.lang.String string,
                                            int size)
Pad the string with leading zeros until it it reached the given size


getByte

protected static int getByte(byte b)
Get unsigned byte


main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Dump the named file to System.out