Java java.awt.datatransfer DataFlavor fields, constructors, methods, implement or subclass

Example usage for Java java.awt.datatransfer DataFlavor fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt.datatransfer DataFlavor.

The text is from its open source code.

Field

DataFlavorstringFlavor
The DataFlavor representing a Java Unicode String class, where:
 representationClass = java.lang.String mimeType            = "application/x-java-serialized-object" 
DataFlavorimageFlavor
The DataFlavor representing a Java Image class, where:
 representationClass = java.awt.Image mimeType            = "image/x-java-image" 
Will be null if java.awt.Image is not visible, the java.desktop module is not loaded, or the java.desktop module is not in the run-time image.
DataFlavorplainTextFlavor
The DataFlavor representing plain text with Unicode encoding, where:
 representationClass = InputStream mimeType            = "text/plain; charset=unicode" 
This DataFlavor has been deprecated because:
  • Its representation is an InputStream, an 8-bit based representation, while Unicode is a 16-bit character set
  • The charset "unicode" is not well-defined.
StringjavaSerializedObjectMimeType
A MIME Content-Type of application/x-java-serialized-object represents a graph of Java object(s) that have been made persistent.
DataFlavorjavaFileListFlavor
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.
StringjavaJVMLocalObjectMimeType
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 Transferable .
StringjavaRemoteObjectMimeType
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.

Constructor

DataFlavor(Class representationClass, String humanPresentableName)
Constructs a DataFlavor that represents a Java class.
DataFlavor(String mimeType, String humanPresentableName)
Constructs a DataFlavor that represents a MimeType .
DataFlavor(String mimeType)
Constructs a DataFlavor from a mimeType string.

Method

Objectclone()
Returns a clone of this DataFlavor .
booleanequals(Object o)

The equals comparison for the DataFlavor class is implemented as follows: Two DataFlavor s are considered equal if and only if their MIME primary type and subtype and representation class are equal.

booleanequals(DataFlavor that)
This method has the same behavior as #equals(Object) .
booleanequals(String s)
Compares only the mimeType against the passed in String and representationClass is not considered in the comparison.
ClassgetDefaultRepresentationClass()
Returns the default representation class.
StringgetHumanPresentableName()
Returns the human presentable name for the data format that this DataFlavor represents.
StringgetMimeType()
Returns the MIME type string for this DataFlavor .
StringgetParameter(String paramName)
Returns the human presentable name for this DataFlavor if paramName equals "humanPresentableName".
StringgetPrimaryType()
Returns the primary MIME type for this DataFlavor .
ReadergetReaderForText(Transferable transferable)
Gets a Reader for a text flavor, decoded, if necessary, for the expected charset (encoding).
ClassgetRepresentationClass()
Returns the Class which objects supporting this DataFlavor will return when this DataFlavor is requested.
StringgetSubType()
Returns the sub MIME type of this DataFlavor .
DataFlavorgetTextPlainUnicodeFlavor()
Returns a DataFlavor representing plain text with Unicode encoding, where:
 representationClass = java.io.InputStream mimeType            = "text/plain; charset=<platform default Unicode encoding>" 
inthashCode()
Returns hash code for this DataFlavor .
booleanisFlavorJavaFileListType()
Returns true if the DataFlavor specified represents a list of file objects.
booleanisFlavorRemoteObjectType()
Returns true if the DataFlavor specified represents a remote object.
booleanisFlavorSerializedObjectType()
Returns true if the DataFlavor specified represents a serialized object.
booleanisFlavorTextType()
Returns whether this DataFlavor is a valid text flavor for this implementation of the Java platform.
booleanisMimeTypeEqual(String mimeType)
Returns whether the string representation of the MIME type passed in is equivalent to the MIME type of this DataFlavor .
booleanisMimeTypeEqual(DataFlavor dataFlavor)
Compares the mimeType of two DataFlavor objects.
booleanisMimeTypeEqual(MimeType mtype)
Compares the mimeType of two DataFlavor objects.
booleanisMimeTypeSerializedObject()
Does the DataFlavor represent a serialized object?
booleanisRepresentationClassByteBuffer()
Returns whether the representation class for this DataFlavor is java.nio.ByteBuffer or a subclass thereof.
booleanisRepresentationClassCharBuffer()
Returns whether the representation class for this DataFlavor is java.nio.CharBuffer or a subclass thereof.
booleanisRepresentationClassInputStream()
Does the DataFlavor represent a java.io.InputStream ?
booleanisRepresentationClassReader()
Returns whether the representation class for this DataFlavor is java.io.Reader or a subclass thereof.
booleanisRepresentationClassRemote()
Returns true if the representation class is Remote .
booleanisRepresentationClassSerializable()
Returns true if the representation class can be serialized.
booleanmatch(DataFlavor that)
Identical to #equals(DataFlavor) .
DataFlavorselectBestTextFlavor(DataFlavor[] availableFlavors)
Selects the best text DataFlavor from an array of DataFlavor s.
voidsetHumanPresentableName(String humanPresentableName)
Sets the human presentable name for the data format that this DataFlavor represents.
StringtoString()
String representation of this DataFlavor and its parameters.