Interface Decoder<T>

Type Parameters:
T - the type to decode into, the return type of the decode(org.bson.BsonReader, DecoderContext) method.
All Known Subinterfaces:
Codec<T>, CollectibleCodec<T>
All Known Implementing Classes:
AtomicBooleanCodec, AtomicIntegerCodec, AtomicLongCodec, BigDecimalCodec, BinaryCodec, BooleanCodec, BsonArrayCodec, BsonBinaryCodec, BsonBooleanCodec, BsonCodec, BsonDateTimeCodec, BsonDBPointerCodec, BsonDecimal128Codec, BsonDocumentCodec, BsonDocumentWrapperCodec, BsonDoubleCodec, BsonInt32Codec, BsonInt64Codec, BsonJavaScriptCodec, BsonJavaScriptWithScopeCodec, BsonMaxKeyCodec, BsonMinKeyCodec, BsonNullCodec, BsonObjectIdCodec, BsonRegularExpressionCodec, BsonStringCodec, BsonSymbolCodec, BsonTimestampCodec, BsonUndefinedCodec, BsonValueCodec, ByteArrayCodec, ByteCodec, CharacterCodec, CodeCodec, CodeWithScopeCodec, DateCodec, Decimal128Codec, DocumentCodec, DoubleCodec, EnumCodec, FloatCodec, InstantCodec, IntegerCodec, IterableCodec, JsonObjectCodec, LocalDateCodec, LocalDateTimeCodec, LocalTimeCodec, LongCodec, MapCodec, MaxKeyCodec, MinKeyCodec, ObjectIdCodec, OverridableUuidRepresentationUuidCodec, PatternCodec, RawBsonDocumentCodec, ShortCodec, StringCodec, SymbolCodec, UuidCodec

public interface Decoder<T>
Decoders are used for reading BSON types from MongoDB and converting them into Java objects.
Since:
3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(BsonReader reader, DecoderContext decoderContext)
    Decodes a BSON value from the given reader into an instance of the type parameter T.
  • Method Details

    • decode

      T decode(BsonReader reader, DecoderContext decoderContext)
      Decodes a BSON value from the given reader into an instance of the type parameter T.
      Parameters:
      reader - the BSON reader
      decoderContext - the decoder context
      Returns:
      an instance of the type parameter T.