public final class BigIntegerType extends DataType
BigInteger
instance using the byte[]
returned by
BigInteger.toByteArray()
.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
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)
Generates runtime-compilable code for de-serializing a
BigInteger message field from a
ByteBuffer . |
protected void |
createSerializer(MessageType.MessageField field,
java.lang.String fieldName,
java.lang.String indent,
java.util.Formatter output)
Generates runtime-compilable code for serializing a
BigInteger message field. |
java.lang.Object |
deserialize(MessageType.MessageField field,
java.nio.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(java.lang.Object o,
MessageType.MessageField field,
java.nio.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, isBoolean, isBoolean, isBuiltin, isEnum, isField, isFixedSize, isInstance, isLocalOnly, isMessage, isPrimitive, maxAllowedTextSize, replyClasses, size, toString
public void serialize(@Nullable java.lang.Object o, MessageType.MessageField field, java.nio.ByteBuffer buffer)
BigInteger
two's-complement
byte array to the given buffer.serialize
in class DataType
o
- serialize this object. May be null
.field
- contains external information needed to
serialize this message field.buffer
- serialize o
to this buffer.java.nio.BufferOverflowException
- if the serialized BigInteger
instance is greater
than the buffer's remaining space.deserialize(net.sf.eBus.messages.type.MessageType.MessageField, java.nio.ByteBuffer)
public java.lang.Object deserialize(MessageType.MessageField field, java.nio.ByteBuffer buffer)
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 DataType
field
- contains information needed to de-serialize
this message field.buffer
- read in the BigInteger
from this
buffer.BigInteger
instance.
May return null
.java.nio.BufferUnderflowException
- if buffer
contains an incomplete
BigInteger
instance.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)
BigInteger
message field.createSerializer
in class DataType
field
- 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, java.lang.String fieldName, java.lang.String indent, java.util.Formatter output, boolean useBuilder)
BigInteger
message field from a
ByteBuffer
.createDeserializer
in class DataType
field
- 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 © 2001 - 2024. Charles W. Rapp. All rights reserved.