Constructor | Description |
---|---|
BsonArrayCodecβ() |
Creates a new instance with a default codec registry that uses the
BsonValueCodecProvider . |
BsonArrayCodecβ(CodecRegistry codecRegistry) |
Construct an instance with the given registry
|
Modifier and Type | Method | Description |
---|---|---|
BsonArray |
decodeβ(BsonReader reader,
DecoderContext decoderContext) |
Decodes a BSON value from the given reader into an instance of the type parameter
T . |
void |
encodeβ(BsonWriter writer,
BsonArray array,
EncoderContext encoderContext) |
Encode an instance of the type parameter
T into a BSON value. |
Class<BsonArray> |
getEncoderClassβ() |
Returns the Class instance that this encodes.
|
protected BsonValue |
readValueβ(BsonReader reader,
DecoderContext decoderContext) |
This method may be overridden to change the behavior of reading the current value from the given
BsonReader . |
public BsonArrayCodecβ()
BsonValueCodecProvider
.public BsonArrayCodecβ(CodecRegistry codecRegistry)
codecRegistry
- the codec registrypublic BsonArray decodeβ(BsonReader reader, DecoderContext decoderContext)
Decoder
T
.public void encodeβ(BsonWriter writer, BsonArray array, EncoderContext encoderContext)
Encoder
T
into a BSON value.public Class<BsonArray> getEncoderClassβ()
Encoder
getEncoderClass
in interface Encoder<BsonArray>
protected BsonValue readValueβ(BsonReader reader, DecoderContext decoderContext)
BsonReader
. It is required
that the value be fully consumed before returning.reader
- the read to read the value fromdecoderContext
- the decoder context