Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
javax.activation

Class ActivationDataFlavor

  • All Implemented Interfaces:
    Externalizable, Serializable, Cloneable

    public class ActivationDataFlavor
    extends DataFlavor
    The ActivationDataFlavor class is a special subclass of 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.
    Since:
    1.6
    See Also:
    Serialized Form
    • Constructor Detail

      • ActivationDataFlavor

        public ActivationDataFlavor(Class 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
        mimeType = mimeType
        humanName = humanName

        Parameters:
        representationClass - the class used in this DataFlavor
        mimeType - the MIME type of the data represented by this class
        humanPresentableName - the human presentable name of the flavor
      • ActivationDataFlavor

        public ActivationDataFlavor(Class 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

        Parameters:
        representationClass - the class used in this DataFlavor
        humanPresentableName - the human presentable name of the flavor
      • ActivationDataFlavor

        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

        Parameters:
        mimeType - the MIME type of the data represented by this class
        humanPresentableName - the human presentable name of the flavor
    • Method Detail

      • getMimeType

        public String getMimeType()
        Return the MIME type for this DataFlavor.
        Overrides:
        getMimeType in class DataFlavor
        Returns:
        the MIME type
      • getRepresentationClass

        public Class getRepresentationClass()
        Return the representation class.
        Overrides:
        getRepresentationClass in class DataFlavor
        Returns:
        the representation class
      • setHumanPresentableName

        public void setHumanPresentableName(String humanPresentableName)
        Set the human presentable name.
        Overrides:
        setHumanPresentableName in class DataFlavor
        Parameters:
        humanPresentableName - the name to set
      • isMimeTypeEqual

        public boolean isMimeTypeEqual(String mimeType)
        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.

        Overrides:
        isMimeTypeEqual in class DataFlavor
        Parameters:
        mimeType - the MIME type
        Returns:
        true if the same MIME type
      • normalizeMimeTypeParameter

        protected String normalizeMimeTypeParameter(String parameterName,
                                        String parameterValue)
        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.

        Overrides:
        normalizeMimeTypeParameter in class DataFlavor
        Parameters:
        parameterName - the parameter name
        parameterValue - the parameter value
        Returns:
        the normalized parameter value
      • normalizeMimeType

        protected String normalizeMimeType(String mimeType)
        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.
        Overrides:
        normalizeMimeType in class DataFlavor
        Parameters:
        mimeType - the MIME type
        Returns:
        the normalized MIME type

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/activation/ActivationDataFlavor.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut