public class StringField extends Field
| Constructor and Description |
|---|
StringField(DataInputStream is)
Constructor for reading from the network.
|
StringField(String text)
Constructor for code.
|
| 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.
|
String |
getValue()
Get the string represented by this field.
|
String |
toString() |
public StringField(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 StringField(String text)
text - the value that this field will convey.public String getValue()
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.