org.ka2ddo.ax25
Class XIDGroup

java.lang.Object
  extended by org.ka2ddo.ax25.XIDGroup

public class XIDGroup
extends java.lang.Object

This class encapsulates and encodes one X.25 XID group. This is used to handle responding to the XID frame in the AX.25 protocol.


Field Summary
 byte formatIdentifier
           
 byte groupIdentifier
           
 java.util.ArrayList<XIDParameter> paramList
           
 
Constructor Summary
XIDGroup()
          Create an empty XIDGroup with the AX.25 default FI/GI.
 
Method Summary
 int getGroupLength()
          Get the number of bytes needed to encode the list of XIDParameters in this XIDGroup.
static XIDGroup read(java.io.DataInput dis)
          Read an XIDGroup from an input byte stream.
 void write(java.io.DataOutput dos)
          Write the XIDGroup to a byte stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

formatIdentifier

public byte formatIdentifier

groupIdentifier

public byte groupIdentifier

paramList

public final java.util.ArrayList<XIDParameter> paramList
Constructor Detail

XIDGroup

public XIDGroup()
Create an empty XIDGroup with the AX.25 default FI/GI.

Method Detail

write

public void write(java.io.DataOutput dos)
           throws java.io.IOException
Write the XIDGroup to a byte stream.

Parameters:
dos - DataOutput to write the XIDGroup to
Throws:
java.io.IOException - if write fails for any reason

getGroupLength

public int getGroupLength()
Get the number of bytes needed to encode the list of XIDParameters in this XIDGroup.

Returns:
byte count

read

public static XIDGroup read(java.io.DataInput dis)
                     throws java.io.IOException
Read an XIDGroup from an input byte stream.

Parameters:
dis - DataInput to read the XIDGroup from
Returns:
decoded XIDGroup
Throws:
java.io.IOException - if read fails for any reason