pt.tumba.parser.swf
Class Hex

java.lang.Object
  extended by pt.tumba.parser.swf.Hex

public class Hex
extends java.lang.Object

Hex dump conversion utilities

Author:
unknown

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

Field Detail

_theInstance

private static final Hex _theInstance
Constructor Detail

Hex

private Hex()
Method Detail

getInstance

public static Hex getInstance()

dump

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

Parameters:
data - Description of the Parameter
startAddress - Description of the Parameter
indent - Description of the Parameter
Returns:
Description of the Return Value

dumpWithBinary

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

Parameters:
data - Description of the Parameter
startAddress - Description of the Parameter
indent - Description of the Parameter
Returns:
Description of the Return Value

dump

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

Parameters:
out - Description of the Parameter
data - Description of the Parameter
startAddress - Description of the Parameter
indent - Description of the Parameter
includeBinary - Description of the Parameter

dump

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

Parameters:
out - Description of the Parameter
data - Description of the Parameter
startIndex - Description of the Parameter
length - Description of the Parameter
startAddress - Description of the Parameter
indent - Description of the Parameter
includeBinary - Description of the Parameter

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

Parameters:
string - Description of the Parameter
size - Description of the Parameter
Returns:
Description of the Return Value

getByte

protected static int getByte(byte b)
Get unsigned byte

Parameters:
b - Description of the Parameter
Returns:
The byte value