|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.brains2b.util.HexHelper
HexHelper decodes and encodes to hexadecimal values.
Constructor Summary | |
HexHelper()
|
Method Summary | |
static byte[] |
decode(java.lang.String s)
decode a hexidecimal string into an array of bytes |
static java.lang.String |
encode(byte[] b)
encode an array of bytes into a hexidecimal 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 final java.lang.String encode(byte[] b)
The string is supplied without any prefix
b
- byte[], the array to encode
java.lang.NullPointerException
- if no bytes were suppliedpublic static final byte[] decode(java.lang.String s)
If it is prefixed with '0x' this will be removed first.
If the String has an odd length '0' will be prepended
s
- String, the hexidecimal String to decode
NullPointerException,
- if String is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |