Codec<BsonDocumentWrapper>
, Decoder<BsonDocumentWrapper>
, Encoder<BsonDocumentWrapper>
public class BsonDocumentWrapperCodec extends Object implements Codec<BsonDocumentWrapper>
Constructor | Description |
---|---|
BsonDocumentWrapperCodec(Codec<BsonDocument> bsonDocumentCodec) |
Construct a new instance,
|
Modifier and Type | Method | Description |
---|---|---|
BsonDocumentWrapper |
decode(BsonReader reader,
DecoderContext decoderContext) |
Decoding of
BsonDocumentWrapper instances is not supported, so this method will throw UnsupportedOperationException
in all cases. |
void |
encode(BsonWriter writer,
BsonDocumentWrapper value,
EncoderContext encoderContext) |
Encode an instance of the type parameter
T into a BSON value. |
Class<BsonDocumentWrapper> |
getEncoderClass() |
Returns the Class instance that this encodes.
|
public BsonDocumentWrapperCodec(Codec<BsonDocument> bsonDocumentCodec)
bsonDocumentCodec
- the code to use if the BsonDocumentWrapper
has been unwrapped.public BsonDocumentWrapper decode(BsonReader reader, DecoderContext decoderContext)
BsonDocumentWrapper
instances is not supported, so this method will throw UnsupportedOperationException
in all cases.decode
in interface Decoder<BsonDocumentWrapper>
reader
- the BSON reader the readerdecoderContext
- a decoder context, currently unusedpublic void encode(BsonWriter writer, BsonDocumentWrapper value, EncoderContext encoderContext)
Encoder
T
into a BSON value.encode
in interface Encoder<BsonDocumentWrapper>
writer
- the BSON writer to encode intovalue
- the value to encodeencoderContext
- the encoder contextpublic Class<BsonDocumentWrapper> getEncoderClass()
Encoder
getEncoderClass
in interface Encoder<BsonDocumentWrapper>