Class JsonParserAdapter

java.lang.Object
tools.jackson.core.JsonParser
tools.jackson.core.base.ParserMinimalBase
tools.jackson.core.base.ParserBase
org.mongojack.internal.stream.JsonParserAdapter
All Implemented Interfaces:
Closeable, AutoCloseable, tools.jackson.core.Versioned
Direct Known Subclasses:
DBDecoderBsonParser

public class JsonParserAdapter extends tools.jackson.core.base.ParserBase
  • Nested Class Summary

    Nested classes/interfaces inherited from class tools.jackson.core.JsonParser

    tools.jackson.core.JsonParser.NumberType, tools.jackson.core.JsonParser.NumberTypeFP
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Object
     
    protected final org.bson.codecs.PatternCodec
     
    protected final org.bson.AbstractBsonReader
     

    Fields inherited from class tools.jackson.core.base.ParserBase

    _binaryValue, _byteArrayBuilder, _currInputProcessed, _currInputRow, _currInputRowStart, _expLength, _fractLength, _inputEnd, _inputPtr, _intLength, _numberBigDecimal, _numberBigInt, _numberDouble, _numberDoubleDeferred, _numberFloat, _numberInt, _numberIsNaN, _numberLong, _numberNegative, _numberString, _numTypesValid, _textBuffer, _tokenInputCol, _tokenInputRow, _tokenInputTotal, BASE64_CHECK_INTERVAL

    Fields inherited from class tools.jackson.core.base.ParserMinimalBase

    _closed, _currToken, _ioContext, _lastClearedToken, _objectReadContext, _streamReadConstraints, _streamReadFeatures, _tokenCount, _trackMaxTokenCount, BD_MAX_INT, BD_MAX_LONG, BD_MIN_INT, BD_MIN_LONG, BI_MAX_INT, BI_MAX_LONG, BI_MIN_INT, BI_MIN_LONG, CHAR_NULL, INT_0, INT_9, INT_APOS, INT_ASTERISK, INT_BACKSLASH, INT_COLON, INT_COMMA, INT_CR, INT_e, INT_E, INT_HASH, INT_LBRACKET, INT_LCURLY, INT_LF, INT_MINUS, INT_PERIOD, INT_PLUS, INT_QUOTE, INT_RBRACKET, INT_RCURLY, INT_RS, INT_SLASH, INT_SPACE, INT_TAB, MAX_BYTE_I, MAX_INT_D, MAX_INT_L, MAX_LONG_D, MAX_SHORT_I, MIN_BYTE_I, MIN_INT_D, MIN_INT_L, MIN_LONG_D, MIN_SHORT_I, NO_BYTES, NO_INTS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_FLOAT, NR_INT, NR_LONG, NR_UNKNOWN, STREAM_READ_FEATURE_DEFAULTS

    Fields inherited from class tools.jackson.core.JsonParser

    DEFAULT_READ_CAPABILITIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    JsonParserAdapter(tools.jackson.core.ObjectReadContext readCtxt, int jsonFeatures, org.bson.AbstractBsonReader reader, org.bson.UuidRepresentation uuidRepresentation)
     
    JsonParserAdapter(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ctxt, int jsonFeatures, org.bson.AbstractBsonReader reader, org.bson.UuidRepresentation uuidRepresentation)
    Constructs a new parser
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected void
     
    protected int
     
    protected void
    _parseNumericValue(int expType)
     
    void
     
    tools.jackson.core.TokenStreamLocation
     
     
    tools.jackson.core.TokenStreamLocation
     
     
    byte[]
    getBinaryValue(tools.jackson.core.Base64Variant b64variant)
     
     
    double
     
     
    float
     
    int
     
    long
     
    tools.jackson.core.JsonParser.NumberType
     
     
     
     
     
    char[]
     
    int
     
    int
     
     
    char[]
     
    int
     
    int
     
     
    tools.jackson.core.JsonToken
     
    tools.jackson.core.TokenStreamContext
     
     
    protected tools.jackson.core.JsonToken
    toJsonToken(org.bson.BsonType type)
     
    tools.jackson.core.Version
     

    Methods inherited from class tools.jackson.core.base.ParserBase

    _base64MaxDecodedLength, _contentReference, _contentReferenceRedacted, _convertBigDecimalToBigInteger, _decodeBase64Escape, _decodeBase64Escape, _decodeEscaped, _eofAsNextChar, _floatNumberText, _getBigDecimal, _getBigInteger, _getByteArrayBuilder, _getNumberDouble, _getNumberFloat, _growNameDecodeBuffer, _handleBase64MissingPadding, _releaseBuffers, _reportBase64LengthExceeded, _reportInvalidBase64Char, _reportInvalidBase64Char, assignCurrentValue, convertNumberToBigDecimal, convertNumberToBigInteger, convertNumberToDouble, convertNumberToFloat, convertNumberToInt, convertNumberToLong, currentValue, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, growArrayBy, hasStringCharacters, isNaN, reset, resetAsNaN, resetFloat, resetInt

    Methods inherited from class tools.jackson.core.base.ParserMinimalBase

    _constructInputCoercion, _constructNotNumericType, _currentLocationMinusOne, _decodeBase64, _getCharDesc, _hasTextualNull, _longIntegerDesc, _longNumberDesc, _nullSafeUpdateToken, _reportBadInputStream, _reportBadReader, _reportError, _reportError, _reportError, _reportError, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportInvalidNumber, _reportInvalidSpace, _reportInvalidUTF8Surrogate, _reportMissingRootWS, _reportOverflowByte, _reportOverflowInt, _reportOverflowInt, _reportOverflowInt, _reportOverflowLong, _reportOverflowLong, _reportOverflowLong, _reportOverflowShort, _reportUnexpectedChar, _reportUnexpectedNumberChar, _throwInternal, _updateToken, _updateTokenToNA, _updateTokenToNull, _wrapIOFailure, clearCurrentToken, currentNameMatch, currentToken, currentTokenCount, currentTokenId, finishToken, getBooleanValue, getByteValue, getLastClearedToken, getNumberTypeFP, getShortValue, getString, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, getValueAsString, getValueAsString, hasCurrentToken, hasToken, hasTokenId, isClosed, isEnabled, isExpectedNumberIntToken, isExpectedStartArrayToken, isExpectedStartObjectToken, nextName, nextNameMatch, nextValue, objectReadContext, readValueAs, readValueAs, readValueAs, readValueAsTree, skipChildren, streamReadCapabilities, streamReadConstraints, streamReadFeatures

    Methods inherited from class tools.jackson.core.JsonParser

    _constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _reportUnsupportedOperation, canParseAsync, canReadObjectId, canReadTypeId, getBinaryValue, getObjectId, getSchema, getTypeId, getValueAsBoolean, getValueAsDouble, nextBooleanValue, nextIntValue, nextLongValue, nextNameMatchAndToken, nextStringValue, nonBlockingInputFeeder, readBinaryValue, readBinaryValue, readString, releaseBuffered, releaseBuffered, willInternPropertyNames

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • reader

      protected final org.bson.AbstractBsonReader reader
    • patternCodec

      protected final org.bson.codecs.PatternCodec patternCodec
    • currentValue

      protected Object currentValue
  • Constructor Details

    • JsonParserAdapter

      public JsonParserAdapter(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ctxt, int jsonFeatures, org.bson.AbstractBsonReader reader, org.bson.UuidRepresentation uuidRepresentation)
      Constructs a new parser
      Parameters:
      ctxt - the Jackson IO context
      jsonFeatures - bit flag composed of bits that indicate which StreamReadFeatures are enabled.
      reader - Bson reader to read from
    • JsonParserAdapter

      public JsonParserAdapter(tools.jackson.core.ObjectReadContext readCtxt, int jsonFeatures, org.bson.AbstractBsonReader reader, org.bson.UuidRepresentation uuidRepresentation)
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class tools.jackson.core.base.ParserBase
    • nextToken

      public tools.jackson.core.JsonToken nextToken() throws tools.jackson.core.JacksonException
      Specified by:
      nextToken in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • toJsonToken

      protected tools.jackson.core.JsonToken toJsonToken(org.bson.BsonType type) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • nextName

      public String nextName() throws tools.jackson.core.JacksonException
      Overrides:
      nextName in class tools.jackson.core.base.ParserMinimalBase
      Throws:
      tools.jackson.core.JacksonException
    • currentName

      public String currentName() throws tools.jackson.core.JacksonException
      Specified by:
      currentName in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • currentTokenLocation

      public tools.jackson.core.TokenStreamLocation currentTokenLocation()
      Specified by:
      currentTokenLocation in class tools.jackson.core.JsonParser
    • currentLocation

      public tools.jackson.core.TokenStreamLocation currentLocation()
      Specified by:
      currentLocation in class tools.jackson.core.JsonParser
    • getText

      public String getText() throws tools.jackson.core.JacksonException
      Overrides:
      getText in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • getTextCharacters

      public char[] getTextCharacters() throws tools.jackson.core.JacksonException
      Overrides:
      getTextCharacters in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • getTextLength

      public int getTextLength() throws tools.jackson.core.JacksonException
      Overrides:
      getTextLength in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • getTextOffset

      public int getTextOffset()
      Overrides:
      getTextOffset in class tools.jackson.core.JsonParser
    • getNumberValue

      public Number getNumberValue()
      Overrides:
      getNumberValue in class tools.jackson.core.base.ParserBase
    • getNumberValueExact

      public Number getNumberValueExact()
      Overrides:
      getNumberValueExact in class tools.jackson.core.base.ParserBase
    • getNumberValueDeferred

      public Object getNumberValueDeferred() throws tools.jackson.core.JacksonException
      Overrides:
      getNumberValueDeferred in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • getNumberType

      public tools.jackson.core.JsonParser.NumberType getNumberType()
      Overrides:
      getNumberType in class tools.jackson.core.base.ParserBase
    • getIntValue

      public int getIntValue()
      Overrides:
      getIntValue in class tools.jackson.core.base.ParserBase
    • getLongValue

      public long getLongValue()
      Overrides:
      getLongValue in class tools.jackson.core.base.ParserBase
    • getBigIntegerValue

      public BigInteger getBigIntegerValue()
      Overrides:
      getBigIntegerValue in class tools.jackson.core.base.ParserBase
    • getFloatValue

      public float getFloatValue()
      Overrides:
      getFloatValue in class tools.jackson.core.base.ParserBase
    • getDoubleValue

      public double getDoubleValue()
      Overrides:
      getDoubleValue in class tools.jackson.core.base.ParserBase
    • getDecimalValue

      public BigDecimal getDecimalValue()
      Overrides:
      getDecimalValue in class tools.jackson.core.base.ParserBase
    • getBinaryValue

      public byte[] getBinaryValue(tools.jackson.core.Base64Variant b64variant)
      Overrides:
      getBinaryValue in class tools.jackson.core.base.ParserBase
    • getEmbeddedObject

      public Object getEmbeddedObject()
      Overrides:
      getEmbeddedObject in class tools.jackson.core.base.ParserMinimalBase
    • _handleEOF

      protected void _handleEOF() throws tools.jackson.core.exc.StreamReadException
      Overrides:
      _handleEOF in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.exc.StreamReadException
    • _closeInput

      protected void _closeInput()
      Specified by:
      _closeInput in class tools.jackson.core.base.ParserMinimalBase
    • streamReadContext

      public tools.jackson.core.TokenStreamContext streamReadContext()
      Specified by:
      streamReadContext in class tools.jackson.core.JsonParser
    • _parseNumericValue

      protected void _parseNumericValue(int expType) throws tools.jackson.core.JacksonException, tools.jackson.core.exc.InputCoercionException
      Specified by:
      _parseNumericValue in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
      tools.jackson.core.exc.InputCoercionException
    • _parseIntValue

      protected int _parseIntValue() throws tools.jackson.core.JacksonException
      Specified by:
      _parseIntValue in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • version

      public tools.jackson.core.Version version()
      Specified by:
      version in interface tools.jackson.core.Versioned
      Specified by:
      version in class tools.jackson.core.JsonParser
    • streamReadInputSource

      public Object streamReadInputSource()
      Specified by:
      streamReadInputSource in class tools.jackson.core.JsonParser
    • getString

      public String getString() throws tools.jackson.core.JacksonException
      Specified by:
      getString in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • getStringCharacters

      public char[] getStringCharacters() throws tools.jackson.core.JacksonException
      Specified by:
      getStringCharacters in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • getStringLength

      public int getStringLength() throws tools.jackson.core.JacksonException
      Specified by:
      getStringLength in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • getStringOffset

      public int getStringOffset() throws tools.jackson.core.JacksonException
      Specified by:
      getStringOffset in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException