Package org.bouncycastle.util.encoders
Class Base64Encoder
java.lang.Object
org.bouncycastle.util.encoders.Base64Encoder
- All Implemented Interfaces:
Encoder
public class Base64Encoder extends Object implements Encoder
-
Field Summary
Fields Modifier and Type Field Description protected byte[]decodingTableprotected byte[]encodingTableprotected bytepadding -
Constructor Summary
Constructors Constructor Description Base64Encoder() -
Method Summary
Modifier and Type Method Description intdecode(byte[] data, int off, int length, OutputStream out)decode the base 64 encoded byte data writing it to the given output stream, whitespace characters will be ignored.intdecode(String data, OutputStream out)decode the base 64 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 base 64 output stream.protected voidinitialiseDecodingTable()
-
Field Details
-
encodingTable
protected final byte[] encodingTable -
padding
protected byte padding -
decodingTable
protected final byte[] decodingTable
-
-
Constructor Details
-
Base64Encoder
public Base64Encoder()
-
-
Method Details
-
initialiseDecodingTable
protected void initialiseDecodingTable() -
encode
encode the input data producing a base 64 output stream.- Specified by:
encodein interfaceEncoder- Returns:
- the number of bytes produced.
- Throws:
IOException
-
decode
decode the base 64 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
decode the base 64 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
-