commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1415850 [3/15] - in /commons/proper/io/trunk/src: main/java/org/apache/commons/io/ main/java/org/apache/commons/io/comparator/ main/java/org/apache/commons/io/filefilter/ main/java/org/apache/commons/io/input/ main/java/org/apache/commons/...
Date Fri, 30 Nov 2012 20:52:08 GMT
Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOCase.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOCase.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOCase.java Fri Nov 30 20:51:39 2012
@@ -77,7 +77,7 @@ public final class IOCase implements Ser
      * @return the IOCase object
      * @throws IllegalArgumentException if the name is invalid
      */
-    public static IOCase forName(String name) {
+    public static IOCase forName(final String name) {
         if (IOCase.SENSITIVE.name.equals(name)){
             return IOCase.SENSITIVE;
         }
@@ -97,7 +97,7 @@ public final class IOCase implements Ser
      * @param name  the name
      * @param sensitive  the sensitivity
      */
-    private IOCase(String name, boolean sensitive) {
+    private IOCase(final String name, final boolean sensitive) {
         this.name = name;
         this.sensitive = sensitive;
     }
@@ -143,7 +143,7 @@ public final class IOCase implements Ser
      * @return true if equal using the case rules
      * @throws NullPointerException if either string is null
      */
-    public int checkCompareTo(String str1, String str2) {
+    public int checkCompareTo(final String str1, final String str2) {
         if (str1 == null || str2 == null) {
             throw new NullPointerException("The strings must not be null");
         }
@@ -161,7 +161,7 @@ public final class IOCase implements Ser
      * @return true if equal using the case rules
      * @throws NullPointerException if either string is null
      */
-    public boolean checkEquals(String str1, String str2) {
+    public boolean checkEquals(final String str1, final String str2) {
         if (str1 == null || str2 == null) {
             throw new NullPointerException("The strings must not be null");
         }
@@ -179,7 +179,7 @@ public final class IOCase implements Ser
      * @return true if equal using the case rules
      * @throws NullPointerException if either string is null
      */
-    public boolean checkStartsWith(String str, String start) {
+    public boolean checkStartsWith(final String str, final String start) {
         return str.regionMatches(!sensitive, 0, start, 0, start.length());
     }
 
@@ -194,8 +194,8 @@ public final class IOCase implements Ser
      * @return true if equal using the case rules
      * @throws NullPointerException if either string is null
      */
-    public boolean checkEndsWith(String str, String end) {
-        int endLen = end.length();
+    public boolean checkEndsWith(final String str, final String end) {
+        final int endLen = end.length();
         return str.regionMatches(!sensitive, str.length() - endLen, end, 0, endLen);
     }
 
@@ -214,8 +214,8 @@ public final class IOCase implements Ser
      * @throws NullPointerException if either string is null
      * @since 2.0
      */
-    public int checkIndexOf(String str, int strStartIndex, String search) {
-        int endIndex = str.length() - search.length();
+    public int checkIndexOf(final String str, final int strStartIndex, final String search) {
+        final int endIndex = str.length() - search.length();
         if (endIndex >= strStartIndex) {
             for (int i = strStartIndex; i <= endIndex; i++) {
                 if (checkRegionMatches(str, i, search)) {
@@ -238,7 +238,7 @@ public final class IOCase implements Ser
      * @return true if equal using the case rules
      * @throws NullPointerException if either string is null
      */
-    public boolean checkRegionMatches(String str, int strStartIndex, String search) {
+    public boolean checkRegionMatches(final String str, final int strStartIndex, final String search) {
         return str.regionMatches(!sensitive, strStartIndex, search, 0, search.length());
     }
 

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOExceptionWithCause.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOExceptionWithCause.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOExceptionWithCause.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOExceptionWithCause.java Fri Nov 30 20:51:39 2012
@@ -45,7 +45,7 @@ public class IOExceptionWithCause extend
      * @param cause
      *            the cause (see {@link #getCause()}). A {@code null} value is allowed.
      */
-    public IOExceptionWithCause(String message, Throwable cause) {
+    public IOExceptionWithCause(final String message, final Throwable cause) {
         super(message);
         this.initCause(cause);
     }
@@ -60,7 +60,7 @@ public class IOExceptionWithCause extend
      * @param cause
      *            the cause (see {@link #getCause()}). A {@code null} value is allowed.
      */
-    public IOExceptionWithCause(Throwable cause) {
+    public IOExceptionWithCause(final Throwable cause) {
         super(cause == null ? null : cause.toString());
         this.initCause(cause);
     }

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOUtils.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOUtils.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOUtils.java Fri Nov 30 20:51:39 2012
@@ -116,8 +116,8 @@ public class IOUtils {
     
     static {
         // avoid security issues
-        StringBuilderWriter buf = new StringBuilderWriter(4);
-        PrintWriter out = new PrintWriter(buf);
+        final StringBuilderWriter buf = new StringBuilderWriter(4);
+        final PrintWriter out = new PrintWriter(buf);
         out.println();
         LINE_SEPARATOR = buf.toString();
         out.close();
@@ -162,7 +162,7 @@ public class IOUtils {
      * @param conn the connection to close.
      * @since 2.4
      */
-    public static void close(URLConnection conn) {
+    public static void close(final URLConnection conn) {
         if (conn instanceof HttpURLConnection) {
             ((HttpURLConnection) conn).disconnect();
         }
@@ -191,7 +191,7 @@ public class IOUtils {
      * 
      * @param input  the Reader to close, may be null or already closed
      */
-    public static void closeQuietly(Reader input) {
+    public static void closeQuietly(final Reader input) {
         closeQuietly((Closeable)input);
     }
 
@@ -217,7 +217,7 @@ public class IOUtils {
      *
      * @param output  the Writer to close, may be null or already closed
      */
-    public static void closeQuietly(Writer output) {
+    public static void closeQuietly(final Writer output) {
         closeQuietly((Closeable)output);
     }
 
@@ -244,7 +244,7 @@ public class IOUtils {
      *
      * @param input  the InputStream to close, may be null or already closed
      */
-    public static void closeQuietly(InputStream input) {
+    public static void closeQuietly(final InputStream input) {
         closeQuietly((Closeable)input);
     }
 
@@ -272,7 +272,7 @@ public class IOUtils {
      *
      * @param output  the OutputStream to close, may be null or already closed
      */
-    public static void closeQuietly(OutputStream output) {
+    public static void closeQuietly(final OutputStream output) {
         closeQuietly((Closeable)output);
     }
     
@@ -299,12 +299,12 @@ public class IOUtils {
      * @param closeable the object to close, may be null or already closed
      * @since 2.0
      */
-    public static void closeQuietly(Closeable closeable) {
+    public static void closeQuietly(final Closeable closeable) {
         try {
             if (closeable != null) {
                 closeable.close();
             }
-        } catch (IOException ioe) {
+        } catch (final IOException ioe) {
             // ignore
         }
     }
@@ -332,11 +332,11 @@ public class IOUtils {
      * @param sock the Socket to close, may be null or already closed
      * @since 2.0
      */
-    public static void closeQuietly(Socket sock){
+    public static void closeQuietly(final Socket sock){
         if (sock != null){
             try {
                 sock.close();
-            } catch (IOException ioe) {
+            } catch (final IOException ioe) {
                 // ignored
             }
         }
@@ -365,11 +365,11 @@ public class IOUtils {
      * @param selector the Selector to close, may be null or already closed
      * @since 2.2
      */
-    public static void closeQuietly(Selector selector){
+    public static void closeQuietly(final Selector selector){
         if (selector != null){
             try {
               selector.close();
-            } catch (IOException ioe) {
+            } catch (final IOException ioe) {
                 // ignored
             }
         }
@@ -398,11 +398,11 @@ public class IOUtils {
      * @param sock the ServerSocket to close, may be null or already closed
      * @since 2.2
      */
-    public static void closeQuietly(ServerSocket sock){
+    public static void closeQuietly(final ServerSocket sock){
         if (sock != null){
             try {
                 sock.close();
-            } catch (IOException ioe) {
+            } catch (final IOException ioe) {
                 // ignored
             }
         }
@@ -429,7 +429,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.0
      */
-    public static InputStream toBufferedInputStream(InputStream input) throws IOException {
+    public static InputStream toBufferedInputStream(final InputStream input) throws IOException {
         return ByteArrayOutputStream.toBufferedInputStream(input);
     }
 
@@ -442,7 +442,7 @@ public class IOUtils {
      * @return the given reader or a new {@link BufferedReader} for the given reader
      * @since 2.2
      */
-    public static BufferedReader toBufferedReader(Reader reader) {
+    public static BufferedReader toBufferedReader(final Reader reader) {
         return reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader);
     }
     
@@ -459,8 +459,8 @@ public class IOUtils {
      * @throws NullPointerException if the input is null
      * @throws IOException if an I/O error occurs
      */
-    public static byte[] toByteArray(InputStream input) throws IOException {
-        ByteArrayOutputStream output = new ByteArrayOutputStream();
+    public static byte[] toByteArray(final InputStream input) throws IOException {
+        final ByteArrayOutputStream output = new ByteArrayOutputStream();
         copy(input, output);
         return output.toByteArray();
     }
@@ -481,7 +481,7 @@ public class IOUtils {
      * @see IOUtils#toByteArray(java.io.InputStream, int)
      * @since 2.1
      */
-    public static byte[] toByteArray(InputStream input, long size) throws IOException {
+    public static byte[] toByteArray(final InputStream input, final long size) throws IOException {
 
       if(size > Integer.MAX_VALUE) {
           throw new IllegalArgumentException("Size cannot be greater than Integer max value: " + size);
@@ -501,7 +501,7 @@ public class IOUtils {
      * @throws IllegalArgumentException if size is less than zero
      * @since 2.1
      */
-    public static byte[] toByteArray(InputStream input, int size) throws IOException {
+    public static byte[] toByteArray(final InputStream input, final int size) throws IOException {
 
         if (size < 0) {
             throw new IllegalArgumentException("Size must be equal or greater than zero: " + size);
@@ -511,7 +511,7 @@ public class IOUtils {
             return new byte[0];
         }
 
-        byte[] data = new byte[size];
+        final byte[] data = new byte[size];
         int offset = 0;
         int readed;
 
@@ -538,7 +538,7 @@ public class IOUtils {
      * @throws NullPointerException if the input is null
      * @throws IOException if an I/O error occurs
      */
-    public static byte[] toByteArray(Reader input) throws IOException {
+    public static byte[] toByteArray(final Reader input) throws IOException {
         return toByteArray(input, Charset.defaultCharset());
     }
 
@@ -556,8 +556,8 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.3
      */
-    public static byte[] toByteArray(Reader input, Charset encoding) throws IOException {
-        ByteArrayOutputStream output = new ByteArrayOutputStream();
+    public static byte[] toByteArray(final Reader input, final Charset encoding) throws IOException {
+        final ByteArrayOutputStream output = new ByteArrayOutputStream();
         copy(input, output, encoding);
         return output.toByteArray();
     }
@@ -582,7 +582,7 @@ public class IOUtils {
      *             supported.
      * @since 1.1
      */
-    public static byte[] toByteArray(Reader input, String encoding) throws IOException {
+    public static byte[] toByteArray(final Reader input, final String encoding) throws IOException {
         return toByteArray(input, Charsets.toCharset(encoding));
     }
 
@@ -599,7 +599,7 @@ public class IOUtils {
      * @deprecated Use {@link String#getBytes()}
      */
     @Deprecated
-    public static byte[] toByteArray(String input) throws IOException {
+    public static byte[] toByteArray(final String input) throws IOException {
         return input.getBytes();
     }
 
@@ -615,7 +615,7 @@ public class IOUtils {
      *             if an I/O exception occurs
      * @since 2.4
      */
-    public static byte[] toByteArray(URI uri) throws IOException {
+    public static byte[] toByteArray(final URI uri) throws IOException {
         return IOUtils.toByteArray(uri.toURL());
     }
 
@@ -631,8 +631,8 @@ public class IOUtils {
      *             if an I/O exception occurs
      * @since 2.4
      */
-    public static byte[] toByteArray(URL url) throws IOException {
-        URLConnection conn = url.openConnection();
+    public static byte[] toByteArray(final URL url) throws IOException {
+        final URLConnection conn = url.openConnection();
         try {
             return IOUtils.toByteArray(conn);
         } finally {
@@ -652,8 +652,8 @@ public class IOUtils {
      *             if an I/O exception occurs
      * @since 2.4
      */
-    public static byte[] toByteArray(URLConnection urlConn) throws IOException {
-        InputStream inputStream = urlConn.getInputStream();
+    public static byte[] toByteArray(final URLConnection urlConn) throws IOException {
+        final InputStream inputStream = urlConn.getInputStream();
         try {
             return IOUtils.toByteArray(inputStream);
         } finally {
@@ -676,7 +676,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static char[] toCharArray(InputStream is) throws IOException {
+    public static char[] toCharArray(final InputStream is) throws IOException {
         return toCharArray(is, Charset.defaultCharset());
     }
 
@@ -694,9 +694,9 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.3
      */
-    public static char[] toCharArray(InputStream is, Charset encoding)
+    public static char[] toCharArray(final InputStream is, final Charset encoding)
             throws IOException {
-        CharArrayWriter output = new CharArrayWriter();
+        final CharArrayWriter output = new CharArrayWriter();
         copy(is, output, encoding);
         return output.toCharArray();
     }
@@ -721,7 +721,7 @@ public class IOUtils {
      *             supported.
      * @since 1.1
      */
-    public static char[] toCharArray(InputStream is, String encoding) throws IOException {
+    public static char[] toCharArray(final InputStream is, final String encoding) throws IOException {
         return toCharArray(is, Charsets.toCharset(encoding));
     }
 
@@ -737,8 +737,8 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static char[] toCharArray(Reader input) throws IOException {
-        CharArrayWriter sw = new CharArrayWriter();
+    public static char[] toCharArray(final Reader input) throws IOException {
+        final CharArrayWriter sw = new CharArrayWriter();
         copy(input, sw);
         return sw.toCharArray();
     }
@@ -757,7 +757,7 @@ public class IOUtils {
      * @throws NullPointerException if the input is null
      * @throws IOException if an I/O error occurs
      */
-    public static String toString(InputStream input) throws IOException {
+    public static String toString(final InputStream input) throws IOException {
         return toString(input, Charset.defaultCharset());
     }
 
@@ -775,8 +775,8 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.3
      */
-    public static String toString(InputStream input, Charset encoding) throws IOException {
-        StringBuilderWriter sw = new StringBuilderWriter();
+    public static String toString(final InputStream input, final Charset encoding) throws IOException {
+        final StringBuilderWriter sw = new StringBuilderWriter();
         copy(input, sw, encoding);
         return sw.toString();
     }
@@ -800,7 +800,7 @@ public class IOUtils {
      *             thrown instead of {@link UnsupportedEncodingException} in version 2.2 if the encoding is not
      *             supported.
      */
-    public static String toString(InputStream input, String encoding)
+    public static String toString(final InputStream input, final String encoding)
             throws IOException {
         return toString(input, Charsets.toCharset(encoding));
     }
@@ -816,8 +816,8 @@ public class IOUtils {
      * @throws NullPointerException if the input is null
      * @throws IOException if an I/O error occurs
      */
-    public static String toString(Reader input) throws IOException {
-        StringBuilderWriter sw = new StringBuilderWriter();
+    public static String toString(final Reader input) throws IOException {
+        final StringBuilderWriter sw = new StringBuilderWriter();
         copy(input, sw);
         return sw.toString();
     }
@@ -831,7 +831,7 @@ public class IOUtils {
      * @throws IOException if an I/O exception occurs.
      * @since 2.1
      */
-    public static String toString(URI uri) throws IOException {
+    public static String toString(final URI uri) throws IOException {
         return toString(uri, Charset.defaultCharset());
     }
 
@@ -846,7 +846,7 @@ public class IOUtils {
      * @throws IOException if an I/O exception occurs.
      * @since 2.3.
      */
-    public static String toString(URI uri, Charset encoding) throws IOException {
+    public static String toString(final URI uri, final Charset encoding) throws IOException {
         return toString(uri.toURL(), Charsets.toCharset(encoding));
     }
 
@@ -864,7 +864,7 @@ public class IOUtils {
      *             supported.
      * @since 2.1
      */
-    public static String toString(URI uri, String encoding) throws IOException {
+    public static String toString(final URI uri, final String encoding) throws IOException {
         return toString(uri, Charsets.toCharset(encoding));
     }
 
@@ -877,7 +877,7 @@ public class IOUtils {
      * @throws IOException if an I/O exception occurs.
      * @since 2.1
      */
-    public static String toString(URL url) throws IOException {
+    public static String toString(final URL url) throws IOException {
         return toString(url, Charset.defaultCharset());
     }
 
@@ -892,8 +892,8 @@ public class IOUtils {
      * @throws IOException if an I/O exception occurs.
      * @since 2.3
      */
-    public static String toString(URL url, Charset encoding) throws IOException {
-        InputStream inputStream = url.openStream();
+    public static String toString(final URL url, final Charset encoding) throws IOException {
+        final InputStream inputStream = url.openStream();
         try {
             return toString(inputStream, encoding);
         } finally {
@@ -915,7 +915,7 @@ public class IOUtils {
      *             supported.
      * @since 2.1
      */
-    public static String toString(URL url, String encoding) throws IOException {
+    public static String toString(final URL url, final String encoding) throws IOException {
         return toString(url, Charsets.toCharset(encoding));
     }
 
@@ -930,7 +930,7 @@ public class IOUtils {
      * @deprecated Use {@link String#String(byte[])}
      */
     @Deprecated
-    public static String toString(byte[] input) throws IOException {
+    public static String toString(final byte[] input) throws IOException {
         return new String(input);
     }
 
@@ -947,7 +947,7 @@ public class IOUtils {
      * @throws NullPointerException if the input is null
      * @throws IOException if an I/O error occurs (never occurs)
      */
-    public static String toString(byte[] input, String encoding) throws IOException {
+    public static String toString(final byte[] input, final String encoding) throws IOException {
         return new String(input, Charsets.toCharset(encoding));
     }
 
@@ -966,7 +966,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static List<String> readLines(InputStream input) throws IOException {
+    public static List<String> readLines(final InputStream input) throws IOException {
         return readLines(input, Charset.defaultCharset());
     }
 
@@ -984,8 +984,8 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.3
      */
-    public static List<String> readLines(InputStream input, Charset encoding) throws IOException {
-        InputStreamReader reader = new InputStreamReader(input, Charsets.toCharset(encoding));
+    public static List<String> readLines(final InputStream input, final Charset encoding) throws IOException {
+        final InputStreamReader reader = new InputStreamReader(input, Charsets.toCharset(encoding));
         return readLines(reader);
     }
 
@@ -1009,7 +1009,7 @@ public class IOUtils {
      *             supported.
      * @since 1.1
      */
-    public static List<String> readLines(InputStream input, String encoding) throws IOException {
+    public static List<String> readLines(final InputStream input, final String encoding) throws IOException {
         return readLines(input, Charsets.toCharset(encoding));
     }
 
@@ -1026,9 +1026,9 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static List<String> readLines(Reader input) throws IOException {
-        BufferedReader reader = toBufferedReader(input);
-        List<String> list = new ArrayList<String>();
+    public static List<String> readLines(final Reader input) throws IOException {
+        final BufferedReader reader = toBufferedReader(input);
+        final List<String> list = new ArrayList<String>();
         String line = reader.readLine();
         while (line != null) {
             list.add(line);
@@ -1066,7 +1066,7 @@ public class IOUtils {
      * @throws IllegalArgumentException if the reader is null
      * @since 1.2
      */
-    public static LineIterator lineIterator(Reader reader) {
+    public static LineIterator lineIterator(final Reader reader) {
         return new LineIterator(reader);
     }
 
@@ -1100,7 +1100,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs, such as if the encoding is invalid
      * @since 2.3
      */
-    public static LineIterator lineIterator(InputStream input, Charset encoding) throws IOException {
+    public static LineIterator lineIterator(final InputStream input, final Charset encoding) throws IOException {
         return new LineIterator(new InputStreamReader(input, Charsets.toCharset(encoding)));
     }
 
@@ -1137,7 +1137,7 @@ public class IOUtils {
      *             supported.
      * @since 1.2
      */
-    public static LineIterator lineIterator(InputStream input, String encoding) throws IOException {
+    public static LineIterator lineIterator(final InputStream input, final String encoding) throws IOException {
         return lineIterator(input, Charsets.toCharset(encoding));
     }
 
@@ -1150,7 +1150,7 @@ public class IOUtils {
      * @return an input stream
      * @since 2.0
      */
-    public static InputStream toInputStream(CharSequence input) {
+    public static InputStream toInputStream(final CharSequence input) {
         return toInputStream(input, Charset.defaultCharset());
     }
 
@@ -1163,7 +1163,7 @@ public class IOUtils {
      * @return an input stream
      * @since 2.3
      */
-    public static InputStream toInputStream(CharSequence input, Charset encoding) {
+    public static InputStream toInputStream(final CharSequence input, final Charset encoding) {
         return toInputStream(input.toString(), encoding);
     }
 
@@ -1183,7 +1183,7 @@ public class IOUtils {
      *             supported.
      * @since 2.0
      */
-    public static InputStream toInputStream(CharSequence input, String encoding) throws IOException {
+    public static InputStream toInputStream(final CharSequence input, final String encoding) throws IOException {
         return toInputStream(input, Charsets.toCharset(encoding));
     }
 
@@ -1196,7 +1196,7 @@ public class IOUtils {
      * @return an input stream
      * @since 1.1
      */
-    public static InputStream toInputStream(String input) {
+    public static InputStream toInputStream(final String input) {
         return toInputStream(input, Charset.defaultCharset());
     }
 
@@ -1209,7 +1209,7 @@ public class IOUtils {
      * @return an input stream
      * @since 2.3
      */
-    public static InputStream toInputStream(String input, Charset encoding) {
+    public static InputStream toInputStream(final String input, final Charset encoding) {
         return new ByteArrayInputStream(input.getBytes(Charsets.toCharset(encoding)));
     }
 
@@ -1229,8 +1229,8 @@ public class IOUtils {
      *             supported.
      * @since 1.1
      */
-    public static InputStream toInputStream(String input, String encoding) throws IOException {
-        byte[] bytes = input.getBytes(Charsets.toCharset(encoding));
+    public static InputStream toInputStream(final String input, final String encoding) throws IOException {
+        final byte[] bytes = input.getBytes(Charsets.toCharset(encoding));
         return new ByteArrayInputStream(bytes);
     }
 
@@ -1246,7 +1246,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static void write(byte[] data, OutputStream output)
+    public static void write(final byte[] data, final OutputStream output)
             throws IOException {
         if (data != null) {
             output.write(data);
@@ -1266,7 +1266,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static void write(byte[] data, Writer output) throws IOException {
+    public static void write(final byte[] data, final Writer output) throws IOException {
         write(data, output, Charset.defaultCharset());
     }
 
@@ -1284,7 +1284,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.3
      */
-    public static void write(byte[] data, Writer output, Charset encoding) throws IOException {
+    public static void write(final byte[] data, final Writer output, final Charset encoding) throws IOException {
         if (data != null) {
             output.write(new String(data, Charsets.toCharset(encoding)));
         }
@@ -1310,7 +1310,7 @@ public class IOUtils {
      *             supported.
      * @since 1.1
      */
-    public static void write(byte[] data, Writer output, String encoding) throws IOException {
+    public static void write(final byte[] data, final Writer output, final String encoding) throws IOException {
         write(data, output, Charsets.toCharset(encoding));
     }
 
@@ -1327,7 +1327,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static void write(char[] data, Writer output) throws IOException {
+    public static void write(final char[] data, final Writer output) throws IOException {
         if (data != null) {
             output.write(data);
         }
@@ -1347,7 +1347,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static void write(char[] data, OutputStream output)
+    public static void write(final char[] data, final OutputStream output)
             throws IOException {
         write(data, output, Charset.defaultCharset());
     }
@@ -1367,7 +1367,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.3
      */
-    public static void write(char[] data, OutputStream output, Charset encoding) throws IOException {
+    public static void write(final char[] data, final OutputStream output, final Charset encoding) throws IOException {
         if (data != null) {
             output.write(new String(data).getBytes(Charsets.toCharset(encoding)));
         }
@@ -1394,7 +1394,7 @@ public class IOUtils {
      *             supported.
      * @since 1.1
      */
-    public static void write(char[] data, OutputStream output, String encoding)
+    public static void write(final char[] data, final OutputStream output, final String encoding)
             throws IOException {
         write(data, output, Charsets.toCharset(encoding));
     }
@@ -1410,7 +1410,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.0
      */
-    public static void write(CharSequence data, Writer output) throws IOException {
+    public static void write(final CharSequence data, final Writer output) throws IOException {
         if (data != null) {
             write(data.toString(), output);
         }
@@ -1429,7 +1429,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.0
      */
-    public static void write(CharSequence data, OutputStream output)
+    public static void write(final CharSequence data, final OutputStream output)
             throws IOException {
         write(data, output, Charset.defaultCharset());
     }
@@ -1447,7 +1447,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.3
      */
-    public static void write(CharSequence data, OutputStream output, Charset encoding) throws IOException {
+    public static void write(final CharSequence data, final OutputStream output, final Charset encoding) throws IOException {
         if (data != null) {
             write(data.toString(), output, encoding);
         }
@@ -1472,7 +1472,7 @@ public class IOUtils {
      *             supported.
      * @since 2.0
      */
-    public static void write(CharSequence data, OutputStream output, String encoding) throws IOException {
+    public static void write(final CharSequence data, final OutputStream output, final String encoding) throws IOException {
         write(data, output, Charsets.toCharset(encoding));
     }
 
@@ -1487,7 +1487,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static void write(String data, Writer output) throws IOException {
+    public static void write(final String data, final Writer output) throws IOException {
         if (data != null) {
             output.write(data);
         }
@@ -1506,7 +1506,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static void write(String data, OutputStream output)
+    public static void write(final String data, final OutputStream output)
             throws IOException {
         write(data, output, Charset.defaultCharset());
     }
@@ -1524,7 +1524,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.3
      */
-    public static void write(String data, OutputStream output, Charset encoding) throws IOException {
+    public static void write(final String data, final OutputStream output, final Charset encoding) throws IOException {
         if (data != null) {
             output.write(data.getBytes(Charsets.toCharset(encoding)));
         }
@@ -1549,7 +1549,7 @@ public class IOUtils {
      *             supported.
      * @since 1.1
      */
-    public static void write(String data, OutputStream output, String encoding)
+    public static void write(final String data, final OutputStream output, final String encoding)
             throws IOException {
         write(data, output, Charsets.toCharset(encoding));
     }
@@ -1567,7 +1567,7 @@ public class IOUtils {
      * @deprecated replaced by write(CharSequence, Writer)
      */
     @Deprecated
-    public static void write(StringBuffer data, Writer output)
+    public static void write(final StringBuffer data, final Writer output)
             throws IOException {
         if (data != null) {
             output.write(data.toString());
@@ -1589,7 +1589,7 @@ public class IOUtils {
      * @deprecated replaced by write(CharSequence, OutputStream)
      */
     @Deprecated
-    public static void write(StringBuffer data, OutputStream output)
+    public static void write(final StringBuffer data, final OutputStream output)
             throws IOException {
         write(data, output, (String) null);
     }
@@ -1615,7 +1615,7 @@ public class IOUtils {
      * @deprecated replaced by write(CharSequence, OutputStream, String)
      */
     @Deprecated
-    public static void write(StringBuffer data, OutputStream output, String encoding) throws IOException {
+    public static void write(final StringBuffer data, final OutputStream output, final String encoding) throws IOException {
         if (data != null) {
             output.write(data.toString().getBytes(Charsets.toCharset(encoding)));
         }
@@ -1635,8 +1635,8 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static void writeLines(Collection<?> lines, String lineEnding,
-            OutputStream output) throws IOException {
+    public static void writeLines(final Collection<?> lines, final String lineEnding,
+            final OutputStream output) throws IOException {
         writeLines(lines, lineEnding, output, Charset.defaultCharset());
     }
 
@@ -1653,7 +1653,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.3
      */
-    public static void writeLines(Collection<?> lines, String lineEnding, OutputStream output, Charset encoding)
+    public static void writeLines(final Collection<?> lines, String lineEnding, final OutputStream output, final Charset encoding)
             throws IOException {
         if (lines == null) {
             return;
@@ -1661,8 +1661,8 @@ public class IOUtils {
         if (lineEnding == null) {
             lineEnding = LINE_SEPARATOR;
         }
-        Charset cs = Charsets.toCharset(encoding);
-        for (Object line : lines) {
+        final Charset cs = Charsets.toCharset(encoding);
+        for (final Object line : lines) {
             if (line != null) {
                 output.write(line.toString().getBytes(cs));
             }
@@ -1689,8 +1689,8 @@ public class IOUtils {
      *             supported.
      * @since 1.1
      */
-    public static void writeLines(Collection<?> lines, String lineEnding,
-            OutputStream output, String encoding) throws IOException {
+    public static void writeLines(final Collection<?> lines, final String lineEnding,
+            final OutputStream output, final String encoding) throws IOException {
         writeLines(lines, lineEnding, output, Charsets.toCharset(encoding));
     }
 
@@ -1705,15 +1705,15 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static void writeLines(Collection<?> lines, String lineEnding,
-            Writer writer) throws IOException {
+    public static void writeLines(final Collection<?> lines, String lineEnding,
+            final Writer writer) throws IOException {
         if (lines == null) {
             return;
         }
         if (lineEnding == null) {
             lineEnding = LINE_SEPARATOR;
         }
-        for (Object line : lines) {
+        for (final Object line : lines) {
             if (line != null) {
                 writer.write(line.toString());
             }
@@ -1742,8 +1742,8 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static int copy(InputStream input, OutputStream output) throws IOException {
-        long count = copyLarge(input, output);
+    public static int copy(final InputStream input, final OutputStream output) throws IOException {
+        final long count = copyLarge(input, output);
         if (count > Integer.MAX_VALUE) {
             return -1;
         }
@@ -1770,7 +1770,7 @@ public class IOUtils {
      *             if an I/O error occurs
      * @since 2.5
      */
-    public static long copy(InputStream input, OutputStream output, int bufferSize) throws IOException {
+    public static long copy(final InputStream input, final OutputStream output, final int bufferSize) throws IOException {
         return copyLarge(input, output, new byte[bufferSize]);
     }
 
@@ -1790,7 +1790,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.3
      */
-    public static long copyLarge(InputStream input, OutputStream output)
+    public static long copyLarge(final InputStream input, final OutputStream output)
             throws IOException {
         return copy(input, output, DEFAULT_BUFFER_SIZE);
     }
@@ -1811,7 +1811,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.2
      */
-    public static long copyLarge(InputStream input, OutputStream output, byte[] buffer)
+    public static long copyLarge(final InputStream input, final OutputStream output, final byte[] buffer)
             throws IOException {
         long count = 0;
         int n = 0;
@@ -1846,7 +1846,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.2
      */
-    public static long copyLarge(InputStream input, OutputStream output, long inputOffset, long length)
+    public static long copyLarge(final InputStream input, final OutputStream output, final long inputOffset, final long length)
             throws IOException {
         return copyLarge(input, output, inputOffset, length, new byte[DEFAULT_BUFFER_SIZE]);
     }
@@ -1876,8 +1876,8 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.2
      */
-    public static long copyLarge(InputStream input, OutputStream output, 
-            final long inputOffset, final long length, byte[] buffer)  throws IOException {
+    public static long copyLarge(final InputStream input, final OutputStream output, 
+            final long inputOffset, final long length, final byte[] buffer)  throws IOException {
         if (inputOffset > 0) {
             skipFully(input, inputOffset);
         }
@@ -1917,7 +1917,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static void copy(InputStream input, Writer output)
+    public static void copy(final InputStream input, final Writer output)
             throws IOException {
         copy(input, output, Charset.defaultCharset());
     }
@@ -1938,8 +1938,8 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.3
      */
-    public static void copy(InputStream input, Writer output, Charset encoding) throws IOException {
-        InputStreamReader in = new InputStreamReader(input, Charsets.toCharset(encoding));
+    public static void copy(final InputStream input, final Writer output, final Charset encoding) throws IOException {
+        final InputStreamReader in = new InputStreamReader(input, Charsets.toCharset(encoding));
         copy(in, output);
     }
 
@@ -1965,7 +1965,7 @@ public class IOUtils {
      *             supported.
      * @since 1.1
      */
-    public static void copy(InputStream input, Writer output, String encoding) throws IOException {
+    public static void copy(final InputStream input, final Writer output, final String encoding) throws IOException {
         copy(input, output, Charsets.toCharset(encoding));
     }
 
@@ -1989,8 +1989,8 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static int copy(Reader input, Writer output) throws IOException {
-        long count = copyLarge(input, output);
+    public static int copy(final Reader input, final Writer output) throws IOException {
+        final long count = copyLarge(input, output);
         if (count > Integer.MAX_VALUE) {
             return -1;
         }
@@ -2012,7 +2012,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.3
      */
-    public static long copyLarge(Reader input, Writer output) throws IOException {
+    public static long copyLarge(final Reader input, final Writer output) throws IOException {
         return copyLarge(input, output, new char[DEFAULT_BUFFER_SIZE]);
     }
 
@@ -2031,7 +2031,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.2
      */
-    public static long copyLarge(Reader input, Writer output, char [] buffer) throws IOException {
+    public static long copyLarge(final Reader input, final Writer output, final char [] buffer) throws IOException {
         long count = 0;
         int n = 0;
         while (EOF != (n = input.read(buffer))) {
@@ -2060,7 +2060,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.2
      */
-    public static long copyLarge(Reader input, Writer output, final long inputOffset, final long length)
+    public static long copyLarge(final Reader input, final Writer output, final long inputOffset, final long length)
             throws IOException {
         return  copyLarge(input, output, inputOffset, length, new char[DEFAULT_BUFFER_SIZE]);
     }
@@ -2084,7 +2084,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.2
      */
-    public static long copyLarge(Reader input, Writer output, final long inputOffset, final long length, char [] buffer)
+    public static long copyLarge(final Reader input, final Writer output, final long inputOffset, final long length, final char [] buffer)
             throws IOException {
         if (inputOffset > 0) {
             skipFully(input, inputOffset);
@@ -2128,7 +2128,7 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 1.1
      */
-    public static void copy(Reader input, OutputStream output)
+    public static void copy(final Reader input, final OutputStream output)
             throws IOException {
         copy(input, output, Charset.defaultCharset());
     }
@@ -2156,8 +2156,8 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.3
      */
-    public static void copy(Reader input, OutputStream output, Charset encoding) throws IOException {
-        OutputStreamWriter out = new OutputStreamWriter(output, Charsets.toCharset(encoding));
+    public static void copy(final Reader input, final OutputStream output, final Charset encoding) throws IOException {
+        final OutputStreamWriter out = new OutputStreamWriter(output, Charsets.toCharset(encoding));
         copy(input, out);
         // XXX Unless anyone is planning on rewriting OutputStreamWriter,
         // we have to flush here.
@@ -2190,7 +2190,7 @@ public class IOUtils {
      *             supported.
      * @since 1.1
      */
-    public static void copy(Reader input, OutputStream output, String encoding) throws IOException {
+    public static void copy(final Reader input, final OutputStream output, final String encoding) throws IOException {
         copy(input, output, Charsets.toCharset(encoding));
     }
 
@@ -2221,14 +2221,14 @@ public class IOUtils {
 
         int ch = input1.read();
         while (EOF != ch) {
-            int ch2 = input2.read();
+            final int ch2 = input2.read();
             if (ch != ch2) {
                 return false;
             }
             ch = input1.read();
         }
 
-        int ch2 = input2.read();
+        final int ch2 = input2.read();
         return ch2 == EOF;
     }
 
@@ -2255,14 +2255,14 @@ public class IOUtils {
 
         int ch = input1.read();
         while (EOF != ch) {
-            int ch2 = input2.read();
+            final int ch2 = input2.read();
             if (ch != ch2) {
                 return false;
             }
             ch = input1.read();
         }
 
-        int ch2 = input2.read();
+        final int ch2 = input2.read();
         return ch2 == EOF;
     }
 
@@ -2280,10 +2280,10 @@ public class IOUtils {
      * @throws IOException if an I/O error occurs
      * @since 2.2
      */
-    public static boolean contentEqualsIgnoreEOL(Reader input1, Reader input2)
+    public static boolean contentEqualsIgnoreEOL(final Reader input1, final Reader input2)
             throws IOException {
-        BufferedReader br1 = toBufferedReader(input1);
-        BufferedReader br2 = toBufferedReader(input2);
+        final BufferedReader br1 = toBufferedReader(input1);
+        final BufferedReader br2 = toBufferedReader(input2);
 
         String line1 = br1.readLine();
         String line2 = br2.readLine();
@@ -2318,7 +2318,7 @@ public class IOUtils {
      * @throws IllegalArgumentException if toSkip is negative
      * @since 2.0
      */
-    public static long skip(InputStream input, long toSkip) throws IOException {
+    public static long skip(final InputStream input, final long toSkip) throws IOException {
         if (toSkip < 0) {
             throw new IllegalArgumentException("Skip count must be non-negative, actual: " + toSkip);
         }
@@ -2333,7 +2333,7 @@ public class IOUtils {
         long remain = toSkip;
         while (remain > 0) {
             // See https://issues.apache.org/jira/browse/IO-203 for why we use read() rather than delegating to skip()
-            long n = input.read(SKIP_BYTE_BUFFER, 0, (int) Math.min(remain, SKIP_BUFFER_SIZE));
+            final long n = input.read(SKIP_BYTE_BUFFER, 0, (int) Math.min(remain, SKIP_BUFFER_SIZE));
             if (n < 0) { // EOF
                 break;
             }
@@ -2355,16 +2355,16 @@ public class IOUtils {
      * @throws IllegalArgumentException if toSkip is negative
      * @since 2.5
      */
-    public static long skip(ReadableByteChannel input, long toSkip) throws IOException {
+    public static long skip(final ReadableByteChannel input, final long toSkip) throws IOException {
         if (toSkip < 0) {
             throw new IllegalArgumentException("Skip count must be non-negative, actual: " + toSkip);
         }
-        ByteBuffer skipByteBuffer = ByteBuffer.allocate((int) Math.min(toSkip, SKIP_BUFFER_SIZE));
+        final ByteBuffer skipByteBuffer = ByteBuffer.allocate((int) Math.min(toSkip, SKIP_BUFFER_SIZE));
         long remain = toSkip;
         while (remain > 0) {
             skipByteBuffer.position(0);
             skipByteBuffer.limit((int) Math.min(remain, SKIP_BUFFER_SIZE));
-            int n = input.read(skipByteBuffer);
+            final int n = input.read(skipByteBuffer);
             if (n == EOF) {
                 break;
             }
@@ -2396,7 +2396,7 @@ public class IOUtils {
      * @throws IllegalArgumentException if toSkip is negative
      * @since 2.0
      */
-    public static long skip(Reader input, long toSkip) throws IOException {
+    public static long skip(final Reader input, final long toSkip) throws IOException {
         if (toSkip < 0) {
             throw new IllegalArgumentException("Skip count must be non-negative, actual: " + toSkip);
         }
@@ -2411,7 +2411,7 @@ public class IOUtils {
         long remain = toSkip;
         while (remain > 0) {
             // See https://issues.apache.org/jira/browse/IO-203 for why we use read() rather than delegating to skip()
-            long n = input.read(SKIP_CHAR_BUFFER, 0, (int) Math.min(remain, SKIP_BUFFER_SIZE));
+            final long n = input.read(SKIP_CHAR_BUFFER, 0, (int) Math.min(remain, SKIP_BUFFER_SIZE));
             if (n < 0) { // EOF
                 break;
             }
@@ -2440,11 +2440,11 @@ public class IOUtils {
      * @throws EOFException if the number of bytes skipped was incorrect 
      * @since 2.0
      */
-    public static void skipFully(InputStream input, long toSkip) throws IOException {
+    public static void skipFully(final InputStream input, final long toSkip) throws IOException {
         if (toSkip < 0) {
             throw new IllegalArgumentException("Bytes to skip must not be negative: " + toSkip);
         }
-        long skipped = skip(input, toSkip);
+        final long skipped = skip(input, toSkip);
         if (skipped != toSkip) {
             throw new EOFException("Bytes to skip: " + toSkip + " actual: " + skipped);
         }
@@ -2461,11 +2461,11 @@ public class IOUtils {
      * @throws EOFException if the number of bytes skipped was incorrect
      * @since 2.5
      */
-    public static void skipFully(ReadableByteChannel input, long toSkip) throws IOException {
+    public static void skipFully(final ReadableByteChannel input, final long toSkip) throws IOException {
         if (toSkip < 0) {
             throw new IllegalArgumentException("Bytes to skip must not be negative: " + toSkip);
         }
-        long skipped = skip(input, toSkip);
+        final long skipped = skip(input, toSkip);
         if (skipped != toSkip) {
             throw new EOFException("Bytes to skip: " + toSkip + " actual: " + skipped);
         }
@@ -2491,8 +2491,8 @@ public class IOUtils {
      * @throws EOFException if the number of characters skipped was incorrect
      * @since 2.0
      */
-    public static void skipFully(Reader input, long toSkip) throws IOException {
-        long skipped = skip(input, toSkip);
+    public static void skipFully(final Reader input, final long toSkip) throws IOException {
+        final long skipped = skip(input, toSkip);
         if (skipped != toSkip) {
             throw new EOFException("Chars to skip: " + toSkip + " actual: " + skipped);
         }
@@ -2513,14 +2513,14 @@ public class IOUtils {
      * @throws IOException if a read error occurs
      * @since 2.2
      */
-    public static int read(Reader input, char[] buffer, int offset, int length) throws IOException {
+    public static int read(final Reader input, final char[] buffer, final int offset, final int length) throws IOException {
         if (length < 0) {
             throw new IllegalArgumentException("Length must not be negative: " + length);
         }
         int remaining = length;
         while (remaining > 0) {
-            int location = length - remaining;
-            int count = input.read(buffer, offset + location, remaining);
+            final int location = length - remaining;
+            final int count = input.read(buffer, offset + location, remaining);
             if (EOF == count) { // EOF
                 break;
             }
@@ -2541,7 +2541,7 @@ public class IOUtils {
      * @throws IOException if a read error occurs
      * @since 2.2
      */
-    public static int read(Reader input, char[] buffer) throws IOException {
+    public static int read(final Reader input, final char[] buffer) throws IOException {
         return read(input, buffer, 0, buffer.length);
     }
 
@@ -2559,14 +2559,14 @@ public class IOUtils {
      * @throws IOException if a read error occurs
      * @since 2.2
      */
-    public static int read(InputStream input, byte[] buffer, int offset, int length) throws IOException {
+    public static int read(final InputStream input, final byte[] buffer, final int offset, final int length) throws IOException {
         if (length < 0) {
             throw new IllegalArgumentException("Length must not be negative: " + length);
         }
         int remaining = length;
         while (remaining > 0) {
-            int location = length - remaining;
-            int count = input.read(buffer, offset + location, remaining);
+            final int location = length - remaining;
+            final int count = input.read(buffer, offset + location, remaining);
             if (EOF == count) { // EOF
                 break;
             }
@@ -2587,7 +2587,7 @@ public class IOUtils {
      * @throws IOException if a read error occurs
      * @since 2.2
      */
-    public static int read(InputStream input, byte[] buffer) throws IOException {
+    public static int read(final InputStream input, final byte[] buffer) throws IOException {
         return read(input, buffer, 0, buffer.length);
     }
 
@@ -2604,10 +2604,10 @@ public class IOUtils {
      * @throws IOException if a read error occurs
      * @since 2.5
      */
-    public static int read(ReadableByteChannel input, ByteBuffer buffer) throws IOException {
-        int length = buffer.remaining();
+    public static int read(final ReadableByteChannel input, final ByteBuffer buffer) throws IOException {
+        final int length = buffer.remaining();
         while (buffer.remaining() > 0) {
-            int count = input.read(buffer);
+            final int count = input.read(buffer);
             if (EOF == count) { // EOF
                 break;
             }
@@ -2631,8 +2631,8 @@ public class IOUtils {
      * @throws EOFException if the number of characters read was incorrect
      * @since 2.2
      */
-    public static void readFully(Reader input, char[] buffer, int offset, int length) throws IOException {
-        int actual = read(input, buffer, offset, length);
+    public static void readFully(final Reader input, final char[] buffer, final int offset, final int length) throws IOException {
+        final int actual = read(input, buffer, offset, length);
         if (actual != length) {
             throw new EOFException("Length to read: " + length + " actual: " + actual);
         }
@@ -2652,7 +2652,7 @@ public class IOUtils {
      * @throws EOFException if the number of characters read was incorrect
      * @since 2.2
      */
-    public static void readFully(Reader input, char[] buffer) throws IOException {
+    public static void readFully(final Reader input, final char[] buffer) throws IOException {
         readFully(input, buffer, 0, buffer.length);
     }
 
@@ -2672,8 +2672,8 @@ public class IOUtils {
      * @throws EOFException if the number of bytes read was incorrect
      * @since 2.2
      */
-    public static void readFully(InputStream input, byte[] buffer, int offset, int length) throws IOException {
-        int actual = read(input, buffer, offset, length);
+    public static void readFully(final InputStream input, final byte[] buffer, final int offset, final int length) throws IOException {
+        final int actual = read(input, buffer, offset, length);
         if (actual != length) {
             throw new EOFException("Length to read: " + length + " actual: " + actual);
         }
@@ -2693,7 +2693,7 @@ public class IOUtils {
      * @throws EOFException if the number of bytes read was incorrect
      * @since 2.2
      */
-    public static void readFully(InputStream input, byte[] buffer) throws IOException {
+    public static void readFully(final InputStream input, final byte[] buffer) throws IOException {
         readFully(input, buffer, 0, buffer.length);
     }
 
@@ -2710,9 +2710,9 @@ public class IOUtils {
      * @throws EOFException if the number of bytes read was incorrect
      * @since 2.5
      */
-    public static void readFully(ReadableByteChannel input, ByteBuffer buffer) throws IOException {
-        int expected = buffer.remaining();
-        int actual = read(input, buffer);
+    public static void readFully(final ReadableByteChannel input, final ByteBuffer buffer) throws IOException {
+        final int expected = buffer.remaining();
+        final int actual = read(input, buffer);
         if (actual != expected) {
             throw new EOFException("Length to read: " + expected + " actual: " + actual);
         }

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/LineIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/LineIterator.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/LineIterator.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/LineIterator.java Fri Nov 30 20:51:39 2012
@@ -92,7 +92,7 @@ public class LineIterator implements Ite
         } else {
             try {
                 while (true) {
-                    String line = bufferedReader.readLine();
+                    final String line = bufferedReader.readLine();
                     if (line == null) {
                         finished = true;
                         return false;
@@ -101,7 +101,7 @@ public class LineIterator implements Ite
                         return true;
                     }
                 }
-            } catch(IOException ioe) {
+            } catch(final IOException ioe) {
                 close();
                 throw new IllegalStateException(ioe);
             }
@@ -114,7 +114,7 @@ public class LineIterator implements Ite
      * @param line  the line that is to be validated
      * @return true if valid, false to remove from the iterator
      */
-    protected boolean isValidLine(String line) {
+    protected boolean isValidLine(final String line) {
         return true;
     }
 
@@ -138,7 +138,7 @@ public class LineIterator implements Ite
         if (!hasNext()) {
             throw new NoSuchElementException("No more lines");
         }
-        String currentLine = cachedLine;
+        final String currentLine = cachedLine;
         cachedLine = null;
         return currentLine;        
     }
@@ -171,7 +171,7 @@ public class LineIterator implements Ite
      *
      * @param iterator  the iterator to close
      */
-    public static void closeQuietly(LineIterator iterator) {
+    public static void closeQuietly(final LineIterator iterator) {
         if (iterator != null) {
             iterator.close();
         }

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/TaggedIOException.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/TaggedIOException.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/TaggedIOException.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/TaggedIOException.java Fri Nov 30 20:51:39 2012
@@ -61,7 +61,7 @@ public class TaggedIOException extends I
      * @return {@code true} if the throwable has the specified tag,
      * otherwise {@code false}
      */
-    public static boolean isTaggedWith(Throwable throwable, Object tag) {
+    public static boolean isTaggedWith(final Throwable throwable, final Object tag) {
         return tag != null
             && throwable instanceof TaggedIOException
             && tag.equals(((TaggedIOException) throwable).tag);
@@ -89,7 +89,7 @@ public class TaggedIOException extends I
      * @param tag tag object
      * @throws IOException original exception from the tagged decorator, if any
      */
-    public static void throwCauseIfTaggedWith(Throwable throwable, Object tag)
+    public static void throwCauseIfTaggedWith(final Throwable throwable, final Object tag)
             throws IOException {
         if (isTaggedWith(throwable, tag)) {
             throw ((TaggedIOException) throwable).getCause();
@@ -107,7 +107,7 @@ public class TaggedIOException extends I
      * @param original the exception to be tagged
      * @param tag tag of this exception
      */
-    public TaggedIOException(IOException original, Serializable tag) {
+    public TaggedIOException(final IOException original, final Serializable tag) {
         super(original.getMessage(), original);
         this.tag = tag;
     }

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/ThreadMonitor.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/ThreadMonitor.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/ThreadMonitor.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/ThreadMonitor.java Fri Nov 30 20:51:39 2012
@@ -51,7 +51,7 @@ class ThreadMonitor implements Runnable 
      * @return The monitor thread or {@code null}
      * if the timeout amount is not greater than zero
      */
-    public static Thread start(long timeout) {
+    public static Thread start(final long timeout) {
         return start(Thread.currentThread(), timeout);
     }
 
@@ -64,10 +64,10 @@ class ThreadMonitor implements Runnable 
      * @return The monitor thread or {@code null}
      * if the timeout amount is not greater than zero
      */
-    public static Thread start(Thread thread, long timeout) {
+    public static Thread start(final Thread thread, final long timeout) {
         Thread monitor = null;
         if (timeout > 0) {
-            ThreadMonitor timout = new ThreadMonitor(thread, timeout);
+            final ThreadMonitor timout = new ThreadMonitor(thread, timeout);
             monitor = new Thread(timout, ThreadMonitor.class.getSimpleName());
             monitor.setDaemon(true);
             monitor.start();
@@ -80,7 +80,7 @@ class ThreadMonitor implements Runnable 
      *
      * @param thread The monitor thread, may be {@code null}
      */
-    public static void stop(Thread thread) {
+    public static void stop(final Thread thread) {
         if (thread != null) {
             thread.interrupt();
         }
@@ -92,7 +92,7 @@ class ThreadMonitor implements Runnable 
      * @param thread The thread to monitor
      * @param timeout The timeout amount in milliseconds
      */
-    private ThreadMonitor(Thread thread, long timeout) {
+    private ThreadMonitor(final Thread thread, final long timeout) {
         this.thread = thread;
         this.timeout = timeout;
     }
@@ -107,7 +107,7 @@ class ThreadMonitor implements Runnable 
         try {
             Thread.sleep(timeout);
             thread.interrupt();
-        } catch (InterruptedException e) {
+        } catch (final InterruptedException e) {
             // timeout not reached
         }
     }

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/AbstractFileComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/AbstractFileComparator.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/AbstractFileComparator.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/AbstractFileComparator.java Fri Nov 30 20:51:39 2012
@@ -40,7 +40,7 @@ abstract class AbstractFileComparator im
      * @return The sorted array
      * @since 2.0
      */
-    public File[] sort(File... files) {
+    public File[] sort(final File... files) {
         if (files != null) {
             Arrays.sort(files, this);
         }
@@ -57,7 +57,7 @@ abstract class AbstractFileComparator im
      * @return The sorted list
      * @since 2.0
      */
-    public List<File> sort(List<File> files) {
+    public List<File> sort(final List<File> files) {
         if (files != null) {
             Collections.sort(files, this);
         }

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/CompositeFileComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/CompositeFileComparator.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/CompositeFileComparator.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/CompositeFileComparator.java Fri Nov 30 20:51:39 2012
@@ -53,7 +53,7 @@ public class CompositeFileComparator ext
      * @param delegates The delegate file comparators
      */
     @SuppressWarnings("unchecked") // casts 1 & 2 must be OK because types are already correct
-    public CompositeFileComparator(Comparator<File>... delegates) {
+    public CompositeFileComparator(final Comparator<File>... delegates) {
         if (delegates == null) {
             this.delegates = (Comparator<File>[]) NO_COMPARATORS;//1
         } else {
@@ -68,12 +68,12 @@ public class CompositeFileComparator ext
      * @param delegates The delegate file comparators
      */
     @SuppressWarnings("unchecked") // casts 1 & 2 must be OK because types are already correct
-    public CompositeFileComparator(Iterable<Comparator<File>> delegates) {
+    public CompositeFileComparator(final Iterable<Comparator<File>> delegates) {
         if (delegates == null) {
             this.delegates = (Comparator<File>[]) NO_COMPARATORS; //1
         } else {
-            List<Comparator<File>> list = new ArrayList<Comparator<File>>();
-            for (Comparator<File> comparator : delegates) {
+            final List<Comparator<File>> list = new ArrayList<Comparator<File>>();
+            for (final Comparator<File> comparator : delegates) {
                 list.add(comparator);
             }
             this.delegates = (Comparator<File>[]) list.toArray(new Comparator<?>[list.size()]); //2
@@ -88,9 +88,9 @@ public class CompositeFileComparator ext
      * @return the first non-zero result returned from
      * the delegate comparators or zero.
      */
-    public int compare(File file1, File file2) {
+    public int compare(final File file1, final File file2) {
         int result = 0;
-        for (Comparator<File> delegate : delegates) {
+        for (final Comparator<File> delegate : delegates) {
             result = delegate.compare(file1, file2);
             if (result != 0) {
                 break;
@@ -106,7 +106,7 @@ public class CompositeFileComparator ext
      */
     @Override
     public String toString() {
-        StringBuilder builder = new StringBuilder();
+        final StringBuilder builder = new StringBuilder();
         builder.append(super.toString());
         builder.append('{');
         for (int i = 0; i < delegates.length; i++) {

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java Fri Nov 30 20:51:39 2012
@@ -59,7 +59,7 @@ public class DefaultFileComparator exten
      * @return the result of calling file1's
      * {@link File#compareTo(File)} with file2 as the parameter.
      */
-    public int compare(File file1, File file2) {
+    public int compare(final File file1, final File file2) {
         return file1.compareTo(file2);
     }
 }

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/DirectoryFileComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/DirectoryFileComparator.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/DirectoryFileComparator.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/DirectoryFileComparator.java Fri Nov 30 20:51:39 2012
@@ -59,7 +59,7 @@ public class DirectoryFileComparator ext
      * @return the result of calling file1's
      * {@link File#compareTo(File)} with file2 as the parameter.
      */
-    public int compare(File file1, File file2) {
+    public int compare(final File file1, final File file2) {
         return getType(file1) - getType(file2);
     }
 
@@ -69,7 +69,7 @@ public class DirectoryFileComparator ext
      * @param file The file
      * @return 1 for directories and 2 for files
      */
-    private int getType(File file) {
+    private int getType(final File file) {
         if (file.isDirectory()) {
             return 1;
         } else {

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java Fri Nov 30 20:51:39 2012
@@ -87,7 +87,7 @@ public class ExtensionFileComparator ext
      *
      * @param caseSensitivity how to handle case sensitivity, null means case-sensitive
      */
-    public ExtensionFileComparator(IOCase caseSensitivity) {
+    public ExtensionFileComparator(final IOCase caseSensitivity) {
         this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
     }
 
@@ -102,9 +102,9 @@ public class ExtensionFileComparator ext
      * is greater than the second file.
      * 
      */
-    public int compare(File file1, File file2) {
-        String suffix1 = FilenameUtils.getExtension(file1.getName());
-        String suffix2 = FilenameUtils.getExtension(file2.getName());
+    public int compare(final File file1, final File file2) {
+        final String suffix1 = FilenameUtils.getExtension(file1.getName());
+        final String suffix2 = FilenameUtils.getExtension(file2.getName());
         return caseSensitivity.checkCompareTo(suffix1, suffix2);
     }
 

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java Fri Nov 30 20:51:39 2012
@@ -63,8 +63,8 @@ public class LastModifiedFileComparator 
      * is greater than the second file.
      * 
      */
-    public int compare(File file1, File file2) {
-        long result = file1.lastModified() - file2.lastModified();
+    public int compare(final File file1, final File file2) {
+        final long result = file1.lastModified() - file2.lastModified();
         if (result < 0) {
             return -1;
         } else if (result > 0) {

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java Fri Nov 30 20:51:39 2012
@@ -83,7 +83,7 @@ public class NameFileComparator extends 
      *
      * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
      */
-    public NameFileComparator(IOCase caseSensitivity) {
+    public NameFileComparator(final IOCase caseSensitivity) {
         this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
     }
 
@@ -97,7 +97,7 @@ public class NameFileComparator extends 
      * same and a positive value if the first files name
      * is greater than the second file.
      */
-    public int compare(File file1, File file2) {
+    public int compare(final File file1, final File file2) {
         return caseSensitivity.checkCompareTo(file1.getName(), file2.getName());
     }
 

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/PathFileComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/PathFileComparator.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/PathFileComparator.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/PathFileComparator.java Fri Nov 30 20:51:39 2012
@@ -83,7 +83,7 @@ public class PathFileComparator extends 
      *
      * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
      */
-    public PathFileComparator(IOCase caseSensitivity) {
+    public PathFileComparator(final IOCase caseSensitivity) {
         this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
     }
 
@@ -98,7 +98,7 @@ public class PathFileComparator extends 
      * is greater than the second file.
      * 
      */
-    public int compare(File file1, File file2) {
+    public int compare(final File file1, final File file2) {
         return caseSensitivity.checkCompareTo(file1.getPath(), file2.getPath());
     }
 

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/ReverseComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/ReverseComparator.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/ReverseComparator.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/ReverseComparator.java Fri Nov 30 20:51:39 2012
@@ -36,7 +36,7 @@ class ReverseComparator extends Abstract
      *
      * @param delegate The comparator to delegate to
      */
-    public ReverseComparator(Comparator<File> delegate) {
+    public ReverseComparator(final Comparator<File> delegate) {
         if (delegate == null) {
             throw new IllegalArgumentException("Delegate comparator is missing");
         }
@@ -51,7 +51,7 @@ class ReverseComparator extends Abstract
      * @return the result from the delegate {@link Comparator#compare(Object, Object)}
      * reversing the value (i.e. positive becomes negative and vice versa)
      */
-    public int compare(File file1, File file2) {
+    public int compare(final File file1, final File file2) {
         return delegate.compare(file2, file1); // parameters switched round
     }
 

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/SizeFileComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/SizeFileComparator.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/SizeFileComparator.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/SizeFileComparator.java Fri Nov 30 20:51:39 2012
@@ -89,7 +89,7 @@ public class SizeFileComparator extends 
      *  should be calculated, otherwise {@code false} if directories should be treated
      *  as size zero (see {@link FileUtils#sizeOfDirectory(File)}).
      */
-    public SizeFileComparator(boolean sumDirectoryContents) {
+    public SizeFileComparator(final boolean sumDirectoryContents) {
         this.sumDirectoryContents = sumDirectoryContents;
     }
 
@@ -104,7 +104,7 @@ public class SizeFileComparator extends 
      * is greater than the second file.
      * 
      */
-    public int compare(File file1, File file2) {
+    public int compare(final File file1, final File file2) {
         long size1 = 0;
         if (file1.isDirectory()) {
             size1 = sumDirectoryContents && file1.exists() ? FileUtils.sizeOfDirectory(file1) : 0;
@@ -117,7 +117,7 @@ public class SizeFileComparator extends 
         } else {
             size2 = file2.length();
         }
-        long result = size1 - size2;
+        final long result = size1 - size2;
         if (result < 0) {
             return -1;
         } else if (result > 0) {

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/AbstractFileFilter.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/AbstractFileFilter.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/AbstractFileFilter.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/AbstractFileFilter.java Fri Nov 30 20:51:39 2012
@@ -36,7 +36,7 @@ public abstract class AbstractFileFilter
      * @param file  the File to check
      * @return true if this file matches the test
      */
-    public boolean accept(File file) {
+    public boolean accept(final File file) {
         return accept(file.getParentFile(), file.getName());
     }
 
@@ -47,7 +47,7 @@ public abstract class AbstractFileFilter
      * @param name  the filename within the directory to check
      * @return true if this file matches the test
      */
-    public boolean accept(File dir, String name) {
+    public boolean accept(final File dir, final String name) {
         return accept(new File(dir, name));
     }
 

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java Fri Nov 30 20:51:39 2012
@@ -61,7 +61,7 @@ public class AgeFileFilter extends Abstr
      *
      * @param cutoff  the threshold age of the files
      */
-    public AgeFileFilter(long cutoff) {
+    public AgeFileFilter(final long cutoff) {
         this(cutoff, true);
     }
 
@@ -73,7 +73,7 @@ public class AgeFileFilter extends Abstr
      * @param acceptOlder  if true, older files (at or before the cutoff)
      * are accepted, else newer ones (after the cutoff).
      */
-    public AgeFileFilter(long cutoff, boolean acceptOlder) {
+    public AgeFileFilter(final long cutoff, final boolean acceptOlder) {
         this.acceptOlder = acceptOlder;
         this.cutoff = cutoff;
     }
@@ -84,7 +84,7 @@ public class AgeFileFilter extends Abstr
      *
      * @param cutoffDate  the threshold age of the files
      */
-    public AgeFileFilter(Date cutoffDate) {
+    public AgeFileFilter(final Date cutoffDate) {
         this(cutoffDate, true);
     }
 
@@ -96,7 +96,7 @@ public class AgeFileFilter extends Abstr
      * @param acceptOlder  if true, older files (at or before the cutoff)
      * are accepted, else newer ones (after the cutoff).
      */
-    public AgeFileFilter(Date cutoffDate, boolean acceptOlder) {
+    public AgeFileFilter(final Date cutoffDate, final boolean acceptOlder) {
         this(cutoffDate.getTime(), acceptOlder);
     }
 
@@ -107,7 +107,7 @@ public class AgeFileFilter extends Abstr
      * @param cutoffReference  the file whose last modification
      *        time is usesd as the threshold age of the files
      */
-    public AgeFileFilter(File cutoffReference) {
+    public AgeFileFilter(final File cutoffReference) {
         this(cutoffReference, true);
     }
 
@@ -121,7 +121,7 @@ public class AgeFileFilter extends Abstr
      * @param acceptOlder  if true, older files (at or before the cutoff)
      * are accepted, else newer ones (after the cutoff).
      */
-    public AgeFileFilter(File cutoffReference, boolean acceptOlder) {
+    public AgeFileFilter(final File cutoffReference, final boolean acceptOlder) {
         this(cutoffReference.lastModified(), acceptOlder);
     }
 
@@ -139,8 +139,8 @@ public class AgeFileFilter extends Abstr
      * @return true if the filename matches
      */
     @Override
-    public boolean accept(File file) {
-        boolean newer = FileUtils.isFileNewer(file, cutoff);
+    public boolean accept(final File file) {
+        final boolean newer = FileUtils.isFileNewer(file, cutoff);
         return acceptOlder ? !newer : newer;
     }
 
@@ -151,7 +151,7 @@ public class AgeFileFilter extends Abstr
      */
     @Override
     public String toString() {
-        String condition = acceptOlder ? "<=" : ">";
+        final String condition = acceptOlder ? "<=" : ">";
         return super.toString() + "(" + condition + cutoff + ")";
     }
 }

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java Fri Nov 30 20:51:39 2012
@@ -72,7 +72,7 @@ public class AndFileFilter
      * @param filter2  the second filter, must not be null
      * @throws IllegalArgumentException if either filter is null
      */
-    public AndFileFilter(IOFileFilter filter1, IOFileFilter filter2) {
+    public AndFileFilter(final IOFileFilter filter1, final IOFileFilter filter2) {
         if (filter1 == null || filter2 == null) {
             throw new IllegalArgumentException("The filters must not be null");
         }
@@ -118,7 +118,7 @@ public class AndFileFilter
         if (this.fileFilters.isEmpty()) {
             return false;
         }
-        for (IOFileFilter fileFilter : fileFilters) {
+        for (final IOFileFilter fileFilter : fileFilters) {
             if (!fileFilter.accept(file)) {
                 return false;
             }
@@ -134,7 +134,7 @@ public class AndFileFilter
         if (this.fileFilters.isEmpty()) {
             return false;
         }
-        for (IOFileFilter fileFilter : fileFilters) {
+        for (final IOFileFilter fileFilter : fileFilters) {
             if (!fileFilter.accept(file, name)) {
                 return false;
             }
@@ -149,7 +149,7 @@ public class AndFileFilter
      */
     @Override
     public String toString() {
-        StringBuilder buffer = new StringBuilder();
+        final StringBuilder buffer = new StringBuilder();
         buffer.append(super.toString());
         buffer.append("(");
         if (fileFilters != null) {
@@ -157,7 +157,7 @@ public class AndFileFilter
                 if (i > 0) {
                     buffer.append(",");
                 }
-                Object filter = fileFilters.get(i);
+                final Object filter = fileFilters.get(i);
                 buffer.append(filter == null ? "null" : filter.toString());
             }
         }

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java Fri Nov 30 20:51:39 2012
@@ -86,7 +86,7 @@ public class CanReadFileFilter extends A
      *  read, otherwise {@code false}.
      */
     @Override
-    public boolean accept(File file) {
+    public boolean accept(final File file) {
         return file.canRead();
     }
     

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java?rev=1415850&r1=1415849&r2=1415850&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java Fri Nov 30 20:51:39 2012
@@ -74,7 +74,7 @@ public class CanWriteFileFilter extends 
      *  written to, otherwise {@code false}.
      */
     @Override
-    public boolean accept(File file) {
+    public boolean accept(final File file) {
         return file.canWrite();
     }
     



Mime
View raw message