Class BsonReaderDecoder

  • All Implemented Interfaces:
    io.micronaut.serde.Decoder, java.lang.AutoCloseable

    @Internal
    public final class BsonReaderDecoder
    extends io.micronaut.serde.support.AbstractStreamDecoder
    Bson implementation of Decoder.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class io.micronaut.serde.support.AbstractStreamDecoder

        io.micronaut.serde.support.AbstractStreamDecoder.TokenType, io.micronaut.serde.support.AbstractStreamDecoder.ValueDecoder<R extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      BsonReaderDecoder​(org.bson.BsonReader bsonReader)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void backFromChild​(io.micronaut.serde.support.AbstractStreamDecoder child)  
      protected java.lang.String coerceScalarToString()  
      protected io.micronaut.serde.support.AbstractStreamDecoder createChildDecoder()  
      java.io.IOException createDeserializationException​(java.lang.String message, java.lang.Object invalidValue)  
      protected io.micronaut.serde.support.AbstractStreamDecoder.TokenType currentToken()  
      io.micronaut.serde.Decoder decodeBuffer()  
      <T> T decodeCustom​(org.bson.codecs.Decoder<T> decoder, org.bson.codecs.DecoderContext context)  
      org.bson.types.Decimal128 decodeDecimal128()
      Decodes Decimal128.
      org.bson.types.ObjectId decodeObjectId()
      Decodes ObjectId.
      protected java.lang.Number getBestNumber()  
      protected java.math.BigDecimal getBigDecimal()  
      protected java.math.BigInteger getBigInteger()  
      protected boolean getBoolean()  
      protected java.lang.String getCurrentKey()  
      protected double getDouble()  
      protected long getLong()  
      protected void nextToken()  
      protected void skipChildren()  
      • Methods inherited from class io.micronaut.serde.support.AbstractStreamDecoder

        decodeArbitrary, decodeArray, decodeBigDecimal, decodeBigInteger, decodeBoolean, decodeByte, decodeChar, decodeCustom, decodeCustom, decodeDouble, decodeFloat, decodeInt, decodeKey, decodeLong, decodeNull, decodeNumber, decodeObject, decodeShort, decodeString, finishStructure, getBestNumberNode, getInteger, hasNextArrayValue, skipValue, unexpectedToken
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.micronaut.serde.Decoder

        close, decodeArray, decodeObject
    • Constructor Detail

      • BsonReaderDecoder

        public BsonReaderDecoder​(org.bson.BsonReader bsonReader)
    • Method Detail

      • backFromChild

        protected void backFromChild​(io.micronaut.serde.support.AbstractStreamDecoder child)
                              throws java.io.IOException
        Overrides:
        backFromChild in class io.micronaut.serde.support.AbstractStreamDecoder
        Throws:
        java.io.IOException
      • nextToken

        protected void nextToken()
        Specified by:
        nextToken in class io.micronaut.serde.support.AbstractStreamDecoder
      • getCurrentKey

        protected java.lang.String getCurrentKey()
        Specified by:
        getCurrentKey in class io.micronaut.serde.support.AbstractStreamDecoder
      • coerceScalarToString

        protected java.lang.String coerceScalarToString()
                                                 throws java.io.IOException
        Specified by:
        coerceScalarToString in class io.micronaut.serde.support.AbstractStreamDecoder
        Throws:
        java.io.IOException
      • createChildDecoder

        protected io.micronaut.serde.support.AbstractStreamDecoder createChildDecoder()
        Specified by:
        createChildDecoder in class io.micronaut.serde.support.AbstractStreamDecoder
      • getBoolean

        protected boolean getBoolean()
        Specified by:
        getBoolean in class io.micronaut.serde.support.AbstractStreamDecoder
      • getLong

        protected long getLong()
        Specified by:
        getLong in class io.micronaut.serde.support.AbstractStreamDecoder
      • getDouble

        protected double getDouble()
        Specified by:
        getDouble in class io.micronaut.serde.support.AbstractStreamDecoder
      • getBigInteger

        protected java.math.BigInteger getBigInteger()
        Specified by:
        getBigInteger in class io.micronaut.serde.support.AbstractStreamDecoder
      • getBigDecimal

        protected java.math.BigDecimal getBigDecimal()
        Specified by:
        getBigDecimal in class io.micronaut.serde.support.AbstractStreamDecoder
      • getBestNumber

        protected java.lang.Number getBestNumber()
        Specified by:
        getBestNumber in class io.micronaut.serde.support.AbstractStreamDecoder
      • skipChildren

        protected void skipChildren()
        Specified by:
        skipChildren in class io.micronaut.serde.support.AbstractStreamDecoder
      • currentToken

        protected io.micronaut.serde.support.AbstractStreamDecoder.TokenType currentToken()
        Specified by:
        currentToken in class io.micronaut.serde.support.AbstractStreamDecoder
      • createDeserializationException

        public java.io.IOException createDeserializationException​(java.lang.String message,
                                                                  java.lang.Object invalidValue)
      • decodeDecimal128

        public org.bson.types.Decimal128 decodeDecimal128()
                                                   throws java.io.IOException
        Decodes Decimal128.
        Returns:
        decoded value
        Throws:
        java.io.IOException
      • decodeObjectId

        public org.bson.types.ObjectId decodeObjectId()
                                               throws java.io.IOException
        Decodes ObjectId.
        Returns:
        decoded value
        Throws:
        java.io.IOException
      • decodeCustom

        public <T> T decodeCustom​(org.bson.codecs.Decoder<T> decoder,
                                  org.bson.codecs.DecoderContext context)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeBuffer

        public io.micronaut.serde.Decoder decodeBuffer()
                                                throws java.io.IOException
        Specified by:
        decodeBuffer in interface io.micronaut.serde.Decoder
        Overrides:
        decodeBuffer in class io.micronaut.serde.support.AbstractStreamDecoder
        Throws:
        java.io.IOException