public class BinaryField extends Field
| Constructor and Description |
|---|
BinaryField(byte[] bytes)
Constructor for code.
|
BinaryField(DataInputStream is)
Constructor for reading from the network.
|
| Modifier and Type | Method and Description |
|---|---|
byte |
getArgumentTag()
Get the value which identifies this type of field in a message argument list.
|
ByteBuffer |
getBytes()
Get the bytes which represent this field when sent over the network, including the leading type tag.
|
long |
getSize()
Get the size, in bytes, of the network representation of this field, excluding the leading type tag and
length bytes (if any).
|
byte |
getTypeTag()
Get the value which identifies the start of this field in the network stream.
|
ByteBuffer |
getValue()
Get the bytes which represent the payload of this field, without the leading type tag and length header.
|
byte[] |
getValueAsArray()
Get the bytes which represent the payload of this field, without the leading type tag and length header, as
a newly-allocated byte array.
|
String |
toString() |
public BinaryField(DataInputStream is) throws IOException
is - the stream on which the field value is to be read.IllegalArgumentException - if tag is not a valid number field tag.IOException - if there is a problem reading the value.public BinaryField(byte[] bytes)
bytes - the value that this field will convey.public ByteBuffer getValue()
public byte[] getValueAsArray()
public byte getTypeTag()
FieldgetTypeTag in class Fieldpublic byte getArgumentTag()
FieldgetArgumentTag in class Fieldpublic ByteBuffer getBytes()
Fieldpublic long getSize()
FieldCopyright © 2016–2018 Deep Symmetry, LLC. All rights reserved.