DataFlavor Members

DataFlavor Members

Class Overview | This Package | All Packages

Fields
Name Description
plainTextFlavor The DataFlavor representing plain text with unicode encoding, where:

representationClass = InputStream
mimeType = "text/plain; charset=unicode"

stringFlavor The DataFlavor representing a Java Unicode String class, where:

representationClass = java.lang.String
mimeType = "application/x-java-serialized-object"

Constructors
Name Description
DataFlavor(Class, String) Construct a DataFlavor that represents a Java class

The returned DataFlavor will have the following characteristics

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

DataFlavor(String, String) 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

Methods
Name Description
equals(DataFlavor)  
getHumanPresentableName() Returns the human presentable name for the data foramt that this DataFlavor represents.
getMimeType() Returns the MIME type string for this DataFlavor
getRepresentationClass() Returns the Class which objects supporting this DataFlavor will return when this DataFlavor is requested.
isMimeTypeEqual(DataFlavor) Convenience function equivalent to calling: isMimeTypeEqual(dataFlavor.getMimeType());
isMimeTypeEqual(String) Is the string representation of the MIME type passed in equivalent to the MIME type of this DataFlavor.
normalizeMimeType(String) Called for each MIME type string to give DataFlavor subtypes the opportunity to change how the normalization of MIME types is accomplished.
normalizeMimeTypeParameter(String, String) 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.
setHumanPresentableName(String) Sets the human presentable name for the data format that this DataFlavor represents.