?? message.html
字號(hào):
<DL></DL></DL><HR><A NAME="cachedByteLength"><!-- --></A><H3>cachedByteLength</H3><PRE>protected transient long <B>cachedByteLength</B></PRE><DL><DD>cached aggregate size of all the memeber elements. Used by <A HREF="../../../net/jxta/endpoint/Message.html#getByteLength()"><CODE>getByteLength()</CODE></A><P><DL></DL></DL><HR><A NAME="cachedByteLengthModCount"><!-- --></A><H3>cachedByteLengthModCount</H3><PRE>protected transient int <B>cachedByteLengthModCount</B></PRE><DL><DD>modcount at the time the message length was last calculated. Used by <A HREF="../../../net/jxta/endpoint/Message.html#getByteLength()"><CODE>getByteLength()</CODE></A><P><DL></DL></DL><HR><A NAME="modifiable"><!-- --></A><H3>modifiable</H3><PRE>public boolean <B>modifiable</B></PRE><DL><DD><B>Deprecated.</B> <I>You really should not depend on this feature.</I><P><DD>If true then the message is modifiable. This is primarily intended as a diagnostic tool for detecting concurrent modification.<P><DL></DL></DL><HR><A NAME="modHistory"><!-- --></A><H3>modHistory</H3><PRE>protected java.util.List <B>modHistory</B></PRE><DL><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Message()"><!-- --></A><H3>Message</H3><PRE>public <B>Message</B>()</PRE><DL><DD>Standard Constructor for messages. The default namespace will be the empty string ("")<P></DL><HR><A NAME="Message(java.lang.String)"><!-- --></A><H3>Message</H3><PRE>protected <B>Message</B>(java.lang.String defaultNamespace)</PRE><DL><DD>Standard Constructor for messages.<P><DT><B>Parameters:</B><DD><CODE>defaultNamespace</CODE> - the namespace which is assumed when calls are made that don't include a namespace specification.</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getNextMessageNumber()"><!-- --></A><H3>getNextMessageNumber</H3><PRE>protected static int <B>getNextMessageNumber</B>()</PRE><DL><DD>Returns the next message number in sequence.<P><DD><DL><DT><B>Returns:</B><DD>the next message number in sequence.</DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public java.lang.Object <B>clone</B>()</PRE><DL><DD> <p/>Duplicates the Message. The returned duplicate is a real copy. It may be freely modified without causing change to the originally cloned message.<P><DD><DL><DT><B>Returns:</B><DD>Message a Message that is a copy of the original message</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(java.lang.Object target)</PRE><DL><DD> Compare this Message against another. Returns true if all of the elements are identical and in the same order. Message properties (setProperty/getProperty) are not considered in the calculation.<P><DD><DL><DT><B>Returns:</B><DD>boolean true if the elements are identical.</DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD><P><DD><DL></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD> Displays the lineage of the message including its own message number. This is useful primarily for debugging purposes.<P><DD><DL></DL></DD></DL><HR><A NAME="getDefaultNamespace()"><!-- --></A><H3>getDefaultNamespace</H3><PRE>protected java.lang.String <B>getDefaultNamespace</B>()</PRE><DL><DD>Return the default Namespace of this message.<P><DD><DL><DT><B>Returns:</B><DD>The default namespace for this message.</DL></DD></DL><HR><A NAME="addMessageElement(net.jxta.endpoint.MessageElement)"><!-- --></A><H3>addMessageElement</H3><PRE>public void <B>addMessageElement</B>(<A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A> add)</PRE><DL><DD>Add a MessageElement into the message. The MessageElement is stored in the default namespace.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>add</CODE> - the Element to add to the message.</DL></DD></DL><HR><A NAME="addMessageElement(java.lang.String, net.jxta.endpoint.MessageElement)"><!-- --></A><H3>addMessageElement</H3><PRE>public void <B>addMessageElement</B>(java.lang.String namespace, <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A> add)</PRE><DL><DD>Add a MessageElement into the message using the specified namespace.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>namespace</CODE> - contains the namespace of the element to add. You can specify null as a shorthand for the default namespace.<DD><CODE>add</CODE> - the MessageElement to add to the message.</DL></DD></DL><HR><A NAME="replaceMessageElement(net.jxta.endpoint.MessageElement)"><!-- --></A><H3>replaceMessageElement</H3><PRE>public <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A> <B>replaceMessageElement</B>(<A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A> replacement)</PRE><DL><DD>Replace a <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint"><CODE>MessageElement</CODE></A> in the message. This method will remove all MessageElement instances in the default namespace which match the specified name (if any) and then insert the replacement element. The existing version of the element is returned, if more than one matching element was removed, a random matching element is returned. <p/>For greatest control over element replacement, use the <CODE>ListIterator.set(java.lang.Object)</CODE> method as returned by <A HREF="../../../net/jxta/endpoint/Message.html#getMessageElements()"><CODE>getMessageElements()</CODE></A>, <A HREF="../../../net/jxta/endpoint/Message.html#getMessageElements(java.lang.String)"><CODE>getMessageElements(java.lang.String)</CODE></A> or <A HREF="../../../net/jxta/endpoint/Message.html#getMessageElementsOfNamespace(java.lang.String)"><CODE>getMessageElementsOfNamespace(java.lang.String)</CODE></A><P><DD><DL><DT><B>Parameters:</B><DD><CODE>replacement</CODE> - the Element to be inserted into to the message.<DT><B>Returns:</B><DD>One of the elements which was replaced or null if no existing matching item was located.</DL></DD></DL><HR><A NAME="replaceMessageElement(java.lang.String, net.jxta.endpoint.MessageElement)"><!-- --></A><H3>replaceMessageElement</H3><PRE>public <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A> <B>replaceMessageElement</B>(java.lang.String namespace, <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A> replacement)</PRE><DL><DD>Replace a <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint"><CODE>MessageElement</CODE></A> in the message using the specified namespace. This method will remove all MessageElement instances which match the specified name (if any) and then insert the replacement element. The existing version of the element is returned, if more than one matching element was removed, a random matching element is returned. <p/>For greatest control over element replacement, use the <CODE>ListIterator.set(java.lang.Object)</CODE> method as returned by <A HREF="../../../net/jxta/endpoint/Message.html#getMessageElements()"><CODE>getMessageElements()</CODE></A>, <A HREF="../../../net/jxta/endpoint/Message.html#getMessageElements(java.lang.String)"><CODE>getMessageElements(java.lang.String)</CODE></A> or <A HREF="../../../net/jxta/endpoint/Message.html#getMessageElementsOfNamespace(java.lang.String)"><CODE>getMessageElementsOfNamespace(java.lang.String)</CODE></A><P><DD><DL><DT><B>Parameters:</B><DD><CODE>namespace</CODE> - contains the namespace of the element to be replaced. You can specify null as a shorthand for the default namespace.<DD><CODE>replacement</CODE> - the Element to be inserted into to the message.<DT><B>Returns:</B><DD>One of the elements which was replaced or null if no existing matching item was located.</DL></DD></DL><HR><A NAME="getMessageNamespaces()"><!-- --></A><H3>getMessageNamespaces</H3><PRE><DL><DD>Returns an iterator of the namespaces present in this message. all of the elements will be Strings.<P><DD><DL><DT><B>Returns:</B><DD>iterator of strings of the namespaces of this message.</DL></DD></DL><HR><A NAME="getMessageElement(java.lang.String)"><!-- --></A><H3>getMessageElement</H3><PRE>public <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A> <B>getMessageElement</B>(java.lang.String name)</PRE><DL><DD>Retrieve a element by name from the message without regard to namespace. If there is more than one element with this name, a random element will be returned.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the element to attept to retrieve.<DT><B>Returns:</B><DD>Element the element or null if no matching element could be found.</DL></DD></DL><HR><A NAME="getMessageElement(java.lang.String, java.lang.String)"><!-- --></A><H3>getMessageElement</H3><PRE>public <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A> <B>getMessageElement</B>(java.lang.String namespace, java.lang.String name)</PRE><DL><DD>Retrieve a element by name in the specified namespace from the message. If there is more than one element with this name, a random element will be returned.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>namespace</CODE> - contains the namespace of the element to get. You can specify null as a shorthand for the default namespace.<DD><CODE>name</CODE> - contains the name of the element to get<DT><B>Returns:</B><DD>Element the element.</DL></DD></DL><HR><A NAME="getMessageElements()"><!-- --></A><H3>getMessageElements</H3><PRE>public <A HREF="../../../net/jxta/endpoint/Message.ElementIterator.html" title="class in net.jxta.endpoint">Message.ElementIterator</A> <B>getMessageElements</B>()</PRE><DL><DD>Returns a list iterator of all of the elements contained in this message. Elements from all namespaces are returned. <p/>The iterator returned is not synchronized with the message and will throw <CODE>ConcurrentModificationException</CODE> if the message is modified.<P><DD><DL><DT><B>Returns:</B><DD>Enumeration of Elements.</DL></DD></DL><HR><A NAME="getMessageElements(java.lang.String)"><!-- --></A><H3>getMessageElements</H3><PRE>public <A HREF="../../../net/jxta/endpoint/Message.ElementIterator.html" title="class in net.jxta.endpoint">Message.ElementIterator</A> <B>getMessageElements</B>(java.lang.String name)</PRE><DL><DD>Returns a list iterator of all of the elements contained in this message who's name matches the specified name. Elements from all namespaces are returned.
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -