org.walluck.oscar
Class FLAP

java.lang.Object
  extended by org.walluck.oscar.FLAP

public class FLAP
extends Object

FLAP is the low-level communications protocol underlying the SNAC protocol layer.

Since:
1.0
Version:
1.0
Author:
David Walluck

Field Summary
static int ASTERISK
          The asterisk.
static int MAX_LENGTH
          The maximum FLAP length (maximum short value minus the 6 byte header length).
static int VERSION
          The FLAP version we support.
 
Constructor Summary
FLAP(int channel)
          Creates a new outgoing FLAP with the specified channel.
FLAP(int command, int channel, int seqNum, int length)
          Creates a new incoming FLAP.
 
Method Summary
 int getChannel()
          Get the value of channel.
 int getCommand()
          Get the value of command.
 int getLength()
          Get the value of length.
 int getSeqNum()
          Get the value of seqNum.
 void setLength(int length)
          Set the value of length.
 void setSeqNum(int seqNum)
          Set the value of seqNum.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_LENGTH

public static final int MAX_LENGTH
The maximum FLAP length (maximum short value minus the 6 byte header length).

See Also:
Constant Field Values

VERSION

public static final int VERSION
The FLAP version we support.

See Also:
Constant Field Values

ASTERISK

public static final int ASTERISK
The asterisk.

See Also:
Constant Field Values
Constructor Detail

FLAP

public FLAP(int channel)
Creates a new outgoing FLAP with the specified channel.

Parameters:
channel - the FLAP channel

FLAP

public FLAP(int command,
            int channel,
            int seqNum,
            int length)
     throws IOException
Creates a new incoming FLAP.

Parameters:
command - the FLAP command
channel - the FLAP channel
seqNum - the FLAP sequence number
length - the FLAP length
Throws:
IOException - if an error occurs
Method Detail

getCommand

public int getCommand()
Get the value of command.

Returns:
value of command.

getChannel

public int getChannel()
Get the value of channel.

Returns:
value of channel.

getSeqNum

public int getSeqNum()
Get the value of seqNum.

Returns:
value of seqNum.

setSeqNum

public void setSeqNum(int seqNum)
Set the value of seqNum.

Parameters:
seqNum - Value to assign to seqNum.

getLength

public int getLength()
Get the value of length.

Returns:
value of length.

setLength

public void setLength(int length)
               throws IOException
Set the value of length.

Parameters:
length - Value to assign to length.
Throws:
IOException - if an error occurs