|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.core.util.HexDecoder
public final class HexDecoder
Hex encoder/decoder implementation (borrowed from BouncyCastle=.
| Field Summary | |
|---|---|
static String |
DATA_TYPE
Identifies the data type supported by this decoder. |
protected static byte[] |
DECODING_TABLE
Decoding table. |
protected static byte[] |
ENCODING_TABLE
Encoding table. |
| Method Summary | |
|---|---|
static int |
decode(byte[] data,
int off,
int length,
OutputStream out)
Decodes the Hex encoded byte data writing it to the given output stream, whitespace characters will be ignored. |
static byte[] |
decode(String data)
Decodes the HEX input data producing a output stream. |
static int |
decode(String data,
OutputStream out)
Decodes the Hex encoded String data writing it to the given output stream, whitespace characters will be ignored. |
static String |
encode(byte[] data)
Encodes the input data producing a Hex output stream. |
static int |
encode(byte[] data,
int off,
int length,
OutputStream out)
Encodes the input data producing a Hex output stream. |
protected static void |
initialiseDecodingTable()
Initialize the decoding table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DATA_TYPE
protected static final byte[] ENCODING_TABLE
protected static final byte[] DECODING_TABLE
| Method Detail |
|---|
protected static void initialiseDecodingTable()
public static int encode(byte[] data,
int off,
int length,
OutputStream out)
throws IOException
data - The input data to be HEX encodedoff - Initiak offsetlength - Initial length of the input data arrayout - The OutputStream instance holding the encoded input data.
IOException - If encoding fails.
public static int decode(byte[] data,
int off,
int length,
OutputStream out)
throws IOException
data - The data to be encodedoff - Initial offset.length - Initial lengthout - The OutputStream instance
IOException - If encoding failed.
public static int decode(String data,
OutputStream out)
throws IOException
data - The data to be encodedout - The OutputStream instance
IOException - If encoding failed.public static String encode(byte[] data)
data - Input data to encode.
public static byte[] decode(String data)
data - Input data to be decoded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||