net.kano.joscar.snaccmd.icon
Class UploadIconAck

java.lang.Object
  extended bySnacCommand
      extended byIconCommand
          extended byUploadIconAck

public class UploadIconAck
extends IconCommand

A SNAC command sent to acknowledge that a buddy icon has successfully been uploaded. Normally sent in response to a UploadIconCmd.

See Also:
UploadIconCmd
Source of this SNAC:
AIM server
SNAC command type:
Family 0x10, command 0x03

Field Summary
static int CODE_DEFAULT
          A default value for the acknowledgement code sent in this command.
 
Fields inherited from class IconCommand
CMD_ICON_DATA, CMD_ICON_REQ, CMD_UPLOAD_ACK, CMD_UPLOAD_ICON, FAMILY_ICON, FAMILY_INFO
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
  UploadIconAck(ExtraInfoBlock iconInfo)
          Creates a new outgoing icon upload acknowledgement command with the given icon information block and a code of CODE_DEFAULT.
  UploadIconAck(int code, ExtraInfoBlock iconInfo)
          Creates a new outgoing icon upload acknowledgement command with the given icon information block and the given code.
protected UploadIconAck(SnacPacket packet)
          Generates an icon upload acknowledgement command from the given incoming SNAC packet.
 
Method Summary
 int getCode()
          Returns the acknowledgement code sent in this command.
 ExtraInfoBlock getIconInfo()
          Returns the icon information block corresponding to the uploaded icon.
 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
 

Field Detail

CODE_DEFAULT

public static final int CODE_DEFAULT
A default value for the acknowledgement code sent in this command.

See Also:
Constant Field Values
Constructor Detail

UploadIconAck

protected UploadIconAck(SnacPacket packet)
Generates an icon upload acknowledgement command from the given incoming SNAC packet.

Parameters:
packet - an incoming icon upload acknowledgement packet

UploadIconAck

public UploadIconAck(ExtraInfoBlock iconInfo)
Creates a new outgoing icon upload acknowledgement command with the given icon information block and a code of CODE_DEFAULT. Using this constructor is equivalent to using new UploadIconAck(UploadIconAck.CODE_DEFAULT, iconInfo).

Parameters:
iconInfo - an icon information block corresponding to the uploaded icon

UploadIconAck

public UploadIconAck(int code,
                     ExtraInfoBlock iconInfo)
Creates a new outgoing icon upload acknowledgement command with the given icon information block and the given code.

Parameters:
code - some sort of code, normally CODE_DEFAULT
iconInfo - an icon information block corresponding to the uploaded icon
Method Detail

getCode

public final int getCode()
Returns the acknowledgement code sent in this command. Normally CODE_DEFAULT.

Returns:
some sort of acknowledgement code

getIconInfo

public final ExtraInfoBlock getIconInfo()
Returns the icon information block corresponding to the uploaded icon.

Returns:
the icon information block for the uploaded icon

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()