|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.owasp.esapi.codecs.Hex
public class Hex
Encode and decode to/from hexadecimal strings to byte arrays.
Constructor Summary | |
---|---|
Hex()
|
Method Summary | |
---|---|
static byte[] |
decode(java.lang.String hexStr)
Decode hexadecimal-encoded string and return raw byte array. |
static java.lang.String |
encode(byte[] b,
boolean leading0x)
Output byte representation as hexadecimal representation. |
static byte[] |
fromHex(java.lang.String hexStr)
Decode hexadecimal-encoded string and return raw byte array. |
static java.lang.String |
toHex(byte[] b,
boolean leading0x)
Output byte representation as hexadecimal representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Hex()
Method Detail |
---|
public static java.lang.String toHex(byte[] b, boolean leading0x)
b
- Bytes to encode to hexadecimal representation.leading0x
- If true, return with leading "0x".
public static java.lang.String encode(byte[] b, boolean leading0x)
toHex()
method.
b
- Bytes to encode to hexadecimal representation.leading0x
- If true, return with leading "0x".
public static byte[] fromHex(java.lang.String hexStr)
hexStr
- Hexadecimal-encoded string, with or without leading "0x".
public static byte[] decode(java.lang.String hexStr)
fromHex()
method.
hexStr
- Hexadecimal-encoded string, with or without leading "0x".
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |