java.awt.datatransfer.DataFlavor class. It allows
Jakarta Activation to
set all three values stored by the DataFlavor class via a new
constructor. It also contains improved MIME parsing in the equals
method. Except for the improved parsing, its semantics are
identical to that of the JDK's DataFlavor class.
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private MimeType | |
| private String | |
| private Class |
| Access | Constructor and Description |
|---|---|
| public | ActivationDataFlavor(Class<?>
the class used in this ActivationDataFlavor representationClass, String the MIME type of the data represented by this class mimeType, String the human presentable name of the flavor humanPresentableName)Construct an ActivationDataFlavor that represents an arbitrary Java object. |
| public | ActivationDataFlavor(Class<?>
the class used in this ActivationDataFlavor representationClass, String the human presentable name of the flavor humanPresentableName)Construct an ActivationDataFlavor that represents a MimeType. |
| public | ActivationDataFlavor(String
the MIME type of the data represented by this class mimeType, String the human presentable name of the flavor humanPresentableName)Construct an ActivationDataFlavor that represents a MimeType. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the MIME type and representation class are the samethe ActivationDataFlavor to compare with dataFlavor)Compares the ActivationDataFlavor passed in with this
ActivationDataFlavor; calls the |
| public boolean | Returns: true if the object is also an ActivationDataFlavor and is equal to thisthe o)Object to compare withOverrides java. |
| public boolean | Returns: true if the String (MimeType) is equal; false otherwise or ifs is nullthe s)mimeType to compare.
Deprecated
As inconsistent with
Compares only the hashCode() contract,
use isMimeTypeEqual(String) instead.
mimeType against the passed in
String and representationClass is
not considered in the comparison.
|
| public String | |
| public String | |
| public Class | |
| public int | Returns: a hash code for thisActivationDataFlavorOverrides java. ActivationDataFlavor.
|
| public boolean | Returns: true if the same MIME typethe MIME type mimeType)Is the string representation of the MIME type passed in equivalent to the MIME type of this ActivationDataFlavor. |
| protected String | Returns: the normalized MIME typethe MIME type mimeType)
Deprecated
Called for each MIME type string to give ActivationDataFlavor subtypes
the opportunity to change how the normalization of MIME types is
accomplished.
|
| protected String | Returns: the normalized parameter valuethe parameter name parameterName, String the parameter value parameterValue)
Deprecated
Called on ActivationDataFlavor for every MIME Type parameter to allow
ActivationDataFlavor subclasses to handle special parameters like the
text/plain charset parameters, whose values are case insensitive.
|
| public void |
| humanPresentableName | back to summary |
|---|---|
| private String humanPresentableName | |
| mimeObject | back to summary |
|---|---|
| private MimeType mimeObject | |
| mimeType | back to summary |
|---|---|
| private String mimeType | |
| representationClass | back to summary |
|---|---|
| private Class<?> representationClass | |
| ActivationDataFlavor | back to summary |
|---|---|
| public ActivationDataFlavor(Class<?> representationClass, String mimeType, String humanPresentableName) Construct an ActivationDataFlavor that represents an arbitrary Java object. The returned ActivationDataFlavor will have the following characteristics:
representationClass = representationClass | |
| ActivationDataFlavor | back to summary |
|---|---|
| public ActivationDataFlavor(Class<?> representationClass, String humanPresentableName) Construct an ActivationDataFlavor that represents a MimeType. The returned ActivationDataFlavor will have the following characteristics: If the mimeType is "application/x-java-serialized-object; class=", the result is the same as calling new ActivationDataFlavor(Class.forName()) as above. otherwise: representationClass = InputStream mimeType = mimeType | |
| ActivationDataFlavor | back to summary |
|---|---|
| public ActivationDataFlavor(String mimeType, String humanPresentableName) Construct an ActivationDataFlavor that represents a MimeType. The returned ActivationDataFlavor will have the following characteristics: If the mimeType is "application/x-java-serialized-object; class=", the result is the same as calling new ActivationDataFlavor(Class.forName()) as above, otherwise:
representationClass = InputStream | |
| equals | back to summary |
|---|---|
| public boolean equals(ActivationDataFlavor dataFlavor) Compares the ActivationDataFlavor passed in with this
ActivationDataFlavor; calls the
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| equals | back to summary |
|---|---|
| public boolean equals(String s)
Deprecated As inconsistent with Compares only the
| |
| getHumanPresentableName | back to summary |
|---|---|
| public String getHumanPresentableName() Return the Human Presentable name.
| |
| getMimeType | back to summary |
|---|---|
| public String getMimeType() Return the MIME type for this ActivationDataFlavor.
| |
| getRepresentationClass | back to summary |
|---|---|
| public Class Return the representation class.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns hash code for this
| |
| isMimeTypeEqual | back to summary |
|---|---|
| public boolean isMimeTypeEqual(String mimeType) Is the string representation of the MIME type passed in equivalent to the MIME type of this ActivationDataFlavor. ActivationDataFlavor delegates the comparison of MIME types to the MimeType class included as part of Jakarta Activation.
| |
| normalizeMimeType | back to summary |
|---|---|
| protected String normalizeMimeType(String mimeType)
Deprecated
Called for each MIME type string to give ActivationDataFlavor 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. This method is never invoked by this implementation. | |
| normalizeMimeTypeParameter | back to summary |
|---|---|
| protected String normalizeMimeTypeParameter(String parameterName, String parameterValue)
Deprecated
Called on ActivationDataFlavor for every MIME Type parameter to allow ActivationDataFlavor 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). This method is called for each parameter name/value pair and should return the normalized representation of the parameterValue. This method is never invoked by this implementation.
| |
| setHumanPresentableName | back to summary |
|---|---|
| public void setHumanPresentableName(String humanPresentableName) Set the human presentable name.
| |