net.kano.joscar.snaccmd.loc
Class SetInterestsCmd
java.lang.Object
SnacCommand
LocCommand
SetInterestsCmd
- public class SetInterestsCmd
- extends LocCommand
A SNAC command used to store a list of "chat interests." Normally
responded-to with a SetInterestsAck
.
- See Also:
SetInterestsAck
- Source of this SNAC:
- AIM client
- SNAC command type:
- Family
0x02
, command 0x0f
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 |
Constructor Summary |
protected |
SetInterestsCmd(SnacPacket packet)
Generates a new set-chat-interests command from the given incoming SNAC
command. |
|
SetInterestsCmd(java.lang.String[] interests)
Creates a new set-chat-interests command setting the given list of
interests. |
Method Summary |
java.lang.String[] |
getInterests()
Returns the chat interests 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SetInterestsCmd
protected SetInterestsCmd(SnacPacket packet)
- Generates a new set-chat-interests command from the given incoming SNAC
command.
- Parameters:
packet
- an incoming set-chat-interests packet
SetInterestsCmd
public SetInterestsCmd(java.lang.String[] interests)
- Creates a new set-chat-interests command setting the given list of
interests.
- Parameters:
interests
- the list of chat interests to set
getInterests
public final java.lang.String[] getInterests()
- Returns the chat interests being set. Note that this will always be
non-
null
if read from an incoming set-interests command,
even if no interests are being set. In that case, the returned array will
simply have a length of 0
.
- Returns:
- the chat interests 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()