net.kano.joscar.snaccmd.loc
Class SetInfoCmd

java.lang.Object
  extended bySnacCommand
      extended byLocCommand
          extended bySetInfoCmd

public class SetInfoCmd
extends LocCommand

A SNAC command used to set one's "user info" fields, such as away message and "info."


Field Summary
 
Fields inherited from class LocCommand
CMD_DIR_INFO, CMD_GET_DIR, CMD_INTEREST_ACK, CMD_NEW_GET_INFO, CMD_OLD_GET_INFO, CMD_RIGHTS_REQ, CMD_RIGHTS_RESP, CMD_SET_DIR, CMD_SET_DIR_ACK, CMD_SET_INFO, CMD_SET_INTERESTS, CMD_USER_INFO, FAMILY_INFO, FAMILY_LOC
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
  SetInfoCmd(InfoData infoData)
          Creates a new set-info command with the given info data block.
protected SetInfoCmd(SnacPacket packet)
          Generates a new set-info command from the given incoming SNAC packet.
 
Method Summary
 InfoData getInfoData()
          Returns the "info data" block being set.
 java.lang.String toString()
           
 void writeData(java.io.OutputStream out)
          Writes this command's SNAC data block to the given stream.
 
Methods inherited from class SnacCommand
getCommand, getFamily, getFlag1, getFlag2
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetInfoCmd

protected SetInfoCmd(SnacPacket packet)
Generates a new set-info command from the given incoming SNAC packet.

Parameters:
packet - an incoming set-info packet

SetInfoCmd

public SetInfoCmd(InfoData infoData)
Creates a new set-info command with the given info data block.

Parameters:
infoData - a block of "info data" to set
Method Detail

getInfoData

public final InfoData getInfoData()
Returns the "info data" block being set.

Returns:
this command's "info data" that is being set

writeData

public void writeData(java.io.OutputStream out)
               throws java.io.IOException
Description copied from class: SnacCommand
Writes this command's SNAC data block to the given stream. The SNAC data block is the data after the first ten bytes of a SNAC packet.

Specified by:
writeData in class SnacCommand
Parameters:
out - the stream to which to write the SNAC data
Throws:
java.io.IOException - if an I/O error occurs

toString

public java.lang.String toString()