|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTools.HexDumper
public class HexDumper
Simple byte array to hex conversion class
Field Summary | |
---|---|
private byte[] |
bytes
Byte array to work with |
Constructor Summary | |
---|---|
HexDumper(byte[] bytes)
Generate a new HexDumper |
|
HexDumper(java.lang.String str)
Generate a new HexDumper |
Method Summary | |
---|---|
static java.lang.String |
byteToHex(byte beit)
Convert one byte to hexadecimal |
static byte |
cleanByte(byte b)
Filter escape characters |
java.lang.String |
convert()
Convert to a string of hexadecimal numbers |
static char |
intToHex(int hbyte)
Convert one integer to hexadecimal |
static java.lang.String |
lineNumber(int i,
int w)
Pretty line number |
static void |
main(java.lang.String[] args)
|
java.lang.String |
toString()
Get a string representation of this object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private byte[] bytes
Constructor Detail |
---|
public HexDumper(byte[] bytes)
bytes
- Byte array to work withpublic HexDumper(java.lang.String str)
str
- String to work withMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String convert()
public static byte cleanByte(byte b)
b
- A byte
public static java.lang.String lineNumber(int i, int w)
i
- Line numberw
- Width of the line number column
public static java.lang.String byteToHex(byte beit)
beit
- A byte
public static char intToHex(int hbyte)
hbyte
- An integer
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |