📄 document.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><TITLE>Document (Project JXTA J2SE)</TITLE><META NAME="keywords" CONTENT="net.jxta.document.Document interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="Document (Project JXTA J2SE)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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/Document.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><a href='http://www.jxta.org' target='_blank'>Project JXTA</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../net/jxta/document/Attributable.html" title="interface in net.jxta.document"><B>PREV CLASS</B></A> <A HREF="../../../net/jxta/document/Element.html" title="interface in net.jxta.document"><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> <A HREF="Document.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 | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">net.jxta.document</FONT><BR>Interface Document</H2><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document">StructuredDocument</A>, <A HREF="../../../net/jxta/document/StructuredTextDocument.html" title="interface in net.jxta.document">StructuredTextDocument</A>, <A HREF="../../../net/jxta/document/TextDocument.html" title="interface in net.jxta.document">TextDocument</A>, <A HREF="../../../net/jxta/impl/document/TextDocumentCommon.html" title="interface in net.jxta.impl.document">TextDocumentCommon</A>, <A HREF="../../../net/jxta/impl/endpoint/WireFormatMessage.html" title="interface in net.jxta.impl.endpoint">WireFormatMessage</A>, <A HREF="../../../net/jxta/document/XMLDocument.html" title="interface in net.jxta.document">XMLDocument</A>, <A HREF="../../../net/jxta/impl/document/XMLDocumentCommon.html" title="interface in net.jxta.impl.document">XMLDocumentCommon</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../net/jxta/impl/document/BinaryDocument.html" title="class in net.jxta.impl.document">BinaryDocument</A>, <A HREF="../../../net/jxta/impl/document/DOMXMLDocument.html" title="class in net.jxta.impl.document">DOMXMLDocument</A>, <A HREF="../../../net/jxta/impl/document/LiteXMLDocument.html" title="class in net.jxta.impl.document">LiteXMLDocument</A>, <A HREF="../../../net/jxta/endpoint/MessageElement.html" title="class in net.jxta.endpoint">MessageElement</A>, <A HREF="../../../net/jxta/impl/document/PlainTextDocument.html" title="class in net.jxta.impl.document">PlainTextDocument</A>, <A HREF="../../../net/jxta/endpoint/TextMessageElement.html" title="class in net.jxta.endpoint">TextMessageElement</A>, <A HREF="../../../net/jxta/impl/endpoint/WireFormatMessageBinary.html" title="class in net.jxta.impl.endpoint">WireFormatMessageBinary</A>, <A HREF="../../../net/jxta/impl/endpoint/WireFormatMessageBinary.binaryMessageProxy.html" title="class in net.jxta.impl.endpoint">WireFormatMessageBinary.binaryMessageProxy</A></DD></DL><HR><DL><DT>public interface <B>Document</B></DL><P>A simple typed container for data. A <code>Document</code> is presented as a byte stream with an associated type. The data type is specified using a MIME Media Type (as defined by <a href="http://www.ietf.org/rfc/rfc2046.txt" target="_blank">IETF RFC 2046 <i>MIME : Media Types</i></a>).<P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document"><CODE>MimeMediaType</CODE></A>, <A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document"><CODE>StructuredDocument</CODE></A>, <A HREF="../../../net/jxta/document/StructuredDocumentFactory.html" title="class in net.jxta.document"><CODE>StructuredDocumentFactory</CODE></A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></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/document/Document.html#getFileExtension()">getFileExtension</A></B>()</CODE><BR> Returns the file extension type used by this <code>Document</code>. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/document/Document.html#getMimeType()">getMimeType</A></B>()</CODE><BR> 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>. </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/document/Document.html#getStream()">getStream</A></B>()</CODE><BR> Returns the stream of bytes which represents the content of this <code>Document</code>.</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/document/Document.html#sendToStream(java.io.OutputStream)">sendToStream</A></B>(java.io.OutputStream stream)</CODE><BR> Send the contents of this <code>Document</code> to the specified stream.</TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ 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="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><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><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="getStream()"><!-- --></A><H3>getStream</H3><PRE>public java.io.InputStream <B>getStream</B>() throws java.io.IOException</PRE><DL><DD>Returns the stream of bytes which represents the content of this <code>Document</code>.<P><DD><DL><DT><B>Returns:</B><DD>An <CODE>InputStream</CODE> containing the bytes of this <code>Document</code>.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL></DD></DL><HR><A NAME="sendToStream(java.io.OutputStream)"><!-- --></A><H3>sendToStream</H3><PRE>public void <B>sendToStream</B>(java.io.OutputStream stream) throws java.io.IOException</PRE><DL><DD>Send the contents of this <code>Document</code> to the specified stream.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>stream</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><!-- ========= 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/Document.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/document/Attributable.html" title="interface in net.jxta.document"><B>PREV CLASS</B></A> <A HREF="../../../net/jxta/document/Element.html" title="interface in net.jxta.document"><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> <A HREF="Document.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 | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <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 + -