public final class OffsetTimeType extends DataType
java.time.OffsetTime values.| Modifier and Type | Field and Description |
|---|---|
static int |
BYTES
A
OffsetTime requires 12 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| Constructor and Description |
|---|
OffsetTimeType()
Creates a new
OffsetTime data type instance. |
| 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
OffsetTime instance from a ByteBuffer. |
protected void |
createSerializer(MessageType.MessageField field,
String fieldName,
String indent,
Formatter output)
Adds the Java code used to serialize a
OffsetTime
instance to a ByteBuffer. |
Object |
deserialize(ByteBuffer buffer)
Returns the de-serialized
OffsetTime value by
converting the encoded LocalTime and
ZoneOffset values back to a OffsetTime
using OffsetTime.of(LocalTime, ZoneOffset). |
void |
serialize(Object o,
ByteBuffer buffer)
Serializes the
OffsetTime local time and offset
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
OffsetTime requires 12 bytes for encoding.public OffsetTimeType()
OffsetTime data type instance.public void serialize(Object o, ByteBuffer buffer) throws BufferOverflowException
OffsetTime local time and offset
values to buffer.serialize in class DataTypeo - a OffsetTime instance.buffer - write to this buffer.BufferOverflowException - if buffer does not contain enough space to store
the OffsetTime value.public Object deserialize(ByteBuffer buffer) throws BufferUnderflowException
OffsetTime value by
converting the encoded LocalTime and
ZoneOffset values back to a OffsetTime
using OffsetTime.of(LocalTime, ZoneOffset).deserialize in class DataTypebuffer - contains the serialized OffsetTime.OffsetTime.BufferUnderflowException - if buffer does not contain the complete
OffsetTime value.protected void createSerializer(MessageType.MessageField field, String fieldName, String indent, Formatter output)
OffsetTime
instance to a ByteBuffer.createSerializer in class DataTypefield - message field.fieldName - the OffsetTime 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)
OffsetTime instance from a ByteBuffer.createDeserializer in class DataTypefield - message field.fieldName - the OffsetTime 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.