Package com.fasterxml.jackson.core.async
Interface NonBlockingInputFeeder
-
- All Known Subinterfaces:
ByteArrayFeeder
,ByteBufferFeeder
- All Known Implementing Classes:
NonBlockingJsonParser
public interface NonBlockingInputFeeder
Interface used by non-blockingJsonParser
implementations to feed input to parse. Feeder is used by entity that feeds content to parse; at any given point only one chunk of content can be processed so caller has to take care to only feed more content when existing content has been parsed (which occurs when parser'snextToken
is called). Once application using non-blocking parser has no more data to feed it should callendOfInput()
to indicate end of logical input (stream) to parse.- Since:
- 2.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
endOfInput()
Method that should be called after last chunk of data to parse has been fed (withfeedInput
in sub-class); can be called regardless of whatneedMoreInput()
returns.boolean
needMoreInput()
Method called to check whether it is ok to feed more data: parser returns true if it has no more content to parse (and it is ok to feed more); otherwise false (and no data should yet be fed).
-
-
-
Method Detail
-
needMoreInput
boolean needMoreInput()
Method called to check whether it is ok to feed more data: parser returns true if it has no more content to parse (and it is ok to feed more); otherwise false (and no data should yet be fed).- Returns:
True
if more input is needed (and can be fed);false
if there is still some input to decode
-
endOfInput
void endOfInput()
Method that should be called after last chunk of data to parse has been fed (withfeedInput
in sub-class); can be called regardless of whatneedMoreInput()
returns. After calling this method, no more data can be fed; and parser assumes no more data will be available.
-
-