public class JsonParserSequence extends JsonParserDelegate
JacksonParsers to create a single logical sequence of
tokens, as a single JacksonParser.
Fairly simple use of JsonParserDelegate: only need
to override nextToken() to handle transition
JacksonParser.Feature, JacksonParser.NumberType| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Closes the parser so that no further iteration or data access
can be made; will also close the underlying input source
if parser either owns the input source, or feature
JacksonParser.Feature.AUTO_CLOSE_SOURCE is enabled. |
int |
containedParsersCount()
Method that is most useful for debugging or testing;
returns actual number of underlying parsers sequence
was constructed with (nor just ones remaining active)
|
static JsonParserSequence |
createFlattened(JacksonParser first,
JacksonParser second)
Method that will construct a parser (possibly a sequence) that
contains all given sub-parsers.
|
JsonToken |
nextToken()
Main iteration method, which will advance stream enough
to determine type of the next token, if any.
|
canUseSchema, clearCurrentToken, disable, enable, getBigIntegerValue, getBinaryValue, getBooleanValue, getByteValue, getCodec, getCurrentLocation, getCurrentName, getCurrentToken, getDecimalValue, getDoubleValue, getEmbeddedObject, getFloatValue, getInputSource, getIntValue, getLastClearedToken, getLongValue, getNumberType, getNumberValue, getParsingContext, getShortValue, getText, getTextCharacters, getTextLength, getTextOffset, getTokenLocation, hasCurrentToken, hasTextCharacters, isClosed, isEnabled, nextValue, overrideCurrentName, setCodec, setSchema, skipChildren, versionconfigure, getBinaryValue, getSchema, getValueAsBoolean, getValueAsBoolean, getValueAsDouble, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, isExpectedStartArrayToken, nextBooleanValue, nextFieldName, nextIntValue, nextLongValue, nextTextValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, releaseBufferedpublic static JsonParserSequence createFlattened(JacksonParser first, JacksonParser second)
public void close()
throws IOException
JacksonParserJacksonParser.Feature.AUTO_CLOSE_SOURCE is enabled.
Whether parser owns the input source depends on factory
method that was used to construct instance (so check
JsonFactory for details,
but the general
idea is that if caller passes in closable resource (such
as InputStream or Reader) parser does NOT
own the source; but if it passes a reference (such as
File or URL and creates
stream or reader it does own them.close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 JsonParserDelegateIOExceptionpublic JsonToken nextToken() throws IOException, JsonParseException
JacksonParsernextToken 在类中 JsonParserDelegateIOExceptionJsonParseExceptionpublic int containedParsersCount()
Copyright © 2002–2019 The MyMMSCs Software Foundation. All rights reserved.