net.kano.joscar.snaccmd.loc
Class LocRightsCmd
java.lang.Object
SnacCommand
LocCommand
LocRightsCmd
- public class LocRightsCmd
- extends LocCommand
A SNAC command containing location-related "rights." Currently the only
supported value is the maximum length of a user's "info."
- Source of this SNAC:
- AIM server
- SNAC command type:
- Family
0x02
, command 0x03
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 |
|
LocRightsCmd(int maxInfoLength)
Creates a new location rights command with the given maximum info length. |
protected |
LocRightsCmd(SnacPacket packet)
Generates a new location rights command from the given incoming SNAC
packet. |
Method Summary |
int |
getMaxInfoLength()
Returns the maximum length, in bytes, of one's user info. |
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 |
LocRightsCmd
protected LocRightsCmd(SnacPacket packet)
- Generates a new location rights command from the given incoming SNAC
packet.
- Parameters:
packet
- an incoming location rights packet
LocRightsCmd
public LocRightsCmd(int maxInfoLength)
- Creates a new location rights command with the given maximum info length.
- Parameters:
maxInfoLength
- the maximum length of one's "info"
getMaxInfoLength
public final int getMaxInfoLength()
- Returns the maximum length, in bytes, of one's user info.
- Returns:
- the maximum "info" length
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()