|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.eaio.util.lang.Hex
public final class Hex
Number-to-hexadecimal and hexadecimal-to-number conversions.
| Method Summary | |
|---|---|
static Appendable |
append(Appendable a,
byte[] bytes)
Turns a byte array into hex octets. |
static Appendable |
append(Appendable a,
int in)
Turns an int into hex octets. |
static Appendable |
append(Appendable a,
int in,
int length)
Turns an int into hex octets. |
static Appendable |
append(Appendable a,
long in)
Turns a long into hex octets. |
static Appendable |
append(Appendable a,
long in,
int length)
Turns a long into hex octets. |
static Appendable |
append(Appendable a,
short in)
Turns a short into hex octets. |
static Appendable |
append(Appendable a,
short in,
int length)
Turns a short into hex octets. |
static long |
parseLong(CharSequence s)
Parses a long from a hex encoded number. |
static short |
parseShort(String s)
Parses a short from a hex encoded number. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Appendable append(Appendable a,
short in)
short into hex octets.
a - the Appendable, may not be nullin - the integer
Appendable
public static Appendable append(Appendable a,
short in,
int length)
short into hex octets.
a - the Appendable, may not be nullin - the integerlength - the number of octets to produce
Appendable
public static Appendable append(Appendable a,
int in)
int into hex octets.
a - the Appendable, may not be nullin - the integer
Appendable
public static Appendable append(Appendable a,
int in,
int length)
int into hex octets.
a - the Appendable, may not be nullin - the integerlength - the number of octets to produce
Appendable
public static Appendable append(Appendable a,
long in)
long into hex octets.
a - the Appendable, may not be nullin - the long
Appendable
public static Appendable append(Appendable a,
long in,
int length)
long into hex octets.
a - the Appendable, may not be nullin - the longlength - the number of octets to produce
Appendable
public static Appendable append(Appendable a,
byte[] bytes)
byte array into hex octets.
a - the Appendable, may not be nullbytes - the byte array
Appendablepublic static long parseLong(CharSequence s)
long from a hex encoded number. This method will skip all characters that are not 0-9,
A-F and a-f.
Returns 0 if the CharSequence does not contain any interesting characters.
s - the CharSequence to extract a long from, may not be null
long
NullPointerException - if the CharSequence is nullpublic static short parseShort(String s)
short from a hex encoded number. This method will skip all characters that are not 0-9,
A-F and a-f.
Returns 0 if the CharSequence does not contain any interesting characters.
s - the CharSequence to extract a short from, may not be null
short
NullPointerException - if the CharSequence is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||