net.kano.joscar.snaccmd.icon
Class UploadIconCmd
java.lang.Object
SnacCommand
IconCommand
UploadIconCmd
- public class UploadIconCmd
- extends IconCommand
A SNAC command sent to upload one's buddy icon to the buddy icon server.
Normally responded-to with an UploadIconAck
.
- See Also:
UploadIconAck
- Source of this SNAC:
- AIM client
Constructor Summary |
protected |
UploadIconCmd(SnacPacket packet)
Generates an upload icon command from the given incoming SNAC packet. |
|
UploadIconCmd(Writable iconData)
Creates a new icon upload command with the given icon data writer. |
Method Summary |
ByteBlock |
getIconData()
Returns the icon data being uploaded. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UploadIconCmd
protected UploadIconCmd(SnacPacket packet)
- Generates an upload icon command from the given incoming SNAC packet.
- Parameters:
packet
- an incoming icon upload packet
UploadIconCmd
public UploadIconCmd(Writable iconData)
- Creates a new icon upload command with the given icon data writer.
- Parameters:
iconData
- an object used to write the icon data to the connection- See Also:
FileWritable
getIconData
public final ByteBlock getIconData()
- Returns the icon data being uploaded. Note that this will be
null
if this is an outgoing upload icon command, as the
icon data is not stored in a local byte block but rather written directly
from the given Writable
.
- Returns:
- the icon data being uploaded
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()