-
getTransferData
public Object getTransferData getTransferData(DataFlavor flavor)
throws UnsupportedFlavorException,
IOException
Returns the Transferable 's data in the requested DataFlavor if possible. If the desired flavor is DataFlavor.stringFlavor , or an equivalent flavor, the String representing the selection is returned. If the desired flavor is DataFlavor.plainTextFlavor , or an equivalent flavor, a Reader is returned.
Note: The behavior of this method for DataFlavor.plainTextFlavor and equivalent DataFlavor s is inconsistent with the definition of DataFlavor.plainTextFlavor .
-
Specified by:
-
getTransferData in interface Transferable
-
Parameters:
-
flavor - the requested flavor for the data
-
Returns:
- the data in the requested flavor, as outlined above
-
Throws:
-
UnsupportedFlavorException - if the requested data flavor is not equivalent to either DataFlavor.stringFlavor or DataFlavor.plainTextFlavor
-
IOException - if an IOException occurs while retrieving the data. By default, StringSelection never throws this exception, but a subclass may.
-
NullPointerException - if flavor is null
-
See Also:
-
Reader
|
-
getTransferData
public Object getTransferData(DataFlavor flavor)
throws UnsupportedFlavorException,
IOException
Returns the Transferable 's data in the requested DataFlavor if possible. If the desired flavor is DataFlavor.stringFlavor , or an equivalent flavor, the String representing the selection is returned. If the desired flavor is DataFlavor.plainTextFlavor , or an equivalent flavor, a Reader is returned. Note: The behavior of this method for DataFlavor.plainTextFlavor and equivalent DataFlavor s is inconsistent with the definition of DataFlavor.plainTextFlavor .
-
Specified by:
-
getTransferData in interface Transferable
-
Parameters:
-
flavor - the requested flavor for the data
-
Returns:
- the data in the requested flavor, as outlined above
-
Throws:
-
UnsupportedFlavorException - if the requested data flavor is not equivalent to either DataFlavor.stringFlavor or DataFlavor.plainTextFlavor
-
IOException - if an IOException occurs while retrieving the data. By default, StringSelection never throws this exception, but a subclass may.
-
NullPointerException - if flavor is null
-
See Also:
-
Reader
|
-
getTransferData
public Object getTransferData(DataFlavor flavor)
throws UnsupportedFlavorException,
IOException
Returns the Transferable 's data in the requested DataFlavor if possible. If the desired flavor is DataFlavor.stringFlavor , or an equivalent flavor, the String representing the selection is returned. If the desired flavor is DataFlavor.plainTextFlavor , or an equivalent flavor, a Reader is returned.
Note: The behavior of this method for DataFlavor.plainTextFlavor and equivalent DataFlavor s is inconsistent with the definition of DataFlavor.plainTextFlavor .
-
Specified by:
-
getTransferData in interface Transferable
-
Parameters:
-
flavor - the requested flavor for the data
-
Returns:
- the data in the requested flavor, as outlined above
-
Throws:
-
UnsupportedFlavorException - if the requested data flavor is not equivalent to either DataFlavor.stringFlavor or DataFlavor.plainTextFlavor
-
IOException - if an IOException occurs while retrieving the data. By default, StringSelection never throws this exception, but a subclass may.
-
NullPointerException - if flavor is null
-
See Also:
-
Reader
|
|