public final class InetSocketAddressType extends DataType
InetSocketAddress which may contain 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 code to de-serialize the
InetSocketAddress instance from a
ByteBuffer. |
protected void |
createSerializer(MessageType.MessageField field,
String fieldName,
String indent,
Formatter output)
Adds the Java code used to serialize the socket address to
a
ByteBuffer. |
Object |
deserialize(ByteBuffer buffer)
Returns the socket address instance de-serialized from the
given buffer.
|
void |
serialize(Object o,
ByteBuffer buffer)
Serializes the Internet address and TCP port 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.InetSocketAddress instance.serialize in class DataTypeo - serialize this socket address instance.buffer - write to this buffer.BufferOverflowException - if buffer does not contain sufficient space to
hold the socket address.InetAddressTypepublic Object deserialize(ByteBuffer buffer) throws BufferUnderflowException
deserialize in class DataTypebuffer - read in the Internet address and port from
this buffer.BufferUnderflowException - if buffer contains an incomplete Internet socket
address.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)
InetSocketAddress instance from a
ByteBuffer.createDeserializer in class DataTypefield - message field.fieldName - store the de-serialized address in this
field.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.