Top Description Methods
org.bouncycastle.util.encoders

public Interface Encoder

Known Direct Implementers
org.bouncycastle.util.encoders.HexEncoder, org.bouncycastle.util.encoders.Base32Encoder, org.bouncycastle.util.encoders.Base64Encoder
Imports
java.io.IOException, .OutputStream

Encode and decode byte arrays (typically from binary to 7-bit ASCII encodings).

Method Summary

Modifier and TypeMethod and Description
public int
decode(byte[] data, int off, int length, OutputStream out)

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

public int

Returns:

the output length of an encoding.
getEncodedLength
(int
the input length of the data.
inputLength
)

Return the expected output length of the encoding.

public int

Returns:

the upper bound of the output length of a decoding.
getMaxDecodedLength
(int
the input length of the encoded data.
inputLength
)

Return the maximum expected output length of a decoding.

Method Detail

decodeback to summary
public int decode(byte[] data, int off, int length, OutputStream out) throws IOException
decodeback to summary
public int decode(String data, OutputStream out) throws IOException
encodeback to summary
public int encode(byte[] data, int off, int length, OutputStream out) throws IOException
getEncodedLengthback to summary
public int getEncodedLength(int inputLength)

Return the expected output length of the encoding.

Parameters
inputLength:int

the input length of the data.

Returns:int

the output length of an encoding.

getMaxDecodedLengthback to summary
public int getMaxDecodedLength(int inputLength)

Return the maximum expected output length of a decoding. If padding is present the value returned will be greater than the decoded data length.

Parameters
inputLength:int

the input length of the encoded data.

Returns:int

the upper bound of the output length of a decoding.