|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectInvitationMessage
A data structure containing an invitation message string and a language in which that message was written. This structure is used in several rendezvous types, including inviting someone to a chat room and sending someone a file.
Constructor Summary | |
InvitationMessage(java.lang.String message)
Creates a new invitation message with the given message body and with the JVM's current language. |
|
InvitationMessage(java.lang.String message,
java.util.Locale language)
Creates a new invitation message object with the given message body and the language code of the given Locale . |
Method Summary | |
boolean |
equals(java.lang.Object o)
|
java.util.Locale |
getLanguage()
Returns a Locale object whose language field represents the
language used to write the invitation message
body. |
java.lang.String |
getMessage()
Returns the body of the invitation message contained in this invitation message block, or null if none is present. |
int |
hashCode()
|
static InvitationMessage |
readInvitationMessage(TlvChain chain)
Returns an InvitationMessage with properties read 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, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public InvitationMessage(java.lang.String message)
new InvitationMessage(message,
Locale.getDefault())
.
message
- the invitation message text, or null
for nonepublic InvitationMessage(java.lang.String message, java.util.Locale language)
Locale
. Either field can be
null
, indicating that that field is not present in this
invitation message block.
message
- the invitation message bodylanguage
- a Locale
object whose associated language
represents the language in which the invitation message was
writtenMethod Detail |
public static InvitationMessage readInvitationMessage(TlvChain chain)
InvitationMessage
with properties read from the
given TLV chain. Note that this method will never return
null
, even if no invitation message fields exist in the
given TLV chain.
chain
- a TLV chain containing invitation message TLV's
InvitationMessage
read from the given TLV chainpublic final java.util.Locale getLanguage()
Locale
object whose language field represents the
language used to write the invitation message
body. Note that the returned value will be null
if no such
field was sent.
Locale
whose language field represents the
language in which the associated invitation message was written,
or null
if no language code was sent in this
invitation message blockpublic final java.lang.String getMessage()
null
if none is present.
null
if none is presentpublic 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 boolean equals(java.lang.Object o)
public int hashCode()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |