Interface QueryResultParser<P extends QueryResultHandler>

    • Method Detail

      • format

        @Nonnull
        QueryResultFormat format()
        The format this parser can parse
        Returns:
        the format
      • parse

        default void parse​(@Nonnull
                           java.io.InputStream theStream,
                           @Nonnull
                           P theHandler)
                    throws java.io.IOException
        Parse the content using the default options.
        Parameters:
        theStream - the stream to read from
        theHandler - the handler to pass parse events to
        Throws:
        InvalidQueryResults - if there was an error while parsing the results
        java.io.IOException - if there was an error while reading from the stream
      • parse

        void parse​(@Nonnull
                   java.io.InputStream theStream,
                   @Nonnull
                   P theHandler,
                   @Nonnull
                   Options theOptions)
            throws java.io.IOException
        Parse the results.
        Parameters:
        theStream - the stream to read from
        theHandler - the handler to pass parse events to
        theOptions - the parsing options
        Throws:
        InvalidQueryResults - if there was an error while parsing the results
        java.io.IOException - if there was an error while reading from the stream