net.kano.joscar.snaccmd.chat
Class UsersCmd
java.lang.Object
SnacCommand
ChatCommand
UsersCmd
- Direct Known Subclasses:
- UsersJoinedCmd, UsersLeftCmd
- public abstract class UsersCmd
- extends ChatCommand
A base class for the two member-list-based commands in this package,
UsersJoinedCmd
and UsersLeftCmd
.
Constructor Summary |
protected |
UsersCmd(int command,
FullUserInfo[] users)
Creates a new outgoing user-based command with the given SNAC command
subtype and list of users. |
protected |
UsersCmd(int command,
SnacPacket packet)
Creates a new user-based command from the given incoming SNAC packet. |
Method Summary |
FullUserInfo[] |
getUsers()
Returns the list of users sent in this command. |
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 |
UsersCmd
protected UsersCmd(int command,
SnacPacket packet)
- Creates a new user-based command from the given incoming SNAC packet.
- Parameters:
command
- the command's SNAC command subtypepacket
- an incoming user-based SNAC packet
UsersCmd
protected UsersCmd(int command,
FullUserInfo[] users)
- Creates a new outgoing user-based command with the given SNAC command
subtype and list of users.
- Parameters:
command
- the SNAC command subtype of this commandusers
- the users this command concerns
getUsers
public final FullUserInfo[] getUsers()
- Returns the list of users sent in this command.
- Returns:
- the list of users
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()