< prev index next >

src/java.desktop/share/classes/sun/awt/image/JPEGImageDecoder.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -61,18 +61,18 @@
                 }
             });
         initIDs(InputStreamClass);
         RGBcolormodel = new DirectColorModel(24, 0xff0000, 0xff00, 0xff);
         ARGBcolormodel = ColorModel.getRGBdefault();
-        byte g[] = new byte[256];
+        byte[] g = new byte[256];
         for (int i = 0; i < 256; i++) {
             g[i] = (byte) i;
         }
         Graycolormodel = new IndexColorModel(8, 256, g, g, g);
     }
 
-    private native void readImage(InputStream is, byte buf[])
+    private native void readImage(InputStream is, byte[] buf)
         throws ImageFormatException, IOException;
 
     Hashtable<String, Object> props = new Hashtable<>();
 
     public JPEGImageDecoder(InputStreamImageSource src, InputStream is) {

@@ -113,20 +113,20 @@
         headerComplete();
 
         return true;
     }
 
-    public boolean sendPixels(int pixels[], int y) {
+    public boolean sendPixels(int[] pixels, int y) {
         int count = setPixels(0, y, pixels.length, 1, colormodel,
                               pixels, 0, pixels.length);
         if (count <= 0) {
             aborted = true;
         }
         return !aborted;
     }
 
-    public boolean sendPixels(byte pixels[], int y) {
+    public boolean sendPixels(byte[] pixels, int y) {
         int count = setPixels(0, y, pixels.length, 1, colormodel,
                               pixels, 0, pixels.length);
         if (count <= 0) {
             aborted = true;
         }
< prev index next >