|
SourceForge Jpcap | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jpcap.util.HexHelper
public class 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 String |
toQuadString(int i)
Convert an int (32 bits in Java) to a decimal quad of the form aaa.bbb.ccc.ddd. |
static String |
toString(byte b)
Convert a single byte into a string representing its hex value. |
static String |
toString(byte[] bytes)
Returns a text representation of a byte array. |
static 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 String toQuadString(int i)
public static String toString(int i)
public static char nibbleToDigit(byte x)
public static String toString(byte b)
b - the byte to convert.
public static String toString(byte[] bytes)
bytes - a byte array
|
Copyright © Patrick Charles & Jonas Lehmann, 2001; Esmond Pitt, 2008. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||