public class

HexEncoder

extends Object
implements Encoder
java.lang.Object
   ↳ org.bouncycastle.util.encoders.HexEncoder

Summary

Fields
protected final byte[] decodingTable
protected final byte[] encodingTable
Public Constructors
HexEncoder()
Public Methods
int decode(String data, OutputStream out)
decode the Hex encoded String data writing it to the given output stream, whitespace characters will be ignored.
int decode(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.
int encode(byte[] data, int off, int length, OutputStream out)
encode the input data producing a Hex output stream.
Protected Methods
void initialiseDecodingTable()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.bouncycastle.util.encoders.Encoder

Fields

protected final byte[] decodingTable

protected final byte[] encodingTable

Public Constructors

public HexEncoder ()

Public Methods

public int decode (String data, OutputStream out)

decode the Hex encoded String data writing it to the given output stream, whitespace characters will be ignored.

Returns
  • the number of bytes produced.
Throws
IOException

public int decode (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.

Returns
  • the number of bytes produced.
Throws
IOException

public int encode (byte[] data, int off, int length, OutputStream out)

encode the input data producing a Hex output stream.

Returns
  • the number of bytes produced.
Throws
IOException

Protected Methods

protected void initialiseDecodingTable ()