public final class BigDecimalType extends DataType
BigDecimal instance using the long value and
int scale.| Modifier and Type | Field and Description |
|---|---|
static int |
BYTES
A
BigDecimal 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| Modifier and Type | Method and Description |
|---|---|
protected void |
createDeserializer(MessageType.MessageField field,
String fieldName,
String indent,
Formatter output,
boolean useBuilder)
Generates the code to de-serialize the
BigDecimal
instance from a ByteBuffer. |
protected void |
createSerializer(MessageType.MessageField field,
String fieldName,
String indent,
Formatter output)
Generates the code to serialize the
BigDecimal
instance to a ByteBuffer. |
Object |
deserialize(ByteBuffer buffer)
Returns the deserialized object in
buffer. |
void |
serialize(Object o,
ByteBuffer buffer)
Serializes
o to the given buffer. |
compareTo, dataClass, dataClassName, defaultValue, equals, fields, findCharset, findType, hashCode, isArray, isBuiltin, isEnum, isInstance, isLocalOnly, isMessage, isPrimitive, replyClasses, size, toStringpublic static final int BYTES
BigDecimal requires 12 bytes for encoding.public void serialize(Object o, ByteBuffer buffer) throws BufferOverflowException
DataTypeo to the given buffer.serialize in class DataTypeo - serialize this object.buffer - serialize o to this buffer.BufferOverflowException - if serializing o overruns buffer's
available capacity.public Object deserialize(ByteBuffer buffer) throws BufferUnderflowException
DataTypebuffer.deserialize in class DataTypebuffer - Deserialize the object from this
ByteBuffer.BufferUnderflowException - if buffer contains fewer bytes than needed to
completely deserialize the object.protected void createSerializer(MessageType.MessageField field, String fieldName, String indent, Formatter output)
BigDecimal
instance to a ByteBuffer.createSerializer in class DataTypefield - message field.fieldName - the BigDecimal field.indent - indent the code by this amount.output - append the code to this formatter.protected void createDeserializer(MessageType.MessageField field, String fieldName, String indent, Formatter output, boolean useBuilder)
BigDecimal
instance from a ByteBuffer.createDeserializer in class DataTypefield - message field.fieldName - store the de-serialized field in this
name.indent - indent the code by this amount.output - append the code to this formatter.useBuilder - if true then fieldName
is a builder method name; otherwise a local variable.Copyright © 2019. All rights reserved.