diff options
Diffstat (limited to 'libjava/java/awt/image/ByteLookupTable.java')
-rw-r--r-- | libjava/java/awt/image/ByteLookupTable.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libjava/java/awt/image/ByteLookupTable.java b/libjava/java/awt/image/ByteLookupTable.java index 572f6e9212d..f0221915a71 100644 --- a/libjava/java/awt/image/ByteLookupTable.java +++ b/libjava/java/awt/image/ByteLookupTable.java @@ -61,7 +61,7 @@ public class ByteLookupTable extends LookupTable * * @param offset Offset to be subtracted. * @param data Array of lookup tables. - * @exception IllegalArgumentException if offset < 0 or data.length < 1. + * @exception IllegalArgumentException if offset < 0 or data.length < 1. */ public ByteLookupTable(int offset, byte[][] data) throws IllegalArgumentException @@ -78,7 +78,7 @@ public class ByteLookupTable extends LookupTable * * @param offset Offset to be subtracted. * @param data Lookup table for all components. - * @exception IllegalArgumentException if offset < 0. + * @exception IllegalArgumentException if offset < 0. */ public ByteLookupTable(int offset, byte[] data) throws IllegalArgumentException @@ -87,7 +87,11 @@ public class ByteLookupTable extends LookupTable this.data = new byte[][] {data}; } - /** Return the lookup tables. */ + /** + * Return the lookup tables. + * + * @return the tables + */ public final byte[][] getTable() { return data; @@ -107,14 +111,14 @@ public class ByteLookupTable extends LookupTable * translation arrays. * * @param src Component values of a pixel. - * @param dest Destination array for values, or null. + * @param dst Destination array for values, or null. * @return Translated values for the pixel. */ public int[] lookupPixel(int[] src, int[] dst) throws ArrayIndexOutOfBoundsException { if (dst == null) - dst = new int[numComponents]; + dst = new int[src.length]; if (data.length == 1) for (int i=0; i < src.length; i++) @@ -140,14 +144,14 @@ public class ByteLookupTable extends LookupTable * translation arrays. * * @param src Component values of a pixel. - * @param dest Destination array for values, or null. + * @param dst Destination array for values, or null. * @return Translated values for the pixel. */ public byte[] lookupPixel(byte[] src, byte[] dst) throws ArrayIndexOutOfBoundsException { if (dst == null) - dst = new byte[numComponents]; + dst = new byte[src.length]; if (data.length == 1) for (int i=0; i < src.length; i++) |