javax.activation
public class ActivationDataFlavor extends DataFlavor
imageFlavor, javaFileListFlavor, javaJVMLocalObjectMimeType, javaRemoteObjectMimeType, javaSerializedObjectMimeType, plainTextFlavor, stringFlavor
Constructor and Description |
---|
ActivationDataFlavor(Class representationClass,
String humanPresentableName)
Constructor.
|
ActivationDataFlavor(Class representationClass,
String mimeType,
String humanPresentableName)
Constructor.
|
ActivationDataFlavor(String mimeType,
String humanPresentableName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(DataFlavor dataFlavor)
This method test the specified
DataFlavor for equality
against this object. |
String |
getHumanPresentableName()
Returns the human presentable name for this flavor.
|
String |
getMimeType()
Returns the MIME type of this flavor.
|
Class |
getRepresentationClass()
Returns the representation class for this flavor.
|
boolean |
isMimeTypeEqual(String mimeType)
Tests the MIME type of this object for equality against the specified
MIME type.
|
protected String |
normalizeMimeType(String mimeType)
This method exists for backward compatibility.
|
protected String |
normalizeMimeTypeParameter(String parameterName,
String parameterValue)
This method exists for backward compatibility.
|
void |
setHumanPresentableName(String humanPresentableName)
Sets the human presentable name to the specified value.
|
clone, equals, equals, getDefaultRepresentationClass, getDefaultRepresentationClassAsString, getParameter, getPrimaryType, getReaderForText, getSubType, getTextPlainUnicodeFlavor, hashCode, isFlavorJavaFileListType, isFlavorRemoteObjectType, isFlavorSerializedObjectType, isFlavorTextType, isMimeTypeEqual, isMimeTypeSerializedObject, isRepresentationClassByteBuffer, isRepresentationClassCharBuffer, isRepresentationClassInputStream, isRepresentationClassReader, isRepresentationClassRemote, isRepresentationClassSerializable, match, readExternal, selectBestTextFlavor, toString, tryToLoadClass, writeExternal
public ActivationDataFlavor(Class representationClass, String mimeType, String humanPresentableName)
representationClass
- the representation classmimeType
- the MIME type of the datahumanPresentableName
- the human-presentable name of the data
flavorpublic ActivationDataFlavor(Class representationClass, String humanPresentableName)
representationClass
- the representation classhumanPresentableName
- the human-presentable name of the data
flavorpublic ActivationDataFlavor(String mimeType, String humanPresentableName)
mimeType
- the MIME type of the datahumanPresentableName
- the human-presentable name of the data
flavorpublic String getMimeType()
DataFlavor
getMimeType
in class DataFlavor
public Class getRepresentationClass()
DataFlavor
getRepresentationClass
in class DataFlavor
public String getHumanPresentableName()
DataFlavor
getHumanPresentableName
in class DataFlavor
public void setHumanPresentableName(String humanPresentableName)
DataFlavor
setHumanPresentableName
in class DataFlavor
humanPresentableName
- The new display name.public boolean equals(DataFlavor dataFlavor)
DataFlavor
DataFlavor
for equality
against this object. This will be true if the MIME type and
representation class are the equal. If the primary type is 'text'
then also the value of the charset parameter is compared. In such a
case when the charset parameter isn't given then the charset is
assumed to be equal to the default charset of the platform. All
other parameters are ignored.equals
in class DataFlavor
dataFlavor
- The DataFlavor
to test against.true
if the flavor is equal to this object,
false
otherwise.public boolean isMimeTypeEqual(String mimeType)
DataFlavor
isMimeTypeEqual
in class DataFlavor
mimeType
- The MIME type to test against.true
if the MIME type is equal to this object's
MIME type (ignoring parameters), false
otherwise.protected String normalizeMimeTypeParameter(String parameterName, String parameterValue)
DataFlavor
normalizeMimeTypeParameter
in class DataFlavor
parameterName
- The parameter name.parameterValue
- The parameter value.protected String normalizeMimeType(String mimeType)
DataFlavor
normalizeMimeType
in class DataFlavor
mimeType
- The MIME type.