| Package | Description | 
|---|---|
| java.awt.datatransfer | Provides interfaces and classes for transferring data
between and within applications. | 
| java.awt.dnd | Drag and Drop is a direct manipulation gesture found in many Graphical
User Interface systems that provides a mechanism to transfer
information between two entities logically associated with presentation
elements in the GUI. | 
| javax.accessibility | Defines a contract between user-interface components and an assistive technology
that provides access to those components. | 
| javax.activation | |
| javax.swing | Provides a set of "lightweight"
(all-Java language) components that,
to the maximum degree possible, work the same on all platforms. | 
| Modifier and Type | Field and Description | 
|---|---|
| static DataFlavor | DataFlavor. allHtmlFlavorRepresents a piece of an HTML markup. | 
| static DataFlavor | DataFlavor. fragmentHtmlFlavorRepresents a piece of an HTML markup. | 
| static DataFlavor | DataFlavor. imageFlavorThe  DataFlavorrepresenting a Java Image class,
 where: | 
| static DataFlavor | DataFlavor. javaFileListFlavorTo transfer a list of files to/from Java (and the underlying
 platform) a  DataFlavorof this type/subtype and
 representation class ofjava.util.Listis used. | 
| static DataFlavor | DataFlavor. plainTextFlavorDeprecated. 
 as of 1.3. Use  DataFlavor.getReaderForText(Transferable)instead ofTransferable.getTransferData(DataFlavor.plainTextFlavor). | 
| static DataFlavor | DataFlavor. selectionHtmlFlavorRepresents a piece of an HTML markup. | 
| static DataFlavor | DataFlavor. stringFlavorThe  DataFlavorrepresenting a Java Unicode String class,
 where: | 
| Modifier and Type | Method and Description | 
|---|---|
| static DataFlavor | SystemFlavorMap. decodeDataFlavor(String nat)Decodes a  Stringnative for use as aDataFlavor. | 
| DataFlavor[] | Clipboard. getAvailableDataFlavors()Returns an array of  DataFlavors in which the current
 contents of this clipboard can be provided. | 
| static DataFlavor | DataFlavor. getTextPlainUnicodeFlavor()Returns a  DataFlavorrepresenting plain text with Unicode
 encoding, where: | 
| DataFlavor[] | StringSelection. getTransferDataFlavors()Returns an array of flavors in which this  Transferablecan provide the data. | 
| DataFlavor[] | Transferable. getTransferDataFlavors()Returns an array of DataFlavor objects indicating the flavors the data
 can be provided in. | 
| static DataFlavor | DataFlavor. selectBestTextFlavor(DataFlavor[] availableFlavors)Selects the best text  DataFlavorfrom an array of
 DataFlavors. | 
| Modifier and Type | Method and Description | 
|---|---|
| List<DataFlavor> | SystemFlavorMap. getFlavorsForNative(String nat)Returns a  ListofDataFlavors to which the
 specifiedStringnative can be translated by the data
 transfer subsystem. | 
| List<DataFlavor> | FlavorTable. getFlavorsForNative(String nat)Returns a  ListofDataFlavors to which the
 specifiedStringcorresponds. | 
| Map<String,DataFlavor> | SystemFlavorMap. getFlavorsForNatives(String[] natives)Returns a  Mapof the specifiedStringnatives
 to their most preferredDataFlavor. | 
| Map<String,DataFlavor> | FlavorMap. getFlavorsForNatives(String[] natives)Returns a  Mapof the specifiedStringnatives
 to their correspondingDataFlavor. | 
| Map<DataFlavor,String> | SystemFlavorMap. getNativesForFlavors(DataFlavor[] flavors)Returns a  Mapof the specifiedDataFlavors to
 their most preferredStringnative. | 
| Map<DataFlavor,String> | FlavorMap. getNativesForFlavors(DataFlavor[] flavors)Returns a  Mapof the specifiedDataFlavors to
 their correspondingStringnative. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | SystemFlavorMap. addFlavorForUnencodedNative(String nat,
                           DataFlavor flav)Adds a mapping from a single  Stringnative to a singleDataFlavor. | 
| void | SystemFlavorMap. addUnencodedNativeForFlavor(DataFlavor flav,
                           String nat)Adds a mapping from the specified  DataFlavor(and allDataFlavors equal to the specifiedDataFlavor)
 to the specifiedStringnative. | 
| static String | SystemFlavorMap. encodeDataFlavor(DataFlavor flav)Encodes a  DataFlavorfor use as aStringnative. | 
| boolean | DataFlavor. equals(DataFlavor that)This method has the same behavior as  equals(Object). | 
| Object | Clipboard. getData(DataFlavor flavor)Returns an object representing the current contents of this clipboard
 in the specified  DataFlavor. | 
| List<String> | SystemFlavorMap. getNativesForFlavor(DataFlavor flav)Returns a  ListofStringnatives to which the
 specifiedDataFlavorcan be translated by the data transfer
 subsystem. | 
| List<String> | FlavorTable. getNativesForFlavor(DataFlavor flav)Returns a  ListofStringnatives to which the
 specifiedDataFlavorcorresponds. | 
| Map<DataFlavor,String> | SystemFlavorMap. getNativesForFlavors(DataFlavor[] flavors)Returns a  Mapof the specifiedDataFlavors to
 their most preferredStringnative. | 
| Map<DataFlavor,String> | FlavorMap. getNativesForFlavors(DataFlavor[] flavors)Returns a  Mapof the specifiedDataFlavors to
 their correspondingStringnative. | 
