Package org.bouncycastle.util.encoders
Class HexEncoder
- java.lang.Object
-
- org.bouncycastle.util.encoders.HexEncoder
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]decodingTableprotected byte[]encodingTable
-
Constructor Summary
Constructors Constructor Description HexEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdecode(byte[] data, int off, int length, OutputStream out)decode the Hex encoded byte data writing it to the given output stream, whitespace characters will be ignored.intdecode(String data, OutputStream out)decode the Hex encoded String data writing it to the given output stream, whitespace characters will be ignored.intencode(byte[] data, int off, int length, OutputStream out)encode the input data producing a Hex output stream.protected voidinitialiseDecodingTable()
-
-
-
Method Detail
-
initialiseDecodingTable
protected void initialiseDecodingTable()
-
encode
public int encode(byte[] data, int off, int length, OutputStream out) throws IOExceptionencode the input data producing a Hex output stream.- Specified by:
encodein interfaceEncoder- Returns:
- the number of bytes produced.
- Throws:
IOException
-
decode
public int decode(byte[] data, int off, int length, OutputStream out) throws IOExceptiondecode the Hex encoded byte data writing it to the given output stream, whitespace characters will be ignored.- Specified by:
decodein interfaceEncoder- Returns:
- the number of bytes produced.
- Throws:
IOException
-
decode
public int decode(String data, OutputStream out) throws IOException
decode the Hex encoded String data writing it to the given output stream, whitespace characters will be ignored.- Specified by:
decodein interfaceEncoder- Returns:
- the number of bytes produced.
- Throws:
IOException
-
-