⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 messageelement.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</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><DD><DL></DL></DD></DL><HR><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><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getElementName()"><!-- --></A><H3>getElementName</H3><PRE>public java.lang.String <B>getElementName</B>()</PRE><DL><DD>Returns the name of the MessageElement. Unnamed elements will return  the empty string ("");<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>String containing the name of the MessageElement.</DL></DD></DL><HR><A NAME="getMimeType()"><!-- --></A><H3>getMimeType</H3><PRE>public <A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A> <B>getMimeType</B>()</PRE><DL><DD>Returns the MIME Media type of this <code>Document</code> per <a href="http://www.ietf.org/rfc/rfc2046.txt" target="_blank">IETF RFC 2046 <i>MIME : Media Types</i></a>. <p/>JXTA does not currently support the '<code>Multipart</code>' or '<code>Message</code>' media types.  <p/>Will return "Application/Octet-Stream" if no type was originally   specified.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/document/Document.html#getMimeType()">getMimeType</A></CODE> in interface <CODE><A HREF="../../../net/jxta/document/Document.html" title="interface in net.jxta.document">Document</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A MimeMediaType object containing the MIME Media Type for this <code>Document</code>.</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><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></DL></DD><DD><DL><DT><B>Returns:</B><DD>A String containing an appropriate file extension for this <code>Document</code>.</DL></DD></DL><HR><A NAME="getByteLength()"><!-- --></A><H3>getByteLength</H3><PRE>public long <B>getByteLength</B>()</PRE><DL><DD>Returns the size of the element data in bytes.<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="getBytes(boolean)"><!-- --></A><H3>getBytes</H3><PRE>public byte[] <B>getBytes</B>(boolean&nbsp;copy)</PRE><DL><DD>Returns a byte array which contains the element data. The byte array  returned <b>may be shared amongst all copies of the element</b>,  do not modify it. The <code>copy</code> parameter allows you to request a  private, modifiable copy of the element data.  <p/>This implementation builds the byte array from the stream.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>copy</CODE> - If true then the result can be modified without damaging the state of this MessageElement. If false, then the result may be a shared copy of the data and should be considered read-only.<DT><B>Returns:</B><DD>byte[] Contents of message element.</DL></DD></DL><HR><A NAME="sendToStream(java.io.OutputStream)"><!-- --></A><H3>sendToStream</H3><PRE>public void <B>sendToStream</B>(java.io.OutputStream&nbsp;sendTo)                  throws java.io.IOException</PRE><DL><DD>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.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/document/Document.html#sendToStream(java.io.OutputStream)">sendToStream</A></CODE> in interface <CODE><A HREF="../../../net/jxta/document/Document.html" title="interface in net.jxta.document">Document</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>sendTo</CODE> - The OutputStream to which the <code>Document</code> will be written.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL></DD></DL><HR><A NAME="getSignature()"><!-- --></A><H3>getSignature</H3><PRE>public <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A> <B>getSignature</B>()</PRE><DL><DD>Returns the element containing the digest/digital signature for  this element<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Element containing the digital signature.</DL></DD></DL><HR><A NAME="setElementProperty(java.lang.Object, java.lang.Object)"><!-- --></A><H3>setElementProperty</H3><PRE>public java.lang.Object <B>setElementProperty</B>(java.lang.Object&nbsp;key,                                           java.lang.Object&nbsp;value)</PRE><DL><DD>associate a transient property with this element. if there was a previous  value for the key provided then it is returned. This feature is useful for  managing the state of element during processing.  <p/>The setting of particular keys may be controlled by a Java Security  Manager. Keys of type 'java.lang.Class' are checked against the caller of  this method. Only callers which are instances of the key class may modify  the property. This check is not possible through reflection. All other  types of keys are unchecked.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the property key<DD><CODE>value</CODE> - the value for the property<DT><B>Returns:</B><DD>previous value for the property or null if no previous</DL></DD></DL><HR><A NAME="getElementProperty(java.lang.Object)"><!-- --></A><H3>getElementProperty</H3><PRE>public java.lang.Object <B>getElementProperty</B>(java.lang.Object&nbsp;key)</PRE><DL><DD>retrieves a transient property from the set for this element.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the property key.<DT><B>Returns:</B><DD>value for the property or null if no property for this key.</DL></DD></DL><HR><A NAME="copyInputStreamToOutputStream(java.io.InputStream, java.io.OutputStream)"><!-- --></A><H3>copyInputStreamToOutputStream</H3><PRE>protected static void <B>copyInputStreamToOutputStream</B>(java.io.InputStream&nbsp;source,                                                    java.io.OutputStream&nbsp;sink)                                             throws java.io.IOException</PRE><DL><DD>Copies an input stream to an output stream with buffering.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>source</CODE> - The stream to copy from.<DD><CODE>sink</CODE> - The stream to send the data to.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if there is a problem copying the data</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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/MessageElement.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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">&nbsp;<A HREF="../../../net/jxta/endpoint/Message.ElementIterator.html" title="class in net.jxta.endpoint"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../net/jxta/endpoint/MessengerEvent.html" title="class in net.jxta.endpoint"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="MessageElement.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 + -