public final class BigIntegerType extends DataType
BigInteger
instance using the byte[] returned by
BigInteger.toByteArray().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 runtime-compilable code for de-serializing a
BigInteger message field from a
ByteBuffer. |
protected void |
createSerializer(MessageType.MessageField field,
String fieldName,
String indent,
Formatter output)
Generates runtime-compilable code for serializing a
BigInteger message field. |
Object |
deserialize(ByteBuffer buffer)
De-serializes the
BigInteger two's-complement
byte array from the given buffer and constructs a
BigInteger instance from that array. |
void |
serialize(Object o,
ByteBuffer buffer)
Serializes the given
BigInteger two's-complement
byte array to the given buffer. |
compareTo, dataClass, dataClassName, defaultValue, equals, fields, findCharset, findType, hashCode, isArray, isBuiltin, isEnum, isInstance, isLocalOnly, isMessage, isPrimitive, replyClasses, size, toStringpublic void serialize(Object o, ByteBuffer buffer) throws BufferOverflowException
BigInteger two's-complement
byte array to the given buffer.serialize in class DataTypeo - serialize this object.buffer - serialize o to this buffer.BufferOverflowException - if the serialized BigInteger instance is greater
than the buffer's remaining space.public Object deserialize(ByteBuffer buffer) throws BufferUnderflowException
BigInteger two's-complement
byte array from the given buffer and constructs a
BigInteger instance from that array. If the
de-serialized byte array is of zero length, then returns
null.deserialize in class DataTypebuffer - read in the BigInteger from this
buffer.BigInteger instance.
May return null.BufferUnderflowException - if buffer contains an incomplete
BigInteger instance.protected void createSerializer(MessageType.MessageField field, String fieldName, String indent, Formatter output)
BigInteger message field.createSerializer in class DataTypefield - message field.fieldName - BigInteger field name.indent - indent generated code lines by this amount.output - write generated code to this output.protected void createDeserializer(MessageType.MessageField field, String fieldName, String indent, Formatter output, boolean useBuilder)
BigInteger message field from a
ByteBuffer.createDeserializer in class DataTypefield - message field.fieldName - store de-serialized BigInteger
instance into this field.indent - indent generated code lines by this amount.output - write generated code to this output.useBuilder - if true then fieldName
is a builder method name; otherwise a local variable.Copyright © 2019. All rights reserved.