com.ureach.detorres.util
Class HexView

java.lang.Object
  extended by com.ureach.detorres.util.HexView

public class HexView
extends Object

Simple hexadecimal file viewer.

Author:
Andy de Torres, detorres@ureach.com

Field Summary
static int BIG_ENDIAN
           
static int DISPLAY_DECIMAL
           
static int DISPLAY_HEX
           
static int LITTLE_ENDIAN
           
 
Constructor Summary
HexView(FileName fileName)
           
HexView(String fileName)
           
 
Method Summary
 JFrame getFrame()
           
 void Initialize(FileName fileName, boolean isStandAlone)
           
static void main(String[] args)
           
 void setDisplay(int display)
           
 void setEndian(int endian)
           
static int toBigEndianInt(byte b1, byte b2, byte b3, byte b4)
           
static long toBigEndianLong(byte b1, byte b2, byte b3, byte b4, byte b5, byte b6, byte b7, byte b8)
           
static short toBigEndianShort(byte b1, byte b2)
           
static int toLittleEndianInt(byte b1, byte b2, byte b3, byte b4)
           
static long toLittleEndianLong(byte b1, byte b2, byte b3, byte b4, byte b5, byte b6, byte b7, byte b8)
           
static short toLittleEndianShort(byte b1, byte b2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISPLAY_HEX

public static final int DISPLAY_HEX
See Also:
Constant Field Values

DISPLAY_DECIMAL

public static final int DISPLAY_DECIMAL
See Also:
Constant Field Values

LITTLE_ENDIAN

public static final int LITTLE_ENDIAN
See Also:
Constant Field Values

BIG_ENDIAN

public static final int BIG_ENDIAN
See Also:
Constant Field Values
Constructor Detail

HexView

public HexView(String fileName)
        throws FileNotFoundException,
               IOException
Throws:
FileNotFoundException
IOException

HexView

public HexView(FileName fileName)
        throws FileNotFoundException,
               IOException
Throws:
FileNotFoundException
IOException
Method Detail

Initialize

public void Initialize(FileName fileName,
                       boolean isStandAlone)
                throws FileNotFoundException,
                       IOException
Throws:
FileNotFoundException
IOException

getFrame

public JFrame getFrame()

setDisplay

public void setDisplay(int display)

setEndian

public void setEndian(int endian)

toBigEndianShort

public static short toBigEndianShort(byte b1,
                                     byte b2)

toBigEndianInt

public static int toBigEndianInt(byte b1,
                                 byte b2,
                                 byte b3,
                                 byte b4)

toBigEndianLong

public static long toBigEndianLong(byte b1,
                                   byte b2,
                                   byte b3,
                                   byte b4,
                                   byte b5,
                                   byte b6,
                                   byte b7,
                                   byte b8)

toLittleEndianShort

public static short toLittleEndianShort(byte b1,
                                        byte b2)

toLittleEndianInt

public static int toLittleEndianInt(byte b1,
                                    byte b2,
                                    byte b3,
                                    byte b4)

toLittleEndianLong

public static long toLittleEndianLong(byte b1,
                                      byte b2,
                                      byte b3,
                                      byte b4,
                                      byte b5,
                                      byte b6,
                                      byte b7,
                                      byte b8)

main

public static void main(String[] args)