dataflavor.html
来自「API資料大全」· HTML 代码 · 共 1,331 行 · 第 1/4 页
HTML
1,331 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:33:13 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class DataFlavor</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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/DataFlavor.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-files/index-1.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>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../java/awt/datatransfer/Clipboard.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/datatransfer/StringSelection.html"><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="DataFlavor.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <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><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.awt.datatransfer</FONT><BR>Class DataFlavor</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A> | +--<B>java.awt.datatransfer.DataFlavor</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../java/lang/Cloneable.html">Cloneable</A>, <A HREF="../../../java/io/Externalizable.html">Externalizable</A>, <A HREF="../../../java/io/Serializable.html">Serializable</A></DD></DL><HR><DL><DT>public class <B>DataFlavor</B><DT>extends <A HREF="../../../java/lang/Object.html">Object</A><DT>implements <A HREF="../../../java/io/Externalizable.html">Externalizable</A>, <A HREF="../../../java/lang/Cloneable.html">Cloneable</A></DL><P>Each instance represents the opaque concept of a data format as would appear on a clipboard, during drag and drop, or in a file system. <p> <code>DataFlavor</code> objects are constant and never change once instantiated. </p><P><DL><DT><B>See Also: </B><DD><A HREF="../../../serialized-form.html#java.awt.datatransfer.DataFlavor">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/awt/datatransfer/DataFlavor.html">DataFlavor</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#javaFileListFlavor">javaFileListFlavor</A></B></CODE><BR> To transfer a list of files to/from Java (and the underlying platform) a DataFlavor of this type/subtype and representation class of java.util.List is used.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#javaJVMLocalObjectMimeType">javaJVMLocalObjectMimeType</A></B></CODE><BR> to transfer a reference to an arbitrary Java object reference that has no associated MIME Content-type, across a Transferable interface WITHIN THE SAME JVM, a DataFlavor with this type/subtype is used, with a representationClass equal to the type of the class/interface being passed across the Transferble.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#javaRemoteObjectMimeType">javaRemoteObjectMimeType</A></B></CODE><BR> In order to pass a live link to a Remote object via a Drag and Drop ACTION_LINK operation a Mime Content Type of application/x-java-remote-object should be used, where the representation class of the DataFlavor represents the type of the Remote interface to be transferred.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#javaSerializedObjectMimeType">javaSerializedObjectMimeType</A></B></CODE><BR> a MIME Content-Type of application/x-java-serialized-object represents a graph of Java object(s) that have been made persistent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/awt/datatransfer/DataFlavor.html">DataFlavor</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#plainTextFlavor">plainTextFlavor</A></B></CODE><BR> <B>Deprecated.</B> <I>as of 1.3. Use <code>DataFlavor.getReaderForText( Transferable)</code> instead of <code>Transferable. getTransferData(DataFlavor.plainTextFlavor)</code>.</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/awt/datatransfer/DataFlavor.html">DataFlavor</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#stringFlavor">stringFlavor</A></B></CODE><BR> The DataFlavor representing a Java Unicode String class, where: </TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#DataFlavor()">DataFlavor</A></B>()</CODE><BR> Constructs a new DataFlavor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#DataFlavor(java.lang.Class, java.lang.String)">DataFlavor</A></B>(<A HREF="../../../java/lang/Class.html">Class</A> representationClass, <A HREF="../../../java/lang/String.html">String</A> humanPresentableName)</CODE><BR> Construct a DataFlavor that represents a Java class </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#DataFlavor(java.lang.String)">DataFlavor</A></B>(<A HREF="../../../java/lang/String.html">String</A> mimeType)</CODE><BR> Construct a DataFlavor from a Mime Type string.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#DataFlavor(java.lang.String, java.lang.String)">DataFlavor</A></B>(<A HREF="../../../java/lang/String.html">String</A> mimeType, <A HREF="../../../java/lang/String.html">String</A> humanPresentableName)</CODE><BR> Construct a DataFlavor that represents a MimeType </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#DataFlavor(java.lang.String, java.lang.String, java.lang.ClassLoader)">DataFlavor</A></B>(<A HREF="../../../java/lang/String.html">String</A> mimeType, <A HREF="../../../java/lang/String.html">String</A> humanPresentableName, <A HREF="../../../java/lang/ClassLoader.html">ClassLoader</A> classLoader)</CODE><BR> Construct a DataFlavor that represents a MimeType </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><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> <A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#clone()">clone</A></B>()</CODE><BR> Creates and returns a copy of this object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#equals(java.awt.datatransfer.DataFlavor)">equals</A></B>(<A HREF="../../../java/awt/datatransfer/DataFlavor.html">DataFlavor</A> that)</CODE><BR> Two DataFlavors are considered equal if and only if their MIME primary type and subtype and representation class are equal.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../../../java/lang/Object.html">Object</A> o)</CODE><BR> If the object is an instance of DataFlavor, representationClass and MIME type will be compared.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#equals(java.lang.String)">equals</A></B>(<A HREF="../../../java/lang/String.html">String</A> s)</CODE><BR> <B>Deprecated.</B> <I>As inconsistent with <code>hashCode()</code> contract, use <code>isMimeTypeEqual(String)</code> instead.</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/Class.html">Class</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#getDefaultRepresentationClass()">getDefaultRepresentationClass</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#getDefaultRepresentationClassAsString()">getDefaultRepresentationClassAsString</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#getHumanPresentableName()">getHumanPresentableName</A></B>()</CODE><BR> Returns the human presentable name for the data foramt that this DataFlavor represents.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#getMimeType()">getMimeType</A></B>()</CODE><BR> Returns the MIME type string for this DataFlavor</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#getParameter(java.lang.String)">getParameter</A></B>(<A HREF="../../../java/lang/String.html">String</A> paramName)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#getPrimaryType()">getPrimaryType</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/io/Reader.html">Reader</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#getReaderForText(java.awt.datatransfer.Transferable)">getReaderForText</A></B>(<A HREF="../../../java/awt/datatransfer/Transferable.html">Transferable</A> transferable)</CODE><BR> Gets a reader for an input stream, decoded for the expected charset (encoding).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/Class.html">Class</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#getRepresentationClass()">getRepresentationClass</A></B>()</CODE><BR> Returns the Class which objects supporting this DataFlavor will return when this DataFlavor is requested.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#getSubType()">getSubType</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/awt/datatransfer/DataFlavor.html">DataFlavor</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/datatransfer/DataFlavor.html#getTextPlainUnicodeFlavor()">getTextPlainUnicodeFlavor</A></B>()</CODE><BR> </TD></TR>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?