morfologik.fsa.bytes
Class FSA5Serializer

java.lang.Object
  extended by morfologik.fsa.bytes.FSA5Serializer

public final class FSA5Serializer
extends Object

Serializes in-memory byte-labeled automata to FSA5 format. The automaton after serialization may not be minimal because FSA5 keeps acceptance (final) flag on transitions and FSABuilder keeps this information inside States. The difference in practice is about 10% of the overall size; if super-compact format is required, use the original fsa package. Having distinct acceptor States is useful in other applications.


Field Summary
 byte annotationByte
           
 byte fillerByte
           
 
Constructor Summary
FSA5Serializer()
           
 
Method Summary
<T extends OutputStream>
T
serialize(State s, T os)
          Serialize root state s to an output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fillerByte

public byte fillerByte
See Also:
FSA5.filler

annotationByte

public byte annotationByte
See Also:
FSA5.annotation
Constructor Detail

FSA5Serializer

public FSA5Serializer()
Method Detail

serialize

public <T extends OutputStream> T serialize(State s,
                                            T os)
                                 throws IOException
Serialize root state s to an output stream.

Returns:
Returns os for chaining.
Throws:
IOException


Copyright © 2010. All Rights Reserved.