|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.castor.util.HexDecoder
public final class HexDecoder
Hex encoder/decoder implementation (borrowed from BouncyCastle=.
Field Summary | |
---|---|
static java.lang.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,
java.io.OutputStream out)
Decodes the Hex encoded byte data writing it to the given output stream, whitespace characters will be ignored. |
static byte[] |
decode(java.lang.String data)
Decodes the HEX input data producing a output stream. |
static int |
decode(java.lang.String data,
java.io.OutputStream out)
Decodes the Hex encoded String data writing it to the given output stream, whitespace characters will be ignored. |
static java.lang.String |
encode(byte[] data)
Encodes the input data producing a Hex output stream. |
static int |
encode(byte[] data,
int off,
int length,
java.io.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 java.lang.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, java.io.OutputStream out) throws java.io.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.
java.io.IOException
- If encoding fails.public static int decode(byte[] data, int off, int length, java.io.OutputStream out) throws java.io.IOException
data
- The data to be encodedoff
- Initial offset.length
- Initial lengthout
- The OutputStream
instance
java.io.IOException
- If encoding failed.public static int decode(java.lang.String data, java.io.OutputStream out) throws java.io.IOException
data
- The data to be encodedout
- The OutputStream
instance
java.io.IOException
- If encoding failed.public static java.lang.String encode(byte[] data)
data
- Input data to encode.
public static byte[] decode(java.lang.String data)
data
- Input data to be decoded.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |