📄 textmessageelement.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../net/jxta/document/Document.html#getMimeType()">getMimeType</A>, <A HREF="../../../net/jxta/document/Document.html#getStream()">getStream</A>, <A HREF="../../../net/jxta/document/Document.html#sendToStream(java.io.OutputStream)">sendToStream</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="cachedGetCharLength"><!-- --></A><H3>cachedGetCharLength</H3><PRE>protected transient long <B>cachedGetCharLength</B></PRE><DL><DD>cached result of <A HREF="../../../net/jxta/endpoint/TextMessageElement.html#getCharLength()"><CODE>getCharLength()</CODE></A> operation.<P><DL></DL></DL><HR><A NAME="cachedGetChars"><!-- --></A><H3>cachedGetChars</H3><PRE>protected transient java.lang.ref.SoftReference <B>cachedGetChars</B></PRE><DL><DD>cached result of <A HREF="../../../net/jxta/endpoint/MessageElement.html#getBytes(boolean)"><CODE>MessageElement.getBytes(boolean)</CODE></A> operation.<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="TextMessageElement()"><!-- --></A><H3>TextMessageElement</H3><PRE>protected <B>TextMessageElement</B>()</PRE><DL><DD>disabled<P></DL><HR><A NAME="TextMessageElement(java.lang.String, net.jxta.document.MimeMediaType, net.jxta.endpoint.MessageElement)"><!-- --></A><H3>TextMessageElement</H3><PRE>protected <B>TextMessageElement</B>(java.lang.String name, <A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A> type, <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A> sig)</PRE><DL><DD>Internal constructor for initializaing everything but the data.<P><DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of the Element. May be the empty string ("") if the Element is not named.<DD><CODE>type</CODE> - Type of the Element. null is equivalent to specifying the type "Application/Octet-stream"<DD><CODE>sig</CODE> - optional message digest/digital signature elemnent. If no signature is to be specified, pass null.</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="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD> <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.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/document/TextDocument.html#toString()">toString</A></CODE> in interface <CODE><A HREF="../../../net/jxta/document/TextDocument.html" title="interface in net.jxta.document">TextDocument</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../net/jxta/endpoint/MessageElement.html#toString()">toString</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="getFileExtension()"><!-- --></A><H3>getFileExtension</H3><PRE>public java.lang.String <B>getFileExtension</B>()</PRE><DL><DD>Returns the file extension type used by this <code>Document</code>. This value is usually chosen based upon the MIME Media Type. <p/>We use the "unknown" extension and leave it to sub-classes to extend this. If we had a mailcap facility we could do better classification based on mimetype. <p/>We use the "text" extension and leave it to sub-classes to extend this.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/document/Document.html#getFileExtension()">getFileExtension</A></CODE> in interface <CODE><A HREF="../../../net/jxta/document/Document.html" title="interface in net.jxta.document">Document</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../net/jxta/endpoint/MessageElement.html#getFileExtension()">getFileExtension</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="getCharLength()"><!-- --></A><H3>getCharLength</H3><PRE>public long <B>getCharLength</B>()</PRE><DL><DD>Returns the size of the element data in characters<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>long containing the size of the element data.</DL></DD></DL><HR><A NAME="getChars(boolean)"><!-- --></A><H3>getChars</H3><PRE>public char[] <B>getChars</B>(boolean copy)</PRE><DL><DD>Returns a char array which contains the element data. The char array returned <b>may be shared amongst all copies of the element</b>, do not modify it. The <tt>copy</tt> parameter allows you to request a private, modifiable copy of the element data.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>char[] Contents of message element.</DL></DD></DL><HR><A NAME="getReader()"><!-- --></A><H3>getReader</H3><PRE>public abstract java.io.Reader <B>getReader</B>() throws java.io.IOException</PRE><DL><DD>Returns a character reader containing the element character data.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/document/TextDocument.html#getReader()">getReader</A></CODE> in interface <CODE><A HREF="../../../net/jxta/document/TextDocument.html" title="interface in net.jxta.document">TextDocument</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Reader of the stream containing element character data.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if there is a problem getting the stream</DL></DD></DL><HR><A NAME="sendToWriter(java.io.Writer)"><!-- --></A><H3>sendToWriter</H3><PRE>public void <B>sendToWriter</B>(java.io.Writer sendTo) throws java.io.IOException</PRE><DL><DD>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.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/document/TextDocument.html#sendToWriter(java.io.Writer)">sendToWriter</A></CODE> in interface <CODE><A HREF="../../../net/jxta/document/TextDocument.html" title="interface in net.jxta.document">TextDocument</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>sendTo</CODE> - the output stream to send the data to.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if there is a problem sending the data to the specified stream</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TextMessageElement.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>JXTA J2SE</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../net/jxta/endpoint/TextDocumentMessageElement.html" title="class in net.jxta.endpoint"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="TextMessageElement.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -