public final class StartPawnSeriesEncoder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
bytesToDecode |
private short |
decodeBytesIndex |
private StartPawnPair |
decodeCurrentPair |
private boolean |
decodeInFirstHalfByte |
private StartPawn |
decodePreviousReturnValue |
private static java.util.Map<java.lang.Byte,StartPawnPair> |
fromByteToPawns |
private static java.util.Map<StartPawn,java.util.Map<StartPawn,java.lang.Byte>> |
fromPawnsToByte |
| Constructor and Description |
|---|
StartPawnSeriesEncoder() |
| Modifier and Type | Method and Description |
|---|---|
StartPawn |
decode()
Decode the next value from the byte array set up previously with
setBytes(byte[]). |
byte[] |
encode(StartPawnSeries pawns)
Encode the pawns given as a byte array.
|
byte[] |
encode(StartPawnSeries pawns,
boolean padding)
Encode the pawns given as a byte array.
|
private byte[] |
encode(StartPawnSeries pawns,
int outputLength)
Encode the pawns given, with a fixed length of output.
|
void |
setBytes(byte[] bytes)
Set up a byte array that can then be decoded, by calling
decode() iteratively. |
private static final java.util.Map<StartPawn,java.util.Map<StartPawn,java.lang.Byte>> fromPawnsToByte
private static final java.util.Map<java.lang.Byte,StartPawnPair> fromByteToPawns
private byte[] bytesToDecode
private short decodeBytesIndex
private boolean decodeInFirstHalfByte
private StartPawnPair decodeCurrentPair
private StartPawn decodePreviousReturnValue
private byte[] encode(StartPawnSeries pawns, int outputLength)
pawns - outputLength - public byte[] encode(StartPawnSeries pawns, boolean padding)
pawns - padding - public byte[] encode(StartPawnSeries pawns)
pawns - public void setBytes(byte[] bytes)
decode() iteratively.bytes - decode().public StartPawn decode()
setBytes(byte[]).setBytes(byte[]).