|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.misc.HexEncoder
Hex encoding class. Many thanks goes to Wei Dai's Crypto++ for providing public domain C++ code that this could be derived from.
| Constructor Summary | |
HexEncoder()
|
|
| Method Summary | |
static byte[] |
decode(String inputData)
Decodes a string containing hexadecimal characters into the resulting binary values. |
static String |
encode(byte[] inputData)
Encode an array of binary data into a string of hexadecimal values. |
static String |
encode(String s)
Encode an array of binary data into a string of hexadecimal values. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HexEncoder()
| Method Detail |
public static byte[] decode(String inputData)
throws IllegalArgumentException
inputData - - The string to be decoded. The input string must have
only characters "0-9 and A-F" Any other characters in the string
will result in an illegal argument exception.
IllegalArgumentException - if the string is null, is of zero length, or
contains illegal characters.
public static String encode(byte[] inputData)
throws IllegalArgumentException
inputData - - A byte array that will be encoded.
IllegalArgumentException - If the length of the byte array is zero.
public static String encode(String s)
throws IllegalArgumentException
s - the string to encode
IllegalArgumentException - If the length of the byte array is zero.
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||