Package java.awt.datatransfer

Examples of java.awt.datatransfer.DataFlavor.writeExternal()


  {
    DataFlavor f = new DataFlavor("application/text; param1=xyz",
                                  "Plain Text");
    try
      {
        f.writeExternal(output);
      }
    catch (IOException ex)
      {
        fail();
      }
View Full Code Here


      {
        DataFlavor f = new DataFlavor("application/text; param1=xyz",
        "Plain Text");
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        f.writeExternal(oos);
        ByteArrayInputStream bais =
          new ByteArrayInputStream(baos.toByteArray());
        ObjectInputStream ois = new ObjectInputStream(bais);
        DataFlavor read = new DataFlavor();
        read.readExternal(ois);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.