Package org.bson.codecs.jsr310
Class InstantCodec
- java.lang.Object
- 
- org.bson.codecs.jsr310.InstantCodec
 
- 
- 
Constructor SummaryConstructors Constructor Description InstantCodec()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Instantdecode(BsonReader reader, DecoderContext decoderContext)Decodes a BSON value from the given reader into an instance of the type parameterT.voidencode(BsonWriter writer, Instant value, EncoderContext encoderContext)Encode an instance of the type parameterTinto a BSON value.Class<Instant>getEncoderClass()Returns the Class instance that this encodes.
 
- 
- 
- 
Method Detail- 
decodepublic Instant decode(BsonReader reader, DecoderContext decoderContext) Description copied from interface:DecoderDecodes a BSON value from the given reader into an instance of the type parameterT.- Parameters:
- reader- the BSON reader
- decoderContext- the decoder context
- Returns:
- an instance of the type parameter T.
 
 - 
encodepublic void encode(BsonWriter writer, Instant value, EncoderContext encoderContext) Encode an instance of the type parameterTinto a BSON value.- Parameters:
- writer- the BSON writer to encode into
- value- the value to encode
- encoderContext- the encoder context
- Throws:
- CodecConfigurationException- if the Instant cannot be converted to a valid Bson DateTime.
 
 
- 
 
-