ByteBuf 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 ByteBuf | |
| public static ByteBuf | |
| public static ByteBuf | |
| public static ByteBuf | |
| public static ByteBuf | |
| pack-priv static int | |
| public static ByteBuf | |
| public static ByteBuf | |
| public static ByteBuf | |
| public static ByteBuf | |
| public static ByteBuf | |
| public static ByteBuf | |
| public static ByteBuf | |
| public static ByteBuf | |
| public static ByteBuf | encode(ByteBuf src, int off, int len, boolean breakLines, Base64Dialect dialect, ByteBufAllocator allocator)
|
| private static void | encode3to4(ByteBuf src, int srcOffset, int numSigBytes, ByteBuf dest, int destOffset, byte[] alphabet)
|
| private static void | |
| private static void | |
| pack-priv static int | |
| private static int | |
| private 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 ByteBuf decode(ByteBuf src) | |
| decode | back to summary |
|---|---|
| public static ByteBuf decode(ByteBuf src, Base64Dialect dialect) | |
| decode | back to summary |
|---|---|
| public static ByteBuf decode(ByteBuf src, int off, int len) | |
| decode | back to summary |
|---|---|
| public static ByteBuf decode(ByteBuf src, int off, int len, Base64Dialect dialect) | |
| decode | back to summary |
|---|---|
| public static ByteBuf decode(ByteBuf src, int off, int len, Base64Dialect dialect, ByteBufAllocator allocator) | |
| decodedBufferSize | back to summary |
|---|---|
| pack-priv static int decodedBufferSize(int len) | |
| encode | back to summary |
|---|---|
| public static ByteBuf encode(ByteBuf src) | |
| encode | back to summary |
|---|---|
| public static ByteBuf encode(ByteBuf src, Base64Dialect dialect) | |
| encode | back to summary |
|---|---|
| public static ByteBuf encode(ByteBuf src, boolean breakLines) | |
| encode | back to summary |
|---|---|
| public static ByteBuf encode(ByteBuf src, boolean breakLines, Base64Dialect dialect) | |
| encode | back to summary |
|---|---|
| public static ByteBuf encode(ByteBuf src, int off, int len) | |
| encode | back to summary |
|---|---|
| public static ByteBuf encode(ByteBuf src, int off, int len, Base64Dialect dialect) | |
| encode | back to summary |
|---|---|
| public static ByteBuf encode(ByteBuf src, int off, int len, boolean breakLines) | |
| encode | back to summary |
|---|---|
| public static ByteBuf encode(ByteBuf src, int off, int len, boolean breakLines, Base64Dialect dialect) | |
| encode | back to summary |
|---|---|
| public static ByteBuf encode(ByteBuf src, int off, int len, boolean breakLines, Base64Dialect dialect, ByteBufAllocator allocator) | |
| encode3to4 | back to summary |
|---|---|
| private static void encode3to4(ByteBuf src, int srcOffset, int numSigBytes, ByteBuf dest, int destOffset, byte[] alphabet) | |
| encode3to4BigEndian | back to summary |
|---|---|
| private static void encode3to4BigEndian(int inBuff, int numSigBytes, ByteBuf dest, int destOffset, byte[] alphabet) | |
| encode3to4LittleEndian | back to summary |
|---|---|
| private static void encode3to4LittleEndian(int inBuff, int numSigBytes, ByteBuf 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) | |
| toIntLE | back to summary |
|---|---|
| private static int toIntLE(short value) | |
| toIntLE | back to summary |
|---|---|
| private static int toIntLE(int mediumValue) | |
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private int | |
| private byte[] | |
| private ByteBuf | |
| private int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv ByteBuf | |
| 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 ByteBuf dest | |
| outBuffPosn | back to summary |
|---|---|
| private int outBuffPosn | |
| Decoder | back to summary |
|---|---|
| private Decoder() | |
| decode | back to summary |
|---|---|
| pack-priv ByteBuf decode(ByteBuf src, int off, int len, ByteBufAllocator allocator, Base64Dialect dialect) | |
| decode4to3 | back to summary |
|---|---|
| private static int decode4to3(byte[] src, ByteBuf dest, int destOffset, byte[] decodabet) | |
| process | back to summary |
|---|---|
| public boolean process(byte value) throws Exception Implements io.
| |