public class IconHandler extends SNACHandler
Used for storing and retrieving your cute little buddy icon from the AIM servers.
SNACHandler
Constructor and Description |
---|
IconHandler()
Family 0x0010.
|
Modifier and Type | Method and Description |
---|---|
void |
handleSNAC(AIMSession sess,
SNACHandler handler,
AIMFrame frame,
SNAC snac,
AIMInputStream buffer)
Handles incoming SNAC's.
|
void |
request(AIMSession sess,
String sn,
byte[] iconcsum)
Subtype 0x0004 - Request someone's icon.
|
void |
upload(AIMSession sess,
byte[] icon)
Subtype 0x0002 - Upload your icon.
|
getFamily, getVersion, setFamily, setVersion
public void upload(AIMSession sess, byte[] icon) throws IOException
sess
- the oscar sessionicon
- the raw data of the icon image fileIOException
- if an error occurspublic void request(AIMSession sess, String sn, byte[] iconcsum) throws IOException
sess
- the oscar sessionsn
- the screenname of the person whose icon you are requestingiconcsum
- the MD5 checksum of the icon you are requestingIOException
- if an error occurspublic void handleSNAC(AIMSession sess, SNACHandler handler, AIMFrame frame, SNAC snac, AIMInputStream buffer) throws IOException
handleSNAC
in class SNACHandler
sess
- the oscar sessionhandler
- the handlerframe
- the incoming framesnac
- the incoming SNACbuffer
- the incoming bufferIOException
- if an error occurs