Interface FSTSerializer

  • All Known Implementing Classes:
    FSTSerializerImpl

    public interface FSTSerializer
    All FST serializers (to binary formats) will implement this interface.
    • Method Detail

      • serialize

        <T extends OutputStream> T serialize​(FST fst,
                                             T os)
                                      throws IOException
        Serialize a finite state automaton to an output stream.
        Type Parameters:
        T - A subclass of OutputStream, returned for chaining.
        Parameters:
        fst - The automaton to serialize.
        os - The output stream to serialize to.
        Returns:
        Returns T for chaining.
        Throws:
        IOException - Rethrown if an I/O error occurs.
      • getFlags

        Set<FSTFlags> getFlags()
        Returns:
        Returns the set of flags supported by the serializer (and the output automaton).
      • withNumbers

        FSTSerializer withNumbers()
        Enables support for right language count on nodes, speeding up perfect hash counts (only if getFlags() returns FSTFlags.NUMBERS).
        Returns:
        Returns this for call chaining.