|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.ax25.XIDParameter
public class XIDParameter
This class encapsulates one XID parameter. The caller is responsible for putting the XIDParameter object into an appropriately typed XIDGroup object.
Field Summary | |
---|---|
static byte[] |
EMPTY_VALUE
|
byte |
paramIdentifier
|
byte[] |
paramValue
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte[] EMPTY_VALUE
public byte paramIdentifier
public byte[] paramValue
Constructor Detail |
---|
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 encodeMethod Detail |
---|
public byte getParamLength()
public void write(java.io.DataOutput dos) throws java.io.IOException
dos
- DataOutput to write the value to
java.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 from
java.io.IOException
- if read fails for any reasonpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |