Buffer that encodes and decodes to and from
Base64 notation.
The encoding and decoding algorithm in this class has been derived from Robert Harder's Public Domain Base64 Encoder/Decoder.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final byte | EQUALS_SIGN
The equals sign (=) as a byte. |
| private static final byte | |
| private static final int | MAX_LINE_LENGTH
Maximum line length (76) of Base64 output. |
| private static final byte | NEW_LINE
The new line character (\n) as a byte. |
| private static final byte |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static byte[] | |
| private static boolean | |
| private static byte[] | |
| public static Buffer | |
| public static Buffer | |
| public static Buffer | |
| public static Buffer | |
| public static Buffer | |
| pack-priv static int | |
| public static Buffer | |
| public static Buffer | |
| public static Buffer | |
| public static Buffer | |
| public static Buffer | |
| public static Buffer | |
| public static Buffer | |
| public static Buffer | |
| public static Buffer | encode(Buffer src, int off, int len, boolean breakLines, Base64Dialect dialect, BufferAllocator allocator)
|
| private static void | encode3to4(Buffer src, int srcOffset, int numSigBytes, Buffer dest, int destOffset, byte[] alphabet)
|
| private static void | |
| pack-priv static int | |
| private static int | |
| private static int | |
| private static int |
| EQUALS_SIGN | back to summary |
|---|---|
| private static final byte EQUALS_SIGN The equals sign (=) as a byte. | |
| EQUALS_SIGN_ENC | back to summary |
|---|---|
| private static final byte EQUALS_SIGN_ENC | |
| MAX_LINE_LENGTH | back to summary |
|---|---|
| private static final int MAX_LINE_LENGTH Maximum line length (76) of Base64 output. | |
| NEW_LINE | back to summary |
|---|---|
| private static final byte NEW_LINE The new line character (\n) as a byte. | |
| WHITE_SPACE_ENC | back to summary |
|---|---|
| private static final byte WHITE_SPACE_ENC | |
| Base64 | back to summary |
|---|---|
| private Base64() | |
| alphabet | back to summary |
|---|---|
| private static byte[] alphabet(Base64Dialect dialect) | |
| breakLines | back to summary |
|---|---|
| private static boolean breakLines(Base64Dialect dialect) | |
| decodabet | back to summary |
|---|---|
| private static byte[] decodabet(Base64Dialect dialect) | |
| decode | back to summary |
|---|---|
| public static Buffer decode(Buffer src) | |
| decode | back to summary |
|---|---|
| public static Buffer decode(Buffer src, Base64Dialect dialect) | |
| decode | back to summary |
|---|---|
| public static Buffer decode(Buffer src, int off, int len) | |
| decode | back to summary |
|---|---|
| public static Buffer decode(Buffer src, int off, int len, Base64Dialect dialect) | |
| decode | back to summary |
|---|---|
| public static Buffer decode(Buffer src, int off, int len, Base64Dialect dialect, BufferAllocator allocator) | |
| decodedBufferSize | back to summary |
|---|---|
| pack-priv static int decodedBufferSize(int len) | |
| encode | back to summary |
|---|---|
| public static Buffer encode(Buffer src) | |
| encode | back to summary |
|---|---|
| public static Buffer encode(Buffer src, Base64Dialect dialect) | |
| encode | back to summary |
|---|---|
| public static Buffer encode(Buffer src, boolean breakLines) | |
| encode | back to summary |
|---|---|
| public static Buffer encode(Buffer src, boolean breakLines, Base64Dialect dialect) | |
| encode | back to summary |
|---|---|
| public static Buffer encode(Buffer src, int off, int len) | |
| encode | back to summary |
|---|---|
| public static Buffer encode(Buffer src, int off, int len, Base64Dialect dialect) | |
| encode | back to summary |
|---|---|
| public static Buffer encode(Buffer src, int off, int len, boolean breakLines) | |
| encode | back to summary |
|---|---|
| public static Buffer encode(Buffer src, int off, int len, boolean breakLines, Base64Dialect dialect) | |
| encode | back to summary |
|---|---|
| public static Buffer encode(Buffer src, int off, int len, boolean breakLines, Base64Dialect dialect, BufferAllocator allocator) | |
| encode3to4 | back to summary |
|---|---|
| private static void encode3to4(Buffer src, int srcOffset, int numSigBytes, Buffer dest, int destOffset, byte[] alphabet) | |
| encode3to4BigEndian | back to summary |
|---|---|
| private static void encode3to4BigEndian(int inBuff, int numSigBytes, Buffer dest, int destOffset, byte[] alphabet) | |
| encodedBufferSize | back to summary |
|---|---|
| pack-priv static int encodedBufferSize(int len, boolean breakLines) | |
| toInt | back to summary |
|---|---|
| private static int toInt(byte value) | |
| toIntBE | back to summary |
|---|---|
| private static int toIntBE(short value) | |
| toIntBE | back to summary |
|---|---|
| private static int toIntBE(int mediumValue) | |
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private int | |
| private byte[] | |
| private Buffer | |
| private int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Buffer | |
| private static int | |
| public boolean |
| b4 | back to summary |
|---|---|
| private final byte[] b4 | |
| b4Posn | back to summary |
|---|---|
| private int b4Posn | |
| decodabet | back to summary |
|---|---|
| private byte[] decodabet | |
| dest | back to summary |
|---|---|
| private Buffer dest | |
| outBuffPosn | back to summary |
|---|---|
| private int outBuffPosn | |
| Decoder | back to summary |
|---|---|
| private Decoder() | |
| decode | back to summary |
|---|---|
| pack-priv Buffer decode(Buffer src, int off, int len, BufferAllocator allocator, Base64Dialect dialect) | |
| decode4to3 | back to summary |
|---|---|
| private static int decode4to3(byte[] src, Buffer dest, int destOffset, byte[] decodabet) | |
| process | back to summary |
|---|---|
| public boolean process(byte value) Implements io.
| |