| Object | StringSelection. getTransferData(DataFlavor flavor)Returns the  Transferable's data in the requestedDataFlavorif possible. | 
| Object | Transferable. getTransferData(DataFlavor flavor)Returns an object which represents the data to be transferred. | 
| boolean | Clipboard. isDataFlavorAvailable(DataFlavor flavor)Returns whether or not the current contents of this clipboard can be
 provided in the specified  DataFlavor. | 
| boolean | StringSelection. isDataFlavorSupported(DataFlavor flavor)Returns whether the requested flavor is supported by this
  Transferable. | 
| boolean | Transferable. isDataFlavorSupported(DataFlavor flavor)Returns whether or not the specified data flavor is supported for
 this object. | 
| boolean | DataFlavor. isMimeTypeEqual(DataFlavor dataFlavor)Compares the  mimeTypeof twoDataFlavorobjects. | 
| boolean | DataFlavor. match(DataFlavor that)Identical to  equals(DataFlavor). | 
| static DataFlavor | DataFlavor. selectBestTextFlavor(DataFlavor[] availableFlavors)Selects the best text  DataFlavorfrom an array of
 DataFlavors. | 
| void | SystemFlavorMap. setFlavorsForNative(String nat,
                   DataFlavor[] flavors)Discards the current mappings for the specified  Stringnative, and creates new mappings to the specifiedDataFlavors. | 
| void | SystemFlavorMap. setNativesForFlavor(DataFlavor flav,
                   String[] natives)Discards the current mappings for the specified  DataFlavorand allDataFlavors equal to the specifiedDataFlavor, and creates new mappings to the
 specifiedStringnatives. | 
| Constructor and Description | 
|---|
| UnsupportedFlavorException(DataFlavor flavor)Constructs an UnsupportedFlavorException. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected DataFlavor[] | DropTargetContext. getCurrentDataFlavors()get the available DataFlavors of the
  Transferableoperand of this operation. | 
| DataFlavor[] | DropTargetDropEvent. getCurrentDataFlavors()This method returns the current DataFlavors. | 
| DataFlavor[] | DropTargetDragEvent. getCurrentDataFlavors()This method returns the current  DataFlavors from theDropTargetContext. | 
| DataFlavor[] | DropTargetContext.TransferableProxy. getTransferDataFlavors()Returns an array of DataFlavor objects indicating the flavors
 the data can be provided in by the encapsulated transferable. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected List<DataFlavor> | DropTargetContext. getCurrentDataFlavorsAsList()This method returns a the currently available DataFlavors
 of the  Transferableoperand
 as ajava.util.List. | 
| List<DataFlavor> | DropTargetDropEvent. getCurrentDataFlavorsAsList()This method returns the currently available
  DataFlavors as ajava.util.List. | 
| List<DataFlavor> | DropTargetDragEvent. getCurrentDataFlavorsAsList()This method returns the current  DataFlavors
 as ajava.util.List | 
| Modifier and Type | Method and Description | 
|---|---|
| Object | DropTargetContext.TransferableProxy. getTransferData(DataFlavor df)Returns an object which represents the data provided by
 the encapsulated transferable for the requested data flavor. | 
| protected boolean | DropTargetContext. isDataFlavorSupported(DataFlavor df)This method returns a  booleanindicating if the givenDataFlavoris
 supported by thisDropTargetContext. | 
| boolean | DropTargetContext.TransferableProxy. isDataFlavorSupported(DataFlavor flavor)Returns whether or not the specified data flavor is supported by
 the encapsulated transferable. | 
| boolean | DropTargetDropEvent. isDataFlavorSupported(DataFlavor df)This method returns a  booleanindicating if the
 specifiedDataFlavoris available
 from the source. | 
| boolean | DropTargetDragEvent. isDataFlavorSupported(DataFlavor df)This method returns a  booleanindicating
 if the specifiedDataFlavoris supported. | 
| Modifier and Type | Method and Description | 
|---|---|
| DataFlavor[] | AccessibleStreamable. getMimeTypes()Returns an array of DataFlavor objects for the MIME types
 this object supports. | 
| Modifier and Type | Method and Description | 
|---|---|
| InputStream | AccessibleStreamable. getStream(DataFlavor flavor)Returns an InputStream for a DataFlavor | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | ActivationDataFlavorThe ActivationDataFlavor class is a special subclass of
  java.awt.datatransfer.DataFlavor. | 
| Modifier and Type | Method and Description | 
|---|---|
| DataFlavor[] | DataContentHandler. getTransferDataFlavors()Returns an array of DataFlavor objects indicating the flavors the
 data can be provided in. | 
| DataFlavor[] | DataHandler. getTransferDataFlavors()Return the DataFlavors in which this data is available. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | ActivationDataFlavor. equals(DataFlavor dataFlavor)Compares the DataFlavor passed in with this DataFlavor; calls
 the  isMimeTypeEqualmethod. | 
| Object | DataHandler. getTransferData(DataFlavor flavor)Returns an object that represents the data to be
 transferred. | 
| Object | DataContentHandler. getTransferData(DataFlavor df,
               DataSource ds)Returns an object which represents the data to be transferred. | 
| boolean | DataHandler. isDataFlavorSupported(DataFlavor flavor)Returns whether the specified data flavor is supported
 for this object. | 
| Modifier and Type | Method and Description | 
|---|---|
| DataFlavor[] | TransferHandler.TransferSupport. getDataFlavors()Returns the data flavors for this transfer. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | TransferHandler. canImport(JComponent comp,
         DataFlavor[] transferFlavors)Indicates whether a component will accept an import of the given
 set of data flavors prior to actually attempting to import it. | 
| boolean | TransferHandler.TransferSupport. isDataFlavorSupported(DataFlavor df)Returns whether or not the given data flavor is supported. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.