Begins returning true
after the first time next
returns false.
Advances to the next token.
Advances to the next token. Returns false on EOF.
Throws an UnpicklingException if the current tokenType isn't tt
.
Like next(), but throws an UnexpectedEofException if EOF is encountered.
Like next(), but throws an UnexpectedEofException if EOF is encountered.
Can be overridden by a particular implementation to intercept certain types, based on runtime type checking of
the typeName
, and read them in some backend-specific way without using the provided pickler
.
Can be overridden by a particular implementation to intercept certain types, based on runtime type checking of
the typeName
, and read them in some backend-specific way without using the provided pickler
.
Otherwise, if the type is not being overridden, delegates to the pickler
provided.
Produces a stream of tokens. Counterpart of
Writer
.This is patterned after the Jackson stream interface. At any given time, the Reader has a current token, unless it hasn't started reading yet or is already done. The current token can be inspected using the methods on the trait. Typical usage looks like this:
while (reader.next) { reader.tokenType match ... }
The methods
int
,string
etc. throw an UnpicklingException if the current token is not of the right type, or if there is no current token.