public final class OffsetDateTimeType extends DataType
java.time.OffsetDateTime values.| Modifier and Type | Field and Description |
|---|---|
static int |
BYTES
A
OffsetDateTime requires 20 bytes for
encoding. |
ADDRESS_TYPE, ARRAY_SUFFIX, CHARSET, CLASS_TYPE, EMPTY_STRING, FIELD_MASK_SIZE, INDENT, INDENT1, KEY_TYPE, MAX_ARRAY_SIZE, MAX_FIELDS, MAX_FILE_NAME_LENGTH, MAX_STRING_LENGTH, mBuiltinFlag, mClass, mDefaultValue, mSize, sClasses, sCompiledClasses, STRING_TYPE, VARIABLE_SIZE| Modifier and Type | Method and Description |
|---|---|
protected void |
createDeserializer(MessageType.MessageField field,
String fieldName,
String indent,
Formatter output,
boolean useBuilder)
Adds the Java code used to de-serialize a
OffsetDateTime instance from a ByteBuffer. |
protected void |
createSerializer(MessageType.MessageField field,
String fieldName,
String indent,
Formatter output)
Adds the Java code used to serialize a
OffsetDateTime instance to a ByteBuffer. |
Object |
deserialize(ByteBuffer buffer)
Returns the de-serialized
OffsetDateTime value by
converting the encoded local date, local time, and zone
offset values back to an OffsetDateTime using
OffsetDateTime.of(LocalDate, LocalTime, ZoneOffset). |
void |
serialize(Object o,
ByteBuffer buffer)
Serializes the
OffsetDateTime.toLocalDate,
LocalDateTime.toLocalTime, and
LocalDateTime.getOffset values to buffer. |
compareTo, dataClass, dataClassName, defaultValue, equals, fields, findCharset, findType, hashCode, isArray, isBuiltin, isEnum, isInstance, isLocalOnly, isMessage, isPrimitive, replyClasses, size, toStringpublic static final int BYTES
OffsetDateTime requires 20 bytes for
encoding.public void serialize(Object o, ByteBuffer buffer) throws BufferOverflowException
OffsetDateTime.toLocalDate,
LocalDateTime.toLocalTime, and
LocalDateTime.getOffset values to buffer.serialize in class DataTypeo - an OffsetDateTime instance.buffer - write to this buffer.BufferOverflowException - if buffer does not contain enough space to store
the date, time, and offset values.public Object deserialize(ByteBuffer buffer) throws BufferUnderflowException
OffsetDateTime value by
converting the encoded local date, local time, and zone
offset values back to an OffsetDateTime using
OffsetDateTime.of(LocalDate, LocalTime, ZoneOffset).deserialize in class DataTypebuffer - contains the serialized
OffsetDateTime.OffsetDateTime.BufferUnderflowException - if buffer does not contain the complete
OffsetDateTime value.protected void createSerializer(MessageType.MessageField field, String fieldName, String indent, Formatter output)
OffsetDateTime instance to a ByteBuffer.createSerializer in class DataTypefield - message field.fieldName - the OffsetDateTime message field
name.indent - indent code by this many spaces.output - output code to here.protected void createDeserializer(MessageType.MessageField field, String fieldName, String indent, Formatter output, boolean useBuilder)
OffsetDateTime instance from a ByteBuffer.createDeserializer in class DataTypefield - message field.fieldName - the OffsetDateTime message field
name.indent - indent code by this many spaces.output - output code to here.useBuilder - if true then fieldName
is a builder method name; otherwise a local variable.Copyright © 2019. All rights reserved.