Top Description Fields Constructors Methods
com.ongres.scram.common.bouncycastle.base64

public Class Base64Encoder

extends Object
implements Encoder
Class Inheritance
All Implemented Interfaces
com.ongres.scram.common.bouncycastle.base64.Encoder
Imports
java.io.IOException, .OutputStream

A streaming Base64 encoder.

Field Summary

Modifier and TypeField and Description
protected final byte[]
protected final byte[]
protected 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 com.ongres.scram.common.bouncycastle.base64.Encoder.decode.

decode the base 64 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 com.ongres.scram.common.bouncycastle.base64.Encoder.decode.

decode the base 64 encoded String data writing it to the given output stream, whitespace characters will be ignored.
private int
decodeLastBlock(OutputStream out, char c1, char c2, char c3, char c4)

public int

Returns:

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

Implements com.ongres.scram.common.bouncycastle.base64.Encoder.encode.

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

protected void
private int
nextI(byte[] data, int i, int finish)

private int
nextI(String data, int i, int finish)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

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

Constructor Detail

Base64Encoderback to summary
public Base64Encoder()

Method Detail

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

Implements com.ongres.scram.common.bouncycastle.base64.Encoder.decode.

decode the base 64 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 com.ongres.scram.common.bouncycastle.base64.Encoder.decode.

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

Returns:int

the number of bytes produced.

decodeLastBlockback to summary
private int decodeLastBlock(OutputStream out, char c1, char c2, char c3, char c4) throws IOException
encodeback to summary
public int encode(byte[] data, int off, int length, OutputStream out) throws IOException

Implements com.ongres.scram.common.bouncycastle.base64.Encoder.encode.

encode the input data producing a base 64 output stream.

Returns:int

the number of bytes produced.

ignoreback to summary
private boolean ignore(char c)
initialiseDecodingTableback to summary
protected void initialiseDecodingTable()
nextIback to summary
private int nextI(byte[] data, int i, int finish)
nextIback to summary
private int nextI(String data, int i, int finish)