|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.fasterxml.jackson.core.JsonParser
com.fasterxml.jackson.core.base.ParserMinimalBase
com.fasterxml.jackson.core.base.ParserBase
com.bazaarvoice.jackson.rison.RisonParser
public class RisonParser
This is a concrete implementation of JsonParser, which is
based on a Reader to handle low-level character
conversion tasks.
| Nested Class Summary | |
|---|---|
static class |
RisonParser.Feature
Enumeration that defines all configurable features for Rison parsers. |
| Nested classes/interfaces inherited from class com.fasterxml.jackson.core.JsonParser |
|---|
com.fasterxml.jackson.core.JsonParser.NumberType |
| Field Summary | |
|---|---|
protected char[] |
_inputBuffer
Current buffer from which data is read; generally data is read into buffer from input source. |
protected com.fasterxml.jackson.core.ObjectCodec |
_objectCodec
|
protected Reader |
_reader
Reader that can be used for reading more content, if one buffer from input source, but in some cases pre-loaded buffer is handed to the parser. |
protected int |
_risonFeatures
|
protected com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer |
_symbols
|
protected boolean |
_tokenIncomplete
Flag that indicates that the current token has not yet been fully processed, and needs to be finished for some access (or skipped to obtain the next token) |
| Fields inherited from class com.fasterxml.jackson.core.base.ParserBase |
|---|
_binaryValue, _byteArrayBuilder, _closed, _currInputProcessed, _currInputRow, _currInputRowStart, _expLength, _fractLength, _inputEnd, _inputPtr, _intLength, _ioContext, _nameCopied, _nameCopyBuffer, _nextToken, _numberBigDecimal, _numberBigInt, _numberDouble, _numberInt, _numberLong, _numberNegative, _numTypesValid, _parsingContext, _textBuffer, _tokenInputCol, _tokenInputRow, _tokenInputTotal, CHAR_NULL, INT_0, INT_1, INT_2, INT_3, INT_4, INT_5, INT_6, INT_7, INT_8, INT_9, INT_DECIMAL_POINT, INT_e, INT_E, INT_MINUS, INT_PLUS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_INT, NR_LONG, NR_UNKNOWN |
| Fields inherited from class com.fasterxml.jackson.core.base.ParserMinimalBase |
|---|
_currToken, _lastClearedToken, INT_APOSTROPHE, INT_ASTERISK, INT_b, INT_BACKSLASH, INT_COLON, INT_COMMA, INT_CR, INT_f, INT_LBRACKET, INT_LCURLY, INT_LF, INT_n, INT_QUOTE, INT_r, INT_RBRACKET, INT_RCURLY, INT_SLASH, INT_SPACE, INT_t, INT_TAB, INT_u |
| Fields inherited from class com.fasterxml.jackson.core.JsonParser |
|---|
_features |
| Constructor Summary | |
|---|---|
RisonParser(com.fasterxml.jackson.core.io.IOContext ctxt,
int jsonFeatures,
int risonFeatures,
Reader r,
com.fasterxml.jackson.core.ObjectCodec codec,
com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer st)
|
|
| Method Summary | |
|---|---|
protected void |
_closeInput()
|
protected byte[] |
_decodeBase64(com.fasterxml.jackson.core.Base64Variant b64variant)
Efficient handling for incremental parsing of base64-encoded textual content. |
protected int |
_decodeBase64Escape2(com.fasterxml.jackson.core.Base64Variant b64variant,
char ch,
int index)
|
protected char |
_decodeEscaped()
|
protected void |
_finishString()
|
protected void |
_finishString2()
|
protected String |
_getText2(com.fasterxml.jackson.core.JsonToken t)
|
protected com.fasterxml.jackson.core.JsonToken |
_handleInvalidNumberStart(int ch,
boolean negative)
Method called if expected numeric value (due to leading sign) does not look like a number |
protected com.fasterxml.jackson.core.JsonToken |
_handleUnexpectedValue(int i)
Method for handling cases where first non-space character of an expected value token is not legal for standard JSON content. |
protected void |
_matchToken(String matchStr,
int i)
Helper method for checking whether input matches expected token |
protected String |
_parseFieldName(int i)
|
protected String |
_parseUnquotedFieldName(int i)
Method called when we see non-white space character other than double quote, when expecting a field name. |
protected void |
_parseUnquotedString()
|
protected void |
_parseUnquotedString2()
|
protected void |
_releaseBuffers()
Method called to release internal buffers owned by the base reader. |
protected void |
_reportInvalidToken(String matchedPart,
String msg)
|
protected void |
_skipString()
Method called to skim through rest of unparsed String value, if it is not needed. |
void |
close()
|
byte[] |
getBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant)
|
com.fasterxml.jackson.core.ObjectCodec |
getCodec()
|
Object |
getEmbeddedObject()
|
Object |
getInputSource()
|
protected char |
getNextChar(String eofMsg)
|
String |
getText()
Method for accessing textual representation of the current event; if no current event (before first call to nextToken(), or
after encountering end-of-input), returns null. |
char[] |
getTextCharacters()
|
int |
getTextLength()
|
int |
getTextOffset()
|
protected boolean |
loadMore()
|
Boolean |
nextBooleanValue()
|
int |
nextIntValue(int defaultValue)
|
long |
nextLongValue(long defaultValue)
|
String |
nextTextValue()
|
com.fasterxml.jackson.core.JsonToken |
nextToken()
|
protected com.fasterxml.jackson.core.JsonToken |
parseNumberText(int ch)
Initial parsing method for number values. |
int |
releaseBuffered(Writer w)
|
void |
setCodec(com.fasterxml.jackson.core.ObjectCodec c)
|
com.fasterxml.jackson.core.Version |
version()
|
| Methods inherited from class com.fasterxml.jackson.core.base.ParserBase |
|---|
_decodeBase64Escape, _decodeBase64Escape, _getByteArrayBuilder, _handleEOF, _parseNumericValue, _reportMismatchedEndMarker, convertNumberToBigDecimal, convertNumberToBigInteger, convertNumberToDouble, convertNumberToInt, convertNumberToLong, getBigIntegerValue, getCurrentLocation, getCurrentName, getDecimalValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getNumberType, getNumberValue, getParsingContext, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, getTokenLocation, hasTextCharacters, isClosed, loadMoreGuaranteed, overrideCurrentName, reportInvalidBase64Char, reportInvalidBase64Char, reportInvalidNumber, reportOverflowInt, reportOverflowLong, reportUnexpectedNumberChar, reset, resetAsNaN, resetFloat, resetInt |
| Methods inherited from class com.fasterxml.jackson.core.base.ParserMinimalBase |
|---|
_constructError, _decodeBase64, _getCharDesc, _handleUnrecognizedCharacterEscape, _reportBase64EOF, _reportError, _reportInvalidBase64, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportUnexpectedChar, _throwInternal, _throwInvalidSpace, _throwUnquotedSpace, _wrapError, clearCurrentToken, getCurrentToken, getLastClearedToken, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsLong, getValueAsString, hasCurrentToken, nextValue, skipChildren |
| Methods inherited from class com.fasterxml.jackson.core.JsonParser |
|---|
_constructError, _reportUnsupportedOperation, canUseSchema, configure, disable, enable, getBinaryValue, getBooleanValue, getByteValue, getSchema, getShortValue, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsLong, getValueAsString, isEnabled, isExpectedStartArrayToken, nextFieldName, readBinaryValue, readBinaryValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, requiresCustomCodec, setSchema |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Reader _reader
protected char[] _inputBuffer
protected com.fasterxml.jackson.core.ObjectCodec _objectCodec
protected final com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer _symbols
protected final int _risonFeatures
protected boolean _tokenIncomplete
| Constructor Detail |
|---|
public RisonParser(com.fasterxml.jackson.core.io.IOContext ctxt,
int jsonFeatures,
int risonFeatures,
Reader r,
com.fasterxml.jackson.core.ObjectCodec codec,
com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer st)
| Method Detail |
|---|
public com.fasterxml.jackson.core.Version version()
version in interface com.fasterxml.jackson.core.Versionedversion in class com.fasterxml.jackson.core.base.ParserMinimalBasepublic com.fasterxml.jackson.core.ObjectCodec getCodec()
getCodec in class com.fasterxml.jackson.core.JsonParserpublic void setCodec(com.fasterxml.jackson.core.ObjectCodec c)
setCodec in class com.fasterxml.jackson.core.JsonParser
public int releaseBuffered(Writer w)
throws IOException
releaseBuffered in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic Object getInputSource()
getInputSource in class com.fasterxml.jackson.core.JsonParser
protected boolean loadMore()
throws IOException
loadMore in class com.fasterxml.jackson.core.base.ParserBaseIOException
protected char getNextChar(String eofMsg)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
protected void _closeInput()
throws IOException
_closeInput in class com.fasterxml.jackson.core.base.ParserBaseIOException
protected void _releaseBuffers()
throws IOException
_closeInput() (for
example, when explicitly closing this reader instance), or
separately (if need be).
_releaseBuffers in class com.fasterxml.jackson.core.base.ParserBaseIOException
public String getText()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
nextToken(), or
after encountering end-of-input), returns null.
Method can be called for any event.
getText in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOException
com.fasterxml.jackson.core.JsonParseExceptionprotected String _getText2(com.fasterxml.jackson.core.JsonToken t)
public char[] getTextCharacters()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
getTextCharacters in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOException
com.fasterxml.jackson.core.JsonParseException
public int getTextLength()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
getTextLength in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOException
com.fasterxml.jackson.core.JsonParseException
public int getTextOffset()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
getTextOffset in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOException
com.fasterxml.jackson.core.JsonParseException
public Object getEmbeddedObject()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
getEmbeddedObject in class com.fasterxml.jackson.core.JsonParserIOException
com.fasterxml.jackson.core.JsonParseException
public byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
getBinaryValue in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOException
com.fasterxml.jackson.core.JsonParseException
public com.fasterxml.jackson.core.JsonToken nextToken()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
nextToken in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOException
com.fasterxml.jackson.core.JsonParseException
public String nextTextValue()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
nextTextValue in class com.fasterxml.jackson.core.JsonParserIOException
com.fasterxml.jackson.core.JsonParseException
public int nextIntValue(int defaultValue)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
nextIntValue in class com.fasterxml.jackson.core.JsonParserIOException
com.fasterxml.jackson.core.JsonParseException
public long nextLongValue(long defaultValue)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
nextLongValue in class com.fasterxml.jackson.core.JsonParserIOException
com.fasterxml.jackson.core.JsonParseException
public Boolean nextBooleanValue()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
nextBooleanValue in class com.fasterxml.jackson.core.JsonParserIOException
com.fasterxml.jackson.core.JsonParseException
public void close()
throws IOException
close in interface Closeableclose in class com.fasterxml.jackson.core.base.ParserBaseIOException
protected com.fasterxml.jackson.core.JsonToken parseNumberText(int ch)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
Because much of input has to be processed in any case, no partial parsing is done: all input text will be stored for further processing. However, actual numeric value conversion will be deferred, since it is usually the most complicated and costliest part of processing.
IOException
com.fasterxml.jackson.core.JsonParseException
protected com.fasterxml.jackson.core.JsonToken _handleInvalidNumberStart(int ch,
boolean negative)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
protected String _parseFieldName(int i)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
protected String _parseUnquotedFieldName(int i)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
protected com.fasterxml.jackson.core.JsonToken _handleUnexpectedValue(int i)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
protected void _parseUnquotedString()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
protected void _parseUnquotedString2()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
protected void _finishString()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
_finishString in class com.fasterxml.jackson.core.base.ParserBaseIOException
com.fasterxml.jackson.core.JsonParseException
protected void _finishString2()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
protected void _skipString()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
protected char _decodeEscaped()
throws IOException,
com.fasterxml.jackson.core.JsonParseException
_decodeEscaped in class com.fasterxml.jackson.core.base.ParserBaseIOException
com.fasterxml.jackson.core.JsonParseException
protected void _matchToken(String matchStr,
int i)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
protected byte[] _decodeBase64(com.fasterxml.jackson.core.Base64Variant b64variant)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
protected int _decodeBase64Escape2(com.fasterxml.jackson.core.Base64Variant b64variant,
char ch,
int index)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
protected void _reportInvalidToken(String matchedPart,
String msg)
throws IOException,
com.fasterxml.jackson.core.JsonParseException
IOException
com.fasterxml.jackson.core.JsonParseException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||