Top Description Fields Constructors Methods
org.bouncycastle.util.encoders

public Class HexEncoder

extends Object
implements Encoder
Class Inheritance
All Implemented Interfaces
org.bouncycastle.util.encoders.Encoder
Imports
java.io.IOException, .OutputStream

A streaming Hex encoder.

Field Summary

Modifier and TypeField and Description
protected final byte[]
protected final byte[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the number of bytes produced.
decode
(byte[] data, int off, int length, OutputStream out)

Implements org.bouncycastle.util.encoders.Encoder.decode.

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

Returns:

the number of bytes produced.
decode
(String data, OutputStream out)

Implements org.bouncycastle.util.encoders.Encoder.decode.

decode the Hex encoded String data writing it to the given output stream, whitespace characters will be ignored.
pack-priv byte[]
decodeStrict(String str, int off, int len)

public int

Returns:

the number of bytes produced.
encode
(byte[] data, int off, int length, OutputStream out)

Implements org.bouncycastle.util.encoders.Encoder.encode.

encode the input data producing a Hex output stream.
private static boolean
ignore(char c)

protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

decodingTableback to summary
protected final byte[] decodingTable
encodingTableback to summary
protected final byte[] encodingTable

Constructor Detail

HexEncoderback to summary
public HexEncoder()

Method Detail

decodeback to summary
public int decode(byte[] data, int off, int length, OutputStream out) throws IOException

Implements org.bouncycastle.util.encoders.Encoder.decode.

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

Returns:int

the number of bytes produced.

decodeback to summary
public int decode(String data, OutputStream out) throws IOException

Implements org.bouncycastle.util.encoders.Encoder.decode.

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

Returns:int

the number of bytes produced.

decodeStrictback to summary
pack-priv byte[] decodeStrict(String str, int off, int len) throws IOException
encodeback to summary
public int encode(byte[] data, int off, int length, OutputStream out) throws IOException

Implements org.bouncycastle.util.encoders.Encoder.encode.

encode the input data producing a Hex output stream.

Returns:int

the number of bytes produced.

ignoreback to summary
private static boolean ignore(char c)
initialiseDecodingTableback to summary
protected void initialiseDecodingTable()