net.kano.joscar.snaccmd.auth
Class KeyResponse
java.lang.Object
SnacCommand
AuthCommand
KeyResponse
- public class KeyResponse
- extends AuthCommand
A command sent in response to KeyRequest
that provides the user with
an "authorization key."
- See Also:
KeyRequest
- Source of this SNAC:
- AIM server
- SNAC command type:
- Family
0x17
, command 0x07
Constructor Summary |
|
KeyResponse(ByteBlock key)
Creates an outgoing key response command with the given key. |
protected |
KeyResponse(SnacPacket packet)
Generates a key response command from the given incoming SNAC packet. |
Method Summary |
ByteBlock |
getKey()
Returns the authorization key provided in this response. |
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 |
KeyResponse
protected KeyResponse(SnacPacket packet)
- Generates a key response command from the given incoming SNAC packet.
- Parameters:
packet
- a key response packet
KeyResponse
public KeyResponse(ByteBlock key)
- Creates an outgoing key response command with the given key.
- Parameters:
key
- the "authorization key" to send
getKey
public final ByteBlock getKey()
- Returns the authorization key provided in this response.
- Returns:
- an "authorization key" for use in authorizing
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()