Clipboard Formats

Mikhail Cherkasov mikhail.cherkasov at oracle.com
Sat Dec 22 13:00:02 PST 2012


Hello All,

Jdk 7 has less data flavor types than jdk 6, the following types are 
missing from in jdk 7:
-text/plain; class=java.io.InputStream; charset=MacRoman
-text/plain; class=java.nio.ByteBuffer; charset=MacRoman
-text/plain; class="[B"; charset=MacRoman

You can print available formats by this code:
for (final DataFlavor flavor : 
Toolkit.getDefaultToolkit().getSystemClipboard().getAvailableDataFlavors()) 
{
             System.out.println(flavor.getMimeType());
  }

Does anyone know why this DataFlavors are absent in jdk 7?
And is it possible to get them back? if yes, how I can do this?

I have not idea where to get jdk6 source code for macos, so I can't compare
Java_sun_lwawt_macosx_CClipboard_getClipboardFormats method implementation.

Thanks,
Mikhail.


More information about the macosx-port-dev mailing list