public class XIDParameter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static byte[] |
EMPTY_VALUE |
byte |
paramIdentifier |
byte[] |
paramValue |
Constructor and Description |
---|
XIDParameter(byte paramIdentifier)
Create an XIDParameter with an empty value (presence implies the value).
|
XIDParameter(byte paramIdentifier,
byte val)
Create an XIDParameter with a 1-byte value.
|
XIDParameter(byte paramIdentifier,
int val,
boolean is3Byte)
Create an XIDParameter with a 3- or 4-byte value.
|
XIDParameter(byte paramIdentifier,
short val)
Create an XIDParameter with a 2-byte value.
|
Modifier and Type | Method and Description |
---|---|
byte |
getParamLength()
Get the length of the parameter's value.
|
static XIDParameter |
read(java.io.DataInput dis)
Read an XIDParameter from a byte stream.
|
java.lang.String |
toString()
Returns a string representation of the XIDParameter object.
|
void |
write(java.io.DataOutput dos)
Write the XIDParameter to a byte stream.
|
public static final byte[] EMPTY_VALUE
public byte paramIdentifier
public byte[] paramValue
public XIDParameter(byte paramIdentifier)
paramIdentifier
- identifier codepublic XIDParameter(byte paramIdentifier, byte val)
paramIdentifier
- identifier codeval
- value of parameterpublic XIDParameter(byte paramIdentifier, short val)
paramIdentifier
- identifier codeval
- value of parameterpublic XIDParameter(byte paramIdentifier, int val, boolean is3Byte)
paramIdentifier
- identifier codeval
- value of parameteris3Byte
- boolean true if value only requires 24 bits to encodepublic byte getParamLength()
public void write(java.io.DataOutput dos) throws java.io.IOException
dos
- DataOutput to write the value tojava.io.IOException
- if write fails for any reasonpublic static XIDParameter read(java.io.DataInput dis) throws java.io.IOException
dis
- DataInput to read the parameter fromjava.io.IOException
- if read fails for any reasonpublic java.lang.String toString()
toString
in class java.lang.Object