public class Base64Encoder extends java.lang.Object implements Encoder
Modifier and Type | Field and Description |
---|---|
protected byte[] |
decodingTable
set up the decoding table.
|
protected byte[] |
encodingTable
Таблица кодирования
|
protected byte |
padding |
Constructor and Description |
---|
Base64Encoder()
Конструктор
|
Modifier and Type | Method and Description |
---|---|
int |
decode(byte[] data,
int off,
int length,
java.io.OutputStream out)
decode the base 64 encoded byte data writing it to the given output stream,
whitespace characters will be ignored.
|
int |
decode(java.lang.String data,
java.io.OutputStream out)
decode the base 64 encoded String data writing it to the given output stream,
whitespace characters will be ignored.
|
private int |
decodeLastBlock(java.io.OutputStream out,
char c1,
char c2,
char c3,
char c4) |
int |
encode(byte[] data,
int off,
int length,
java.io.OutputStream out)
encode the input data producing a base 64 output stream.
|
private boolean |
ignore(char c)
Игнорирование символов '\n', '\r', '\t', ' '
|
protected void |
initialiseDecodingTable()
Инициализация таблицы декодирования
|
boolean |
isArrayByteBase64(byte[] arrayOctect)
Tests a given byte array to see if it contains
only valid characters within the Base64 alphabet.
|
private boolean |
isBase64Byte(byte octect)
Проверка на то, является ли октет символом BASE64
|
private int |
nextI(byte[] data,
int i,
int finish) |
private int |
nextI(java.lang.String data,
int i,
int finish) |
protected final byte[] encodingTable
protected byte padding
protected final byte[] decodingTable
private boolean isBase64Byte(byte octect)
octect
- Октетpublic boolean isArrayByteBase64(byte[] arrayOctect)
arrayOctect
- byte array to testprotected void initialiseDecodingTable()
public int encode(byte[] data, int off, int length, java.io.OutputStream out) throws java.io.IOException
private boolean ignore(char c)
c
- Символpublic int decode(byte[] data, int off, int length, java.io.OutputStream out) throws java.io.IOException
private int nextI(byte[] data, int i, int finish)
data
- i
- finish
- public int decode(java.lang.String data, java.io.OutputStream out) throws java.io.IOException
private int decodeLastBlock(java.io.OutputStream out, char c1, char c2, char c3, char c4) throws java.io.IOException
out
- c1
- c2
- c3
- c4
- java.io.IOException
private int nextI(java.lang.String data, int i, int finish)
data
- i
- finish
- Copyright © 1998-2014 Gamma Technologies. All Rights Reserved.