public interface FSASerializer
Modifier and Type | Method and Description |
---|---|
Set<FSAFlags> |
getFlags() |
<T extends OutputStream> |
serialize(FSA fsa,
T os)
Serialize a finite state automaton to an output stream.
|
FSASerializer |
withAnnotationSeparator(byte annotationSeparator)
Sets the annotation separator (only if
getFlags() returns
FSAFlags.SEPARATORS ). |
FSASerializer |
withFiller(byte filler)
Sets the filler separator (only if
getFlags() returns
FSAFlags.SEPARATORS ). |
FSASerializer |
withNumbers()
Enables support for right language count on nodes, speeding up perfect hash
counts (only if
getFlags() returns FSAFlags.NUMBERS ). |
<T extends OutputStream> T serialize(FSA fsa, T os) throws IOException
T
- A subclass of OutputStream
, returned for chaining.fsa
- The automaton to serialize.os
- The output stream to serialize to.T
for chaining.IOException
- Rethrown if an I/O error occurs.Set<FSAFlags> getFlags()
FSASerializer withFiller(byte filler)
getFlags()
returns
FSAFlags.SEPARATORS
).filler
- The filler separator byte.this
for call chaining.FSASerializer withAnnotationSeparator(byte annotationSeparator)
getFlags()
returns
FSAFlags.SEPARATORS
).annotationSeparator
- The filler separator byte.this
for call chaining.FSASerializer withNumbers()
getFlags()
returns FSAFlags.NUMBERS
).this
for call chaining.Copyright © 2016. All rights reserved.