|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkz.gamma.hardware.util.encoders.Base64Encoder
public class Base64Encoder
BASE64 кодировщик
| Field Summary | |
|---|---|
protected byte[] |
decodingTable
set up the decoding table. |
protected byte[] |
encodingTable
Таблица кодирования |
protected byte |
padding
|
| Constructor Summary | |
|---|---|
Base64Encoder()
Конструктор |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final byte[] encodingTable
protected byte padding
protected final byte[] decodingTable
| Constructor Detail |
|---|
public Base64Encoder()
| Method Detail |
|---|
private boolean isBase64Byte(byte octect)
octect - Октет
public boolean isArrayByteBase64(byte[] arrayOctect)
arrayOctect - byte array to test
protected void initialiseDecodingTable()
public int encode(byte[] data,
int off,
int length,
java.io.OutputStream out)
throws java.io.IOException
encode in interface Encoderdata - Данные для кодированияoff - Начальный сдвигlength - Длинаout - Поток для записи
java.io.IOExceptionprivate boolean ignore(char c)
c - Символ
public int decode(byte[] data,
int off,
int length,
java.io.OutputStream out)
throws java.io.IOException
decode in interface Encoderdata - Данные для декодированияoff - Начальный сдвигlength - Длинаout - Поток для записи
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
decode in interface Encoderdata - Данные для декодированияout - Поток для записи
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 -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||