public class NodewalkerCodec extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
NodewalkerCodec.Decoder
The type Decoder.
|
protected class |
NodewalkerCodec.Encoder
The type Encoder.
|
Modifier and Type | Field and Description |
---|---|
static char |
END_OF_STRING
The constant END_OF_STRING.
|
static Character |
ESCAPE
The constant ESCAPE.
|
static char |
FALLBACK
The constant FALLBACK.
|
protected CharTrie |
inner
The Inner.
|
protected PrintStream |
verbose
The Verbose.
|
Modifier and Type | Method and Description |
---|---|
CharSequence |
decodePPM(byte[] data,
int context)
Decode ppm string.
|
Bits |
encodePPM(String text,
int context)
Encode ppm bits.
|
protected boolean |
readBackup(NodewalkerCodec.Decoder decoder)
Read backup boolean.
|
protected void |
readForward(NodewalkerCodec.Decoder decoder)
Read forward.
|
NodewalkerCodec |
setVerbose(PrintStream verbose)
Sets verbose.
|
protected Optional<TrieNode> |
writeBackup(NodewalkerCodec.Encoder encoder,
char token)
Write backup optional.
|
protected void |
writeForward(NodewalkerCodec.Encoder encoder)
Write forward.
|
protected void |
writeTerminal(NodewalkerCodec.Encoder encoder)
Write terminal.
|
public static final Character ESCAPE
public static final char FALLBACK
public static final char END_OF_STRING
protected final CharTrie inner
protected PrintStream verbose
public CharSequence decodePPM(byte[] data, int context)
data
- the datacontext
- the contextpublic Bits encodePPM(String text, int context)
text
- the textcontext
- the contextpublic NodewalkerCodec setVerbose(PrintStream verbose)
verbose
- the verboseprotected void writeForward(NodewalkerCodec.Encoder encoder) throws IOException
encoder
- the encoderIOException
- the io exceptionprotected void readForward(NodewalkerCodec.Decoder decoder) throws IOException
decoder
- the decoderIOException
- the io exceptionprotected Optional<TrieNode> writeBackup(NodewalkerCodec.Encoder encoder, char token) throws IOException
encoder
- the encodertoken
- the tokenIOException
- the io exceptionprotected boolean readBackup(NodewalkerCodec.Decoder decoder) throws IOException
decoder
- the decoderIOException
- the io exceptionprotected void writeTerminal(NodewalkerCodec.Encoder encoder) throws IOException
encoder
- the encoderIOException
- the io exceptionCopyright © 2019 SimiaCryptus Software. All rights reserved.