< prev index next >

src/java.desktop/share/classes/java/awt/image/Raster.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2016, 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

@@ -252,11 +252,11 @@
      */
     public static WritableRaster createInterleavedRaster(int dataType,
                                                          int w, int h,
                                                          int scanlineStride,
                                                          int pixelStride,
-                                                         int bandOffsets[],
+                                                         int[] bandOffsets,
                                                          Point location) {
         DataBuffer d;
 
         int size = scanlineStride * (h - 1) + // fisrt (h - 1) scans
             pixelStride * w; // last scan

@@ -363,12 +363,12 @@
      *         or {@code bandOffsets} is {@code null}
      */
     public static WritableRaster createBandedRaster(int dataType,
                                                     int w, int h,
                                                     int scanlineStride,
-                                                    int bankIndices[],
-                                                    int bandOffsets[],
+                                                    int[] bankIndices,
+                                                    int[] bandOffsets,
                                                     Point location) {
         DataBuffer d;
         int bands = bandOffsets.length;
 
         if (bankIndices == null) {

@@ -448,11 +448,11 @@
      *         {@code DataBuffer.TYPE_USHORT}
      *         or {@code DataBuffer.TYPE_INT}
      */
     public static WritableRaster createPackedRaster(int dataType,
                                                     int w, int h,
-                                                    int bandMasks[],
+                                                    int[] bandMasks,
                                                     Point location) {
         DataBuffer d;
 
         switch(dataType) {
         case DataBuffer.TYPE_BYTE:

@@ -626,11 +626,11 @@
      */
     public static WritableRaster createInterleavedRaster(DataBuffer dataBuffer,
                                                          int w, int h,
                                                          int scanlineStride,
                                                          int pixelStride,
-                                                         int bandOffsets[],
+                                                         int[] bandOffsets,
                                                          Point location)
     {
         if (dataBuffer == null) {
             throw new NullPointerException("DataBuffer cannot be null");
         }

@@ -699,12 +699,12 @@
      * @throws NullPointerException if {@code dataBuffer} is null
      */
     public static WritableRaster createBandedRaster(DataBuffer dataBuffer,
                                                     int w, int h,
                                                     int scanlineStride,
-                                                    int bankIndices[],
-                                                    int bandOffsets[],
+                                                    int[] bankIndices,
+                                                    int[] bandOffsets,
                                                     Point location)
     {
         if (dataBuffer == null) {
             throw new NullPointerException("DataBuffer cannot be null");
         }

@@ -782,11 +782,11 @@
      * @throws NullPointerException if {@code dataBuffer} is null
      */
     public static WritableRaster createPackedRaster(DataBuffer dataBuffer,
                                                     int w, int h,
                                                     int scanlineStride,
-                                                    int bandMasks[],
+                                                    int[] bandMasks,
                                                     Point location)
     {
         if (dataBuffer == null) {
             throw new NullPointerException("DataBuffer cannot be null");
         }

@@ -1395,11 +1395,11 @@
      *         overflow
      */
     public Raster createChild(int parentX, int parentY,
                               int width, int height,
                               int childMinX, int childMinY,
-                              int bandList[]) {
+                              int[] bandList) {
         if (parentX < this.minX) {
             throw new RasterFormatException("parentX lies outside raster");
         }
         if (parentY < this.minY) {
             throw new RasterFormatException("parentY lies outside raster");

@@ -1599,11 +1599,11 @@
      * @return the samples for the specified pixel.
      *
      * @throws ArrayIndexOutOfBoundsException if the coordinates are not
      * in bounds, or if iArray is too small to hold the output.
      */
-    public int[] getPixel(int x, int y, int iArray[]) {
+    public int[] getPixel(int x, int y, int[] iArray) {
         return sampleModel.getPixel(x - sampleModelTranslateX,
                                     y - sampleModelTranslateY,
                                     iArray, dataBuffer);
     }
 

@@ -1619,11 +1619,11 @@
      * @return the samples for the specified pixel.
      *
      * @throws ArrayIndexOutOfBoundsException if the coordinates are not
      * in bounds, or if fArray is too small to hold the output.
      */
-    public float[] getPixel(int x, int y, float fArray[]) {
+    public float[] getPixel(int x, int y, float[] fArray) {
         return sampleModel.getPixel(x - sampleModelTranslateX,
                                     y - sampleModelTranslateY,
                                     fArray, dataBuffer);
     }
 

@@ -1638,11 +1638,11 @@
      * @return the samples for the specified pixel.
      *
      * @throws ArrayIndexOutOfBoundsException if the coordinates are not
      * in bounds, or if dArray is too small to hold the output.
      */
-    public double[] getPixel(int x, int y, double dArray[]) {
+    public double[] getPixel(int x, int y, double[] dArray) {
         return sampleModel.getPixel(x - sampleModelTranslateX,
                                     y - sampleModelTranslateY,
                                     dArray, dataBuffer);
     }
 

@@ -1660,11 +1660,11 @@
      * @return the samples for the specified rectangle of pixels.
      *
      * @throws ArrayIndexOutOfBoundsException if the coordinates are not
      * in bounds, or if iArray is too small to hold the output.
      */
-    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) {
         return sampleModel.getPixels(x - sampleModelTranslateX,
                                      y - sampleModelTranslateY, w, h,
                                      iArray, dataBuffer);
     }
 

@@ -1683,11 +1683,11 @@
      *
      * @throws ArrayIndexOutOfBoundsException if the coordinates are not
      * in bounds, or if fArray is too small to hold the output.
      */
     public float[] getPixels(int x, int y, int w, int h,
-                             float fArray[]) {
+                             float[] fArray) {
         return sampleModel.getPixels(x - sampleModelTranslateX,
                                      y - sampleModelTranslateY, w, h,
                                      fArray, dataBuffer);
     }
 

@@ -1706,11 +1706,11 @@
      *
      * @throws ArrayIndexOutOfBoundsException if the coordinates are not
      * in bounds, or if dArray is too small to hold the output.
      */
     public double[] getPixels(int x, int y, int w, int h,
-                              double dArray[]) {
+                              double[] dArray) {
         return sampleModel.getPixels(x - sampleModelTranslateX,
                                      y - sampleModelTranslateY,
                                      w, h, dArray, dataBuffer);
     }
 

@@ -1796,11 +1796,11 @@
      * @throws ArrayIndexOutOfBoundsException if the coordinates or
      * the band index are not in bounds, or if iArray is too small to
      * hold the output.
      */
     public int[] getSamples(int x, int y, int w, int h, int b,
-                            int iArray[]) {
+                            int[] iArray) {
         return sampleModel.getSamples(x - sampleModelTranslateX,
                                       y - sampleModelTranslateY,
                                       w, h, b, iArray,
                                       dataBuffer);
     }

@@ -1823,11 +1823,11 @@
      * @throws ArrayIndexOutOfBoundsException if the coordinates or
      * the band index are not in bounds, or if fArray is too small to
      * hold the output.
      */
     public float[] getSamples(int x, int y, int w, int h, int b,
-                              float fArray[]) {
+                              float[] fArray) {
         return sampleModel.getSamples(x - sampleModelTranslateX,
                                       y - sampleModelTranslateY,
                                       w, h, b, fArray, dataBuffer);
     }
 

@@ -1849,11 +1849,11 @@
      * @throws ArrayIndexOutOfBoundsException if the coordinates or
      * the band index are not in bounds, or if dArray is too small to
      * hold the output.
      */
     public double[] getSamples(int x, int y, int w, int h, int b,
-                               double dArray[]) {
+                               double[] dArray) {
          return sampleModel.getSamples(x - sampleModelTranslateX,
                                        y - sampleModelTranslateY,
                                        w, h, b, dArray, dataBuffer);
     }
 
< prev index next >