|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectInfoData
A data structure used to transmit one's "info" ("profile"), away message, and capability blocks.
Field Summary | |
static java.lang.String |
NOT_AWAY
An away message string indicating that one has come back from away. |
Constructor Summary | |
InfoData(java.lang.String awayMessage)
Creates a new InfoData structure containing only an away
message. |
|
InfoData(java.lang.String info,
java.lang.String awayMessage,
CapabilityBlock[] caps,
CertificateInfo certInfo)
Creates a new info data object with the given properties. |
Method Summary | |
java.lang.String |
getAwayMessage()
Returns the away message associated with this object, or null if that field was not sent. |
CapabilityBlock[] |
getCaps()
Returns a list of capability blocks advertised by this user, or null if this field was not sent. |
CertificateInfo |
getCertificateInfo()
Returns the certificate information block contained in this info data object. |
java.lang.String |
getInfo()
Returns the user info text associated with this object, or null if that field was not included in this object. |
static InfoData |
readInfoData(ByteBlock block)
Reads a user info data block from the given data block. |
static InfoData |
readInfoDataFromChain(TlvChain chain)
Reads a user info data block from the given TLV chain. |
java.lang.String |
toString()
|
void |
write(java.io.OutputStream out)
Writes a representation of this object to the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String NOT_AWAY
""
.
Constructor Detail |
public InfoData(java.lang.String awayMessage)
InfoData
structure containing only an away
message. Note that the awayMessage
can be NOT_AWAY
(an empty string), indicating that the user is back from being away.
awayMessage
- the away message, or NOT_AWAY
(an empty
string) to indicate that the user is back from being awaypublic InfoData(java.lang.String info, java.lang.String awayMessage, CapabilityBlock[] caps, CertificateInfo certInfo)
null
to indicate that that field shall not be sent.
Note that to unset away (to set "back"), one must use NOT_AWAY
(which is actually just an empty string) instead of null
for
the awayMessage
argument.
info
- the user's user info textawayMessage
- the user's away messagecaps
- a list of supported capability blockscertInfo
- client certificate information (for Encrypted IM)Method Detail |
public static InfoData readInfoData(ByteBlock block)
readInfoDataFromChain(TlvChain.readChain(block)
.
block
- the data block containing user info
public static InfoData readInfoDataFromChain(TlvChain chain)
chain
- the TLV chain containing user info TLV's
public final java.lang.String getInfo()
null
if that field was not included in this object.
public final java.lang.String getAwayMessage()
null
if that field was not sent.
public final CapabilityBlock[] getCaps()
null
if this field was not sent. Note that this field will
be a zero-length array instead of null
if this field was
sent but empty.
public final CertificateInfo getCertificateInfo()
null
if none was sentpublic void write(java.io.OutputStream out) throws java.io.IOException
LiveWritable
write
in interface LiveWritable
out
- the stream to which to write
java.io.IOException
- if an I/O error occurspublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |