Java Example Program / Sample Source Code
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.DataFlavor;
public class GetAvailableDataFlavorsExample{
public static void main(String[] argv) throws Exception {
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
DataFlavor[] availableDataFlavors = clipboard.getAvailableDataFlavors();
for (DataFlavor dataFlavor : availableDataFlavors) {
System.out.println("dataFlavor "+dataFlavor);
}
}
} |
|
|