|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jpcap.util.HexHelper
Functions for formatting and printing binary data in hexadecimal.
Constructor Summary | |
HexHelper()
|
Method Summary | |
static char |
nibbleToDigit(byte x)
Converts the lower four bits of a byte into the ascii digit which represents its hex value. |
static java.lang.String |
toQuadString(int i)
Convert an int (32 bits in Java) to a decimal quad of the form aaa.bbb.ccc.ddd. |
static java.lang.String |
toString(byte b)
Convert a single byte into a string representing its hex value. |
static java.lang.String |
toString(byte[] bytes)
Returns a text representation of a byte array. |
static java.lang.String |
toString(int i)
Convert an int to a hexadecimal string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HexHelper()
Method Detail |
public static java.lang.String toQuadString(int i)
public static java.lang.String toString(int i)
public static char nibbleToDigit(byte x)
public static java.lang.String toString(byte b)
b
- the byte to convert.
public static java.lang.String toString(byte[] bytes)
bytes
- a byte array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |