net.kano.joscar.flapcmd
Class FlapErrorCmd

java.lang.Object
  extended byFlapCommand
      extended byFlapErrorCmd

public class FlapErrorCmd
extends FlapCommand

A FLAP command sent when a FLAP-level error occurs.

FLAP channel:
0x03

Field Summary
static int CHANNEL_ERROR
          The FLAP channel where FLAP error commands live.
 
Constructor Summary
protected FlapErrorCmd(FlapPacket packet)
          Generates a new FLAP error command from the given incoming FLAP packet.
  FlapErrorCmd(int code)
          Creates a new outgoing FLAP error command with the given error code.
 
Method Summary
 int getErrorCode()
          Returns the error code sent in this FLAP error command.
 java.lang.String toString()
           
 void writeData(java.io.OutputStream out)
          Writes this command's FLAP data to the given stream.
 
Methods inherited from class FlapCommand
getChannel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CHANNEL_ERROR

public static final int CHANNEL_ERROR
The FLAP channel where FLAP error commands live.

See Also:
Constant Field Values
Constructor Detail

FlapErrorCmd

protected FlapErrorCmd(FlapPacket packet)
Generates a new FLAP error command from the given incoming FLAP packet.

Parameters:
packet - an incoming FLAP error packet

FlapErrorCmd

public FlapErrorCmd(int code)
Creates a new outgoing FLAP error command with the given error code.

Parameters:
code - the error code to send in this FLAP error command
Method Detail

getErrorCode

public final int getErrorCode()
Returns the error code sent in this FLAP error command.

Returns:
this FLAP error command's error code

writeData

public void writeData(java.io.OutputStream out)
               throws java.io.IOException
Description copied from class: FlapCommand
Writes this command's FLAP data to the given stream.

Specified by:
writeData in class FlapCommand
Parameters:
out - the stream to which the FLAP data should be written
Throws:
java.io.IOException - if an I/O error occurs

toString

public java.lang.String toString()