Interface SimpleAutomatonDeserializer<S,​I>

    • Method Detail

      • readModel

        <I2> InputModelData<I2,​SimpleAutomaton<S,​I2>> readModel​(InputStream is,
                                                                            Function<I,​I2> inputTransformer)
                                                                     throws IOException
        Reads the contents from the given input stream and de-serializes it into a InputModelData that contains the model and its alphabet definition.

        Note: the input stream will not be closed.

        Type Parameters:
        I2 - the input symbol type of the model
        Parameters:
        is - the input stream to read data from
        inputTransformer - a function to transform the inputs of this serializer to inputs of the returned model
        Returns:
        InputModelData that contains the model and its alphabet definition
        Throws:
        IOException - if an error occurred while reading from the stream
        FormatException - if the content of the stream was not in the expected format
      • readModel

        default <I2> InputModelData<I2,​SimpleAutomaton<S,​I2>> readModel​(URL url,
                                                                                    Function<I,​I2> inputTransformer)
                                                                             throws IOException
        Reads the contents from the given URL and de-serializes it into a InputModelData that contains the model and its alphabet definition.
        Type Parameters:
        I2 - the input symbol type of the model
        Parameters:
        url - the url to read data from
        inputTransformer - a function to transform the inputs of this serializer to inputs of the returned model
        Returns:
        InputModelData that contains the model and its alphabet definition
        Throws:
        IOException - if an error occurred while reading from the stream
        FormatException - if the content of the stream was not in the expected format
      • readModel

        default <I2> InputModelData<I2,​SimpleAutomaton<S,​I2>> readModel​(File f,
                                                                                    Function<I,​I2> inputTransformer)
                                                                             throws IOException
        Reads the contents from the given file and de-serializes it into a InputModelData that contains the model and its alphabet definition.
        Type Parameters:
        I2 - the input symbol type of the model
        Parameters:
        f - the file to read data from
        inputTransformer - a function to transform the inputs of this serializer to inputs of the returned model
        Returns:
        InputModelData that contains the model and its alphabet definition
        Throws:
        IOException - if an error occurred while reading from the stream
        FormatException - if the content of the stream was not in the expected format
      • readModel

        default <I2> InputModelData<I2,​SimpleAutomaton<S,​I2>> readModel​(byte[] buf,
                                                                                    Function<I,​I2> inputTransformer)
                                                                             throws IOException
        Reads the contents from the given byte buffer and de-serializes it into a InputModelData that contains the model and its alphabet definition.
        Type Parameters:
        I2 - the input symbol type of the model
        Parameters:
        buf - the buffer to read data from
        inputTransformer - a function to transform the inputs of this serializer to inputs of the returned model
        Returns:
        InputModelData that contains the model and its alphabet definition
        Throws:
        IOException - if an error occurred while reading from the stream
        FormatException - if the content of the stream was not in the expected format