< prev index next >
src/java.desktop/share/classes/java/awt/image/ByteLookupTable.java
Print this page
*** 57,68 ****
* data array for each band is stored as a reference.
* @param offset the value subtracted from the input values
* before indexing into the arrays
* @param data an array of byte arrays representing a lookup
* table for each band
! * @throws IllegalArgumentException if <code>offset</code> is
! * is less than 0 or if the length of <code>data</code>
* is less than 1
*/
public ByteLookupTable(int offset, byte data[][]) {
super(offset,data.length);
numComponents = data.length;
--- 57,68 ----
* data array for each band is stored as a reference.
* @param offset the value subtracted from the input values
* before indexing into the arrays
* @param data an array of byte arrays representing a lookup
* table for each band
! * @throws IllegalArgumentException if {@code offset} is
! * is less than 0 or if the length of {@code data}
* is less than 1
*/
public ByteLookupTable(int offset, byte data[][]) {
super(offset,data.length);
numComponents = data.length;
*** 81,92 ****
* values before indexing into the array.
* The data array is stored as a reference.
* @param offset the value subtracted from the input values
* before indexing into the array
* @param data an array of bytes
! * @throws IllegalArgumentException if <code>offset</code> is
! * is less than 0 or if the length of <code>data</code>
* is less than 1
*/
public ByteLookupTable(int offset, byte data[]) {
super(offset,data.length);
numComponents = 1;
--- 81,92 ----
* values before indexing into the array.
* The data array is stored as a reference.
* @param offset the value subtracted from the input values
* before indexing into the array
* @param data an array of bytes
! * @throws IllegalArgumentException if {@code offset} is
! * is less than 0 or if the length of {@code data}
* is less than 1
*/
public ByteLookupTable(int offset, byte data[]) {
super(offset,data.length);
numComponents = 1;
*** 97,128 ****
/**
* Returns the lookup table data by reference. If this ByteLookupTable
* was constructed using a single byte array, the length of the returned
* array is one.
! * @return the data array of this <code>ByteLookupTable</code>.
*/
public final byte[][] getTable(){
return data;
}
/**
* Returns an array of samples of a pixel, translated with the lookup
* table. The source and destination array can be the same array.
! * Array <code>dst</code> is returned.
*
* @param src the source array.
* @param dst the destination array. This array must be at least as
! * long as <code>src</code>. If <code>dst</code> is
! * <code>null</code>, a new array will be allocated having the
! * same length as <code>src</code>.
! * @return the array <code>dst</code>, an <code>int</code> array of
* samples.
! * @exception ArrayIndexOutOfBoundsException if <code>src</code> is
! * longer than <code>dst</code> or if for any element
! * <code>i</code> of <code>src</code>,
! * <code>src[i]-offset</code> is either less than zero or
* greater than or equal to the length of the lookup table
* for any band.
*/
public int[] lookupPixel(int[] src, int[] dst){
if (dst == null) {
--- 97,128 ----
/**
* Returns the lookup table data by reference. If this ByteLookupTable
* was constructed using a single byte array, the length of the returned
* array is one.
! * @return the data array of this {@code ByteLookupTable}.
*/
public final byte[][] getTable(){
return data;
}
/**
* Returns an array of samples of a pixel, translated with the lookup
* table. The source and destination array can be the same array.
! * Array {@code dst} is returned.
*
* @param src the source array.
* @param dst the destination array. This array must be at least as
! * long as {@code src}. If {@code dst} is
! * {@code null}, a new array will be allocated having the
! * same length as {@code src}.
! * @return the array {@code dst}, an {@code int} array of
* samples.
! * @exception ArrayIndexOutOfBoundsException if {@code src} is
! * longer than {@code dst} or if for any element
! * {@code i} of {@code src},
! * {@code src[i]-offset} is either less than zero or
* greater than or equal to the length of the lookup table
* for any band.
*/
public int[] lookupPixel(int[] src, int[] dst){
if (dst == null) {
*** 157,178 ****
}
/**
* Returns an array of samples of a pixel, translated with the lookup
* table. The source and destination array can be the same array.
! * Array <code>dst</code> is returned.
*
* @param src the source array.
* @param dst the destination array. This array must be at least as
! * long as <code>src</code>. If <code>dst</code> is
! * <code>null</code>, a new array will be allocated having the
! * same length as <code>src</code>.
! * @return the array <code>dst</code>, an <code>int</code> array of
* samples.
! * @exception ArrayIndexOutOfBoundsException if <code>src</code> is
! * longer than <code>dst</code> or if for any element
! * <code>i</code> of <code>src</code>,
* {@code (src[i]&0xff)-offset} is either less than
* zero or greater than or equal to the length of the
* lookup table for any band.
*/
public byte[] lookupPixel(byte[] src, byte[] dst){
--- 157,178 ----
}
/**
* Returns an array of samples of a pixel, translated with the lookup
* table. The source and destination array can be the same array.
! * Array {@code dst} is returned.
*
* @param src the source array.
* @param dst the destination array. This array must be at least as
! * long as {@code src}. If {@code dst} is
! * {@code null}, a new array will be allocated having the
! * same length as {@code src}.
! * @return the array {@code dst}, an {@code int} array of
* samples.
! * @exception ArrayIndexOutOfBoundsException if {@code src} is
! * longer than {@code dst} or if for any element
! * {@code i} of {@code src},
* {@code (src[i]&0xff)-offset} is either less than
* zero or greater than or equal to the length of the
* lookup table for any band.
*/
public byte[] lookupPixel(byte[] src, byte[] dst){
< prev index next >