DataFlavor.javaFileListFlavor : DataFlavor « java.awt.datatransfer « Java by API






DataFlavor.javaFileListFlavor

/*
Mime type: application/x-java-serialized-object; class=java.lang.String
Primary type: application
Subtype: x-java-serialized-object
Name: Unicode String
Representation class: class java.lang.String

Mime type: application/x-java-file-list; class=java.util.List
Primary type: application
Subtype: x-java-file-list
Name: application/x-java-file-list
Representation class: interface java.util.List

*/
import java.awt.datatransfer.DataFlavor;

public class MainClass {

  public static void main(String[] args) {

    DataFlavor df = DataFlavor.stringFlavor;

    System.out.println ("Mime type: " + df.getMimeType ());
    System.out.println ("Primary type: " + df.getPrimaryType ());
    System.out.println ("Subtype: " + df.getSubType ());
    System.out.println ("Name: " + df.getHumanPresentableName ());
    String s = df.getRepresentationClass ().toString ();
    System.out.println ("Representation class: " + s + "\n");

    df = DataFlavor.javaFileListFlavor;

    System.out.println ("Mime type: " + df.getMimeType ());
    System.out.println ("Primary type: " + df.getPrimaryType ());
    System.out.println ("Subtype: " + df.getSubType ());
    System.out.println ("Name: " + df.getHumanPresentableName ());
    s = df.getRepresentationClass ().toString ();
    System.out.println ("Representation class: " + s);
  }
}

           
       








Related examples in the same category

1.DataFlavor.stringFlavor
2.new DataFlavor(String mimeType, String humanPresentableName)
3.new DataFlavor(Class representationClass, String humanPresentableName)
4.DataFlavor: getHumanPresentableName()
5.DataFlavor: getMimeType()
6.DataFlavor: getParameter(String paramName)
7.DataFlavor: getPrimaryType()
8.DataFlavor: getRepresentationClass()
9.DataFlavor: getSubType()
10.DataFlavor: isMimeTypeEqual(DataFlavor dataFlavor)