X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FGCJ.java;h=5814bbcefedc13c590a2e97940011b989a82499a;hb=aee6f42572aec2506d92876b20f0721c50677f34;hp=4a6d23ffa68625097f8cda61a13c3df9cb9772aa;hpb=4f7f0b92b26b48cd88f534c5ca29b5bce98929b2;p=org.ibex.core.git diff --git a/src/org/xwt/plat/GCJ.java b/src/org/xwt/plat/GCJ.java index 4a6d23f..5814bbc 100644 --- a/src/org/xwt/plat/GCJ.java +++ b/src/org/xwt/plat/GCJ.java @@ -16,35 +16,39 @@ public abstract class GCJ extends Platform { private static Class c5 = gnu.gcj.convert.Input_8859_1.class; private static Class c6 = gnu.java.locale.LocaleInformation.class; private static Class c7 = gnu.gcj.convert.Output_ASCII.class; + private static Class c8 = gnu.java.locale.Calendar_en.class; + private static Class c9 = gnu.java.locale.Calendar_en_US.class; protected org.xwt.Weak _getWeak(Object o) { return new Java2Weak(o); } + protected native InputStream _getBuiltinInputStream(); + private static class Java2Weak extends java.lang.ref.WeakReference implements org.xwt.Weak { public Java2Weak(Object o) { super(o); } } // FIXME protected ImageDecoder _decodeJPEG(InputStream is, String name) { - try { - return new JPEG(is); - } catch (Exception e) { - Log.log(this, "Exception while decoding JPEG image " + name); - Log.log(this, e); - return null; - } + try { + return new JPEG(is); + } catch (Exception e) { + Log.log(this, "Exception while decoding JPEG image " + name); + Log.log(this, e); + return null; + } } /** Converts an InputStream carrying a JPEG image into an ARGB int[] */ private static class JPEG implements ImageDecoder { - int[] data; - byte[] buffer; - int width, height; - InputStream is; - - public final int[] getData() { return data; } - public final int getWidth() { return width; } - public final int getHeight() { return height; } - private JPEG(InputStream is) { this.is = is; nativeDecompress(); buffer = null; } - private native void nativeDecompress(); + int[] data; + byte[] buffer; + int width, height; + InputStream is; + + public final int[] getData() { return data; } + public final int getWidth() { return width; } + public final int getHeight() { return height; } + private JPEG(InputStream is) { this.is = is; nativeDecompress(); buffer = null; } + private native void nativeDecompress(); } }