📄 datacontenthandler.html
字号:
Convert the object to a byte stream of the specified MIME type and write it to the output 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="getTransferDataFlavors()"><!-- --></A><H3>getTransferDataFlavors</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/datatransfer/DataFlavor.html" title="class or interface in java.awt.datatransfer">DataFlavor</A>[] <B>getTransferDataFlavors</B>()</PRE><DL><DD>Returns an array of DataFlavor objects indicating the flavors the data can be provided in. The array should be ordered according to preference for providing the data (from most richly descriptive to least descriptive).<P><DD><DL><DT><B>Returns:</B><DD>The DataFlavors.</DL></DD></DL><HR><A NAME="getTransferData(java.awt.datatransfer.DataFlavor, javax.activation.DataSource)"><!-- --></A><H3>getTransferData</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getTransferData</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/datatransfer/DataFlavor.html" title="class or interface in java.awt.datatransfer">DataFlavor</A> df, <A HREF="../../javax/activation/DataSource.html" title="interface in javax.activation">DataSource</A> ds) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/datatransfer/UnsupportedFlavorException.html" title="class or interface in java.awt.datatransfer">UnsupportedFlavorException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Returns an object which represents the data to be transferred. The class of the object returned is defined by the representation class of the flavor.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>df</CODE> - The DataFlavor representing the requested type.<DD><CODE>ds</CODE> - The DataSource representing the data to be converted.<DT><B>Returns:</B><DD>The constructed Object.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/datatransfer/UnsupportedFlavorException.html" title="class or interface in java.awt.datatransfer">UnsupportedFlavorException</A></CODE><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL></DD></DL><HR><A NAME="getContent(javax.activation.DataSource)"><!-- --></A><H3>getContent</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getContent</B>(<A HREF="../../javax/activation/DataSource.html" title="interface in javax.activation">DataSource</A> ds) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Return an object representing the data in its most preferred form. Generally this will be the form described by the first DataFlavor returned by the <code>getTransferDataFlavors</code> method.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>ds</CODE> - The DataSource representing the data to be converted.<DT><B>Returns:</B><DD>The constructed Object.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL></DD></DL><HR><A NAME="writeTo(java.lang.Object, java.lang.String, java.io.OutputStream)"><!-- --></A><H3>writeTo</H3><PRE>public void <B>writeTo</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> obj, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> mimeType, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A> os) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Convert the object to a byte stream of the specified MIME type and write it to the output stream.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - The object to be converted.<DD><CODE>mimeType</CODE> - The requested MIME type of the resulting byte stream.<DD><CODE>os</CODE> - The output stream into which to write the converted byte stream.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></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="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><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/activation/CommandObject.html" title="interface in javax.activation"><B>PREV CLASS</B></A> <A HREF="../../javax/activation/DataContentHandlerFactory.html" title="interface in javax.activation"><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="DataContentHandler.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><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -