public class

ClipboardTransferable

extends Object
implements Transferable
java.lang.Object
   ↳ sun.awt.datatransfer.ClipboardTransferable

Class Overview

Reads all of the data from the system Clipboard which the data transfer subsystem knows how to translate. This includes all text data, File Lists, Serializable objects, Remote objects, and properly registered, arbitrary data as InputStreams. The data is stored in byte format until requested by client code. At that point, the data is converted, if necessary, into the proper format to deliver to the application. This hybrid pre-fetch/delayed-rendering approach allows us to circumvent the API restriction that client code cannot lock the Clipboard to discover its formats before requesting data in a particular format, while avoiding the overhead of fully rendering all data ahead of time.

Summary

Public Constructors
ClipboardTransferable(SunClipboard clipboard)
Public Methods
Object getTransferData(DataFlavor flavor)
Returns an object which represents the data to be transferred.
DataFlavor[] getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
boolean isDataFlavorSupported(DataFlavor flavor)
Returns whether or not the specified data flavor is supported for this object.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.awt.datatransfer.Transferable

Public Constructors

public ClipboardTransferable (SunClipboard clipboard)

Public Methods

public Object getTransferData (DataFlavor flavor)

Returns an object which represents the data to be transferred. The class of the object returned is defined by the representation class of the flavor.

Parameters
flavor the requested flavor for the data

public DataFlavor[] getTransferDataFlavors ()

Returns an array of DataFlavor objects indicating the flavors the data can be provided in. The array should be ordered according to preference for providing the data (from most richly descriptive to least descriptive).

Returns
  • an array of data flavors in which this data can be transferred

public boolean isDataFlavorSupported (DataFlavor flavor)

Returns whether or not the specified data flavor is supported for this object.

Parameters
flavor the requested flavor for the data
Returns
  • boolean indicating whether or not the data flavor is supported