Class BufferingJSONAsyncParser

    • Constructor Detail

      • BufferingJSONAsyncParser

        public BufferingJSONAsyncParser​(JSONContext<? extends org.cometd.bayeux.Message.Mutable> jsonContext)
    • Method Detail

      • parse

        public void parse​(byte[] bytes,
                          int offset,
                          int length)
        Specified by:
        parse in interface JSONContext.AsyncParser
        Parameters:
        bytes - the bytes chunk to parse
        offset - the offset to start parsing from
        length - the number of bytes to parse
      • complete

        public <R> R complete()
        Description copied from interface: JSONContext.AsyncParser

        Signals the end of the JSON string content to this parser and returns the parsed object.

        Specified by:
        complete in interface JSONContext.AsyncParser
        Type Parameters:
        R - the type to cast the result to
        Returns:
        the result of the JSON parsing