DataFlavor(String mimeType) constructor from DataFlavor has the following syntax.
public DataFlavor(String mimeType) throws ClassNotFoundException
In the following code shows how to use DataFlavor.DataFlavor(String mimeType) constructor.
//from w w w . j a v a 2 s . c o m import java.awt.datatransfer.DataFlavor; public class Main { public static void main(String[] args) { try { DataFlavor df1 = new DataFlavor("text/plain; charset=ASCII"); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }