public abstract class Field extends Object
| Constructor and Description |
|---|
Field() |
| Modifier and Type | Method and Description |
|---|---|
abstract byte |
getArgumentTag()
Get the value which identifies this type of field in a message argument list.
|
abstract ByteBuffer |
getBytes()
Get the bytes which represent this field when sent over the network, including the leading type tag.
|
abstract long |
getSize()
Get the size, in bytes, of the network representation of this field, excluding the leading type tag and
length bytes (if any).
|
abstract byte |
getTypeTag()
Get the value which identifies the start of this field in the network stream.
|
static Field |
read(DataInputStream is)
Read a field from the supplied stream, starting with the tag that identifies the type, and reading enough
to collect the corresponding value.
|
void |
write(WritableByteChannel channel)
Write the field to the specified channel.
|
public abstract ByteBuffer getBytes()
public abstract long getSize()
public abstract byte getTypeTag()
public abstract byte getArgumentTag()
public static Field read(DataInputStream is) throws IOException
is - the stream on which a type tag is expected to be the next byte, followed by the field value.IOException - if there is a problem reading the field.public void write(WritableByteChannel channel) throws IOException
channel - the channel to which it should be writtenIOException - if there is a problem writing to the channelCopyright © 2016–2018 Deep Symmetry, LLC. All rights reserved.