java.awt.datatransfer.DataFlavor. It allows the JAF 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<T>
the class used in this DataFlavor representationClass, String the MIME type of the data represented by this class mimeType, String the human presentable name of the flavor humanPresentableName)Construct a DataFlavor that represents an arbitrary Java object. |
| public | ActivationDataFlavor(Class<T>
the class used in this DataFlavor representationClass, String the human presentable name of the flavor humanPresentableName)Construct a DataFlavor 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 a DataFlavor that represents a MimeType. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the MIME type and representation class are the samethe DataFlavor to compare with dataFlavor)Overrides java. isMimeTypeEqual method.
|
| public String | Returns: the human presentable nameOverrides java. |
| public String | Returns: the MIME typeOverrides java. |
| public Class | Returns: the representation classOverrides java. |
| 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 DataFlavor.
|
| protected String | Returns: the normalized MIME typethe MIME type mimeType)Overrides java.
Deprecated
Called for each MIME type string to give DataFlavor 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)Overrides java.
Deprecated
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.
|
| public void | setHumanPresentableName(String
the name to set humanPresentableName)Overrides java. |
| humanPresentableName | back to summary |
|---|---|
| private String humanPresentableName Hides java. | |
| mimeObject | back to summary |
|---|---|
| private MimeType mimeObject | |
| mimeType | back to summary |
|---|---|
| private String mimeType | |
| representationClass | back to summary |
|---|---|
| private Class<T> representationClass | |
| ActivationDataFlavor | back to summary |
|---|---|
| public ActivationDataFlavor(Class<T> representationClass, String mimeType, String humanPresentableName) Construct a DataFlavor that represents an arbitrary Java object. This constructor is an extension of the JDK's DataFlavor in that it allows the explicit setting of all three DataFlavor attributes. The returned DataFlavor will have the following characteristics:
representationClass = representationClass
| |
| ActivationDataFlavor | back to summary |
|---|---|
| public ActivationDataFlavor(Class<T> representationClass, String humanPresentableName) 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
| |
| ActivationDataFlavor | back to summary |
|---|---|
| public ActivationDataFlavor(String mimeType, String humanPresentableName) 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 | |
| equals | back to summary |
|---|---|
| public boolean equals(DataFlavor dataFlavor) Overrides java. Compares the DataFlavor passed in with this DataFlavor; calls
the
| |
| getHumanPresentableName | back to summary |
|---|---|
| public String getHumanPresentableName() Overrides java. Return the Human Presentable name.
| |
| getMimeType | back to summary |
|---|---|
| public String getMimeType() Overrides java. Return the MIME type for this DataFlavor.
| |
| getRepresentationClass | back to summary |
|---|---|
| public Class Overrides java. Return the representation class.
| |
| isMimeTypeEqual | back to summary |
|---|---|
| public boolean isMimeTypeEqual(String mimeType) Overrides java. Is the string representation of the MIME type passed in equivalent to the MIME type of this DataFlavor. ActivationDataFlavor delegates the comparison of MIME types to the MimeType class included as part of the JavaBeans Activation Framework. This provides a more robust comparison than is normally available in the DataFlavor class.
| |
| normalizeMimeType | back to summary |
|---|---|
| protected String normalizeMimeType(String mimeType) Overrides java. Deprecated
Called for each MIME type string to give DataFlavor 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) Overrides java. Deprecated
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. (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) Overrides java. Set the human presentable name.
| |