public final class ZonedDateTimeAsStringCodec extends Object implements Codec<ZonedDateTime>
Encodes and decodes ZonedDateTime
values to and from
BSON String
, such as
2018-01-02T10:15:30+01:00[CET]
.
The values are stored as quasi ISO-8601
formatted strings
(see ZonedDateTime.toString()
).
This type is immutable.
Constructor and Description |
---|
ZonedDateTimeAsStringCodec() |
Modifier and Type | Method and Description |
---|---|
ZonedDateTime |
decode(BsonReader reader,
DecoderContext decoderContext) |
void |
encode(BsonWriter writer,
ZonedDateTime value,
EncoderContext encoderContext) |
Class<ZonedDateTime> |
getEncoderClass() |
public void encode(BsonWriter writer, ZonedDateTime value, EncoderContext encoderContext)
encode
in interface Encoder<ZonedDateTime>
public ZonedDateTime decode(BsonReader reader, DecoderContext decoderContext)
decode
in interface Decoder<ZonedDateTime>
public Class<ZonedDateTime> getEncoderClass()
getEncoderClass
in interface Encoder<ZonedDateTime>
Copyright © 2018. All rights reserved.