src/macosx/classes/sun/lwawt/macosx/CDataTransferer.java

Print this page

        

*** 172,182 **** if (format == CF_STRING) { bytes = Normalizer.normalize(new String(bytes, "UTF8"), Form.NFC).getBytes("UTF8"); } ! return super.translateBytesOrStream(stream, bytes, flavor, format, transferable); } synchronized protected Long getFormatForNativeAsLong(String str) { Long format = predefinedClipboardNameMap.get(str); --- 172,182 ---- if (format == CF_STRING) { bytes = Normalizer.normalize(new String(bytes, "UTF8"), Form.NFC).getBytes("UTF8"); } ! return super.translateBytes(bytes, flavor, format, transferable); } synchronized protected Long getFormatForNativeAsLong(String str) { Long format = predefinedClipboardNameMap.get(str);
*** 259,278 **** } private native byte[] imageDataToPlatformImageBytes(int[] rData, int nW, int nH); /** ! * Translates either a byte array or an input stream which contain * platform-specific image data in the given format into an Image. */ ! protected Image platformImageBytesOrStreamToImage(InputStream stream, byte[] bytes, long format) throws IOException { ! byte[] imageData = bytes; ! ! if (imageData == null) ! imageData = inputStreamToByteArray(stream); ! ! return getImageForByteStream(imageData); } private native Image getImageForByteStream(byte[] bytes); @Override --- 259,275 ---- } private native byte[] imageDataToPlatformImageBytes(int[] rData, int nW, int nH); /** ! * Translates a byte array which contains * platform-specific image data in the given format into an Image. */ ! protected Image platformImageBytesToImage(byte[] bytes, long format) ! throws IOException ! { ! return getImageForByteStream(bytes); } private native Image getImageForByteStream(byte[] bytes); @Override