public final class LocalDateType extends DataType
java.time.LocalDate
values._builtinFlag, _class, _classes, _compiledClasses, _defaultValue, 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, STRING_TYPE
Constructor and Description |
---|
LocalDateType()
Creates a new
LocalDate data type instance. |
Modifier and Type | Method and Description |
---|---|
protected void |
createDeserializer(java.lang.String fieldName,
java.lang.String indent,
java.util.Formatter output)
Adds the Java code used to de-serialize a
LocalDate instance from a ByteBuffer . |
protected void |
createSerializer(java.lang.String fieldName,
java.lang.String indent,
java.util.Formatter output)
Adds the Java code used to serialize a
LocalDate
instance to a ByteBuffer . |
java.lang.Object |
deserialize(java.nio.ByteBuffer buffer)
Returns the de-serialized
LocalDate value by
converting the encode long LocalDate.ofNanos value
back to a LocalDate using
LocalDate.ofEpochDay(long) . |
void |
serialize(java.lang.Object o,
java.nio.ByteBuffer buffer)
Serializes the
LocalDate.toEpochDay value to
buffer . |
compareTo, dataClass, dataClassName, defaultValue, equals, fields, findType, hashCode, isArray, isBuiltin, isEnum, isInstance, isPrimitive, replyClasses, toString
public void serialize(java.lang.Object o, java.nio.ByteBuffer buffer) throws java.nio.BufferOverflowException
LocalDate.toEpochDay
value to
buffer
.public java.lang.Object deserialize(java.nio.ByteBuffer buffer) throws java.nio.BufferUnderflowException
LocalDate
value by
converting the encode long LocalDate.ofNanos
value
back to a LocalDate
using
LocalDate.ofEpochDay(long)
.deserialize
in class DataType
buffer
- contains the serialized LocalDate
.LocalDate
.java.nio.BufferUnderflowException
- if buffer
does not contain the complete
long
nanoseconds value.protected void createSerializer(java.lang.String fieldName, java.lang.String indent, java.util.Formatter output)
LocalDate
instance to a ByteBuffer
.createSerializer
in class DataType
fieldName
- the LocalDate
message field name.indent
- indent code by this many spaces.output
- output code to here.protected void createDeserializer(java.lang.String fieldName, java.lang.String indent, java.util.Formatter output)
LocalDate
instance from a ByteBuffer
.createDeserializer
in class DataType
fieldName
- the LocalDate
message field name.indent
- indent code by this many spaces.output
- output code to here.