abstract class AbstractBase32Codec extends java.lang.Object implements Codec
Modifier and Type | Field and Description |
---|---|
private byte[] |
alphabets |
private static int |
MASK_2BITS |
private static int |
MASK_3BITS |
private static int |
MASK_4BITS |
private static int |
MASK_5BITS |
private static byte |
PAD |
Modifier | Constructor and Description |
---|---|
protected |
AbstractBase32Codec(byte[] alphabets) |
Modifier and Type | Method and Description |
---|---|
byte[] |
decode(byte[] src,
int length) |
private void |
decode1to4bytes(int n,
byte[] src,
int s,
byte[] dest,
int d) |
private void |
decode5bytes(byte[] src,
int s,
byte[] dest,
int d) |
byte[] |
encode(byte[] src) |
private void |
encode1byte(byte[] src,
int s,
byte[] dest,
int d) |
private void |
encode2bytes(byte[] src,
int s,
byte[] dest,
int d) |
private void |
encode3bytes(byte[] src,
int s,
byte[] dest,
int d) |
private void |
encode4bytes(byte[] src,
int s,
byte[] dest,
int d) |
private void |
encode5bytes(byte[] src,
int s,
byte[] dest,
int d) |
protected abstract int |
pos(byte in) |
private static final int MASK_2BITS
private static final int MASK_3BITS
private static final int MASK_4BITS
private static final int MASK_5BITS
private static final byte PAD
private final byte[] alphabets
private final void encode5bytes(byte[] src, int s, byte[] dest, int d)
private final void encode4bytes(byte[] src, int s, byte[] dest, int d)
private final void encode3bytes(byte[] src, int s, byte[] dest, int d)
private final void encode2bytes(byte[] src, int s, byte[] dest, int d)
private final void encode1byte(byte[] src, int s, byte[] dest, int d)
private final void decode5bytes(byte[] src, int s, byte[] dest, int d)
private final void decode1to4bytes(int n, byte[] src, int s, byte[] dest, int d)
n
- the number of final quantum in bytes to decode into. Ranges from 1 to 4, inclusive.protected abstract int pos(byte in)