commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1417043 [12/21] - in /commons/proper/imaging/trunk/src: main/java/org/apache/commons/imaging/ main/java/org/apache/commons/imaging/color/ main/java/org/apache/commons/imaging/common/ main/java/org/apache/commons/imaging/common/bytesource/ ...
Date Tue, 04 Dec 2012 17:24:32 GMT
Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserLab.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserLab.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserLab.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserLab.java Tue Dec  4 17:23:16 2012
@@ -26,16 +26,16 @@ public class DataParserLab extends DataP
     }
 
     @Override
-    protected int getRGB(int data[][][], int x, int y,
-            ImageContents imageContents) {
-        int cieL = 0xff & data[0][y][x];
+    protected int getRGB(final int data[][][], final int x, final int y,
+            final ImageContents imageContents) {
+        final int cieL = 0xff & data[0][y][x];
         int cieA = 0xff & data[1][y][x];
         int cieB = 0xff & data[2][y][x];
 
         cieA -= 128;
         cieB -= 128;
 
-        int rgb = ColorConversions.convertCIELabtoARGBTest(cieL, cieA, cieB);
+        final int rgb = ColorConversions.convertCIELabtoARGBTest(cieL, cieA, cieB);
 
         return rgb;
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserRgb.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserRgb.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserRgb.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserRgb.java Tue Dec  4 17:23:16 2012
@@ -20,14 +20,14 @@ import org.apache.commons.imaging.format
 
 public class DataParserRgb extends DataParser {
     @Override
-    protected int getRGB(int data[][][], int x, int y,
-            ImageContents imageContents) {
-        int red = 0xff & data[0][y][x];
-        int green = 0xff & data[1][y][x];
-        int blue = 0xff & data[2][y][x];
-        int alpha = 0xff;
+    protected int getRGB(final int data[][][], final int x, final int y,
+            final ImageContents imageContents) {
+        final int red = 0xff & data[0][y][x];
+        final int green = 0xff & data[1][y][x];
+        final int blue = 0xff & data[2][y][x];
+        final int alpha = 0xff;
 
-        int rgb = ((0xff & alpha) << 24) | ((0xff & red) << 16)
+        final int rgb = ((0xff & alpha) << 24) | ((0xff & red) << 16)
                 | ((0xff & green) << 8) | ((0xff & blue) << 0);
 
         return rgb;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserStub.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserStub.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserStub.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserStub.java Tue Dec  4 17:23:16 2012
@@ -20,8 +20,8 @@ import org.apache.commons.imaging.format
 
 public class DataParserStub extends DataParser {
     @Override
-    protected int getRGB(int data[][][], int x, int y,
-            ImageContents imageContents) {
+    protected int getRGB(final int data[][][], final int x, final int y,
+            final ImageContents imageContents) {
         return 0;
     }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/datareaders/CompressedDataReader.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/datareaders/CompressedDataReader.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/datareaders/CompressedDataReader.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/datareaders/CompressedDataReader.java Tue Dec  4 17:23:16 2012
@@ -33,21 +33,21 @@ import org.apache.commons.imaging.format
 
 public class CompressedDataReader extends DataReader {
 
-    public CompressedDataReader(DataParser fDataParser) {
+    public CompressedDataReader(final DataParser fDataParser) {
         super(fDataParser);
     }
 
     @Override
-    public void readData(InputStream is, BufferedImage bi,
-            ImageContents imageContents, BinaryFileParser bfp)
+    public void readData(final InputStream is, final BufferedImage bi,
+            final ImageContents imageContents, final BinaryFileParser bfp)
             throws ImageReadException, IOException {
-        PsdHeaderInfo header = imageContents.header;
-        int width = header.Columns;
-        int height = header.Rows;
+        final PsdHeaderInfo header = imageContents.header;
+        final int width = header.Columns;
+        final int height = header.Rows;
 
         // this.setDebug(true);
-        int scanline_count = height * header.Channels;
-        int scanline_bytecounts[] = new int[scanline_count];
+        final int scanline_count = height * header.Channels;
+        final int scanline_bytecounts[] = new int[scanline_count];
         for (int i = 0; i < scanline_count; i++) {
             scanline_bytecounts[i] = bfp.read2Bytes("scanline_bytecount[" + i
                     + "]", is, "PSD: bad Image Data");
@@ -56,30 +56,30 @@ public class CompressedDataReader extend
         // System.out.println("fImageContents.Compression: "
         // + imageContents.Compression);
 
-        int depth = header.Depth;
+        final int depth = header.Depth;
 
-        int channel_count = dataParser.getBasicChannelsCount();
-        int data[][][] = new int[channel_count][height][];
+        final int channel_count = dataParser.getBasicChannelsCount();
+        final int data[][][] = new int[channel_count][height][];
         // channels[0] =
         for (int channel = 0; channel < channel_count; channel++) {
             for (int y = 0; y < height; y++) {
-                int index = channel * height + y;
-                byte packed[] = bfp.readByteArray("scanline",
+                final int index = channel * height + y;
+                final byte packed[] = bfp.readByteArray("scanline",
                         scanline_bytecounts[index], is,
                         "PSD: Missing Image Data");
 
-                byte unpacked[] = new PackBits().decompress(packed, width);
-                InputStream bais = new ByteArrayInputStream(unpacked);
-                MyBitInputStream mbis = new MyBitInputStream(bais,
+                final byte unpacked[] = new PackBits().decompress(packed, width);
+                final InputStream bais = new ByteArrayInputStream(unpacked);
+                final MyBitInputStream mbis = new MyBitInputStream(bais,
                         ByteOrder.MOTOROLA);
-                BitsToByteInputStream bbis = new BitsToByteInputStream(mbis, 8); // we
+                final BitsToByteInputStream bbis = new BitsToByteInputStream(mbis, 8); // we
                                                                                  // want
                                                                                  // all
                                                                                  // samples
                                                                                  // to
                                                                                  // be
                                                                                  // bytes
-                int scanline[] = bbis.readBitsArray(depth, width);
+                final int scanline[] = bbis.readBitsArray(depth, width);
                 data[channel][y] = scanline;
 
             }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/datareaders/DataReader.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/datareaders/DataReader.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/datareaders/DataReader.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/datareaders/DataReader.java Tue Dec  4 17:23:16 2012
@@ -28,7 +28,7 @@ import org.apache.commons.imaging.format
 public abstract class DataReader {
     protected final DataParser dataParser;
 
-    public DataReader(DataParser fDataParser) {
+    public DataReader(final DataParser fDataParser) {
         this.dataParser = fDataParser;
     }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/datareaders/UncompressedDataReader.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/datareaders/UncompressedDataReader.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/datareaders/UncompressedDataReader.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/datareaders/UncompressedDataReader.java Tue Dec  4 17:23:16 2012
@@ -30,31 +30,31 @@ import org.apache.commons.imaging.format
 import org.apache.commons.imaging.formats.psd.dataparsers.DataParser;
 
 public class UncompressedDataReader extends DataReader {
-    public UncompressedDataReader(DataParser fDataParser) {
+    public UncompressedDataReader(final DataParser fDataParser) {
         super(fDataParser);
     }
 
     @Override
-    public void readData(InputStream is, BufferedImage bi,
-            ImageContents imageContents, BinaryFileParser bfp)
+    public void readData(final InputStream is, final BufferedImage bi,
+            final ImageContents imageContents, final BinaryFileParser bfp)
             throws ImageReadException, IOException {
-        PsdHeaderInfo header = imageContents.header;
-        int width = header.Columns;
-        int height = header.Rows;
+        final PsdHeaderInfo header = imageContents.header;
+        final int width = header.Columns;
+        final int height = header.Rows;
 
         bfp.setDebug(false);
 
-        int channel_count = dataParser.getBasicChannelsCount();
-        int depth = header.Depth;
-        MyBitInputStream mbis = new MyBitInputStream(is, ByteOrder.MOTOROLA);
+        final int channel_count = dataParser.getBasicChannelsCount();
+        final int depth = header.Depth;
+        final MyBitInputStream mbis = new MyBitInputStream(is, ByteOrder.MOTOROLA);
         // we want all samples to be bytes
-        BitsToByteInputStream bbis = new BitsToByteInputStream(mbis, 8);
+        final BitsToByteInputStream bbis = new BitsToByteInputStream(mbis, 8);
 
-        int data[][][] = new int[channel_count][height][width];
+        final int data[][][] = new int[channel_count][height][width];
         for (int channel = 0; channel < channel_count; channel++) {
             for (int y = 0; y < height; y++) {
                 for (int x = 0; x < width; x++) {
-                    int b = bbis.readBits(depth);
+                    final int b = bbis.readBits(depth);
 
                     data[channel][y][x] = (byte) b;
                 }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/InfoHeaderReader.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/InfoHeaderReader.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/InfoHeaderReader.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/InfoHeaderReader.java Tue Dec  4 17:23:16 2012
@@ -22,12 +22,12 @@ import java.io.InputStream;
 class InfoHeaderReader {
     private final InputStream is;
 
-    public InfoHeaderReader(InputStream is) {
+    public InfoHeaderReader(final InputStream is) {
         this.is = is;
     }
 
     private char read() throws IOException {
-        int result = is.read();
+        final int result = is.read();
         if (result < 0) {
             throw new IOException("HDR: Unexpected EOF");
         }
@@ -35,7 +35,7 @@ class InfoHeaderReader {
     }
 
     public String readNextLine() throws IOException {
-        StringBuilder buffer = new StringBuilder();
+        final StringBuilder buffer = new StringBuilder();
         char c;
 
         while ((c = read()) != '\n') {

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java Tue Dec  4 17:23:16 2012
@@ -71,9 +71,9 @@ public class RgbeImageParser extends Ima
     }
 
     @Override
-    public IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
+    public IImageMetadata getMetadata(final ByteSource byteSource, final Map<String,Object> params)
             throws ImageReadException, IOException {
-        RgbeInfo info = new RgbeInfo(byteSource);
+        final RgbeInfo info = new RgbeInfo(byteSource);
 
         try {
             return info.getMetadata();
@@ -83,9 +83,9 @@ public class RgbeImageParser extends Ima
     }
 
     @Override
-    public ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
+    public ImageInfo getImageInfo(final ByteSource byteSource, final Map<String,Object> params)
             throws ImageReadException, IOException {
-        RgbeInfo info = new RgbeInfo(byteSource);
+        final RgbeInfo info = new RgbeInfo(byteSource);
 
         try {
             return new ImageInfo(
@@ -101,15 +101,15 @@ public class RgbeImageParser extends Ima
     }
 
     @Override
-    public BufferedImage getBufferedImage(ByteSource byteSource, Map<String,Object> params)
+    public BufferedImage getBufferedImage(final ByteSource byteSource, final Map<String,Object> params)
             throws ImageReadException, IOException {
-        RgbeInfo info = new RgbeInfo(byteSource);
+        final RgbeInfo info = new RgbeInfo(byteSource);
 
         try {
             // It is necessary to create our own BufferedImage here as the
             // org.apache.sanselan.common.IBufferedImageFactory interface does
             // not expose this complexity
-            DataBuffer buffer = new DataBufferFloat(info.getPixelData(),
+            final DataBuffer buffer = new DataBufferFloat(info.getPixelData(),
                     info.getWidth() * info.getHeight());
 
             return new BufferedImage(new ComponentColorModel(
@@ -125,9 +125,9 @@ public class RgbeImageParser extends Ima
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
+    public Dimension getImageSize(final ByteSource byteSource, final Map<String,Object> params)
             throws ImageReadException, IOException {
-        RgbeInfo info = new RgbeInfo(byteSource);
+        final RgbeInfo info = new RgbeInfo(byteSource);
 
         try {
             return new Dimension(info.getWidth(), info.getHeight());
@@ -137,18 +137,18 @@ public class RgbeImageParser extends Ima
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
+    public byte[] getICCProfileBytes(final ByteSource byteSource, final Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
 
     @Override
-    public boolean embedICCProfile(File src, File dst, byte[] profile) {
+    public boolean embedICCProfile(final File src, final File dst, final byte[] profile) {
         return false;
     }
 
     @Override
-    public String getXmpXml(ByteSource byteSource, Map<String,Object> params)
+    public String getXmpXml(final ByteSource byteSource, final Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeInfo.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeInfo.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeInfo.java Tue Dec  4 17:23:16 2012
@@ -40,7 +40,7 @@ class RgbeInfo extends BinaryFileFunctio
     private int height = -1;
     private static final byte[] TWO_TWO = new byte[] { 0x2, 0x2 };
 
-    RgbeInfo(ByteSource byteSource) throws IOException {
+    RgbeInfo(final ByteSource byteSource) throws IOException {
         this.in = new BinaryInputStream(byteSource.getInputStream(),
                 ByteOrder.BIG_ENDIAN);
     }
@@ -72,7 +72,7 @@ class RgbeInfo extends BinaryFileFunctio
     void close() {
         try {
             in.close();
-        } catch (IOException e) {
+        } catch (final IOException e) {
             Debug.debug(e);
         }
     }
@@ -80,9 +80,9 @@ class RgbeInfo extends BinaryFileFunctio
     private void readDimensions() throws IOException, ImageReadException {
         getMetadata(); // Ensure we've read past this
 
-        InfoHeaderReader reader = new InfoHeaderReader(in);
-        String resolution = reader.readNextLine();
-        Matcher matcher = RESOLUTION_STRING.matcher(resolution);
+        final InfoHeaderReader reader = new InfoHeaderReader(in);
+        final String resolution = reader.readNextLine();
+        final Matcher matcher = RESOLUTION_STRING.matcher(resolution);
 
         if (!matcher.matches()) {
             throw new ImageReadException(
@@ -98,7 +98,7 @@ class RgbeInfo extends BinaryFileFunctio
         in.readAndVerifyBytes(RgbeConstants.HEADER,
                 "Not a valid HDR: Incorrect Header");
 
-        InfoHeaderReader reader = new InfoHeaderReader(in);
+        final InfoHeaderReader reader = new InfoHeaderReader(in);
 
         if (reader.readNextLine().length() != 0) {
             throw new ImageReadException("Not a valid HDR: Incorrect Header");
@@ -109,11 +109,11 @@ class RgbeInfo extends BinaryFileFunctio
         String info = reader.readNextLine();
 
         while (info.length() != 0) {
-            int equals = info.indexOf("=");
+            final int equals = info.indexOf("=");
 
             if (equals > 0) {
-                String variable = info.substring(0, equals);
-                String value = info.substring(equals + 1);
+                final String variable = info.substring(0, equals);
+                final String value = info.substring(equals + 1);
 
                 if ("FORMAT".equals(value) && !"32-bit_rle_rgbe".equals(value)) {
                     throw new ImageReadException(
@@ -133,18 +133,18 @@ class RgbeInfo extends BinaryFileFunctio
     public float[][] getPixelData() throws IOException, ImageReadException {
         // Read into local variables to ensure that we have seeked into the file
         // far enough
-        int height = getHeight();
-        int width = getWidth();
+        final int height = getHeight();
+        final int width = getWidth();
 
         if (width >= 32768) {
             throw new ImageReadException(
                     "Scan lines must be less than 32768 bytes long");
         }
 
-        byte[] scanLineBytes = convertShortToByteArray(width,
+        final byte[] scanLineBytes = convertShortToByteArray(width,
                 ByteOrder.BIG_ENDIAN);
-        byte[] rgbe = new byte[width * 4];
-        float[][] out = new float[3][width * height];
+        final byte[] rgbe = new byte[width * 4];
+        final float[][] out = new float[3][width * height];
 
         for (int i = 0; i < height; i++) {
             in.readAndVerifyBytes(TWO_TWO, "Scan line " + i
@@ -155,17 +155,17 @@ class RgbeInfo extends BinaryFileFunctio
             decompress(in, rgbe);
 
             for (int channel = 0; channel < 3; channel++) {
-                int channelOffset = channel * width;
-                int eOffset = 3 * width;
+                final int channelOffset = channel * width;
+                final int eOffset = 3 * width;
 
                 for (int p = 0; p < width; p++) {
-                    int mantissa = rgbe[p + eOffset] & 0xff;
-                    int pos = p + i * width;
+                    final int mantissa = rgbe[p + eOffset] & 0xff;
+                    final int pos = p + i * width;
 
                     if (0 == mantissa) {
                         out[channel][pos] = 0;
                     } else {
-                        float mult = (float) Math.pow(2, mantissa - (128 + 8));
+                        final float mult = (float) Math.pow(2, mantissa - (128 + 8));
                         out[channel][pos] = ((rgbe[p + channelOffset] & 0xff) + 0.5f)
                                 * mult;
                     }
@@ -176,16 +176,16 @@ class RgbeInfo extends BinaryFileFunctio
         return out;
     }
 
-    private static void decompress(InputStream in, byte[] out)
+    private static void decompress(final InputStream in, final byte[] out)
             throws IOException {
         int position = 0;
-        int total = out.length;
+        final int total = out.length;
 
         while (position < total) {
-            int n = in.read();
+            final int n = in.read();
 
             if (n > 128) {
-                int value = in.read();
+                final int value = in.read();
 
                 for (int i = 0; i < (n & 0x7f); i++) {
                     out[position++] = (byte) value;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/JpegImageData.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/JpegImageData.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/JpegImageData.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/JpegImageData.java Tue Dec  4 17:23:16 2012
@@ -18,12 +18,12 @@
 package org.apache.commons.imaging.formats.tiff;
 
 public class JpegImageData extends TiffElement.DataElement {
-    public JpegImageData(int offset, int length, final byte data[]) {
+    public JpegImageData(final int offset, final int length, final byte data[]) {
         super(offset, length, data);
     }
 
     @Override
-    public String getElementDescription(boolean verbose) {
+    public String getElementDescription(final boolean verbose) {
         return "Jpeg image data: " + data.length + " bytes";
     }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffContents.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffContents.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffContents.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffContents.java Tue Dec  4 17:23:16 2012
@@ -28,25 +28,25 @@ public class TiffContents {
     public final TiffHeader header;
     public final List<TiffDirectory> directories;
 
-    public TiffContents(TiffHeader tiffHeader, List<TiffDirectory> directories) {
+    public TiffContents(final TiffHeader tiffHeader, final List<TiffDirectory> directories) {
         this.header = tiffHeader;
         this.directories = directories;
     }
 
     public List<TiffElement> getElements() throws ImageReadException {
-        List<TiffElement> result = new ArrayList<TiffElement>();
+        final List<TiffElement> result = new ArrayList<TiffElement>();
 
         result.add(header);
 
         for (int i = 0; i < directories.size(); i++) {
-            TiffDirectory directory = directories.get(i);
+            final TiffDirectory directory = directories.get(i);
 
             result.add(directory);
 
-            List<TiffField> fields = directory.entries;
+            final List<TiffField> fields = directory.entries;
             for (int j = 0; j < fields.size(); j++) {
-                TiffField field = fields.get(j);
-                TiffElement oversizeValue = field.getOversizeValueElement();
+                final TiffField field = fields.get(j);
+                final TiffElement oversizeValue = field.getOversizeValueElement();
                 if (null != oversizeValue) {
                     result.add(oversizeValue);
                 }
@@ -63,11 +63,11 @@ public class TiffContents {
         return result;
     }
 
-    public TiffField findField(TagInfo tag) throws ImageReadException {
+    public TiffField findField(final TagInfo tag) throws ImageReadException {
         for (int i = 0; i < directories.size(); i++) {
-            TiffDirectory directory = directories.get(i);
+            final TiffDirectory directory = directories.get(i);
 
-            TiffField field = directory.findField(tag);
+            final TiffField field = directory.findField(tag);
             if (null != field) {
                 return field;
             }
@@ -76,14 +76,14 @@ public class TiffContents {
         return null;
     }
 
-    public void dissect(boolean verbose) throws ImageReadException {
-        List<TiffElement> elements = getElements();
+    public void dissect(final boolean verbose) throws ImageReadException {
+        final List<TiffElement> elements = getElements();
 
         Collections.sort(elements, TiffElement.COMPARATOR);
 
         int lastEnd = 0;
         for (int i = 0; i < elements.size(); i++) {
-            TiffElement element = elements.get(i);
+            final TiffElement element = elements.get(i);
 
             if (element.offset > lastEnd) {
                 Debug.debug("\t" + "gap: " + (element.offset - lastEnd));
@@ -97,7 +97,7 @@ public class TiffContents {
                     + (element.offset + element.length) + ": "
                     + element.getElementDescription(false));
             if (verbose) {
-                String verbosity = element.getElementDescription(true);
+                final String verbosity = element.getElementDescription(true);
                 if (null != verbosity) {
                     Debug.debug(verbosity);
                 }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java Tue Dec  4 17:23:16 2012
@@ -51,16 +51,16 @@ public class TiffDirectory extends TiffE
     }
 
     @Override
-    public String getElementDescription(boolean verbose) {
+    public String getElementDescription(final boolean verbose) {
         if (!verbose) {
             return "TIFF Directory (" + description() + ")";
         }
 
         int entryOffset = offset + TIFF_DIRECTORY_HEADER_LENGTH;
 
-        StringBuilder result = new StringBuilder();
+        final StringBuilder result = new StringBuilder();
         for (int i = 0; i < entries.size(); i++) {
-            TiffField entry = entries.get(i);
+            final TiffField entry = entries.get(i);
 
             result.append("\t");
             result.append("[" + entryOffset + "]: ");
@@ -79,7 +79,7 @@ public class TiffDirectory extends TiffE
         return result.toString();
     }
 
-    public static final String description(int type) {
+    public static final String description(final int type) {
         switch (type) {
         case DIRECTORY_TYPE_UNKNOWN:
             return "Unknown";
@@ -105,8 +105,8 @@ public class TiffDirectory extends TiffE
     // public final int offset;
     public final int nextDirectoryOffset;
 
-    public TiffDirectory(int type, List<TiffField> entries, final int offset,
-            int nextDirectoryOffset) {
+    public TiffDirectory(final int type, final List<TiffField> entries, final int offset,
+            final int nextDirectoryOffset) {
         super(offset, TIFF_DIRECTORY_HEADER_LENGTH + entries.size()
                 * TIFF_ENTRY_LENGTH + TIFF_DIRECTORY_FOOTER_LENGTH);
 
@@ -121,7 +121,7 @@ public class TiffDirectory extends TiffE
 
     public void dump() {
         for (int i = 0; i < entries.size(); i++) {
-            TiffField entry = entries.get(i);
+            final TiffField entry = entries.get(i);
             entry.dump();
         }
 
@@ -147,13 +147,13 @@ public class TiffDirectory extends TiffE
         return false;
     }
 
-    public BufferedImage getTiffImage(ByteOrder byteOrder) throws ImageReadException,
+    public BufferedImage getTiffImage(final ByteOrder byteOrder) throws ImageReadException,
             IOException {
-        Map<String,Object> params = null;
+        final Map<String,Object> params = null;
         return getTiffImage(byteOrder, params);
     }
 
-    public BufferedImage getTiffImage(ByteOrder byteOrder, Map<String,Object> params)
+    public BufferedImage getTiffImage(final ByteOrder byteOrder, final Map<String,Object> params)
             throws ImageReadException, IOException {
         if (null == tiffImageData) {
             return null;
@@ -162,19 +162,19 @@ public class TiffDirectory extends TiffE
         return new TiffImageParser().getBufferedImage(this, byteOrder, params);
     }
 
-    public TiffField findField(TagInfo tag) throws ImageReadException {
-        boolean failIfMissing = false;
+    public TiffField findField(final TagInfo tag) throws ImageReadException {
+        final boolean failIfMissing = false;
         return findField(tag, failIfMissing);
     }
 
-    public TiffField findField(TagInfo tag, boolean failIfMissing)
+    public TiffField findField(final TagInfo tag, final boolean failIfMissing)
             throws ImageReadException {
         if (entries == null) {
             return null;
         }
 
         for (int i = 0; i < entries.size(); i++) {
-            TiffField field = entries.get(i);
+            final TiffField field = entries.get(i);
             if (field.tag == tag.tag) {
                 return field;
             }
@@ -188,16 +188,16 @@ public class TiffDirectory extends TiffE
         return null;
     }
 
-    public Object getFieldValue(TagInfo tag) throws ImageReadException {
-        TiffField field = findField(tag);
+    public Object getFieldValue(final TagInfo tag) throws ImageReadException {
+        final TiffField field = findField(tag);
         if (field == null) {
             return null;
         }
         return field.getValue();
     }
 
-    public byte getSingleFieldValue(TagInfoByte tag) throws ImageReadException {
-        byte[] result = getFieldValue(tag, true);
+    public byte getSingleFieldValue(final TagInfoByte tag) throws ImageReadException {
+        final byte[] result = getFieldValue(tag, true);
         if (result.length != 1) {
             throw new ImageReadException("Field \"" + tag.name
                     + "\" has incorrect length " + result.length);
@@ -205,9 +205,9 @@ public class TiffDirectory extends TiffE
         return result[0];
     }
 
-    public String getSingleFieldValue(TagInfoAscii tag)
+    public String getSingleFieldValue(final TagInfoAscii tag)
             throws ImageReadException {
-        String[] result = getFieldValue(tag, true);
+        final String[] result = getFieldValue(tag, true);
         if (result.length != 1) {
             throw new ImageReadException("Field \"" + tag.name
                     + "\" has incorrect length " + result.length);
@@ -215,9 +215,9 @@ public class TiffDirectory extends TiffE
         return result[0];
     }
 
-    public short getSingleFieldValue(TagInfoShort tag)
+    public short getSingleFieldValue(final TagInfoShort tag)
             throws ImageReadException {
-        short[] result = getFieldValue(tag, true);
+        final short[] result = getFieldValue(tag, true);
         if (result.length != 1) {
             throw new ImageReadException("Field \"" + tag.name
                     + "\" has incorrect length " + result.length);
@@ -225,8 +225,8 @@ public class TiffDirectory extends TiffE
         return result[0];
     }
 
-    public int getSingleFieldValue(TagInfoLong tag) throws ImageReadException {
-        int[] result = getFieldValue(tag, true);
+    public int getSingleFieldValue(final TagInfoLong tag) throws ImageReadException {
+        final int[] result = getFieldValue(tag, true);
         if (result.length != 1) {
             throw new ImageReadException("Field \"" + tag.name
                     + "\" has incorrect length " + result.length);
@@ -234,9 +234,9 @@ public class TiffDirectory extends TiffE
         return result[0];
     }
 
-    public RationalNumber getSingleFieldValue(TagInfoRational tag)
+    public RationalNumber getSingleFieldValue(final TagInfoRational tag)
             throws ImageReadException {
-        RationalNumber[] result = getFieldValue(tag, true);
+        final RationalNumber[] result = getFieldValue(tag, true);
         if (result.length != 1) {
             throw new ImageReadException("Field \"" + tag.name
                     + "\" has incorrect length " + result.length);
@@ -244,8 +244,8 @@ public class TiffDirectory extends TiffE
         return result[0];
     }
 
-    public byte getSingleFieldValue(TagInfoSByte tag) throws ImageReadException {
-        byte[] result = getFieldValue(tag, true);
+    public byte getSingleFieldValue(final TagInfoSByte tag) throws ImageReadException {
+        final byte[] result = getFieldValue(tag, true);
         if (result.length != 1) {
             throw new ImageReadException("Field \"" + tag.name
                     + "\" has incorrect length " + result.length);
@@ -253,9 +253,9 @@ public class TiffDirectory extends TiffE
         return result[0];
     }
 
-    public short getSingleFieldValue(TagInfoSShort tag)
+    public short getSingleFieldValue(final TagInfoSShort tag)
             throws ImageReadException {
-        short[] result = getFieldValue(tag, true);
+        final short[] result = getFieldValue(tag, true);
         if (result.length != 1) {
             throw new ImageReadException("Field \"" + tag.name
                     + "\" has incorrect length " + result.length);
@@ -263,8 +263,8 @@ public class TiffDirectory extends TiffE
         return result[0];
     }
 
-    public int getSingleFieldValue(TagInfoSLong tag) throws ImageReadException {
-        int[] result = getFieldValue(tag, true);
+    public int getSingleFieldValue(final TagInfoSLong tag) throws ImageReadException {
+        final int[] result = getFieldValue(tag, true);
         if (result.length != 1) {
             throw new ImageReadException("Field \"" + tag.name
                     + "\" has incorrect length " + result.length);
@@ -272,9 +272,9 @@ public class TiffDirectory extends TiffE
         return result[0];
     }
 
-    public RationalNumber getSingleFieldValue(TagInfoSRational tag)
+    public RationalNumber getSingleFieldValue(final TagInfoSRational tag)
             throws ImageReadException {
-        RationalNumber[] result = getFieldValue(tag, true);
+        final RationalNumber[] result = getFieldValue(tag, true);
         if (result.length != 1) {
             throw new ImageReadException("Field \"" + tag.name
                     + "\" has incorrect length " + result.length);
@@ -282,9 +282,9 @@ public class TiffDirectory extends TiffE
         return result[0];
     }
 
-    public float getSingleFieldValue(TagInfoFloat tag)
+    public float getSingleFieldValue(final TagInfoFloat tag)
             throws ImageReadException {
-        float[] result = getFieldValue(tag, true);
+        final float[] result = getFieldValue(tag, true);
         if (result.length != 1) {
             throw new ImageReadException("Field \"" + tag.name
                     + "\" has incorrect length " + result.length);
@@ -292,9 +292,9 @@ public class TiffDirectory extends TiffE
         return result[0];
     }
 
-    public double getSingleFieldValue(TagInfoDouble tag)
+    public double getSingleFieldValue(final TagInfoDouble tag)
             throws ImageReadException {
-        double[] result = getFieldValue(tag, true);
+        final double[] result = getFieldValue(tag, true);
         if (result.length != 1) {
             throw new ImageReadException("Field \"" + tag.name
                     + "\" has incorrect length " + result.length);
@@ -302,9 +302,9 @@ public class TiffDirectory extends TiffE
         return result[0];
     }
 
-    public byte[] getFieldValue(TagInfoByte tag, boolean mustExist)
+    public byte[] getFieldValue(final TagInfoByte tag, final boolean mustExist)
             throws ImageReadException {
-        TiffField field = findField(tag);
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -324,9 +324,9 @@ public class TiffDirectory extends TiffE
         return field.fieldType.getRawBytes(field);
     }
 
-    public String[] getFieldValue(TagInfoAscii tag, boolean mustExist)
+    public String[] getFieldValue(final TagInfoAscii tag, final boolean mustExist)
             throws ImageReadException {
-        TiffField field = findField(tag);
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -343,13 +343,13 @@ public class TiffDirectory extends TiffE
                 return null;
             }
         }
-        byte[] bytes = field.fieldType.getRawBytes(field);
+        final byte[] bytes = field.fieldType.getRawBytes(field);
         return tag.getValue(field.byteOrder, bytes);
     }
 
-    public short[] getFieldValue(TagInfoShort tag, boolean mustExist)
+    public short[] getFieldValue(final TagInfoShort tag, final boolean mustExist)
             throws ImageReadException {
-        TiffField field = findField(tag);
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -366,13 +366,13 @@ public class TiffDirectory extends TiffE
                 return null;
             }
         }
-        byte[] bytes = field.fieldType.getRawBytes(field);
+        final byte[] bytes = field.fieldType.getRawBytes(field);
         return tag.getValue(field.byteOrder, bytes);
     }
 
-    public int[] getFieldValue(TagInfoLong tag, boolean mustExist)
+    public int[] getFieldValue(final TagInfoLong tag, final boolean mustExist)
             throws ImageReadException {
-        TiffField field = findField(tag);
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -389,13 +389,13 @@ public class TiffDirectory extends TiffE
                 return null;
             }
         }
-        byte[] bytes = field.fieldType.getRawBytes(field);
+        final byte[] bytes = field.fieldType.getRawBytes(field);
         return tag.getValue(field.byteOrder, bytes);
     }
 
-    public RationalNumber[] getFieldValue(TagInfoRational tag, boolean mustExist)
+    public RationalNumber[] getFieldValue(final TagInfoRational tag, final boolean mustExist)
             throws ImageReadException {
-        TiffField field = findField(tag);
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -412,13 +412,13 @@ public class TiffDirectory extends TiffE
                 return null;
             }
         }
-        byte[] bytes = field.fieldType.getRawBytes(field);
+        final byte[] bytes = field.fieldType.getRawBytes(field);
         return tag.getValue(field.byteOrder, bytes);
     }
 
-    public byte[] getFieldValue(TagInfoSByte tag, boolean mustExist)
+    public byte[] getFieldValue(final TagInfoSByte tag, final boolean mustExist)
             throws ImageReadException {
-        TiffField field = findField(tag);
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -438,9 +438,9 @@ public class TiffDirectory extends TiffE
         return field.fieldType.getRawBytes(field);
     }
 
-    public short[] getFieldValue(TagInfoSShort tag, boolean mustExist)
+    public short[] getFieldValue(final TagInfoSShort tag, final boolean mustExist)
             throws ImageReadException {
-        TiffField field = findField(tag);
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -457,13 +457,13 @@ public class TiffDirectory extends TiffE
                 return null;
             }
         }
-        byte[] bytes = field.fieldType.getRawBytes(field);
+        final byte[] bytes = field.fieldType.getRawBytes(field);
         return tag.getValue(field.byteOrder, bytes);
     }
 
-    public int[] getFieldValue(TagInfoSLong tag, boolean mustExist)
+    public int[] getFieldValue(final TagInfoSLong tag, final boolean mustExist)
             throws ImageReadException {
-        TiffField field = findField(tag);
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -480,13 +480,13 @@ public class TiffDirectory extends TiffE
                 return null;
             }
         }
-        byte[] bytes = field.fieldType.getRawBytes(field);
+        final byte[] bytes = field.fieldType.getRawBytes(field);
         return tag.getValue(field.byteOrder, bytes);
     }
 
-    public RationalNumber[] getFieldValue(TagInfoSRational tag,
-            boolean mustExist) throws ImageReadException {
-        TiffField field = findField(tag);
+    public RationalNumber[] getFieldValue(final TagInfoSRational tag,
+            final boolean mustExist) throws ImageReadException {
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -503,13 +503,13 @@ public class TiffDirectory extends TiffE
                 return null;
             }
         }
-        byte[] bytes = field.fieldType.getRawBytes(field);
+        final byte[] bytes = field.fieldType.getRawBytes(field);
         return tag.getValue(field.byteOrder, bytes);
     }
 
-    public float[] getFieldValue(TagInfoFloat tag, boolean mustExist)
+    public float[] getFieldValue(final TagInfoFloat tag, final boolean mustExist)
             throws ImageReadException {
-        TiffField field = findField(tag);
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -526,13 +526,13 @@ public class TiffDirectory extends TiffE
                 return null;
             }
         }
-        byte[] bytes = field.fieldType.getRawBytes(field);
+        final byte[] bytes = field.fieldType.getRawBytes(field);
         return tag.getValue(field.byteOrder, bytes);
     }
 
-    public double[] getFieldValue(TagInfoDouble tag, boolean mustExist)
+    public double[] getFieldValue(final TagInfoDouble tag, final boolean mustExist)
             throws ImageReadException {
-        TiffField field = findField(tag);
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -549,13 +549,13 @@ public class TiffDirectory extends TiffE
                 return null;
             }
         }
-        byte[] bytes = field.fieldType.getRawBytes(field);
+        final byte[] bytes = field.fieldType.getRawBytes(field);
         return tag.getValue(field.byteOrder, bytes);
     }
 
-    public String getFieldValue(TagInfoGpsText tag, boolean mustExist)
+    public String getFieldValue(final TagInfoGpsText tag, final boolean mustExist)
             throws ImageReadException {
-        TiffField field = findField(tag);
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -567,9 +567,9 @@ public class TiffDirectory extends TiffE
         return tag.getValue(field);
     }
 
-    public String getFieldValue(TagInfoXpString tag, boolean mustExist)
+    public String getFieldValue(final TagInfoXpString tag, final boolean mustExist)
             throws ImageReadException {
-        TiffField field = findField(tag);
+        final TiffField field = findField(tag);
         if (field == null) {
             if (mustExist) {
                 throw new ImageReadException("Required field \"" + tag.name
@@ -582,12 +582,12 @@ public class TiffDirectory extends TiffE
     }
 
     public static final class ImageDataElement extends TiffElement {
-        public ImageDataElement(int offset, int length) {
+        public ImageDataElement(final int offset, final int length) {
             super(offset, length);
         }
 
         @Override
-        public String getElementDescription(boolean verbose) {
+        public String getElementDescription(final boolean verbose) {
             if (verbose) {
                 return null;
             }
@@ -596,17 +596,17 @@ public class TiffDirectory extends TiffE
     }
 
     private List<ImageDataElement> getRawImageDataElements(
-            TiffField offsetsField, TiffField byteCountsField)
+            final TiffField offsetsField, final TiffField byteCountsField)
             throws ImageReadException {
-        int offsets[] = offsetsField.getIntArrayValue();
-        int byteCounts[] = byteCountsField.getIntArrayValue();
+        final int offsets[] = offsetsField.getIntArrayValue();
+        final int byteCounts[] = byteCountsField.getIntArrayValue();
 
         if (offsets.length != byteCounts.length) {
             throw new ImageReadException("offsets.length(" + offsets.length
                     + ") != byteCounts.length(" + byteCounts.length + ")");
         }
 
-        List<ImageDataElement> result = new ArrayList<ImageDataElement>();
+        final List<ImageDataElement> result = new ArrayList<ImageDataElement>();
         for (int i = 0; i < offsets.length; i++) {
             result.add(new ImageDataElement(offsets[i], byteCounts[i]));
         }
@@ -615,10 +615,10 @@ public class TiffDirectory extends TiffE
 
     public List<ImageDataElement> getTiffRawImageDataElements()
             throws ImageReadException {
-        TiffField tileOffsets = findField(TiffTagConstants.TIFF_TAG_TILE_OFFSETS);
-        TiffField tileByteCounts = findField(TiffTagConstants.TIFF_TAG_TILE_BYTE_COUNTS);
-        TiffField stripOffsets = findField(TiffTagConstants.TIFF_TAG_STRIP_OFFSETS);
-        TiffField stripByteCounts = findField(TiffTagConstants.TIFF_TAG_STRIP_BYTE_COUNTS);
+        final TiffField tileOffsets = findField(TiffTagConstants.TIFF_TAG_TILE_OFFSETS);
+        final TiffField tileByteCounts = findField(TiffTagConstants.TIFF_TAG_TILE_BYTE_COUNTS);
+        final TiffField stripOffsets = findField(TiffTagConstants.TIFF_TAG_STRIP_OFFSETS);
+        final TiffField stripByteCounts = findField(TiffTagConstants.TIFF_TAG_STRIP_BYTE_COUNTS);
 
         if ((tileOffsets != null) && (tileByteCounts != null)) {
             return getRawImageDataElements(tileOffsets, tileByteCounts);
@@ -630,10 +630,10 @@ public class TiffDirectory extends TiffE
     }
 
     public boolean imageDataInStrips() throws ImageReadException {
-        TiffField tileOffsets = findField(TiffTagConstants.TIFF_TAG_TILE_OFFSETS);
-        TiffField tileByteCounts = findField(TiffTagConstants.TIFF_TAG_TILE_BYTE_COUNTS);
-        TiffField stripOffsets = findField(TiffTagConstants.TIFF_TAG_STRIP_OFFSETS);
-        TiffField stripByteCounts = findField(TiffTagConstants.TIFF_TAG_STRIP_BYTE_COUNTS);
+        final TiffField tileOffsets = findField(TiffTagConstants.TIFF_TAG_TILE_OFFSETS);
+        final TiffField tileByteCounts = findField(TiffTagConstants.TIFF_TAG_TILE_BYTE_COUNTS);
+        final TiffField stripOffsets = findField(TiffTagConstants.TIFF_TAG_STRIP_OFFSETS);
+        final TiffField stripByteCounts = findField(TiffTagConstants.TIFF_TAG_STRIP_BYTE_COUNTS);
 
         if ((tileOffsets != null) && (tileByteCounts != null)) {
             return false;
@@ -648,13 +648,13 @@ public class TiffDirectory extends TiffE
 
     public ImageDataElement getJpegRawImageDataElement()
             throws ImageReadException {
-        TiffField jpegInterchangeFormat = findField(TiffTagConstants.TIFF_TAG_JPEG_INTERCHANGE_FORMAT);
-        TiffField jpegInterchangeFormatLength = findField(TiffTagConstants.TIFF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH);
+        final TiffField jpegInterchangeFormat = findField(TiffTagConstants.TIFF_TAG_JPEG_INTERCHANGE_FORMAT);
+        final TiffField jpegInterchangeFormatLength = findField(TiffTagConstants.TIFF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH);
 
         if ((jpegInterchangeFormat != null)
                 && (jpegInterchangeFormatLength != null)) {
-            int offset = jpegInterchangeFormat.getIntArrayValue()[0];
-            int byteCount = jpegInterchangeFormatLength.getIntArrayValue()[0];
+            final int offset = jpegInterchangeFormat.getIntArrayValue()[0];
+            final int byteCount = jpegInterchangeFormatLength.getIntArrayValue()[0];
 
             return new ImageDataElement(offset, byteCount);
         } else {
@@ -664,7 +664,7 @@ public class TiffDirectory extends TiffE
 
     private TiffImageData tiffImageData = null;
 
-    public void setTiffImageData(TiffImageData rawImageData) {
+    public void setTiffImageData(final TiffImageData rawImageData) {
         this.tiffImageData = rawImageData;
     }
 
@@ -674,7 +674,7 @@ public class TiffDirectory extends TiffE
 
     private JpegImageData jpegImageData = null;
 
-    public void setJpegImageData(JpegImageData value) {
+    public void setJpegImageData(final JpegImageData value) {
         this.jpegImageData = value;
     }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffElement.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffElement.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffElement.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffElement.java Tue Dec  4 17:23:16 2012
@@ -22,7 +22,7 @@ public abstract class TiffElement {
     public final int offset;
     public final int length;
 
-    public TiffElement(int offset, int length) {
+    public TiffElement(final int offset, final int length) {
         this.offset = offset;
         this.length = length;
     }
@@ -34,7 +34,7 @@ public abstract class TiffElement {
     public abstract String getElementDescription(boolean verbose);
 
     public static final Comparator<TiffElement> COMPARATOR = new Comparator<TiffElement>() {
-        public int compare(TiffElement e1, TiffElement e2) {
+        public int compare(final TiffElement e1, final TiffElement e2) {
             return e1.offset - e2.offset;
         }
     };
@@ -42,7 +42,7 @@ public abstract class TiffElement {
     public static abstract class DataElement extends TiffElement {
         public final byte data[];
 
-        public DataElement(int offset, int length, final byte data[]) {
+        public DataElement(final int offset, final int length, final byte data[]) {
             super(offset, length);
 
             this.data = data;
@@ -55,12 +55,12 @@ public abstract class TiffElement {
     }
 
     public static final class Stub extends TiffElement {
-        public Stub(int offset, int length) {
+        public Stub(final int offset, final int length) {
             super(offset, length);
         }
 
         @Override
-        public String getElementDescription(boolean verbose) {
+        public String getElementDescription(final boolean verbose) {
             return "Element, offset: " + offset + ", length: " + length
                     + ", last: " + (offset + length) + "";
         }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffField.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffField.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffField.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffField.java Tue Dec  4 17:23:16 2012
@@ -53,8 +53,8 @@ public class TiffField implements TiffCo
     public byte oversizeValue[] = null;
     public final ByteOrder byteOrder;
 
-    public TiffField(int tag, int directoryType, int type, int Length,
-            int ValueOffset, byte ValueOffsetBytes[], ByteOrder byteOrder) {
+    public TiffField(final int tag, final int directoryType, final int type, final int Length,
+            final int ValueOffset, final byte ValueOffsetBytes[], final ByteOrder byteOrder) {
 
         this.tag = tag;
         this.directoryType = directoryType;
@@ -79,12 +79,12 @@ public class TiffField implements TiffCo
     }
 
     public final class OversizeValueElement extends TiffElement {
-        public OversizeValueElement(int offset, int length) {
+        public OversizeValueElement(final int offset, final int length) {
             super(offset, length);
         }
 
         @Override
-        public String getElementDescription(boolean verbose) {
+        public String getElementDescription(final boolean verbose) {
             if (verbose) {
                 return null;
             }
@@ -102,13 +102,13 @@ public class TiffField implements TiffCo
         return new OversizeValueElement(valueOffset, oversizeValue.length);
     }
 
-    public void setOversizeValue(byte bytes[]) {
+    public void setOversizeValue(final byte bytes[]) {
         this.oversizeValue = bytes;
     }
 
-    private static FieldType getFieldType(int value) {
+    private static FieldType getFieldType(final int value) {
         for (int i = 0; i < FIELD_TYPES.size(); i++) {
-            FieldType fieldType = FIELD_TYPES.get(i);
+            final FieldType fieldType = FIELD_TYPES.get(i);
             if (fieldType.type == value) {
                 return fieldType;
             }
@@ -117,8 +117,8 @@ public class TiffField implements TiffCo
         return FIELD_TYPE_UNKNOWN;
     }
 
-    private static TagInfo getTag(int directoryType, int tag,
-            List<TagInfo> possibleMatches) {
+    private static TagInfo getTag(final int directoryType, final int tag,
+            final List<TagInfo> possibleMatches) {
         // Please keep this method in sync with TiffImageMetadata's findField()
 
         if (possibleMatches.size() < 1) {
@@ -132,7 +132,7 @@ public class TiffField implements TiffCo
 
         // first search for exact match.
         for (int i = 0; i < possibleMatches.size(); i++) {
-            TagInfo tagInfo = possibleMatches.get(i);
+            final TagInfo tagInfo = possibleMatches.get(i);
             if (tagInfo.directoryType == TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN) {
                 // pass
                 continue;
@@ -143,7 +143,7 @@ public class TiffField implements TiffCo
 
         // accept an inexact match.
         for (int i = 0; i < possibleMatches.size(); i++) {
-            TagInfo tagInfo = possibleMatches.get(i);
+            final TagInfo tagInfo = possibleMatches.get(i);
 
             if (tagInfo.directoryType == TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN) {
                 // pass
@@ -159,7 +159,7 @@ public class TiffField implements TiffCo
 
         // accept a wildcard match.
         for (int i = 0; i < possibleMatches.size(); i++) {
-            TagInfo tagInfo = possibleMatches.get(i);
+            final TagInfo tagInfo = possibleMatches.get(i);
 
             if (tagInfo.directoryType == TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN) {
                 return tagInfo;
@@ -247,20 +247,20 @@ public class TiffField implements TiffCo
         // return TIFF_TAG_UNKNOWN;
     }
 
-    private static TagInfo getTag(int directoryType, int tag) {
-        List<TagInfo> possibleMatches = ALL_TAG_MAP.get(tag);
+    private static TagInfo getTag(final int directoryType, final int tag) {
+        final List<TagInfo> possibleMatches = ALL_TAG_MAP.get(tag);
 
         if (null == possibleMatches) {
             return TiffTagConstants.TIFF_TAG_UNKNOWN;
         }
 
-        TagInfo result = getTag(directoryType, tag, possibleMatches);
+        final TagInfo result = getTag(directoryType, tag, possibleMatches);
         return result;
     }
 
     private int getValueLengthInBytes() {
-        int unit_length = fieldType.length;
-        int valueLength = unit_length * length;
+        final int unit_length = fieldType.length;
+        final int valueLength = unit_length * length;
 
         // Debug.debug("getValueLengthInBytes unit_length", unit_length);
         // Debug.debug("getValueLengthInBytes length", length);
@@ -268,14 +268,14 @@ public class TiffField implements TiffCo
         return valueLength;
     }
 
-    public void fillInValue(ByteSource byteSource) throws IOException,
+    public void fillInValue(final ByteSource byteSource) throws IOException,
             TiffValueOutsideFileBoundsException {
         if (fieldType.isLocalValue(this)) {
             return;
         }
 
-        int valueLength = getValueLengthInBytes();
-        long valueLengthLong = 0xffffffffL & valueLength;
+        final int valueLength = getValueLengthInBytes();
+        final long valueLengthLong = 0xffffffffL & valueLength;
 
         // Debug.debug("fillInValue tag", tag);
         // Debug.debug("fillInValue tagInfo", tagInfo);
@@ -290,19 +290,19 @@ public class TiffField implements TiffCo
                             + "which is outside the file's size of "
                             + byteSource.getLength());
         }
-        byte bytes[] = byteSource.getBlock(valueOffset, valueLength);
+        final byte bytes[] = byteSource.getBlock(valueOffset, valueLength);
         setOversizeValue(bytes);
     }
 
     public String getValueDescription() {
         try {
             return getValueDescription(getValue());
-        } catch (ImageReadException e) {
+        } catch (final ImageReadException e) {
             return "Invalid value: " + e.getMessage();
         }
     }
 
-    private String getValueDescription(Object o) {
+    private String getValueDescription(final Object o) {
         if (o == null) {
             return null;
         }
@@ -312,14 +312,14 @@ public class TiffField implements TiffCo
         } else if (o instanceof String) {
             return "'" + o.toString().trim() + "'";
         } else if (o instanceof Date) {
-            DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
+            final DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
             return df.format((Date) o);
         } else if (o instanceof Object[]) {
-            Object objects[] = (Object[]) o;
-            StringBuilder result = new StringBuilder();
+            final Object objects[] = (Object[]) o;
+            final StringBuilder result = new StringBuilder();
 
             for (int i = 0; i < objects.length; i++) {
-                Object object = objects[i];
+                final Object object = objects[i];
 
                 if (i > 50) {
                     result.append("... (" + objects.length + ")");
@@ -347,11 +347,11 @@ public class TiffField implements TiffCo
         // return result.toString();
         // }
         } else if (o instanceof short[]) {
-            short values[] = (short[]) o;
-            StringBuffer result = new StringBuffer();
+            final short values[] = (short[]) o;
+            final StringBuffer result = new StringBuffer();
 
             for (int i = 0; i < values.length; i++) {
-                short value = values[i];
+                final short value = values[i];
 
                 if (i > 50) {
                     result.append("... (" + values.length + ")");
@@ -364,11 +364,11 @@ public class TiffField implements TiffCo
             }
             return result.toString();
         } else if (o instanceof int[]) {
-            int values[] = (int[]) o;
-            StringBuffer result = new StringBuffer();
+            final int values[] = (int[]) o;
+            final StringBuffer result = new StringBuffer();
 
             for (int i = 0; i < values.length; i++) {
-                int value = values[i];
+                final int value = values[i];
 
                 if (i > 50) {
                     result.append("... (" + values.length + ")");
@@ -381,11 +381,11 @@ public class TiffField implements TiffCo
             }
             return result.toString();
         } else if (o instanceof long[]) {
-            long values[] = (long[]) o;
-            StringBuffer result = new StringBuffer();
+            final long values[] = (long[]) o;
+            final StringBuffer result = new StringBuffer();
 
             for (int i = 0; i < values.length; i++) {
-                long value = values[i];
+                final long value = values[i];
 
                 if (i > 50) {
                     result.append("... (" + values.length + ")");
@@ -398,11 +398,11 @@ public class TiffField implements TiffCo
             }
             return result.toString();
         } else if (o instanceof double[]) {
-            double values[] = (double[]) o;
-            StringBuffer result = new StringBuffer();
+            final double values[] = (double[]) o;
+            final StringBuffer result = new StringBuffer();
 
             for (int i = 0; i < values.length; i++) {
-                double value = values[i];
+                final double value = values[i];
 
                 if (i > 50) {
                     result.append("... (" + values.length + ")");
@@ -415,11 +415,11 @@ public class TiffField implements TiffCo
             }
             return result.toString();
         } else if (o instanceof byte[]) {
-            byte values[] = (byte[]) o;
-            StringBuffer result = new StringBuffer();
+            final byte values[] = (byte[]) o;
+            final StringBuffer result = new StringBuffer();
 
             for (int i = 0; i < values.length; i++) {
-                byte value = values[i];
+                final byte value = values[i];
 
                 if (i > 50) {
                     result.append("... (" + values.length + ")");
@@ -432,11 +432,11 @@ public class TiffField implements TiffCo
             }
             return result.toString();
         } else if (o instanceof char[]) {
-            char values[] = (char[]) o;
-            StringBuffer result = new StringBuffer();
+            final char values[] = (char[]) o;
+            final StringBuffer result = new StringBuffer();
 
             for (int i = 0; i < values.length; i++) {
-                char value = values[i];
+                final char value = values[i];
 
                 if (i > 50) {
                     result.append("... (" + values.length + ")");
@@ -449,11 +449,11 @@ public class TiffField implements TiffCo
             }
             return result.toString();
         } else if (o instanceof float[]) {
-            float values[] = (float[]) o;
-            StringBuffer result = new StringBuffer();
+            final float values[] = (float[]) o;
+            final StringBuffer result = new StringBuffer();
 
             for (int i = 0; i < values.length; i++) {
-                float value = values[i];
+                final float value = values[i];
 
                 if (i > 50) {
                     result.append("... (" + values.length + ")");
@@ -486,16 +486,16 @@ public class TiffField implements TiffCo
     }
 
     public void dump() {
-        PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out, Charset.defaultCharset()));
+        final PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out, Charset.defaultCharset()));
         dump(pw);
         pw.flush();
     }
 
-    public void dump(PrintWriter pw) {
+    public void dump(final PrintWriter pw) {
         dump(pw, null);
     }
 
-    public void dump(PrintWriter pw, String prefix) {
+    public void dump(final PrintWriter pw, final String prefix) {
         if (prefix != null) {
             pw.print(prefix + ": ");
         }
@@ -524,7 +524,7 @@ public class TiffField implements TiffCo
 
     @Override
     public String toString() {
-        StringBuilder result = new StringBuilder();
+        final StringBuilder result = new StringBuilder();
 
         result.append(tag + " (0x" + Integer.toHexString(tag) + ": "
                 + tagInfo.name + "): ");
@@ -553,7 +553,7 @@ public class TiffField implements TiffCo
     }
 
     public String getStringValue() throws ImageReadException {
-        Object o = getValue();
+        final Object o = getValue();
         if (o == null) {
             return null;
         }
@@ -565,12 +565,12 @@ public class TiffField implements TiffCo
     }
 
     private static final Map<Object, List<TagInfo>> makeTagMap(
-            List<TagInfo> tags, boolean ignoreDuplicates, String name) {
+            final List<TagInfo> tags, final boolean ignoreDuplicates, final String name) {
         // make sure to use the thread-safe version; this is shared state.
-        Map<Object, List<TagInfo>> map = new Hashtable<Object, List<TagInfo>>();
+        final Map<Object, List<TagInfo>> map = new Hashtable<Object, List<TagInfo>>();
 
         for (int i = 0; i < tags.size(); i++) {
-            TagInfo tag = tags.get(i);
+            final TagInfo tag = tags.get(i);
 
             List<TagInfo> tagList = map.get(tag.tag);
             if (tagList == null) {
@@ -631,29 +631,29 @@ public class TiffField implements TiffCo
     //
 
     public int[] getIntArrayValue() throws ImageReadException {
-        Object o = getValue();
+        final Object o = getValue();
         // if (o == null)
         // return null;
 
         if (o instanceof Number) {
             return new int[] { ((Number) o).intValue() };
         } else if (o instanceof Number[]) {
-            Number numbers[] = (Number[]) o;
-            int result[] = new int[numbers.length];
+            final Number numbers[] = (Number[]) o;
+            final int result[] = new int[numbers.length];
             for (int i = 0; i < numbers.length; i++) {
                 result[i] = numbers[i].intValue();
             }
             return result;
         } else if (o instanceof short[]) {
-            short numbers[] = (short[]) o;
-            int result[] = new int[numbers.length];
+            final short numbers[] = (short[]) o;
+            final int result[] = new int[numbers.length];
             for (int i = 0; i < numbers.length; i++) {
                 result[i] = 0xffff & numbers[i];
             }
             return result;
         } else if (o instanceof int[]) {
-            int numbers[] = (int[]) o;
-            int result[] = new int[numbers.length];
+            final int numbers[] = (int[]) o;
+            final int result[] = new int[numbers.length];
             for (int i = 0; i < numbers.length; i++) {
                 result[i] = numbers[i];
             }
@@ -666,43 +666,43 @@ public class TiffField implements TiffCo
     }
 
     public double[] getDoubleArrayValue() throws ImageReadException {
-        Object o = getValue();
+        final Object o = getValue();
         // if (o == null)
         // return null;
 
         if (o instanceof Number) {
             return new double[] { ((Number) o).doubleValue() };
         } else if (o instanceof Number[]) {
-            Number numbers[] = (Number[]) o;
-            double result[] = new double[numbers.length];
+            final Number numbers[] = (Number[]) o;
+            final double result[] = new double[numbers.length];
             for (int i = 0; i < numbers.length; i++) {
                 result[i] = numbers[i].doubleValue();
             }
             return result;
         } else if (o instanceof short[]) {
-            short numbers[] = (short[]) o;
-            double result[] = new double[numbers.length];
+            final short numbers[] = (short[]) o;
+            final double result[] = new double[numbers.length];
             for (int i = 0; i < numbers.length; i++) {
                 result[i] = numbers[i];
             }
             return result;
         } else if (o instanceof int[]) {
-            int numbers[] = (int[]) o;
-            double result[] = new double[numbers.length];
+            final int numbers[] = (int[]) o;
+            final double result[] = new double[numbers.length];
             for (int i = 0; i < numbers.length; i++) {
                 result[i] = numbers[i];
             }
             return result;
         } else if (o instanceof float[]) {
-            float numbers[] = (float[]) o;
-            double result[] = new double[numbers.length];
+            final float numbers[] = (float[]) o;
+            final double result[] = new double[numbers.length];
             for (int i = 0; i < numbers.length; i++) {
                 result[i] = numbers[i];
             }
             return result;
         } else if (o instanceof double[]) {
-            double numbers[] = (double[]) o;
-            double result[] = new double[numbers.length];
+            final double numbers[] = (double[]) o;
+            final double result[] = new double[numbers.length];
             for (int i = 0; i < numbers.length; i++) {
                 result[i] = numbers[i];
             }
@@ -715,30 +715,30 @@ public class TiffField implements TiffCo
     }
 
     public int getIntValueOrArraySum() throws ImageReadException {
-        Object o = getValue();
+        final Object o = getValue();
         // if (o == null)
         // return -1;
 
         if (o instanceof Number) {
             return ((Number) o).intValue();
         } else if (o instanceof Number[]) {
-            Number numbers[] = (Number[]) o;
+            final Number numbers[] = (Number[]) o;
             int sum = 0;
-            for (Number number : numbers) {
+            for (final Number number : numbers) {
                 sum += number.intValue();
             }
             return sum;
         } else if (o instanceof short[]) {
-            short[] numbers = (short[]) o;
+            final short[] numbers = (short[]) o;
             int sum = 0;
-            for (short number : numbers) {
+            for (final short number : numbers) {
                 sum += number;
             }
             return sum;
         } else if (o instanceof int[]) {
-            int numbers[] = (int[]) o;
+            final int numbers[] = (int[]) o;
             int sum = 0;
-            for (int number : numbers) {
+            for (final int number : numbers) {
                 sum += number;
             }
             return sum;
@@ -750,7 +750,7 @@ public class TiffField implements TiffCo
     }
 
     public int getIntValue() throws ImageReadException {
-        Object o = getValue();
+        final Object o = getValue();
         if (o == null) {
             throw new ImageReadException("Missing value: "
                     + tagInfo.getDescription());
@@ -760,7 +760,7 @@ public class TiffField implements TiffCo
     }
 
     public double getDoubleValue() throws ImageReadException {
-        Object o = getValue();
+        final Object o = getValue();
         if (o == null) {
             throw new ImageReadException("Missing value: "
                     + tagInfo.getDescription());
@@ -777,7 +777,7 @@ public class TiffField implements TiffCo
         return sortHint;
     }
 
-    public void setSortHint(int sortHint) {
+    public void setSortHint(final int sortHint) {
         this.sortHint = sortHint;
     }
 }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffHeader.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffHeader.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffHeader.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffHeader.java Tue Dec  4 17:23:16 2012
@@ -24,7 +24,7 @@ public class TiffHeader extends TiffElem
     public final int tiffVersion;
     public final int offsetToFirstIFD;
 
-    public TiffHeader(final ByteOrder byteOrder, int tiffVersion, int offsetToFirstIFD) {
+    public TiffHeader(final ByteOrder byteOrder, final int tiffVersion, final int offsetToFirstIFD) {
         super(0, TiffConstants.TIFF_HEADER_SIZE);
 
         this.byteOrder = byteOrder;
@@ -33,7 +33,7 @@ public class TiffHeader extends TiffElem
     }
 
     @Override
-    public String getElementDescription(boolean verbose) {
+    public String getElementDescription(final boolean verbose) {
         if (verbose) {
             return null;
         }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageData.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageData.java?rev=1417043&r1=1417042&r2=1417043&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageData.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageData.java Tue Dec  4 17:23:16 2012
@@ -52,11 +52,11 @@ public abstract class TiffImageData {
         }
 
         @Override
-        public DataReader getDataReader(TiffDirectory directory,
-                PhotometricInterpreter photometricInterpreter,
-                int bitsPerPixel, int bitsPerSample[], int predictor,
-                int samplesPerPixel, int width, int height, int compression,
-                ByteOrder byteOrder) throws IOException, ImageReadException {
+        public DataReader getDataReader(final TiffDirectory directory,
+                final PhotometricInterpreter photometricInterpreter,
+                final int bitsPerPixel, final int bitsPerSample[], final int predictor,
+                final int samplesPerPixel, final int width, final int height, final int compression,
+                final ByteOrder byteOrder) throws IOException, ImageReadException {
             return new DataReaderTiled(directory, photometricInterpreter,
                     tileWidth, tileLength, bitsPerPixel, bitsPerSample,
                     predictor, samplesPerPixel, width, height, compression,
@@ -91,11 +91,11 @@ public abstract class TiffImageData {
         }
 
         @Override
-        public DataReader getDataReader(TiffDirectory directory,
-                PhotometricInterpreter photometricInterpreter,
-                int bitsPerPixel, int bitsPerSample[], int predictor,
-                int samplesPerPixel, int width, int height, int compression,
-                ByteOrder byteorder) throws IOException, ImageReadException {
+        public DataReader getDataReader(final TiffDirectory directory,
+                final PhotometricInterpreter photometricInterpreter,
+                final int bitsPerPixel, final int bitsPerSample[], final int predictor,
+                final int samplesPerPixel, final int width, final int height, final int compression,
+                final ByteOrder byteorder) throws IOException, ImageReadException {
             return new DataReaderStrips(directory, photometricInterpreter,
                     bitsPerPixel, bitsPerSample, predictor, samplesPerPixel,
                     width, height, compression, byteorder, rowsPerStrip, this);
@@ -121,12 +121,12 @@ public abstract class TiffImageData {
             ImageReadException;
 
     public static class Data extends TiffElement.DataElement {
-        public Data(int offset, int length, final byte data[]) {
+        public Data(final int offset, final int length, final byte data[]) {
             super(offset, length, data);
         }
 
         @Override
-        public String getElementDescription(boolean verbose) {
+        public String getElementDescription(final boolean verbose) {
             return "Tiff image data: " + data.length + " bytes";
         }
 
@@ -135,13 +135,13 @@ public abstract class TiffImageData {
     public static class ByteSourceData extends Data {
         ByteSourceFile byteSourceFile;
 
-        public ByteSourceData(int offset, int length, ByteSourceFile byteSource) {
+        public ByteSourceData(final int offset, final int length, final ByteSourceFile byteSource) {
             super(offset, length, new byte[0]);
             byteSourceFile = byteSource;
         }
 
         @Override
-        public String getElementDescription(boolean verbose) {
+        public String getElementDescription(final boolean verbose) {
             return "Tiff image data: " + data.length + " bytes";
         }
 
@@ -149,7 +149,7 @@ public abstract class TiffImageData {
         public byte[] getData() {
             try {
                 return byteSourceFile.getBlock(offset, length);
-            } catch (IOException ioex) {
+            } catch (final IOException ioex) {
             }
             return new byte[0];
         }



Mime
View raw message