DataFlavor.DataFlavor

DataFlavor.DataFlavor

Class Overview | Class Members | This Package | All Packages

Syntax 1
public DataFlavor( Class representationClass, String humanPresentableName )
Parameters
representationClass
the class used to transfer data in this flavor
humanPresentableName
the human-readible string used to identify this flavor
Description
Construct a DataFlavor that represents a Java class

The returned DataFlavor will have the following characteristics

representationClass = representationClass
mimeType = application/x-java-serialized-object



Syntax 2
public DataFlavor( String mimeType, String humanPresentableName )
Parameters
mimeType
the string used to identify the MIME type for this flavor
humanPresentableName
the human-readible string used to identify this flavor
Description
Construct a DataFlavor that represents a MimeType

The returned DataFlavor will have the following characteristics:

If the mimeType is "application/x-java-serialized-object; class=", the result is the same as calling new DataFlavor(Class:forName() as above

otherwise:

representationClass = InputStream
mimeType = mimeType