📄 stringmessageelement.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.io.Reader</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/endpoint/StringMessageElement.html#getReader()">getReader</A></B>()</CODE><BR> Returns a character reader containing the element character data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.io.InputStream</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/endpoint/StringMessageElement.html#getStream()">getStream</A></B>()</CODE><BR> Returns the stream of bytes which represents the content of this <code>Document</code>. <p/>XXX 20020519 bondolo@jxta.org This implementation is really horrible, use getReader if you possibly can. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/endpoint/StringMessageElement.html#hashCode()">hashCode</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/endpoint/StringMessageElement.html#sendToStream(java.io.OutputStream)">sendToStream</A></B>(java.io.OutputStream sendTo)</CODE><BR> Send the contents of this <code>Document</code> to the specified stream. <p/>This version probably has sub-optimal performance. Sub-classes should override this implementation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/endpoint/StringMessageElement.html#sendToWriter(java.io.Writer)">sendToWriter</A></B>(java.io.Writer sendTo)</CODE><BR> Sends the element character data to the specified character writer. <p/>This version probably has sub-optimal performance. Sub-classes should override this implementation if possible.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/endpoint/StringMessageElement.html#toString()">toString</A></B>()</CODE><BR> <p/>Returns a String representation of the element data. The <code>'charset'</code> parameter of the message element's mimetype, if any, is used to determine encoding. If the charset specified is unsupported then the default enconding will be used. <p/>synchronized for caching purposes. <p/>synchronized for caching purposes.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_net.jxta.endpoint.TextMessageElement"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class net.jxta.endpoint.<A HREF="../../../net/jxta/endpoint/TextMessageElement.html" title="class in net.jxta.endpoint">TextMessageElement</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../net/jxta/endpoint/TextMessageElement.html#getFileExtension()">getFileExtension</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_net.jxta.endpoint.MessageElement"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class net.jxta.endpoint.<A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../net/jxta/endpoint/MessageElement.html#clone()">clone</A>, <A HREF="../../../net/jxta/endpoint/MessageElement.html#copyInputStreamToOutputStream(java.io.InputStream, java.io.OutputStream)">copyInputStreamToOutputStream</A>, <A HREF="../../../net/jxta/endpoint/MessageElement.html#getByteLength()">getByteLength</A>, <A HREF="../../../net/jxta/endpoint/MessageElement.html#getElementName()">getElementName</A>, <A HREF="../../../net/jxta/endpoint/MessageElement.html#getElementProperty(java.lang.Object)">getElementProperty</A>, <A HREF="../../../net/jxta/endpoint/MessageElement.html#getMimeType()">getMimeType</A>, <A HREF="../../../net/jxta/endpoint/MessageElement.html#getSequentialName()">getSequentialName</A>, <A HREF="../../../net/jxta/endpoint/MessageElement.html#getSignature()">getSignature</A>, <A HREF="../../../net/jxta/endpoint/MessageElement.html#getUniqueName()">getUniqueName</A>, <A HREF="../../../net/jxta/endpoint/MessageElement.html#setElementProperty(java.lang.Object, java.lang.Object)">setElementProperty</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>finalize, getClass, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_net.jxta.document.Document"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface net.jxta.document.<A HREF="../../../net/jxta/document/Document.html" title="interface in net.jxta.document">Document</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../net/jxta/document/Document.html#getMimeType()">getMimeType</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="data"><!-- --></A><H3>data</H3><PRE>protected java.lang.String <B>data</B></PRE><DL><DD>The data for this Message Element.<P><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="StringMessageElement()"><!-- --></A><H3>StringMessageElement</H3><PRE>protected <B>StringMessageElement</B>()</PRE><DL><DD>disabled<P></DL><HR><A NAME="StringMessageElement(java.lang.String, java.lang.String, net.jxta.endpoint.MessageElement)"><!-- --></A><H3>StringMessageElement</H3><PRE>public <B>StringMessageElement</B>(java.lang.String name, java.lang.String value, <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A> sig)</PRE><DL><DD>Create a new Message Element from the provided String. The String will be encoded for transmission using UTF-8.<P><DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of the Element. May be the empty string ("") or null if the Element is not named.<DD><CODE>value</CODE> - A String containing the contents of this element.<DD><CODE>sig</CODE> - Message digest/digital signature element. If no signature is to be specified, pass <code>null</code>.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>value</code> is <code>null</code>.</DL><HR><A NAME="StringMessageElement(java.lang.String, java.lang.String, java.lang.String, net.jxta.endpoint.MessageElement)"><!-- --></A><H3>StringMessageElement</H3><PRE>public <B>StringMessageElement</B>(java.lang.String name, java.lang.String value, java.lang.String encoding, <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A> sig) throws java.io.UnsupportedEncodingException</PRE><DL><DD>Create a new Message Element from the provided String. The string will be encoded for transmission using specified character encoding.<P><DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of the MessageElement. May be the empty string ("") or <code>null</code> if the MessageElement is not named.<DD><CODE>value</CODE> - A String containing the contents of this element.<DD><CODE>encoding</CODE> - Name of the character encoding to use. If <code>null</code> then the system default charcter encoding will be used. (Using the system default charcter encoding should be used with extreme caution).<DD><CODE>sig</CODE> - Message digest/digital signature element. If no signature is to be specified, pass <code>null</code>.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>value</code> is <code>null</code>.<DD><CODE>java.io.UnsupportedEncodingException</CODE> - if the requested encoding is not supported.</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="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(java.lang.Object target)</PRE><DL><DD> <p/>Elements are considered equal if they have the same name, type and signatures. Element data is not considered by this implementation as it is mostly intended for subclass use.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../net/jxta/endpoint/MessageElement.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD><P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../net/jxta/endpoint/MessageElement.html#hashCode()">hashCode</A></CODE> in class <CODE><A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -