< prev index next >
src/java.desktop/share/classes/java/awt/image/SampleModel.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
@@ -232,13 +232,13 @@
*
* @throws NullPointerException if data is null.
* @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[], DataBuffer data) {
+ public int[] getPixel(int x, int y, int[] iArray, DataBuffer data) {
- int pixels[];
+ int[] pixels;
if (iArray != null)
pixels = iArray;
else
pixels = new int[numBands];
@@ -696,14 +696,14 @@
*
* @throws NullPointerException if data is null.
* @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,
DataBuffer data) {
- float pixels[];
+ float[] pixels;
if (fArray != null)
pixels = fArray;
else
pixels = new float[numBands];
@@ -727,14 +727,14 @@
*
* @throws NullPointerException if data is null.
* @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,
DataBuffer data) {
- double pixels[];
+ double[] pixels;
if(dArray != null)
pixels = dArray;
else
pixels = new double[numBands];
@@ -762,13 +762,13 @@
* @throws NullPointerException if data is null.
* @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[], DataBuffer data) {
+ int[] iArray, DataBuffer data) {
- int pixels[];
+ int[] pixels;
int Offset=0;
int x1 = x + w;
int y1 = y + h;
if (x < 0 || x >= width || w > width || x1 < 0 || x1 > width ||
@@ -810,13 +810,13 @@
* @throws NullPointerException if data is null.
* @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[], DataBuffer data) {
+ float[] fArray, DataBuffer data) {
- float pixels[];
+ float[] pixels;
int Offset = 0;
int x1 = x + w;
int y1 = y + h;
if (x < 0 || x >= width || w > width || x1 < 0 || x1 > width ||
@@ -858,12 +858,12 @@
* @throws NullPointerException if data is null.
* @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[], DataBuffer data) {
- double pixels[];
+ double[] dArray, DataBuffer data) {
+ double[] pixels;
int Offset = 0;
int x1 = x + w;
int y1 = y + h;
if (x < 0 || x >= width || w > width || x1 < 0 || x1 > width ||
@@ -974,12 +974,12 @@
* @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[], DataBuffer data) {
- int pixels[];
+ int[] iArray, DataBuffer data) {
+ int[] pixels;
int Offset=0;
int x1 = x + w;
int y1 = y + h;
if (x < 0 || x1 < x || x1 > width ||
@@ -1022,13 +1022,13 @@
* @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[],
+ int b, float[] fArray,
DataBuffer data) {
- float pixels[];
+ float[] pixels;
int Offset=0;
int x1 = x + w;
int y1 = y + h;
if (x < 0 || x1 < x || x1 > width ||
@@ -1071,13 +1071,13 @@
* @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[],
+ int b, double[] dArray,
DataBuffer data) {
- double pixels[];
+ double[] pixels;
int Offset=0;
int x1 = x + w;
int y1 = y + h;
if (x < 0 || x1 < x || x1 > width ||
@@ -1112,11 +1112,11 @@
*
* @throws NullPointerException if iArray or data is null.
* @throws ArrayIndexOutOfBoundsException if the coordinates are
* not in bounds, or if iArray is too small to hold the input.
*/
- public void setPixel(int x, int y, int iArray[], DataBuffer data) {
+ public void setPixel(int x, int y, int[] iArray, DataBuffer data) {
for (int i=0; i<numBands; i++)
setSample(x, y, i, iArray[i], data);
}
@@ -1132,11 +1132,11 @@
*
* @throws NullPointerException if fArray or data is null.
* @throws ArrayIndexOutOfBoundsException if the coordinates are
* not in bounds, or if fArray is too small to hold the input.
*/
- public void setPixel(int x, int y, float fArray[], DataBuffer data) {
+ public void setPixel(int x, int y, float[] fArray, DataBuffer data) {
for (int i=0; i<numBands; i++)
setSample(x, y, i, fArray[i], data);
}
@@ -1151,11 +1151,11 @@
*
* @throws NullPointerException if dArray or data is null.
* @throws ArrayIndexOutOfBoundsException if the coordinates are
* not in bounds, or if fArray is too small to hold the input.
*/
- public void setPixel(int x, int y, double dArray[], DataBuffer data) {
+ public void setPixel(int x, int y, double[] dArray, DataBuffer data) {
for (int i=0; i<numBands; i++)
setSample(x, y, i, dArray[i], data);
}
@@ -1175,11 +1175,11 @@
* @throws NullPointerException if iArray or data is null.
* @throws ArrayIndexOutOfBoundsException if the coordinates are
* not in bounds, or if iArray is too small to hold the input.
*/
public void setPixels(int x, int y, int w, int h,
- int iArray[], DataBuffer data) {
+ int[] iArray, DataBuffer data) {
int Offset=0;
int x1 = x + w;
int y1 = y + h;
if (x < 0 || x >= width || w > width || x1 < 0 || x1 > width ||
@@ -1213,11 +1213,11 @@
* @throws NullPointerException if fArray or data is null.
* @throws ArrayIndexOutOfBoundsException if the coordinates are
* not in bounds, or if fArray is too small to hold the input.
*/
public void setPixels(int x, int y, int w, int h,
- float fArray[], DataBuffer data) {
+ float[] fArray, DataBuffer data) {
int Offset=0;
int x1 = x + w;
int y1 = y + h;
if (x < 0 || x >= width || w > width || x1 < 0 || x1 > width||
@@ -1251,11 +1251,11 @@
* @throws NullPointerException if dArray or data is null.
* @throws ArrayIndexOutOfBoundsException if the coordinates are
* not in bounds, or if dArray is too small to hold the input.
*/
public void setPixels(int x, int y, int w, int h,
- double dArray[], DataBuffer data) {
+ double[] dArray, DataBuffer data) {
int Offset=0;
int x1 = x + w;
int y1 = y + h;
if (x < 0 || x >= width || w > width || x1 < 0 || x1 > width ||
@@ -1367,11 +1367,11 @@
* @throws ArrayIndexOutOfBoundsException if the coordinates or
* the band index are not in bounds, or if iArray is too small to
* hold the input.
*/
public void setSamples(int x, int y, int w, int h, int b,
- int iArray[], DataBuffer data) {
+ int[] iArray, DataBuffer data) {
int Offset=0;
int x1 = x + w;
int y1 = y + h;
if (x < 0 || x >= width || w > width || x1 < 0 || x1 > width ||
@@ -1405,11 +1405,11 @@
* @throws ArrayIndexOutOfBoundsException if the coordinates or
* the band index are not in bounds, or if fArray is too small to
* hold the input.
*/
public void setSamples(int x, int y, int w, int h, int b,
- float fArray[], DataBuffer data) {
+ float[] fArray, DataBuffer data) {
int Offset=0;
int x1 = x + w;
int y1 = y + h;
if (x < 0 || x >= width || w > width || x1 < 0 || x1 > width ||
@@ -1443,11 +1443,11 @@
* @throws ArrayIndexOutOfBoundsException if the coordinates or
* the band index are not in bounds, or if dArray is too small to
* hold the input.
*/
public void setSamples(int x, int y, int w, int h, int b,
- double dArray[], DataBuffer data) {
+ double[] dArray, DataBuffer data) {
int Offset=0;
int x1 = x + w;
int y1 = y + h;
@@ -1481,11 +1481,11 @@
* SampleModel.
* @param bands the subset of bands of this {@code SampleModel}
* @return a {@code SampleModel} with a subset of bands of this
* {@code SampleModel}.
*/
- public abstract SampleModel createSubsetSampleModel(int bands[]);
+ public abstract SampleModel createSubsetSampleModel(int[] bands);
/**
* Creates a DataBuffer that corresponds to this SampleModel.
* The DataBuffer's width and height will match this SampleModel's.
* @return a {@code DataBuffer} corresponding to this
< prev index next >