|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmorfologik.fsa.FSA5Serializer
public final class FSA5Serializer
Serializes in-memory FSA graphs to a binary format compatible with
Jan Daciuk's fsa's package FSA5 format.
It is possible to serialize the automaton with numbers required for perfect
hashing. See withNumbers() method.
FSA5,
FSA.read(java.io.InputStream)| Field Summary | |
|---|---|
byte |
annotationByte
|
byte |
fillerByte
|
| Constructor Summary | |
|---|---|
FSA5Serializer()
|
|
| Method Summary | ||
|---|---|---|
java.util.Set<FSAFlags> |
getFlags()
Return supported flags. |
|
|
serialize(FSA fsa,
T os)
Serialize root state s to an output stream in
FSA5 format. |
|
FSA5Serializer |
withAnnotationSeparator(byte annotationSeparator)
Supports built-in annotation separator. |
|
FSA5Serializer |
withFiller(byte filler)
Supports built-in filler separator. |
|
FSASerializer |
withLogger(IMessageLogger logger)
Log extra messages during construction. |
|
FSA5Serializer |
withNumbers()
Serialize the automaton with the number of right-language sequences in each node. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public byte fillerByte
FSA5.fillerpublic byte annotationByte
FSA5.annotation| Constructor Detail |
|---|
public FSA5Serializer()
| Method Detail |
|---|
public FSA5Serializer withNumbers()
withNumbers in interface FSASerializerpublic FSA5Serializer withFiller(byte filler)
FSASerializer.getFlags() returns
FSAFlags.SEPARATORS.
withFiller in interface FSASerializerpublic FSA5Serializer withAnnotationSeparator(byte annotationSeparator)
FSASerializer.getFlags() returns
FSAFlags.SEPARATORS.
withAnnotationSeparator in interface FSASerializerpublic FSASerializer withLogger(IMessageLogger logger)
withLogger in interface FSASerializer
public <T extends java.io.OutputStream> T serialize(FSA fsa,
T os)
throws java.io.IOException
s to an output stream in
FSA5 format.
serialize in interface FSASerializeros for chaining.
java.io.IOExceptionwithNumberspublic java.util.Set<FSAFlags> getFlags()
getFlags in interface FSASerializer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||