<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.awt.datatransfer.DataFlavor
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.datatransfer.html">This Package</a>  <a href="java.awt.datatransfer.Clipboard.html#_top_">Previous</a>  <a href="java.awt.datatransfer.StringSelection.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.awt.datatransfer.DataFlavor
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.awt.datatransfer.DataFlavor
</pre>
<hr>
<dl>
  <dt> public class <b>DataFlavor</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
</dl>
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>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#plainTextFlavor"><b>plainTextFlavor</b></a>
  <dd>  The DataFlavor representing plain text with unicode encoding, where:
 <p>
 representationClass = InputStream<br>
 mimeType            = "text/plain; charset=unicode"
 <p>

  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#stringFlavor"><b>stringFlavor</b></a>
  <dd>  The DataFlavor representing a Java Unicode String class, where:
 <p>
 representationClass = java.lang.String<br>
/**
 The DataFlavor representing a Java Unicode String class, where:
 <p>
 representationClass = java.lang.String<br>
 mimeType            = "application/x-java-serialized-object"
 <p>

</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DataFlavor(java.lang.Class, java.lang.String)"><b>DataFlavor</b></a>(Class, String)
  <dd>  Construct a DataFlavor that represents a Java class
 <p>
 The returned DataFlavor will have the following characteristics
 <p>
 representationClass = representationClass<br>
 mimeType            = application/x-java-serialized-object
 <p>
 
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DataFlavor(java.lang.String, java.lang.String)"><b>DataFlavor</b></a>(String, String)
  <dd>  Construct a DataFlavor that represents a MimeType
 <p>
 The returned DataFlavor will have the following characteristics:
 <p>
 If the mimeType is
 "application/x-java-serialized-object; class=<representation class>",
 the result is the same as calling
 new DataFlavor(Class:forName(<representation class>) as above
 <p>
 otherwise:
 <p>
 representationClass = InputStream<br>
 mimeType            = mimeType
 <p>
 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#equals(java.awt.datatransfer.DataFlavor)"><b>equals</b></a>(DataFlavor)
  <dd> 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getHumanPresentableName()"><b>getHumanPresentableName</b></a>()
  <dd>  Returns the human presentable name for the data foramt that this
 DataFlavor represents.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getMimeType()"><b>getMimeType</b></a>()
  <dd>  Returns the MIME type string for this DataFlavor

  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getRepresentationClass()"><b>getRepresentationClass</b></a>()
  <dd>   Returns the Class which objects supporting this DataFlavor
  will return when this DataFlavor is requested.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isMimeTypeEqual(java.awt.datatransfer.DataFlavor)"><b>isMimeTypeEqual</b></a>(DataFlavor)
  <dd>  Convenience function equivalent to calling:
 isMimeTypeEqual(dataFlavor.getMimeType());

  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isMimeTypeEqual(java.lang.String)"><b>isMimeTypeEqual</b></a>(String)
  <dd>  Is the string representation of the MIME type passed in equivalent
 to the MIME type of this DataFlavor.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#normalizeMimeType(java.lang.String)"><b>normalizeMimeType</b></a>(String)
  <dd>  Called for each MIME type string to give DataFlavor subtypes the
 opportunity to change how the normalization of MIME types is accomplished.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#normalizeMimeTypeParameter(java.lang.String, java.lang.String)"><b>normalizeMimeTypeParameter</b></a>(String, String)
  <dd>  Called on DataFlavor for every MIME Type parameter to allow DataFlavor
 subclasses to handle special parameters like the text/plain charset
 parameters, whose values are case insensitive.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setHumanPresentableName(java.lang.String)"><b>setHumanPresentableName</b></a>(String)
  <dd>  Sets the human presentable name for the data format that this
 DataFlavor represents.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="stringFlavor"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>stringFlavor</b>
<pre>
 public static final <a href="#_top_">DataFlavor</a> stringFlavor
</pre>
<dl>
  <dd> The DataFlavor representing a Java Unicode String class, where:
 <p>
 representationClass = java.lang.String<br>
/**
 The DataFlavor representing a Java Unicode String class, where:
 <p>
 representationClass = java.lang.String<br>
 mimeType            = "application/x-java-serialized-object"
 <p><p>
</dl>
<a name="plainTextFlavor"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>plainTextFlavor</b>
<pre>
 public static final <a href="#_top_">DataFlavor</a> plainTextFlavor
</pre>
<dl>
  <dd> The DataFlavor representing plain text with unicode encoding, where:
 <p>
 representationClass = InputStream<br>
 mimeType            = "text/plain; charset=unicode"
 <p><p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="DataFlavor"></a>
<a name="DataFlavor(java.lang.Class, java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>DataFlavor</b>
<pre>
 public DataFlavor(<a href="java.lang.Class.html#_top_">Class</a> representationClass,
                   <a href="java.lang.String.html#_top_">String</a> humanPresentableName)
</pre>
<dl>
  <dd> Construct a DataFlavor that represents a Java class
 <p>
 The returned DataFlavor will have the following characteristics
 <p>
 representationClass = representationClass<br>
 mimeType            = application/x-java-serialized-object
 <p>
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> representationClass - the class used to transfer data in this flavor
    <dd> humanPresentableName - the human-readible string used to identify this flavor
  </dl></dd>
</dl>
<a name="DataFlavor(java.lang.String, java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>DataFlavor</b>
<pre>
 public DataFlavor(<a href="java.lang.String.html#_top_">String</a> mimeType,
                   <a href="java.lang.String.html#_top_">String</a> humanPresentableName)
</pre>
<dl>
  <dd> Construct a DataFlavor that represents a MimeType
 <p>
 The returned DataFlavor will have the following characteristics:
 <p>
 If the mimeType is
 "application/x-java-serialized-object; class=<representation class>",
 the result is the same as calling
 new DataFlavor(Class:forName(<representation class>) as above
 <p>
 otherwise:
 <p>
 representationClass = InputStream<br>
 mimeType            = mimeType
 <p>
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> mimeType - the string used to identify the MIME type for this flavor
    <dd> humanPresentableName - the human-readible string used to identify this flavor
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getMimeType()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getMimeType"><b>getMimeType</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getMimeType()
</pre>
<dl>
  <dd> Returns the MIME type string for this DataFlavor
<p>
</dl>
<a name="getRepresentationClass()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getRepresentationClass"><b>getRepresentationClass</b></a>
<pre>
 public <a href="java.lang.Class.html#_top_">Class</a> getRepresentationClass()
</pre>
<dl>
  <dd> Returns the Class which objects supporting this DataFlavor
  will return when this DataFlavor is requested.
<p>
</dl>
<a name="getHumanPresentableName()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getHumanPresentableName"><b>getHumanPresentableName</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getHumanPresentableName()
</pre>
<dl>
  <dd> Returns the human presentable name for the data foramt that this
 DataFlavor represents.  This name would be localized for different
 countries
<p>
</dl>
<a name="setHumanPresentableName(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setHumanPresentableName"><b>setHumanPresentableName</b></a>
<pre>
 public void setHumanPresentableName(<a href="java.lang.String.html#_top_">String</a> humanPresentableName)
</pre>
<dl>
  <dd> Sets the human presentable name for the data format that this
 DataFlavor represents. This name would be localized for different
 countries
<p>
</dl>
<a name="equals(java.awt.datatransfer.DataFlavor)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="equals"><b>equals</b></a>
<pre>
 public boolean equals(<a href="#_top_">DataFlavor</a> dataFlavor)
</pre>
<a name="isMimeTypeEqual(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isMimeTypeEqual"><b>isMimeTypeEqual</b></a>
<pre>
 public boolean isMimeTypeEqual(<a href="java.lang.String.html#_top_">String</a> mimeType)
</pre>
<dl>
  <dd> Is the string representation of the MIME type passed in equivalent
 to the MIME type of this DataFlavor.  This may involve adding default
 attributes for some MIME types (like adding charset=US-ASCII to
 text/plain MIME types that have no charset parameter specified)
<p>
</dl>
<a name="isMimeTypeEqual(java.awt.datatransfer.DataFlavor)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isMimeTypeEqual"><b>isMimeTypeEqual</b></a>
<pre>
 public final boolean isMimeTypeEqual(<a href="#_top_">DataFlavor</a> dataFlavor)
</pre>
<dl>
  <dd> Convenience function equivalent to calling:
 isMimeTypeEqual(dataFlavor.getMimeType());
<p>
</dl>
<a name="normalizeMimeTypeParameter(java.lang.String, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="normalizeMimeTypeParameter"><b>normalizeMimeTypeParameter</b></a>
<pre>
 protected <a href="java.lang.String.html#_top_">String</a> normalizeMimeTypeParameter(<a href="java.lang.String.html#_top_">String</a> parameterName,
                                             <a href="java.lang.String.html#_top_">String</a> parameterValue)
</pre>
<dl>
  <dd> Called on DataFlavor for every MIME Type parameter to allow DataFlavor
 subclasses to handle special parameters like the text/plain charset
 parameters, whose values are case insensitive.  (MIME type parameter
 values are supposed to be case sensitive.
 <p>
 This method is called for each parameter name/value pair and should
 return the normalized representation of the parameterValue
<p>
</dl>
<a name="normalizeMimeType(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="normalizeMimeType"><b>normalizeMimeType</b></a>
<pre>
 protected <a href="java.lang.String.html#_top_">String</a> normalizeMimeType(<a href="java.lang.String.html#_top_">String</a> mimeType)
</pre>
<dl>
  <dd> Called for each MIME type string to give DataFlavor subtypes the
 opportunity to change how the normalization of MIME types is accomplished.
 One possible use would be to add default parameter/value pairs in cases
 where none are present in the MIME type string passed in
<p>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.datatransfer.html">This Package</a>  <a href="java.awt.datatransfer.Clipboard.html#_top_">Previous</a>  <a href="java.awt.datatransfer.StringSelection.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
