< prev index next >

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

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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

@@ -242,11 +242,11 @@
         if ((x < this.minX) || (y < this.minY) ||
             (x >= this.maxX) || (y >= this.maxY)) {
             throw new ArrayIndexOutOfBoundsException
                 ("Coordinate out of bounds!");
         }
-        byte outData[];
+        byte[] outData;
         if (obj == null) {
             outData = new byte[numDataElements];
         } else {
             outData = (byte[])obj;
         }

@@ -316,21 +316,21 @@
         if ((x < this.minX) || (y < this.minY) ||
             (x + w > this.maxX) || (y + h > this.maxY)) {
             throw new ArrayIndexOutOfBoundsException
                 ("Coordinate out of bounds!");
         }
-        byte outData[];
+        byte[] outData;
         if (obj == null) {
             outData = new byte[numDataElements*w*h];
         } else {
             outData = (byte[])obj;
         }
         int pixbits = pixelBitStride;
         int scanbit = dataBitOffset + (x-minX) * pixbits;
         int index = (y-minY) * scanlineStride;
         int outindex = 0;
-        byte data[] = this.data;
+        byte[] data = this.data;
 
         for (int j = 0; j < h; j++) {
             int bitnum = scanbit;
             for (int i = 0; i < w; i++) {
                 int shift = shiftOffset - (bitnum & 7);

@@ -397,11 +397,11 @@
         }
         int pixbits = pixelBitStride;
         int scanbit = dataBitOffset + (x-minX) * pixbits;
         int index = (y-minY) * scanlineStride;
         int outindex = 0;
-        byte data[] = this.data;
+        byte[] data = this.data;
 
         for (int j = 0; j < h; j++) {
             int bitnum = scanbit;
             int element;
 

@@ -504,11 +504,11 @@
         if ((x < this.minX) || (y < this.minY) ||
             (x >= this.maxX) || (y >= this.maxY)) {
             throw new ArrayIndexOutOfBoundsException
                 ("Coordinate out of bounds!");
         }
-        byte inData[] = (byte[])obj;
+        byte[] inData = (byte[])obj;
         int bitnum = dataBitOffset + (x-minX) * pixelBitStride;
         int index = (y-minY) * scanlineStride + (bitnum >> 3);
         int shift = shiftOffset - (bitnum & 7);
 
         byte element = data[index];

@@ -915,11 +915,11 @@
 
         int pixbits = pixelBitStride;
         int scanbit = dataBitOffset + (x - minX) * pixbits;
         int index = (y - minY) * scanlineStride;
         int outindex = 0;
-        byte data[] = this.data;
+        byte[] data = this.data;
         for (int j = 0; j < h; j++) {
             int bitnum = scanbit;
             int element;
 
             // Process initial portion of scanline

@@ -1023,11 +1023,11 @@
      * @param w      Width of the pixel rectangle
      * @param h      Height of the pixel rectangle
      * @param iArray An optionally pre-allocated int array
      * @return the samples for the specified rectangle of pixels.
      */
-    public int[] getPixels(int x, int y, int w, int h, int iArray[]) {
+    public int[] getPixels(int x, int y, int w, int h, int[] iArray) {
         if ((x < this.minX) || (y < this.minY) ||
             (x + w > this.maxX) || (y + h > this.maxY)) {
             throw new ArrayIndexOutOfBoundsException
                 ("Coordinate out of bounds!");
         }

@@ -1036,11 +1036,11 @@
         }
         int pixbits = pixelBitStride;
         int scanbit = dataBitOffset + (x-minX) * pixbits;
         int index = (y-minY) * scanlineStride;
         int outindex = 0;
-        byte data[] = this.data;
+        byte[] data = this.data;
 
         for (int j = 0; j < h; j++) {
             int bitnum = scanbit;
             int element;
 

@@ -1136,21 +1136,21 @@
      * @param y        The Y coordinate of the upper left pixel location.
      * @param w        Width of the pixel rectangle.
      * @param h        Height of the pixel rectangle.
      * @param iArray   The input int pixel array.
      */
-    public void setPixels(int x, int y, int w, int h, int iArray[]) {
+    public void setPixels(int x, int y, int w, int h, int[] iArray) {
         if ((x < this.minX) || (y < this.minY) ||
             (x + w > this.maxX) || (y + h > this.maxY)) {
             throw new ArrayIndexOutOfBoundsException
                 ("Coordinate out of bounds!");
         }
         int pixbits = pixelBitStride;
         int scanbit = dataBitOffset + (x - minX) * pixbits;
         int index = (y - minY) * scanlineStride;
         int outindex = 0;
-        byte data[] = this.data;
+        byte[] data = this.data;
         for (int j = 0; j < h; j++) {
             int bitnum = scanbit;
             int element;
 
             // Process initial portion of scanline
< prev index next >