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

📄 datacontenthandler.html

📁 wifi上网例子程序
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2) on Wed Apr 19 08:10:59 PDT 2006 --><TITLE>DataContentHandler (JavaBeans Activation Framework API documentation)</TITLE><META NAME="keywords" CONTENT="javax.activation.DataContentHandler interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="DataContentHandler (JavaBeans Activation Framework API documentation)";}</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="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/DataContentHandler.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-files/index-1.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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javax/activation/CommandObject.html" title="interface in javax.activation"><B>PREV CLASS</B></A>&nbsp;&nbsp;<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>  &nbsp;&nbsp;<A HREF="DataContentHandler.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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">javax.activation</FONT><BR>Interface DataContentHandler</H2><HR><DL><DT>public interface <B>DataContentHandler</B></DL><P>The DataContentHandler interface is implemented by objects that can be used to extend the capabilities of the DataHandler's implementation of the Transferable interface. Through <code>DataContentHandlers</code> the framework can be extended to convert streams in to objects, and to write objects to streams. <p> Applications don't generally call the methods in DataContentHandlers directly. Instead, an application calls the equivalent methods in DataHandler. The DataHandler will attempt to find an appropriate DataContentHandler that corresponds to its MIME type using the current DataContentHandlerFactory. The DataHandler then calls through to the methods in the DataContentHandler.<P><P><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>&nbsp;java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/activation/DataContentHandler.html#getContent(javax.activation.DataSource)">getContent</A></B>(<A HREF="../../javax/activation/DataSource.html" title="interface in javax.activation">DataSource</A>&nbsp;ds)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return an object representing the data in its most preferred form.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/activation/DataContentHandler.html#getTransferData(java.awt.datatransfer.DataFlavor, javax.activation.DataSource)">getTransferData</A></B>(java.awt.datatransfer.DataFlavor&nbsp;df,                <A HREF="../../javax/activation/DataSource.html" title="interface in javax.activation">DataSource</A>&nbsp;ds)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an object which represents the data to be transferred.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.awt.datatransfer.DataFlavor[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/activation/DataContentHandler.html#getTransferDataFlavors()">getTransferDataFlavors</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array of DataFlavor objects indicating the flavors the data can be provided in.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/activation/DataContentHandler.html#writeTo(java.lang.Object, java.lang.String, java.io.OutputStream)">writeTo</A></B>(java.lang.Object&nbsp;obj,        java.lang.String&nbsp;mimeType,        java.io.OutputStream&nbsp;os)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert the object to a byte stream of the specified MIME type and write it to the output stream.</TD></TR></TABLE>&nbsp;<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 java.awt.datatransfer.DataFlavor[] <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 java.lang.Object <B>getTransferData</B>(java.awt.datatransfer.DataFlavor&nbsp;df,                                        <A HREF="../../javax/activation/DataSource.html" title="interface in javax.activation">DataSource</A>&nbsp;ds)                                 throws java.awt.datatransfer.UnsupportedFlavorException,                                        java.io.IOException</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>java.awt.datatransfer.UnsupportedFlavorException</CODE> - if the handler doesn't						support the requested flavor<DD><CODE>java.io.IOException</CODE> - if the data can't be accessed</DL></DD></DL><HR><A NAME="getContent(javax.activation.DataSource)"><!-- --></A><H3>getContent</H3><PRE>public java.lang.Object <B>getContent</B>(<A HREF="../../javax/activation/DataSource.html" title="interface in javax.activation">DataSource</A>&nbsp;ds)                            throws java.io.IOException</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>java.io.IOException</CODE> - if the data can't be accessed</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>(java.lang.Object&nbsp;obj,                    java.lang.String&nbsp;mimeType,                    java.io.OutputStream&nbsp;os)             throws java.io.IOException</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>java.io.IOException</CODE> - errors writing to the 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="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/DataContentHandler.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-files/index-1.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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javax/activation/CommandObject.html" title="interface in javax.activation"><B>PREV CLASS</B></A>&nbsp;&nbsp;<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>  &nbsp;&nbsp;<A HREF="DataContentHandler.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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 + -