public final class InetAddressType extends DataType
InetAddress which may be either an
IPv4 or
IPv6 address.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 class de-serialization code storing the
result according to the
useBuilder flag. |
protected void |
createSerializer(MessageType.MessageField field,
String fieldName,
String indent,
Formatter output)
Adds the Java code used to serialize the Internet address
to a
ByteBuffer. |
Object |
deserialize(ByteBuffer buffer)
Returns the IPv4 or IPv6 Internet address instance
de-serialized from the given buffer.
|
void |
serialize(Object o,
ByteBuffer buffer)
Serializes the Internet address 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
o is null or is not an
java.net.InetAddress instance. Serializes the
raw address byte array to the buffer.serialize in class DataTypeo - serialize this address instance.buffer - write to this buffer.BufferOverflowException - if buffer does not contain sufficient space to
hold the address bytes.public Object deserialize(ByteBuffer buffer) throws BufferUnderflowException
null.deserialize in class DataTypebuffer - read in the Internet address from this
buffer.BufferUnderflowException - if buffer contains an incomplete Internet address
instance.protected void createSerializer(MessageType.MessageField field, String fieldName, String indent, Formatter output)
ByteBuffer.createSerializer in class DataTypefield - message field.fieldName - the message field name.indent - indent the code by this amount.output - write the code to this formatter.protected void createDeserializer(MessageType.MessageField field, String fieldName, String indent, Formatter output, boolean useBuilder)
useBuilder flag. If
true, then store the result into the message/field
builder. Otherwise store the result into the named local
variable.createDeserializer in class DataTypefield - message field.fieldName - store result into this field.indent - indent the code by this amount.output - append the code to this formatter.useBuilder - if true store de-serialized
Internet address into the message/field builder; if
false store result into named local variable.Copyright © 2019. All rights reserved.