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, CLASS_TYPE, DEFAULT_CHARSET, EMPTY_STRING, FIELD_MASK_SIZE, INDENT, INDENT1, KEY_TYPE, MAX_ARRAY_SIZE, MAX_BIG_INTEGER_SIZE, MAX_CLASS_NAME_LENGTH, MAX_FIELDS, MAX_FILE_NAME_LENGTH, MAX_STRING_LENGTH, MAX_ZONE_ID_LENGTH, mBuiltinFlag, mClass, mDefaultValue, mIsFixedSize, mSize, sClasses, sCompiledClasses, sTextTypes, STRING_TYPE, sVariableTypes, 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,
java.lang.String fieldName,
java.lang.String indent,
java.util.Formatter output,
boolean useBuilder)
Adds the Java code used to de-serialize a
OffsetTime instance from a ByteBuffer . |
protected void |
createSerializer(MessageType.MessageField field,
java.lang.String fieldName,
java.lang.String indent,
java.util.Formatter output)
Adds the Java code used to serialize a
OffsetTime
instance to a ByteBuffer . |
java.lang.Object |
deserialize(MessageType.MessageField field,
java.nio.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(java.lang.Object o,
MessageType.MessageField field,
java.nio.ByteBuffer buffer)
Serializes the
OffsetTime local time and offset
values to buffer . |
compareTo, dataClass, dataClassName, defaultValue, equals, fields, findCharset, findType, hashCode, isArray, isBoolean, isBoolean, isBuiltin, isEnum, isField, isFixedSize, isInstance, isLocalOnly, isMessage, isPrimitive, maxAllowedTextSize, replyClasses, size, toString
public static final int BYTES
OffsetTime
requires 12 bytes for encoding.public OffsetTimeType()
OffsetTime
data type instance.public void serialize(java.lang.Object o, MessageType.MessageField field, java.nio.ByteBuffer buffer)
OffsetTime
local time and offset
values to buffer
.serialize
in class DataType
o
- a OffsetTime
instance.field
- contains external information needed to
serialize this message field.buffer
- write to this buffer.java.nio.BufferOverflowException
- if buffer
does not contain enough space to store
the OffsetTime
value.deserialize(net.sf.eBus.messages.type.MessageType.MessageField, java.nio.ByteBuffer)
public java.lang.Object deserialize(MessageType.MessageField field, java.nio.ByteBuffer buffer)
OffsetTime
value by
converting the encoded LocalTime
and
ZoneOffset
values back to a OffsetTime
using OffsetTime.of(LocalTime, ZoneOffset)
.deserialize
in class DataType
field
- contains information needed to de-serialize
this message field.buffer
- contains the serialized OffsetTime
.OffsetTime
.java.nio.BufferUnderflowException
- if buffer
does not contain the complete
OffsetTime
value.serialize(java.lang.Object, net.sf.eBus.messages.type.MessageType.MessageField, java.nio.ByteBuffer)
protected void createSerializer(MessageType.MessageField field, java.lang.String fieldName, java.lang.String indent, java.util.Formatter output)
OffsetTime
instance to a ByteBuffer
.createSerializer
in class DataType
field
- 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, java.lang.String fieldName, java.lang.String indent, java.util.Formatter output, boolean useBuilder)
OffsetTime
instance from a ByteBuffer
.createDeserializer
in class DataType
field
- 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 © 2001 - 2024. Charles W. Rapp. All rights reserved.