[maven-release-plugin] copy for tag commons-io-2.5-RC1

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/tags/commons-io-2.5-RC1@1715664 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index b7abf40..b08f76d 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -1,6 +1,6 @@
 
 Apache Commons IO 
-Version 2.4
+Version 2.5
 Release Notes
 
 INTRODUCTION:
@@ -9,35 +9,154 @@
 Classes in this package are considered to be so standard and of such high 
 reuse as to justify existence in java.io.
 
-The Commons IO library contains utility classes, stream implementations, file filters, 
+The Apache Commons IO library contains utility classes, stream implementations, file filters, 
 file comparators, endian transformation classes, and much more.
 
 ==============================================================================
-Apache Commons IO Version 2.4
+Apache Commons IO Version 2.5
 ==============================================================================
 New features and bug fixes.
 
 Changes in this version include:
 
 New features:
-o IO-269:  Tailer locks file from deletion/rename on Windows. Thanks to sebb. 
-o IO-333:  Export OSGi packages at version 1.x in addition to 2.x. Thanks to fmeschbe. 
-o IO-320:  Add XmlStreamReader support for UTF-32. Thanks to ggregory. 
-o IO-331:  BOMInputStream wrongly detects UTF-32LE_BOM files as UTF-16LE_BOM files in method getBOM(). Thanks to ggregory. 
-o IO-327:  Add byteCountToDisplaySize(BigInteger). Thanks to ggregory. 
-o IO-326:  Add new FileUtils.sizeOf[Directory] APIs to return BigInteger. Thanks to ggregory, kinow. 
-o IO-325:  Add IOUtils.toByteArray methods to work with URL and URI. Thanks to raviprak. 
-o IO-324:  Add missing Charset sister APIs to method that take a String charset name. Thanks to raviprak. 
+o IO-487:  Add ValidatingObjectInputStream for controlled deserialization 
+o IO-471:  Support for additional encodings in ReversedLinesFileReader Thanks to Leandro Reis. 
+o IO-425:  Setter method for threshold on ThresholdingOutputStream Thanks to Craig Swank. 
+o IO-406:  Introduce new class AppendableOutputStream Thanks to Niall Pemberton. 
+o IO-459:  Add WindowsLineEndingInputStream and UnixLineEndingInputStream. Thanks to Kristian Rosenvold. 
+o IO-457:  Add a BoundedReader, a wrapper that can be used to constrain access
+        to an underlying stream when used with mark/reset -
+        to avoid overflowing the mark limit of the underlying buffer. Thanks to Kristian Rosenvold. 
+o IO-426:  Add API IOUtils.closeQuietly(Closeable...) 
+o IO-410:  Readfully() That Returns A Byte Array Thanks to Beluga Behr. 
+o IO-395:  Overload IOUtils buffer methods to accept buffer size Thanks to Beluga Behr. 
+o IO-382:  Chunked IO for large arrays.
+         Added writeChunked(byte[], OutputStream) and writeChunked(char[] Writer)
+         Added ChunkedOutputStream, ChunkedWriter 
+o IO-233:  Add Methods for Buffering Streams/Writers To IOUtils
+         Added overloaded buffer() methods - see also IO-330 
+o IO-330:  IOUtils#toBufferedOutputStream/toBufferedWriter to conditionally wrap the output
+         Added overloaded buffer() methods - see also IO-233 
+o IO-381:  Add FileUtils.copyInputStreamToFile API with option to leave the source open.
+        See copyInputStreamToFile(final InputStream source, final File destination, boolean closeSource) 
+o IO-379:  CharSequenceInputStream - add tests for available()
+         Fix code so it really does reflect a minimum available. 
+o IO-346:  Add ByteArrayOutputStream.toInputStream() 
+o IO-341:  A constant for holding the BOM character (U+FEFF) 
+o IO-361:  Add API FileUtils.forceMkdirsParent(). 
+o IO-360:  Add API Charsets.requiredCharsets(). 
+o IO-359:  Add IOUtils.skip and skipFully(ReadableByteChannel, long). Thanks to yukoba. 
+o IO-358:  Add IOUtils.read and readFully(ReadableByteChannel, ByteBuffer buffer). Thanks to yukoba. 
+o IO-353:  Add API IOUtils.copy(InputStream, OutputStream, int) Thanks to ggregory. 
+o IO-349:  Add API with array offset and length argument to FileUtils.writeByteArrayToFile. Thanks to scop. 
+o IO-348:  Missing information in IllegalArgumentException thrown by org.apache.commons.io.FileUtils#validateListFilesParameters. Thanks to plcstpierre. 
+o IO-345:  Supply a hook method allowing Tailer actively determining stop condition. Thanks to mkresse. 
+o IO-437:  Make IOUtils.EOF public and reuse it in various classes. 
 
 Fixed Bugs:
-o IO-336:  Yottabyte (YB) incorrectly defined in FileUtils. Thanks to rleavelle. 
-o IO-279:  Tailer erroneously considers file as new. Thanks to Sergio Bossa, Chris Baron. 
-o IO-335:  Tailer#readLines - incorrect CR handling. 
-o IO-334:  FileUtils.toURLs throws NPE for null parameter; document the behavior. 
-o IO-332:  Improve tailer's reading performance. Thanks to liangly. 
-o IO-279:  Improve Tailer performance with buffered reads (see IO-332). 
-o IO-329:  FileUtils.writeLines uses unbuffered IO. Thanks to tivv. 
-o IO-319:  FileUtils.sizeOfDirectory follows symbolic links. Thanks to raviprak. 
+o IO-446:  adds an endOfFileReached method to the TailerListener Thanks to Jeffrey Barrus. 
+o IO-484:  FilenameUtils should handle embedded null bytes Thanks to Philippe Arteau. 
+o IO-481:  Changed/Corrected algorithm for waitFor 
+o IO-428:  BOMInputStream.skip returns wrong count if stream contains no BOM Thanks to Stefan Gmeiner. 
+o IO-488:  FileUtils.waitFor(...) swallows thread interrupted status Thanks to Björn Buchner. 
+o IO-452:  Support for symlinks with missing target. Added support for JDK7 symlink features when present Thanks to David Standish. 
+o IO-453:  Regression in FileUtils.readFileToString from 2.0.1 Thanks to Steven Christou. 
+o IO-451:  ant test fails - resources missing from test classpath Thanks to David Standish. 
+o IO-435:  Document that FileUtils.deleteDirectory, directoryContains and cleanDirectory
+         may throw an IllegalArgumentException in case the passed directory does not
+         exist or is not a directory. Thanks to Dominik Stadler. 
+o IO-424:  Javadoc fixes, mostly to appease 1.8.0 Thanks to Ville Skyttä. 
+o IO-389:  FileUtils.sizeOfDirectory can throw IllegalArgumentException Thanks to Austin Doupnik. 
+o IO-390:  FileUtils.sizeOfDirectoryAsBigInteger can overflow.
+         Ensure that recursive calls all use BigInteger 
+o IO-385:  FileUtils.doCopyFile can potentially loop for ever
+         Exit loop if no data to copy 
+o IO-383:  FileUtils.doCopyFile caches the file size; needs to be documented
+         Added Javadoc; show file lengths in exception message 
+o IO-380:  FileUtils.copyInputStreamToFile should document it closes the input source Thanks to claudio_ch. 
+o IO-279:  Tailer erroneously considers file as new.
+        Fix to use file.lastModified() rather than System.currentTimeMillis() 
+o IO-356:  CharSequenceInputStream#reset() behaves incorrectly in case when buffer size is not dividable by data size.
+         Fix code so skip relates to the encoded bytes; reset now re-encodes the data up to the point of the mark 
+o IO-368:  ClassLoaderObjectInputStream does not handle primitive typed members 
+o IO-314:  Deprecate all methods that use the default encoding 
+o IO-338:  When a file is rotated, finish reading previous file prior to starting new one 
+o IO-354:  Commons IO Tailer does not respect UTF-8 Charset. 
+o IO-323:  What should happen in FileUtils.sizeOf[Directory] when an overflow takes place?
+        Added Javadoc. 
+o IO-372:  FileUtils.moveDirectory can produce misleading error message on failiure 
+o IO-362:  IOUtils.contentEquals* methods returns false if input1 == input2, should return true. Thanks to mmadson, ggregory. 
+o IO-357:  [Tailer] InterruptedException while the thread is sleeping is silently ignored Thanks to mortenh. 
+o IO-352:  Spelling fixes. Thanks to scop. 
+o IO-436:  Improper JavaDoc comment for FilenameUtils.indexOfExtension. Thanks to christoph.schneegans. 
+
+Changes:
+o IO-466:  Added testcase to show this was fixed with IO-423 
+o IO-479:  Correct exception message in FileUtils.getFile(File, String...) Thanks to Zhouce Chen. 
+o IO-465:  Update to JUnit 4.12 Thanks to based2. 
+o IO-462:  IOExceptionWithCause no longer needed 
+o IO-422:  Deprecate Charsets Charset constants in favor of Java 7's java.nio.charset.StandardCharsets 
+o IO-239:  Convert IOCase to a Java 1.5+ Enumeration
+         [N.B. this is binary compatible] 
+o IO-328:  getPrefixLength returns null if filename has leading slashes
+        Javadoc: add examples to show correct behaviour; add unit tests 
+o IO-299:  FileUtils.listFilesAndDirs includes original dir in results even when it doesn't match filter
+        Javadoc: clarify that original dir is included in the results 
+o IO-375:  FilenameUtils.splitOnTokens(String text) check for '**' could be simplified 
+o IO-374:  WildcardFileFilter ctors should not use null to mean IOCase.SENSITIVE when delegating to other ctors 
+
+Compatibility with 2.4:
+Binary compatible: Yes.
+Source compatible: Yes.
+Semantic compatible: Yes.
+
+Compatibility with 2.2 and 1.4:
+Binary compatible: Yes.
+Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
+Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
+
+Commons IO 2.5 requires JDK 1.6 or later.
+Commons IO 2.4 requires JDK 1.6 or later.
+Commons IO 2.3 requires JDK 1.6 or later.
+Commons IO 2.2 requires JDK 1.5 or later.
+Commons IO 1.4 requires JDK 1.3 or later.
+
+==============================================================================
+Apache Commons IO Version 2.4
+==============================================================================
+
+Changes in this version include:
+
+New features:
+o IO-269:  Tailer locks file from deletion/rename on Windows. Thanks to
+sebb.
+o IO-333:  Export OSGi packages at version 1.x in addition to 2.x. Thanks
+to fmeschbe.
+o IO-320:  Add XmlStreamReader support for UTF-32. Thanks to ggregory.
+o IO-331:  BOMInputStream wrongly detects UTF-32LE_BOM files as
+UTF-16LE_BOM files in method getBOM(). Thanks to ggregory.
+o IO-327:  Add byteCountToDisplaySize(BigInteger). Thanks to ggregory.
+o IO-326:  Add new FileUtils.sizeOf[Directory] APIs to return BigInteger.
+Thanks to ggregory.
+o IO-325:  Add IOUtils.toByteArray methods to work with URL and URI. Thanks
+to raviprak.
+o IO-324:  Add missing Charset sister APIs to method that take a String
+charset name. Thanks to raviprak.
+
+Fixed Bugs:
+o IO-336:  Yottabyte (YB) incorrectly defined in FileUtils. Thanks to
+rleavelle.
+o IO-279:  Tailer erroneously considers file as new. Thanks to Sergio
+Bossa, Chris Baron.
+o IO-335:  Tailer#readLines - incorrect CR handling.
+o IO-334:  FileUtils.toURLs throws NPE for null parameter; document the
+behavior.
+o IO-332:  Improve tailer's reading performance. Thanks to liangly.
+o IO-279:  Improve Tailer performance with buffered reads (see IO-332).
+o IO-329:  FileUtils.writeLines uses unbuffered IO. Thanks to tivv.
+o IO-319:  FileUtils.sizeOfDirectory follows symbolic links. Thanks to
+raviprak.
 
 
 Compatibility with 2.3:
diff --git a/build.xml b/build.xml
index a8c7273..e3b4ff9 100644
--- a/build.xml
+++ b/build.xml
@@ -37,7 +37,7 @@
   <property name="repository"              value="${user.home}/.m2/repository"/>
 
   <!-- The directories corresponding to your necessary dependencies -->
-  <property name="junit.version"           value="4.10"/>
+  <property name="junit.version"           value="4.12"/>
   <property name="junit.home"              value="${repository}/junit/junit/${junit.version}"/>
   <property name="junit.jar"               value="${junit.home}/junit-${junit.version}.jar"/>
 
@@ -55,7 +55,7 @@
   <property name="component.title"         value="Commons IO"/>
 
   <!-- The current version number of this component -->
-  <property name="component.version"       value="2.2-SNAPSHOT"/>
+  <property name="component.version"       value="2.5-SNAPSHOT"/>
 
   <!-- The base directory for component sources -->
   <property name="source.home"             value="src/main/java"/>
@@ -87,10 +87,10 @@
 <!-- ========== Compiler Defaults ========================================= -->
 
   <!-- compiler source JDK version -->
-  <property name="compile.source"          value="1.5"/>
+  <property name="compile.source"          value="1.6"/>
 
   <!-- compiler target JDK version -->
-  <property name="compile.target"          value="1.5"/>
+  <property name="compile.target"          value="1.6"/>
 
   <!-- Should Java compilations set the 'debug' compiler option? -->
   <property name="compile.debug"           value="true"/>
@@ -109,6 +109,7 @@
   <!-- Construct compile classpath -->
   <path id="downloaded.lib.classpath">
     <pathelement location="${download.lib.dir}/junit-${junit.version}.jar"/>
+    <pathelement location="${download.lib.dir}/hamcrest-core-1.3.jar"/>
   </path>
 
 <!-- ========== Test Execution Defaults =================================== -->
@@ -335,7 +336,7 @@
 
     <target name="check-availability">
         <echo message="doing check-availability..." />
-        <available file="${junit.jar}" property="junit.found"/>
+        <available file="${download.lib.dir}/junit-${junit.version}.jar" property="junit.found"/>
     </target>
 
     <target name="download-junit" unless="junit.found">
@@ -345,6 +346,9 @@
         <get dest="${download.lib.dir}"
             usetimestamp="true" ignoreerrors="true"
             src="http://repo1.maven.org/maven2/junit/junit/${junit.version}/junit-${junit.version}.jar"/>
+        <get dest="${download.lib.dir}"
+            usetimestamp="true" ignoreerrors="true"
+            src="https://hamcrest.googlecode.com/files/hamcrest-core-1.3.jar"/>
     </target>
 
 </project>
diff --git a/pom.xml b/pom.xml
index 4475a1e..57cbdfc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
   <parent>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-parent</artifactId>
-    <version>38</version>
+    <version>39</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>commons-io</groupId>
@@ -49,9 +49,9 @@
   </distributionManagement>
 
   <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/io/tags/commons-io-2.5</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/io/tags/commons-io-2.5</developerConnection>
-    <url>http://svn.apache.org/viewvc/commons/proper/io/tags/commons-io-2.5</url>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/io/tags/commons-io-2.5-RC1</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/io/tags/commons-io-2.5-RC1</developerConnection>
+    <url>http://svn.apache.org/viewvc/commons/proper/io/tags/commons-io-2.5-RC1</url>
   </scm>
 
   <developers>
@@ -240,8 +240,6 @@
     <commons.rc.version>RC1</commons.rc.version>
     <commons.release.version>2.5</commons.release.version>
     <commons.release.desc>(requires JDK 1.6+)</commons.release.desc>
-    <commons.release.2.version>2.2</commons.release.2.version>
-    <commons.release.2.desc>(requires JDK 1.5+)</commons.release.2.desc>
     <commons.jira.id>IO</commons.jira.id>
     <commons.jira.pid>12310477</commons.jira.pid>
     <commons.osgi.export>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 853f3f2..55c4d38 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -47,6 +47,9 @@
   <body>
     <!-- The release date is the date RC is cut -->
     <release version="2.5" date="2015-??-??" description="New features and bug fixes.">
+      <action issue="IO-487" dev="bdelacretaz" type="add">
+        Add ValidatingObjectInputStream for controlled deserialization
+      </action>
       <action issue="IO-446" dev="krosenvold" type="fix" due-to="Jeffrey Barrus">
         adds an endOfFileReached method to the TailerListener
       </action>
@@ -114,10 +117,10 @@
       <action issue="IO-422" dev="ggregory" type="update">
          Deprecate Charsets Charset constants in favor of Java 7's java.nio.charset.StandardCharsets
       </action>
-      <action issue="IO-410" dev="sebb" type="add" due-to="BELUGA BEHR">
+      <action issue="IO-410" dev="sebb" type="add" due-to="Beluga Behr">
          Readfully() That Returns A Byte Array
       </action>
-      <action issue="IO-395" dev="brentworden" type="add" due-to="BELUGA BEHR">
+      <action issue="IO-395" dev="brentworden" type="add" due-to="Beluga Behr">
          Overload IOUtils buffer methods to accept buffer size
       </action>
       <action issue="IO-389" dev="sebb" type="fix" due-to="Austin Doupnik">
diff --git a/src/changes/release-notes.vm b/src/changes/release-notes.vm
index f4d68bd..b39b90a 100644
--- a/src/changes/release-notes.vm
+++ b/src/changes/release-notes.vm
@@ -143,6 +143,59 @@
 ## End of main loop
 #end
 ##
+Compatibility with 2.4:
+Binary compatible: Yes.
+Source compatible: Yes.
+Semantic compatible: Yes.
+
+Compatibility with 2.2 and 1.4:
+Binary compatible: Yes.
+Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
+Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
+
+Commons IO 2.5 requires JDK 1.6 or later.
+Commons IO 2.4 requires JDK 1.6 or later.
+Commons IO 2.3 requires JDK 1.6 or later.
+Commons IO 2.2 requires JDK 1.5 or later.
+Commons IO 1.4 requires JDK 1.3 or later.
+
+==============================================================================
+Apache Commons IO Version 2.4
+==============================================================================
+
+Changes in this version include:
+
+New features:
+o IO-269:  Tailer locks file from deletion/rename on Windows. Thanks to
+sebb.
+o IO-333:  Export OSGi packages at version 1.x in addition to 2.x. Thanks
+to fmeschbe.
+o IO-320:  Add XmlStreamReader support for UTF-32. Thanks to ggregory.
+o IO-331:  BOMInputStream wrongly detects UTF-32LE_BOM files as
+UTF-16LE_BOM files in method getBOM(). Thanks to ggregory.
+o IO-327:  Add byteCountToDisplaySize(BigInteger). Thanks to ggregory.
+o IO-326:  Add new FileUtils.sizeOf[Directory] APIs to return BigInteger.
+Thanks to ggregory.
+o IO-325:  Add IOUtils.toByteArray methods to work with URL and URI. Thanks
+to raviprak.
+o IO-324:  Add missing Charset sister APIs to method that take a String
+charset name. Thanks to raviprak.
+
+Fixed Bugs:
+o IO-336:  Yottabyte (YB) incorrectly defined in FileUtils. Thanks to
+rleavelle.
+o IO-279:  Tailer erroneously considers file as new. Thanks to Sergio
+Bossa, Chris Baron.
+o IO-335:  Tailer#readLines - incorrect CR handling.
+o IO-334:  FileUtils.toURLs throws NPE for null parameter; document the
+behavior.
+o IO-332:  Improve tailer's reading performance. Thanks to liangly.
+o IO-279:  Improve Tailer performance with buffered reads (see IO-332).
+o IO-329:  FileUtils.writeLines uses unbuffered IO. Thanks to tivv.
+o IO-319:  FileUtils.sizeOfDirectory follows symbolic links. Thanks to
+raviprak.
+
+
 Compatibility with 2.3:
 Binary compatible: Yes.
 Source compatible: Yes.
diff --git a/src/main/java/org/apache/commons/io/FileUtils.java b/src/main/java/org/apache/commons/io/FileUtils.java
index 289b9e3..57ac5c7 100644
--- a/src/main/java/org/apache/commons/io/FileUtils.java
+++ b/src/main/java/org/apache/commons/io/FileUtils.java
@@ -1282,7 +1282,7 @@
      * modified date/times using {@link File#setLastModified(long)}, however
      * it is not guaranteed that those operations will succeed.
      * If the modification operation fails, no indication is provided.
-     * <p>
+     * </p>
      * <h3>Example: Copy directories only</h3>
      * <pre>
      *  // only copy the directory structure
@@ -1332,7 +1332,7 @@
      * date/times using {@link File#setLastModified(long)}, however it is
      * not guaranteed that those operations will succeed.
      * If the modification operation fails, no indication is provided.
-     * <p>
+     * </p>
      * <h3>Example: Copy directories only</h3>
      * <pre>
      *  // only copy the directory structure
@@ -1813,7 +1813,7 @@
         InputStream in = null;
         try {
             in = openInputStream(file);
-            return IOUtils.toByteArray(in); // Do NOT use file.length() - see NET-453
+            return IOUtils.toByteArray(in); // Do NOT use file.length() - see IO-453
         } finally {
             IOUtils.closeQuietly(in);
         }
diff --git a/src/main/java/org/apache/commons/io/IOUtils.java b/src/main/java/org/apache/commons/io/IOUtils.java
index 57da01c..c7ace28 100644
--- a/src/main/java/org/apache/commons/io/IOUtils.java
+++ b/src/main/java/org/apache/commons/io/IOUtils.java
@@ -52,7 +52,7 @@
 
 /**
  * General IO stream manipulation utilities.
- * <p/>
+ * <p>
  * This class provides static utility methods for input/output operations.
  * <ul>
  * <li>closeQuietly - these methods close a stream ignoring nulls and exceptions
@@ -61,19 +61,19 @@
  * <li>copy - these methods copy all the data from one stream to another
  * <li>contentEquals - these methods compare the content of two streams
  * </ul>
- * <p/>
+ * <p>
  * The byte-to-char methods and char-to-byte methods involve a conversion step.
  * Two methods are provided in each case, one that uses the platform default
  * encoding and the other which allows you to specify an encoding. You are
  * encouraged to always specify an encoding because relying on the platform
  * default can lead to unexpected results, for example when moving from
  * development to production.
- * <p/>
+ * <p>
  * All the methods in this class that read a stream are buffered internally.
  * This means that there is no cause to use a <code>BufferedInputStream</code>
  * or <code>BufferedReader</code>. The default buffer size of 4K has been shown
  * to be efficient in tests.
- * <p/>
+ * <p>
  * The various copy methods all delegate the actual copying to one of the following methods:
  * <ul>
  * <li>{@link #copyLarge(InputStream, OutputStream, byte[])}</li>
@@ -84,15 +84,15 @@
  * For example, {@link #copy(InputStream, OutputStream)} calls {@link #copyLarge(InputStream, OutputStream)}
  * which calls {@link #copy(InputStream, OutputStream, int)} which creates the buffer and calls
  * {@link #copyLarge(InputStream, OutputStream, byte[])}.
- * <p/>
+ * <p>
  * Applications can re-use buffers by using the underlying methods directly.
  * This may improve performance for applications that need to do a lot of copying.
- * <p/>
+ * <p>
  * Wherever possible, the methods in this class do <em>not</em> flush or close
  * the stream. This is to avoid making non-portable assumptions about the
  * streams' origin and further use. Thus the caller is still responsible for
  * closing streams after use.
- * <p/>
+ * <p>
  * Origin of code: Excalibur.
  *
  * @version $Id$
@@ -104,6 +104,7 @@
 
     /**
      * Represents the end-of-file (or stream).
+     * @since 2.5 (made public)
      */
     public static final int EOF = -1;
 
@@ -191,10 +192,10 @@
 
     /**
      * Closes an <code>Reader</code> unconditionally.
-     * <p/>
+     * <p>
      * Equivalent to {@link Reader#close()}, except any exceptions will be ignored.
      * This is typically used in finally blocks.
-     * <p/>
+     * <p>
      * Example code:
      * <pre>
      *   char[] data = new char[1024];
@@ -218,10 +219,10 @@
 
     /**
      * Closes an <code>Writer</code> unconditionally.
-     * <p/>
+     * <p>
      * Equivalent to {@link Writer#close()}, except any exceptions will be ignored.
      * This is typically used in finally blocks.
-     * <p/>
+     * <p>
      * Example code:
      * <pre>
      *   Writer out = null;
@@ -244,10 +245,10 @@
 
     /**
      * Closes an <code>InputStream</code> unconditionally.
-     * <p/>
+     * <p>
      * Equivalent to {@link InputStream#close()}, except any exceptions will be ignored.
      * This is typically used in finally blocks.
-     * <p/>
+     * <p>
      * Example code:
      * <pre>
      *   byte[] data = new byte[1024];
@@ -271,10 +272,10 @@
 
     /**
      * Closes an <code>OutputStream</code> unconditionally.
-     * <p/>
+     * <p>
      * Equivalent to {@link OutputStream#close()}, except any exceptions will be ignored.
      * This is typically used in finally blocks.
-     * <p/>
+     * <p>
      * Example code:
      * <pre>
      * byte[] data = "Hello, World".getBytes();
@@ -299,12 +300,12 @@
 
     /**
      * Closes a <code>Closeable</code> unconditionally.
-     * <p/>
+     * <p>
      * Equivalent to {@link Closeable#close()}, except any exceptions will be ignored. This is typically used in
      * finally blocks.
-     * <p/>
+     * <p>
      * Example code:
-     * <p/>
+     * </p>
      * <pre>
      * Closeable closeable = null;
      * try {
@@ -317,9 +318,9 @@
      *     IOUtils.closeQuietly(closeable);
      * }
      * </pre>
-     * <p/>
+     * <p>
      * Closing all streams:
-     * <p/>
+     * </p>
      * <pre>
      * try {
      *     return IOUtils.copy(inputStream, outputStream);
@@ -344,9 +345,9 @@
 
     /**
      * Closes a <code>Closeable</code> unconditionally.
-     * <p/>
+     * <p>
      * Equivalent to {@link Closeable#close()}, except any exceptions will be ignored.
-     * <p/>
+     * <p>
      * This is typically used in finally blocks to ensure that the closeable is closed
      * even if an Exception was thrown before the normal close statement was reached.
      * <br>
@@ -355,9 +356,9 @@
      * <br>
      * It is only intended to simplify tidying up where normal processing has already failed
      * and reporting close failure as well is not necessary or useful.
-     * <p/>
+     * <p>
      * Example code:
-     * <p/>
+     * </p>
      * <pre>
      * Closeable closeable = null;
      * try {
@@ -370,7 +371,7 @@
      *     <b>IOUtils.closeQuietly(closeable); // In case normal close was skipped due to Exception</b>
      * }
      * </pre>
-     * <p/>
+     * <p>
      * Closing all streams:
      * <br>
      * <pre>
@@ -396,10 +397,10 @@
 
     /**
      * Closes a <code>Socket</code> unconditionally.
-     * <p/>
+     * <p>
      * Equivalent to {@link Socket#close()}, except any exceptions will be ignored.
      * This is typically used in finally blocks.
-     * <p/>
+     * <p>
      * Example code:
      * <pre>
      *   Socket socket = null;
@@ -429,10 +430,10 @@
 
     /**
      * Closes a <code>Selector</code> unconditionally.
-     * <p/>
+     * <p>
      * Equivalent to {@link Selector#close()}, except any exceptions will be ignored.
      * This is typically used in finally blocks.
-     * <p/>
+     * <p>
      * Example code:
      * <pre>
      *   Selector selector = null;
@@ -462,10 +463,10 @@
 
     /**
      * Closes a <code>ServerSocket</code> unconditionally.
-     * <p/>
+     * <p>
      * Equivalent to {@link ServerSocket#close()}, except any exceptions will be ignored.
      * This is typically used in finally blocks.
-     * <p/>
+     * <p>
      * Example code:
      * <pre>
      *   ServerSocket socket = null;
@@ -496,7 +497,7 @@
     /**
      * Fetches entire contents of an <code>InputStream</code> and represent
      * same data as result InputStream.
-     * <p/>
+     * <p>
      * This method is useful where,
      * <ul>
      * <li>Source InputStream is slow.</li>
@@ -521,7 +522,7 @@
     /**
      * Fetches entire contents of an <code>InputStream</code> and represent
      * same data as result InputStream.
-     * <p/>
+     * <p>
      * This method is useful where,
      * <ul>
      * <li>Source InputStream is slow.</li>
@@ -706,7 +707,7 @@
 
     /**
      * Gets the contents of an <code>InputStream</code> as a <code>byte[]</code>.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
      *
@@ -788,7 +789,7 @@
     /**
      * Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
      * using the default character encoding of the platform.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedReader</code>.
      *
@@ -806,7 +807,7 @@
     /**
      * Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
      * using the specified character encoding.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedReader</code>.
      *
@@ -826,10 +827,10 @@
     /**
      * Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
      * using the specified character encoding.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedReader</code>.
      *
@@ -850,7 +851,7 @@
     /**
      * Gets the contents of a <code>String</code> as a <code>byte[]</code>
      * using the default character encoding of the platform.
-     * <p/>
+     * <p>
      * This is the same as {@link String#getBytes()}.
      *
      * @param input the <code>String</code> to convert
@@ -920,7 +921,7 @@
     /**
      * Gets the contents of an <code>InputStream</code> as a character array
      * using the default character encoding of the platform.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
      *
@@ -939,7 +940,7 @@
     /**
      * Gets the contents of an <code>InputStream</code> as a character array
      * using the specified character encoding.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
      *
@@ -960,10 +961,10 @@
     /**
      * Gets the contents of an <code>InputStream</code> as a character array
      * using the specified character encoding.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
      *
@@ -983,7 +984,7 @@
 
     /**
      * Gets the contents of a <code>Reader</code> as a character array.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedReader</code>.
      *
@@ -1005,7 +1006,7 @@
     /**
      * Gets the contents of an <code>InputStream</code> as a String
      * using the default character encoding of the platform.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
      *
@@ -1044,10 +1045,10 @@
     /**
      * Gets the contents of an <code>InputStream</code> as a String
      * using the specified character encoding.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
      *
@@ -1067,7 +1068,7 @@
 
     /**
      * Gets the contents of a <code>Reader</code> as a String.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedReader</code>.
      *
@@ -1192,7 +1193,7 @@
     /**
      * Gets the contents of a <code>byte[]</code> as a String
      * using the specified character encoding.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
      *
@@ -1212,7 +1213,7 @@
     /**
      * Gets the contents of an <code>InputStream</code> as a list of Strings,
      * one entry per line, using the default character encoding of the platform.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
      *
@@ -1231,7 +1232,7 @@
     /**
      * Gets the contents of an <code>InputStream</code> as a list of Strings,
      * one entry per line, using the specified character encoding.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
      *
@@ -1250,10 +1251,10 @@
     /**
      * Gets the contents of an <code>InputStream</code> as a list of Strings,
      * one entry per line, using the specified character encoding.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
      *
@@ -1274,7 +1275,7 @@
     /**
      * Gets the contents of a <code>Reader</code> as a list of Strings,
      * one entry per line.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedReader</code>.
      *
@@ -1300,13 +1301,13 @@
 
     /**
      * Returns an Iterator for the lines in a <code>Reader</code>.
-     * <p/>
+     * <p>
      * <code>LineIterator</code> holds a reference to the open
      * <code>Reader</code> specified here. When you have finished with the
      * iterator you should close the reader to free internal resources.
      * This can be done by closing the reader directly, or by calling
      * {@link LineIterator#close()} or {@link LineIterator#closeQuietly(LineIterator)}.
-     * <p/>
+     * <p>
      * The recommended usage pattern is:
      * <pre>
      * try {
@@ -1332,13 +1333,13 @@
     /**
      * Returns an Iterator for the lines in an <code>InputStream</code>, using
      * the character encoding specified (or default encoding if null).
-     * <p/>
+     * <p>
      * <code>LineIterator</code> holds a reference to the open
      * <code>InputStream</code> specified here. When you have finished with
      * the iterator you should close the stream to free internal resources.
      * This can be done by closing the stream directly, or by calling
      * {@link LineIterator#close()} or {@link LineIterator#closeQuietly(LineIterator)}.
-     * <p/>
+     * <p>
      * The recommended usage pattern is:
      * <pre>
      * try {
@@ -1366,13 +1367,13 @@
     /**
      * Returns an Iterator for the lines in an <code>InputStream</code>, using
      * the character encoding specified (or default encoding if null).
-     * <p/>
+     * <p>
      * <code>LineIterator</code> holds a reference to the open
      * <code>InputStream</code> specified here. When you have finished with
      * the iterator you should close the stream to free internal resources.
      * This can be done by closing the stream directly, or by calling
      * {@link LineIterator#close()} or {@link LineIterator#closeQuietly(LineIterator)}.
-     * <p/>
+     * <p>
      * The recommended usage pattern is:
      * <pre>
      * try {
@@ -1432,7 +1433,7 @@
     /**
      * Converts the specified CharSequence to an input stream, encoded as bytes
      * using the specified character encoding.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
      *
@@ -1481,7 +1482,7 @@
     /**
      * Converts the specified string to an input stream, encoded as bytes
      * using the specified character encoding.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
      *
@@ -1548,7 +1549,7 @@
     /**
      * Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
      * using the default character encoding of the platform.
-     * <p/>
+     * <p>
      * This method uses {@link String#String(byte[])}.
      *
      * @param data the byte array to write, do not modify during output,
@@ -1567,7 +1568,7 @@
     /**
      * Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
      * using the specified character encoding.
-     * <p/>
+     * <p>
      * This method uses {@link String#String(byte[], String)}.
      *
      * @param data the byte array to write, do not modify during output,
@@ -1587,10 +1588,10 @@
     /**
      * Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
      * using the specified character encoding.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p/>
+     * <p>
      * This method uses {@link String#String(byte[], String)}.
      *
      * @param data the byte array to write, do not modify during output,
@@ -1655,7 +1656,7 @@
     /**
      * Writes chars from a <code>char[]</code> to bytes on an
      * <code>OutputStream</code>.
-     * <p/>
+     * <p>
      * This method uses {@link String#String(char[])} and
      * {@link String#getBytes()}.
      *
@@ -1676,7 +1677,7 @@
     /**
      * Writes chars from a <code>char[]</code> to bytes on an
      * <code>OutputStream</code> using the specified character encoding.
-     * <p/>
+     * <p>
      * This method uses {@link String#String(char[])} and
      * {@link String#getBytes(String)}.
      *
@@ -1697,10 +1698,10 @@
     /**
      * Writes chars from a <code>char[]</code> to bytes on an
      * <code>OutputStream</code> using the specified character encoding.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p/>
+     * <p>
      * This method uses {@link String#String(char[])} and
      * {@link String#getBytes(String)}.
      *
@@ -1741,7 +1742,7 @@
      * Writes chars from a <code>CharSequence</code> to bytes on an
      * <code>OutputStream</code> using the default character encoding of the
      * platform.
-     * <p/>
+     * <p>
      * This method uses {@link String#getBytes()}.
      *
      * @param data the <code>CharSequence</code> to write, null ignored
@@ -1760,7 +1761,7 @@
     /**
      * Writes chars from a <code>CharSequence</code> to bytes on an
      * <code>OutputStream</code> using the specified character encoding.
-     * <p/>
+     * <p>
      * This method uses {@link String#getBytes(String)}.
      *
      * @param data the <code>CharSequence</code> to write, null ignored
@@ -1780,10 +1781,10 @@
     /**
      * Writes chars from a <code>CharSequence</code> to bytes on an
      * <code>OutputStream</code> using the specified character encoding.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p/>
+     * <p>
      * This method uses {@link String#getBytes(String)}.
      *
      * @param data the <code>CharSequence</code> to write, null ignored
@@ -1822,7 +1823,7 @@
      * Writes chars from a <code>String</code> to bytes on an
      * <code>OutputStream</code> using the default character encoding of the
      * platform.
-     * <p/>
+     * <p>
      * This method uses {@link String#getBytes()}.
      *
      * @param data the <code>String</code> to write, null ignored
@@ -1841,7 +1842,7 @@
     /**
      * Writes chars from a <code>String</code> to bytes on an
      * <code>OutputStream</code> using the specified character encoding.
-     * <p/>
+     * <p>
      * This method uses {@link String#getBytes(String)}.
      *
      * @param data the <code>String</code> to write, null ignored
@@ -1860,10 +1861,10 @@
     /**
      * Writes chars from a <code>String</code> to bytes on an
      * <code>OutputStream</code> using the specified character encoding.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p/>
+     * <p>
      * This method uses {@link String#getBytes(String)}.
      *
      * @param data the <code>String</code> to write, null ignored
@@ -1905,7 +1906,7 @@
      * Writes chars from a <code>StringBuffer</code> to bytes on an
      * <code>OutputStream</code> using the default character encoding of the
      * platform.
-     * <p/>
+     * <p>
      * This method uses {@link String#getBytes()}.
      *
      * @param data the <code>StringBuffer</code> to write, null ignored
@@ -1924,10 +1925,10 @@
     /**
      * Writes chars from a <code>StringBuffer</code> to bytes on an
      * <code>OutputStream</code> using the specified character encoding.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p/>
+     * <p>
      * This method uses {@link String#getBytes(String)}.
      *
      * @param data the <code>StringBuffer</code> to write, null ignored
@@ -2004,7 +2005,7 @@
      * Writes the <code>toString()</code> value of each item in a collection to
      * an <code>OutputStream</code> line by line, using the specified character
      * encoding and the specified line ending.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
      *
@@ -2057,10 +2058,10 @@
     /**
      * Copies bytes from an <code>InputStream</code> to an
      * <code>OutputStream</code>.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
-     * <p/>
+     * <p>
      * Large streams (over 2GB) will return a bytes copied value of
      * <code>-1</code> after the copy has completed since the correct
      * number of bytes cannot be returned as an int. For large streams
@@ -2084,9 +2085,9 @@
     /**
      * Copies bytes from an <code>InputStream</code> to an <code>OutputStream</code> using an internal buffer of the
      * given size.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
-     * <p/>
+     * <p>
      *
      * @param input the <code>InputStream</code> to read from
      * @param output the <code>OutputStream</code> to write to
@@ -2104,10 +2105,10 @@
     /**
      * Copies bytes from a large (over 2GB) <code>InputStream</code> to an
      * <code>OutputStream</code>.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
-     * <p/>
+     * <p>
      * The buffer size is given by {@link #DEFAULT_BUFFER_SIZE}.
      *
      * @param input the <code>InputStream</code> to read from
@@ -2125,10 +2126,10 @@
     /**
      * Copies bytes from a large (over 2GB) <code>InputStream</code> to an
      * <code>OutputStream</code>.
-     * <p/>
+     * <p>
      * This method uses the provided buffer, so there is no need to use a
      * <code>BufferedInputStream</code>.
-     * <p/>
+     * <p>
      *
      * @param input the <code>InputStream</code> to read from
      * @param output the <code>OutputStream</code> to write to
@@ -2231,10 +2232,10 @@
     /**
      * Copies bytes from an <code>InputStream</code> to chars on a
      * <code>Writer</code> using the default character encoding of the platform.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
-     * <p/>
+     * <p>
      * This method uses {@link InputStreamReader}.
      *
      * @param input the <code>InputStream</code> to read from
@@ -2253,10 +2254,10 @@
     /**
      * Copies bytes from an <code>InputStream</code> to chars on a
      * <code>Writer</code> using the specified character encoding.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
-     * <p/>
+     * <p>
      * This method uses {@link InputStreamReader}.
      *
      * @param input the <code>InputStream</code> to read from
@@ -2275,13 +2276,13 @@
     /**
      * Copies bytes from an <code>InputStream</code> to chars on a
      * <code>Writer</code> using the specified character encoding.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedInputStream</code>.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p/>
+     * <p>
      * This method uses {@link InputStreamReader}.
      *
      * @param input the <code>InputStream</code> to read from
@@ -2304,10 +2305,10 @@
 
     /**
      * Copies chars from a <code>Reader</code> to a <code>Writer</code>.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedReader</code>.
-     * <p/>
+     * <p>
      * Large streams (over 2GB) will return a chars copied value of
      * <code>-1</code> after the copy has completed since the correct
      * number of chars cannot be returned as an int. For large streams
@@ -2330,10 +2331,10 @@
 
     /**
      * Copies chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedReader</code>.
-     * <p/>
+     * <p>
      * The buffer size is given by {@link #DEFAULT_BUFFER_SIZE}.
      *
      * @param input the <code>Reader</code> to read from
@@ -2349,10 +2350,10 @@
 
     /**
      * Copies chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.
-     * <p/>
+     * <p>
      * This method uses the provided buffer, so there is no need to use a
      * <code>BufferedReader</code>.
-     * <p/>
+     * <p>
      *
      * @param input the <code>Reader</code> to read from
      * @param output the <code>Writer</code> to write to
@@ -2375,10 +2376,10 @@
     /**
      * Copies some or all chars from a large (over 2GB) <code>InputStream</code> to an
      * <code>OutputStream</code>, optionally skipping input chars.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedReader</code>.
-     * <p/>
+     * <p>
      * The buffer size is given by {@link #DEFAULT_BUFFER_SIZE}.
      *
      * @param input the <code>Reader</code> to read from
@@ -2399,10 +2400,10 @@
     /**
      * Copies some or all chars from a large (over 2GB) <code>InputStream</code> to an
      * <code>OutputStream</code>, optionally skipping input chars.
-     * <p/>
+     * <p>
      * This method uses the provided buffer, so there is no need to use a
      * <code>BufferedReader</code>.
-     * <p/>
+     * <p>
      *
      * @param input the <code>Reader</code> to read from
      * @param output the <code>Writer</code> to write to
@@ -2445,13 +2446,13 @@
      * Copies chars from a <code>Reader</code> to bytes on an
      * <code>OutputStream</code> using the default character encoding of the
      * platform, and calling flush.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedReader</code>.
-     * <p/>
+     * <p>
      * Due to the implementation of OutputStreamWriter, this method performs a
      * flush.
-     * <p/>
+     * <p>
      * This method uses {@link OutputStreamWriter}.
      *
      * @param input the <code>Reader</code> to read from
@@ -2503,16 +2504,16 @@
      * Copies chars from a <code>Reader</code> to bytes on an
      * <code>OutputStream</code> using the specified character encoding, and
      * calling flush.
-     * <p/>
+     * <p>
      * This method buffers the input internally, so there is no need to use a
      * <code>BufferedReader</code>.
-     * <p/>
+     * <p>
      * Character encoding names can be found at
      * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p/>
+     * <p>
      * Due to the implementation of OutputStreamWriter, this method performs a
      * flush.
-     * <p/>
+     * <p>
      * This method uses {@link OutputStreamWriter}.
      *
      * @param input the <code>Reader</code> to read from
@@ -2536,7 +2537,7 @@
     /**
      * Compares the contents of two Streams to determine if they are equal or
      * not.
-     * <p/>
+     * <p>
      * This method buffers the input internally using
      * <code>BufferedInputStream</code> if they are not already buffered.
      *
@@ -2575,7 +2576,7 @@
     /**
      * Compares the contents of two Readers to determine if they are equal or
      * not.
-     * <p/>
+     * <p>
      * This method buffers the input internally using
      * <code>BufferedReader</code> if they are not already buffered.
      *
@@ -2612,7 +2613,7 @@
     /**
      * Compares the contents of two Readers to determine if they are equal or
      * not, ignoring EOL characters.
-     * <p/>
+     * <p>
      * This method buffers the input internally using
      * <code>BufferedReader</code> if they are not already buffered.
      *
@@ -2932,7 +2933,7 @@
 
     /**
      * Reads bytes from a ReadableByteChannel.
-     * <p/>
+     * <p>
      * This implementation guarantees that it will read as many bytes
      * as possible before giving up; this may not always be the case for
      * subclasses of {@link ReadableByteChannel}.
@@ -2956,7 +2957,7 @@
 
     /**
      * Reads the requested number of characters or fail if there are not enough left.
-     * <p/>
+     * <p>
      * This allows for the possibility that {@link Reader#read(char[], int, int)} may
      * not read as many characters as requested (most likely because of reaching EOF).
      *
@@ -2979,7 +2980,7 @@
 
     /**
      * Reads the requested number of characters or fail if there are not enough left.
-     * <p/>
+     * <p>
      * This allows for the possibility that {@link Reader#read(char[], int, int)} may
      * not read as many characters as requested (most likely because of reaching EOF).
      *
@@ -2996,7 +2997,7 @@
 
     /**
      * Reads the requested number of bytes or fail if there are not enough left.
-     * <p/>
+     * <p>
      * This allows for the possibility that {@link InputStream#read(byte[], int, int)} may
      * not read as many bytes as requested (most likely because of reaching EOF).
      *
@@ -3019,7 +3020,7 @@
 
     /**
      * Reads the requested number of bytes or fail if there are not enough left.
-     * <p/>
+     * <p>
      * This allows for the possibility that {@link InputStream#read(byte[], int, int)} may
      * not read as many bytes as requested (most likely because of reaching EOF).
      *
@@ -3036,7 +3037,7 @@
 
     /**
      * Reads the requested number of bytes or fail if there are not enough left.
-     * <p/>
+     * <p>
      * This allows for the possibility that {@link InputStream#read(byte[], int, int)} may
      * not read as many bytes as requested (most likely because of reaching EOF).
      *
@@ -3056,7 +3057,7 @@
 
     /**
      * Reads the requested number of bytes or fail if there are not enough left.
-     * <p/>
+     * <p>
      * This allows for the possibility that {@link ReadableByteChannel#read(ByteBuffer)} may
      * not read as many bytes as requested (most likely because of reaching EOF).
      *
diff --git a/src/main/java/org/apache/commons/io/input/Tailer.java b/src/main/java/org/apache/commons/io/input/Tailer.java
index ade7cd8..36f4567 100644
--- a/src/main/java/org/apache/commons/io/input/Tailer.java
+++ b/src/main/java/org/apache/commons/io/input/Tailer.java
@@ -550,7 +550,9 @@
         IOUtils.closeQuietly(lineBuf); // not strictly necessary
         reader.seek(rePos); // Ensure we can re-read if necessary
 
-        listener.endOfFileReached();
+        if (listener instanceof TailerListenerAdapter) {
+            ((TailerListenerAdapter) listener).endOfFileReached();
+        }
 
         return rePos;
     }
diff --git a/src/main/java/org/apache/commons/io/input/TailerListener.java b/src/main/java/org/apache/commons/io/input/TailerListener.java
index 6906db8..c58eb64 100644
--- a/src/main/java/org/apache/commons/io/input/TailerListener.java
+++ b/src/main/java/org/apache/commons/io/input/TailerListener.java
@@ -64,10 +64,4 @@
      */
     void handle(Exception ex);
 
-    /**
-     * Called each time the Tailer reaches the end of the file.
-     * <p>
-     * <b>Note:</b> this is called from the tailer thread.
-     */
-    void endOfFileReached();
 }
diff --git a/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java b/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java
index 52ee222..1ae624b 100644
--- a/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java
+++ b/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java
@@ -63,6 +63,13 @@
 
     /**
      * Called each time the Tailer reaches the end of the file.
+     *
+     * <b>Note:</b> this is called from the tailer thread.
+     *
+     * Note: a future version of commons-io will pull this method up to the TailerListener interface,
+     * for now clients must subclass this class to use this feature.
+     *
+     * @since 2.5
      */
     public void endOfFileReached() {
     }
diff --git a/trunk/src/main/java/org/apache/commons/io/serialization/ClassNameMatcher.java b/src/main/java/org/apache/commons/io/serialization/ClassNameMatcher.java
similarity index 100%
rename from trunk/src/main/java/org/apache/commons/io/serialization/ClassNameMatcher.java
rename to src/main/java/org/apache/commons/io/serialization/ClassNameMatcher.java
diff --git a/trunk/src/main/java/org/apache/commons/io/serialization/FullClassNameMatcher.java b/src/main/java/org/apache/commons/io/serialization/FullClassNameMatcher.java
similarity index 100%
rename from trunk/src/main/java/org/apache/commons/io/serialization/FullClassNameMatcher.java
rename to src/main/java/org/apache/commons/io/serialization/FullClassNameMatcher.java
diff --git a/trunk/src/main/java/org/apache/commons/io/serialization/RegexpClassNameMatcher.java b/src/main/java/org/apache/commons/io/serialization/RegexpClassNameMatcher.java
similarity index 100%
rename from trunk/src/main/java/org/apache/commons/io/serialization/RegexpClassNameMatcher.java
rename to src/main/java/org/apache/commons/io/serialization/RegexpClassNameMatcher.java
diff --git a/trunk/src/main/java/org/apache/commons/io/serialization/ValidatingObjectInputStream.java b/src/main/java/org/apache/commons/io/serialization/ValidatingObjectInputStream.java
similarity index 100%
rename from trunk/src/main/java/org/apache/commons/io/serialization/ValidatingObjectInputStream.java
rename to src/main/java/org/apache/commons/io/serialization/ValidatingObjectInputStream.java
diff --git a/trunk/src/main/java/org/apache/commons/io/serialization/WildcardClassNameMatcher.java b/src/main/java/org/apache/commons/io/serialization/WildcardClassNameMatcher.java
similarity index 100%
rename from trunk/src/main/java/org/apache/commons/io/serialization/WildcardClassNameMatcher.java
rename to src/main/java/org/apache/commons/io/serialization/WildcardClassNameMatcher.java
diff --git a/trunk/src/main/java/org/apache/commons/io/serialization/package.html b/src/main/java/org/apache/commons/io/serialization/package.html
similarity index 100%
rename from trunk/src/main/java/org/apache/commons/io/serialization/package.html
rename to src/main/java/org/apache/commons/io/serialization/package.html
diff --git a/src/site/xdoc/download_io.xml b/src/site/xdoc/download_io.xml
index f84abc3..bbb2565 100644
--- a/src/site/xdoc/download_io.xml
+++ b/src/site/xdoc/download_io.xml
@@ -45,11 +45,11 @@
 -->
 <document>
   <properties>
-    <title>Download Commons IO</title>
+    <title>Download Apache Commons IO</title>
     <author email="dev@commons.apache.org">Commons Documentation Team</author>
   </properties>
   <body>
-    <section name="Download Commons IO">
+    <section name="Download Apache Commons IO">
     <subsection name="Using a Mirror">
       <p>
         We recommend you use a mirror to download our release
@@ -95,62 +95,32 @@
       </p>
     </subsection>
     </section>
-    <section name="Commons IO 2.4 (requires JDK 1.6+)">
+    <section name="Apache Commons IO 2.5 (requires JDK 1.6+)">
       <subsection name="Binaries">
         <table>
           <tr>
-              <td><a href="[preferred]/commons/io/binaries/commons-io-2.4-bin.tar.gz">commons-io-2.4-bin.tar.gz</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.4-bin.tar.gz.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.4-bin.tar.gz.asc">pgp</a></td>
+              <td><a href="[preferred]/commons/io/binaries/commons-io-2.5-bin.tar.gz">commons-io-2.5-bin.tar.gz</a></td>
+              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.5-bin.tar.gz.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.5-bin.tar.gz.asc">pgp</a></td>
           </tr>
           <tr>
-              <td><a href="[preferred]/commons/io/binaries/commons-io-2.4-bin.zip">commons-io-2.4-bin.zip</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.4-bin.zip.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.4-bin.zip.asc">pgp</a></td>
+              <td><a href="[preferred]/commons/io/binaries/commons-io-2.5-bin.zip">commons-io-2.5-bin.zip</a></td>
+              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.5-bin.zip.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.5-bin.zip.asc">pgp</a></td>
           </tr>
         </table>
       </subsection>
       <subsection name="Source">
         <table>
           <tr>
-              <td><a href="[preferred]/commons/io/source/commons-io-2.4-src.tar.gz">commons-io-2.4-src.tar.gz</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.4-src.tar.gz.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.4-src.tar.gz.asc">pgp</a></td>
+              <td><a href="[preferred]/commons/io/source/commons-io-2.5-src.tar.gz">commons-io-2.5-src.tar.gz</a></td>
+              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.5-src.tar.gz.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.5-src.tar.gz.asc">pgp</a></td>
           </tr>
           <tr>
-              <td><a href="[preferred]/commons/io/source/commons-io-2.4-src.zip">commons-io-2.4-src.zip</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.4-src.zip.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.4-src.zip.asc">pgp</a></td>
-          </tr>
-        </table>
-      </subsection>
-    </section>
-    <section name="Commons IO 2.2 (requires JDK 1.5+)">
-      <subsection name="Binaries">
-        <table>
-          <tr>
-              <td><a href="[preferred]/commons/io/binaries/commons-io-2.2-bin.tar.gz">commons-io-2.2-bin.tar.gz</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.2-bin.tar.gz.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.2-bin.tar.gz.asc">pgp</a></td>
-          </tr>
-          <tr>
-              <td><a href="[preferred]/commons/io/binaries/commons-io-2.2-bin.zip">commons-io-2.2-bin.zip</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.2-bin.zip.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.2-bin.zip.asc">pgp</a></td>
-          </tr>
-        </table>
-      </subsection>
-      <subsection name="Source">
-        <table>
-          <tr>
-              <td><a href="[preferred]/commons/io/source/commons-io-2.2-src.tar.gz">commons-io-2.2-src.tar.gz</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.2-src.tar.gz.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.2-src.tar.gz.asc">pgp</a></td>
-          </tr>
-          <tr>
-              <td><a href="[preferred]/commons/io/source/commons-io-2.2-src.zip">commons-io-2.2-src.zip</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.2-src.zip.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.2-src.zip.asc">pgp</a></td>
+              <td><a href="[preferred]/commons/io/source/commons-io-2.5-src.zip">commons-io-2.5-src.zip</a></td>
+              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.5-src.zip.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.5-src.zip.asc">pgp</a></td>
           </tr>
         </table>
       </subsection>
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index 0357a1d..7a1f160 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -47,9 +47,23 @@
 <!-- ================================================== -->
 <section name="Releases">
 
-<subsection name="Commons IO 2.4 (requires JDK 1.6+)">
+    <subsection name="Commons IO 2.5 (requires JDK 1.6+)">
+        <p>
+            Commons IO 2.5 is the latest version and requires a minimum of JDK 1.6 -
+            <a href="http://commons.apache.org/io/download_io.cgi">Download now!</a>
+        </p>
+        <p>
+            View the
+            <a href="upgradeto2_5.html">Release Notes</a>
+            and
+            <a href="javadocs/api-release/index.html">JavaDoc API documents</a>
+        </p>
+    </subsection>
+
+
+    <subsection name="Commons IO 2.4 (requires JDK 1.6+)">
 <p>
-Commons IO 2.4 is the latest version and requires a minimum of JDK 1.6 -
+    Commons IO 2.4 requires a minimum of JDK 1.6 -
 <a href="http://commons.apache.org/io/download_io.cgi">Download now!</a>
 </p> 
 <p>
diff --git a/trunk/src/site/xdoc/upgradeto2_5.xml b/src/site/xdoc/upgradeto2_5.xml
similarity index 100%
rename from trunk/src/site/xdoc/upgradeto2_5.xml
rename to src/site/xdoc/upgradeto2_5.xml
diff --git a/src/test/java/org/apache/commons/io/input/TailerTest.java b/src/test/java/org/apache/commons/io/input/TailerTest.java
index 1d3b706..7699565 100644
--- a/src/test/java/org/apache/commons/io/input/TailerTest.java
+++ b/src/test/java/org/apache/commons/io/input/TailerTest.java
@@ -436,7 +436,7 @@
     /**
      * Test {@link TailerListener} implementation.
      */
-    private static class TestTailerListener implements TailerListener {
+    private static class TestTailerListener extends TailerListenerAdapter {
 
         // Must be synchronised because it is written by one thread and read by another
         private final List<String> lines = Collections.synchronizedList(new ArrayList<String>());
diff --git a/trunk/src/test/java/org/apache/commons/io/serialization/ClosingBase.java b/src/test/java/org/apache/commons/io/serialization/ClosingBase.java
similarity index 100%
rename from trunk/src/test/java/org/apache/commons/io/serialization/ClosingBase.java
rename to src/test/java/org/apache/commons/io/serialization/ClosingBase.java
diff --git a/trunk/src/test/java/org/apache/commons/io/serialization/FullClassNameMatcherTest.java b/src/test/java/org/apache/commons/io/serialization/FullClassNameMatcherTest.java
similarity index 100%
rename from trunk/src/test/java/org/apache/commons/io/serialization/FullClassNameMatcherTest.java
rename to src/test/java/org/apache/commons/io/serialization/FullClassNameMatcherTest.java
diff --git a/trunk/src/test/java/org/apache/commons/io/serialization/MockSerializedClass.java b/src/test/java/org/apache/commons/io/serialization/MockSerializedClass.java
similarity index 100%
rename from trunk/src/test/java/org/apache/commons/io/serialization/MockSerializedClass.java
rename to src/test/java/org/apache/commons/io/serialization/MockSerializedClass.java
diff --git a/trunk/src/test/java/org/apache/commons/io/serialization/MoreComplexObject.java b/src/test/java/org/apache/commons/io/serialization/MoreComplexObject.java
similarity index 100%
rename from trunk/src/test/java/org/apache/commons/io/serialization/MoreComplexObject.java
rename to src/test/java/org/apache/commons/io/serialization/MoreComplexObject.java
diff --git a/trunk/src/test/java/org/apache/commons/io/serialization/MoreComplexObjectTest.java b/src/test/java/org/apache/commons/io/serialization/MoreComplexObjectTest.java
similarity index 100%
rename from trunk/src/test/java/org/apache/commons/io/serialization/MoreComplexObjectTest.java
rename to src/test/java/org/apache/commons/io/serialization/MoreComplexObjectTest.java
diff --git a/trunk/src/test/java/org/apache/commons/io/serialization/RegexpClassNameMatcherTest.java b/src/test/java/org/apache/commons/io/serialization/RegexpClassNameMatcherTest.java
similarity index 100%
rename from trunk/src/test/java/org/apache/commons/io/serialization/RegexpClassNameMatcherTest.java
rename to src/test/java/org/apache/commons/io/serialization/RegexpClassNameMatcherTest.java
diff --git a/trunk/src/test/java/org/apache/commons/io/serialization/ValidatingObjectInputStreamTest.java b/src/test/java/org/apache/commons/io/serialization/ValidatingObjectInputStreamTest.java
similarity index 100%
rename from trunk/src/test/java/org/apache/commons/io/serialization/ValidatingObjectInputStreamTest.java
rename to src/test/java/org/apache/commons/io/serialization/ValidatingObjectInputStreamTest.java
diff --git a/trunk/src/test/java/org/apache/commons/io/serialization/WildcardClassNameMatcherTest.java b/src/test/java/org/apache/commons/io/serialization/WildcardClassNameMatcherTest.java
similarity index 100%
rename from trunk/src/test/java/org/apache/commons/io/serialization/WildcardClassNameMatcherTest.java
rename to src/test/java/org/apache/commons/io/serialization/WildcardClassNameMatcherTest.java
diff --git a/trunk/CONTRIBUTING.md b/trunk/CONTRIBUTING.md
deleted file mode 100644
index 11e9dd7..0000000
--- a/trunk/CONTRIBUTING.md
+++ /dev/null
@@ -1,97 +0,0 @@
-<!---
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!---
- +======================================================================+
- |****                                                              ****|
- |****      THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN      ****|
- |****                    DO NOT EDIT DIRECTLY                      ****|
- |****                                                              ****|
- +======================================================================+
- | TEMPLATE FILE: contributing-md-template.md                           |
- | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
- +======================================================================+
- |                                                                      |
- | 1) Re-generate using: mvn commons:contributing-md                    |
- |                                                                      |
- | 2) Set the following properties in the component's pom:              |
- |    - commons.jira.id  (required, alphabetic, upper case)             |
- |                                                                      |
- | 3) Example Properties                                                |
- |                                                                      |
- |  <properties>                                                        |
- |    <commons.jira.id>MATH</commons.jira.id>                           |
- |  </properties>                                                       |
- |                                                                      |
- +======================================================================+
---->
-Contributing to Apache Commons IO
-======================
-
-You have found a bug or you have an idea for a cool new feature? Contributing code is a great way to give something back to
-the open source community. Before you dig right into the code there are a few guidelines that we need contributors to
-follow so that we can have a chance of keeping on top of things.
-
-Getting Started
----------------
-
-+ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
-+ Make sure you have a [GitHub account](https://github.com/signup/free).
-+ If you're planning to implement a new feature it makes sense to discuss you're changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons IO's scope.
-+ Submit a ticket for your issue, assuming one does not already exist.
-  + Clearly describe the issue including steps to reproduce when it is a bug.
-  + Make sure you fill in the earliest version that you know has the issue.
-+ Fork the repository on GitHub.
-
-Making Changes
---------------
-
-+ Create a topic branch from where you want to base your work (this is usually the master/trunk branch).
-+ Make commits of logical units.
-+ Respect the original code style:
-  + Only use spaces for indentation.
-  + Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
-  + Check for unnecessary whitespace with git diff --check before committing.
-+ Make sure your commit messages are in the proper format. Your commit message should contain the key of the JIRA issue.
-+ Make sure you have added the necessary tests for your changes.
-+ Run all the tests with `mvn clean verify` to assure nothing else was accidentally broken.
-
-Making Trivial Changes
-----------------------
-
-For changes of a trivial nature to comments and documentation, it is not always necessary to create a new ticket in JIRA.
-In this case, it is appropriate to start the first line of a commit with '(doc)' instead of a ticket number.
-
-Submitting Changes
-------------------
-
-+ Sign the [Contributor License Agreement][cla] if you haven't already.
-+ Push your changes to a topic branch in your fork of the repository.
-+ Submit a pull request to the repository in the apache organization.
-+ Update your JIRA ticket and include a link to the pull request in the ticket.
-
-Additional Resources
---------------------
-
-+ [Contributing patches](https://commons.apache.org/patches.html)
-+ [Apache Commons IO JIRA project page](https://issues.apache.org/jira/browse/IO)
-+ [Contributor License Agreement][cla]
-+ [General GitHub documentation](https://help.github.com/)
-+ [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
-+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
-+ #apachecommons IRC channel on freenode.org
-
-[cla]:https://www.apache.org/licenses/#clas
diff --git a/trunk/LICENSE.txt b/trunk/LICENSE.txt
deleted file mode 100644
index 6b0b127..0000000
--- a/trunk/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
diff --git a/trunk/NOTICE.txt b/trunk/NOTICE.txt
deleted file mode 100644
index a6b77d1..0000000
--- a/trunk/NOTICE.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Apache Commons IO
-Copyright 2002-2014 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
diff --git a/trunk/PROPOSAL.html b/trunk/PROPOSAL.html
deleted file mode 100644
index a96b3e6..0000000
--- a/trunk/PROPOSAL.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-<html>
-<head>
-  <title>Proposal for IO Package</title>
-</head>
- <body bgcolor="white">
-  
-<div align="center"> 
-<h1>Proposal for <em>IO</em> Package</h1>
- </div>
-  
-<h3>(0) Rationale</h3>
-  
-<p>Many software projects have a need to perform I/O in various ways, and
-the JDK class libraries provide a lot of functionality, but sometimes you
-need just a little bit more.  The io package seeks to  encapsulate some of
-the most popular i/o base classes into one easy to  use package.</p>
-   
-<h3>(1) Scope of the Package</h3>
-  
-<p>This proposal is to create a package of Java utility classes for  various
-types of i/o related activity.</p>
-   
-<h3>(1.5) Interaction With Other Packages</h3>
-  
-<p><em>IO</em> relies only on standard JDK 1.2 (or later) APIs for production
-deployment.  It utilizes the JUnit unit testing framework for developing
-and executing unit tests, but this is of interest only to developers of the
-component.  IO will be a dependency for several existing components in the
-open source world.</p>
-  
-<p>No external configuration files are utilized.</p>
-   
-<h3>(2) Initial Source of the Package</h3>
-  
-<p>The original Java classes are splashed around various Apache  subprojects.
- We intend to seek them out and integrate them.</p>
-  
-<p>The proposed package name for the new component is <code>org.apache.commons.io</code>.</p>
-   
-<h3>(3)  Required Jakarta-Commons Resources</h3>
-  
-<ul>
- <li>CVS Repository - New directory <code>io</code> in the     <code>jakarta-commons</code>
-CVS repository.</li>
- <li>Mailing List - Discussions will take place on the general     <em>dev@commons.apache.org</em>
-mailing list.  To help     list subscribers identify messages of interest,
-it is suggested that     the message subject of messages about this component
-be prefixed with     [IO].</li>
- <li>Bugzilla - New component "IO" under the "Commons" product     category,
-with appropriate version identifiers as needed.</li>
- <li>Jyve FAQ - New category "commons-io" (when available).</li>
- 
-</ul>
-   
-<h3>(4) Initial Committers</h3>
-  
-<p>The initial committers on the IO component shall be Scott Sanders and
-Nicola Ken Barozzi and Henri Yandell</p>
-    <br>
-</body>
-</html>
diff --git a/trunk/README.md b/trunk/README.md
deleted file mode 100644
index dad371b..0000000
--- a/trunk/README.md
+++ /dev/null
@@ -1,99 +0,0 @@
-<!---
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!---
- +======================================================================+
- |****                                                              ****|
- |****      THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN      ****|
- |****                    DO NOT EDIT DIRECTLY                      ****|
- |****                                                              ****|
- +======================================================================+
- | TEMPLATE FILE: readme-md-template.md                                 |
- | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
- +======================================================================+
- |                                                                      |
- | 1) Re-generate using: mvn commons:readme-md                          |
- |                                                                      |
- | 2) Set the following properties in the component's pom:              |
- |    - commons.componentid (required, alphabetic, lower case)          |
- |    - commons.release.version (required)                              |
- |                                                                      |
- | 3) Example Properties                                                |
- |                                                                      |
- |  <properties>                                                        |
- |    <commons.componentid>math</commons.componentid>                   |
- |    <commons.release.version>1.2</commons.release.version>            |
- |  </properties>                                                       |
- |                                                                      |
- +======================================================================+
---->
-Apache Commons IO
-===================
-
-The Apache Commons IO library contains utility classes, stream implementations, file filters, 
-file comparators, endian transformation classes, and much more.
-
-Documentation
--------------
-
-More information can be found on the [homepage](https://commons.apache.org/proper/commons-io).
-The [JavaDoc](https://commons.apache.org/proper/commons-io/javadocs/api-release) can be browsed.
-Questions related to the usage of Apache Commons IO should be posted to the [user mailing list][ml].
-
-Where can I get the latest release?
------------------------------------
-You can download source and binaries from our [download page](https://commons.apache.org/proper/commons-io/download_io.cgi).
-
-Alternatively you can pull it from the central Maven repositories:
-
-```xml
-<dependency>
-  <groupId>commons-io</groupId>
-  <artifactId>commons-io</artifactId>
-  <version>2.4</version>
-</dependency>
-```
-
-Contributing
-------------
-
-We accept PRs via github. The [developer mailing list][ml] is the main channel of communication for contributors.
-There are some guidelines which will make applying PRs easier for us:
-+ No tabs! Please use spaces for indentation.
-+ Respect the code style.
-+ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
-+ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn clean test```.
-
-If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
-You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).
-
-License
--------
-Code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0.txt).
-
-Donations
----------
-You like Apache Commons IO? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support the development.
-
-Additional Resources
---------------------
-
-+ [Apache Commons Homepage](https://commons.apache.org/)
-+ [Apache Bugtracker (JIRA)](https://issues.apache.org/jira/)
-+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
-+ #apachecommons IRC channel on freenode.org
-
-[ml]:https://commons.apache.org/mail-lists.html
diff --git a/trunk/RELEASE-NOTES.txt b/trunk/RELEASE-NOTES.txt
deleted file mode 100644
index b08f76d..0000000
--- a/trunk/RELEASE-NOTES.txt
+++ /dev/null
@@ -1,992 +0,0 @@
-
-Apache Commons IO 
-Version 2.5
-Release Notes
-
-INTRODUCTION:
-
-Commons IO is a package of Java utility classes like java.io.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-The Apache Commons IO library contains utility classes, stream implementations, file filters, 
-file comparators, endian transformation classes, and much more.
-
-==============================================================================
-Apache Commons IO Version 2.5
-==============================================================================
-New features and bug fixes.
-
-Changes in this version include:
-
-New features:
-o IO-487:  Add ValidatingObjectInputStream for controlled deserialization 
-o IO-471:  Support for additional encodings in ReversedLinesFileReader Thanks to Leandro Reis. 
-o IO-425:  Setter method for threshold on ThresholdingOutputStream Thanks to Craig Swank. 
-o IO-406:  Introduce new class AppendableOutputStream Thanks to Niall Pemberton. 
-o IO-459:  Add WindowsLineEndingInputStream and UnixLineEndingInputStream. Thanks to Kristian Rosenvold. 
-o IO-457:  Add a BoundedReader, a wrapper that can be used to constrain access
-        to an underlying stream when used with mark/reset -
-        to avoid overflowing the mark limit of the underlying buffer. Thanks to Kristian Rosenvold. 
-o IO-426:  Add API IOUtils.closeQuietly(Closeable...) 
-o IO-410:  Readfully() That Returns A Byte Array Thanks to Beluga Behr. 
-o IO-395:  Overload IOUtils buffer methods to accept buffer size Thanks to Beluga Behr. 
-o IO-382:  Chunked IO for large arrays.
-         Added writeChunked(byte[], OutputStream) and writeChunked(char[] Writer)
-         Added ChunkedOutputStream, ChunkedWriter 
-o IO-233:  Add Methods for Buffering Streams/Writers To IOUtils
-         Added overloaded buffer() methods - see also IO-330 
-o IO-330:  IOUtils#toBufferedOutputStream/toBufferedWriter to conditionally wrap the output
-         Added overloaded buffer() methods - see also IO-233 
-o IO-381:  Add FileUtils.copyInputStreamToFile API with option to leave the source open.
-        See copyInputStreamToFile(final InputStream source, final File destination, boolean closeSource) 
-o IO-379:  CharSequenceInputStream - add tests for available()
-         Fix code so it really does reflect a minimum available. 
-o IO-346:  Add ByteArrayOutputStream.toInputStream() 
-o IO-341:  A constant for holding the BOM character (U+FEFF) 
-o IO-361:  Add API FileUtils.forceMkdirsParent(). 
-o IO-360:  Add API Charsets.requiredCharsets(). 
-o IO-359:  Add IOUtils.skip and skipFully(ReadableByteChannel, long). Thanks to yukoba. 
-o IO-358:  Add IOUtils.read and readFully(ReadableByteChannel, ByteBuffer buffer). Thanks to yukoba. 
-o IO-353:  Add API IOUtils.copy(InputStream, OutputStream, int) Thanks to ggregory. 
-o IO-349:  Add API with array offset and length argument to FileUtils.writeByteArrayToFile. Thanks to scop. 
-o IO-348:  Missing information in IllegalArgumentException thrown by org.apache.commons.io.FileUtils#validateListFilesParameters. Thanks to plcstpierre. 
-o IO-345:  Supply a hook method allowing Tailer actively determining stop condition. Thanks to mkresse. 
-o IO-437:  Make IOUtils.EOF public and reuse it in various classes. 
-
-Fixed Bugs:
-o IO-446:  adds an endOfFileReached method to the TailerListener Thanks to Jeffrey Barrus. 
-o IO-484:  FilenameUtils should handle embedded null bytes Thanks to Philippe Arteau. 
-o IO-481:  Changed/Corrected algorithm for waitFor 
-o IO-428:  BOMInputStream.skip returns wrong count if stream contains no BOM Thanks to Stefan Gmeiner. 
-o IO-488:  FileUtils.waitFor(...) swallows thread interrupted status Thanks to Björn Buchner. 
-o IO-452:  Support for symlinks with missing target. Added support for JDK7 symlink features when present Thanks to David Standish. 
-o IO-453:  Regression in FileUtils.readFileToString from 2.0.1 Thanks to Steven Christou. 
-o IO-451:  ant test fails - resources missing from test classpath Thanks to David Standish. 
-o IO-435:  Document that FileUtils.deleteDirectory, directoryContains and cleanDirectory
-         may throw an IllegalArgumentException in case the passed directory does not
-         exist or is not a directory. Thanks to Dominik Stadler. 
-o IO-424:  Javadoc fixes, mostly to appease 1.8.0 Thanks to Ville Skyttä. 
-o IO-389:  FileUtils.sizeOfDirectory can throw IllegalArgumentException Thanks to Austin Doupnik. 
-o IO-390:  FileUtils.sizeOfDirectoryAsBigInteger can overflow.
-         Ensure that recursive calls all use BigInteger 
-o IO-385:  FileUtils.doCopyFile can potentially loop for ever
-         Exit loop if no data to copy 
-o IO-383:  FileUtils.doCopyFile caches the file size; needs to be documented
-         Added Javadoc; show file lengths in exception message 
-o IO-380:  FileUtils.copyInputStreamToFile should document it closes the input source Thanks to claudio_ch. 
-o IO-279:  Tailer erroneously considers file as new.
-        Fix to use file.lastModified() rather than System.currentTimeMillis() 
-o IO-356:  CharSequenceInputStream#reset() behaves incorrectly in case when buffer size is not dividable by data size.
-         Fix code so skip relates to the encoded bytes; reset now re-encodes the data up to the point of the mark 
-o IO-368:  ClassLoaderObjectInputStream does not handle primitive typed members 
-o IO-314:  Deprecate all methods that use the default encoding 
-o IO-338:  When a file is rotated, finish reading previous file prior to starting new one 
-o IO-354:  Commons IO Tailer does not respect UTF-8 Charset. 
-o IO-323:  What should happen in FileUtils.sizeOf[Directory] when an overflow takes place?
-        Added Javadoc. 
-o IO-372:  FileUtils.moveDirectory can produce misleading error message on failiure 
-o IO-362:  IOUtils.contentEquals* methods returns false if input1 == input2, should return true. Thanks to mmadson, ggregory. 
-o IO-357:  [Tailer] InterruptedException while the thread is sleeping is silently ignored Thanks to mortenh. 
-o IO-352:  Spelling fixes. Thanks to scop. 
-o IO-436:  Improper JavaDoc comment for FilenameUtils.indexOfExtension. Thanks to christoph.schneegans. 
-
-Changes:
-o IO-466:  Added testcase to show this was fixed with IO-423 
-o IO-479:  Correct exception message in FileUtils.getFile(File, String...) Thanks to Zhouce Chen. 
-o IO-465:  Update to JUnit 4.12 Thanks to based2. 
-o IO-462:  IOExceptionWithCause no longer needed 
-o IO-422:  Deprecate Charsets Charset constants in favor of Java 7's java.nio.charset.StandardCharsets 
-o IO-239:  Convert IOCase to a Java 1.5+ Enumeration
-         [N.B. this is binary compatible] 
-o IO-328:  getPrefixLength returns null if filename has leading slashes
-        Javadoc: add examples to show correct behaviour; add unit tests 
-o IO-299:  FileUtils.listFilesAndDirs includes original dir in results even when it doesn't match filter
-        Javadoc: clarify that original dir is included in the results 
-o IO-375:  FilenameUtils.splitOnTokens(String text) check for '**' could be simplified 
-o IO-374:  WildcardFileFilter ctors should not use null to mean IOCase.SENSITIVE when delegating to other ctors 
-
-Compatibility with 2.4:
-Binary compatible: Yes.
-Source compatible: Yes.
-Semantic compatible: Yes.
-
-Compatibility with 2.2 and 1.4:
-Binary compatible: Yes.
-Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-
-Commons IO 2.5 requires JDK 1.6 or later.
-Commons IO 2.4 requires JDK 1.6 or later.
-Commons IO 2.3 requires JDK 1.6 or later.
-Commons IO 2.2 requires JDK 1.5 or later.
-Commons IO 1.4 requires JDK 1.3 or later.
-
-==============================================================================
-Apache Commons IO Version 2.4
-==============================================================================
-
-Changes in this version include:
-
-New features:
-o IO-269:  Tailer locks file from deletion/rename on Windows. Thanks to
-sebb.
-o IO-333:  Export OSGi packages at version 1.x in addition to 2.x. Thanks
-to fmeschbe.
-o IO-320:  Add XmlStreamReader support for UTF-32. Thanks to ggregory.
-o IO-331:  BOMInputStream wrongly detects UTF-32LE_BOM files as
-UTF-16LE_BOM files in method getBOM(). Thanks to ggregory.
-o IO-327:  Add byteCountToDisplaySize(BigInteger). Thanks to ggregory.
-o IO-326:  Add new FileUtils.sizeOf[Directory] APIs to return BigInteger.
-Thanks to ggregory.
-o IO-325:  Add IOUtils.toByteArray methods to work with URL and URI. Thanks
-to raviprak.
-o IO-324:  Add missing Charset sister APIs to method that take a String
-charset name. Thanks to raviprak.
-
-Fixed Bugs:
-o IO-336:  Yottabyte (YB) incorrectly defined in FileUtils. Thanks to
-rleavelle.
-o IO-279:  Tailer erroneously considers file as new. Thanks to Sergio
-Bossa, Chris Baron.
-o IO-335:  Tailer#readLines - incorrect CR handling.
-o IO-334:  FileUtils.toURLs throws NPE for null parameter; document the
-behavior.
-o IO-332:  Improve tailer's reading performance. Thanks to liangly.
-o IO-279:  Improve Tailer performance with buffered reads (see IO-332).
-o IO-329:  FileUtils.writeLines uses unbuffered IO. Thanks to tivv.
-o IO-319:  FileUtils.sizeOfDirectory follows symbolic links. Thanks to
-raviprak.
-
-
-Compatibility with 2.3:
-Binary compatible: Yes.
-Source compatible: Yes.
-Semantic compatible: Yes.
-
-Compatibility with 2.2 and 1.4:
-Binary compatible: Yes.
-Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-
-Commons IO 2.4 requires JDK 1.6 or later.
-Commons IO 2.3 requires JDK 1.6 or later.
-Commons IO 2.2 requires JDK 1.5 or later.
-Commons IO 1.4 requires JDK 1.3 or later.
-
-==============================================================================
-Apache Commons IO Version 2.3
-==============================================================================
-
-Changes in this version include:
-
-New features:
-o IO-322:  Add and use class Charsets. Thanks to ggregory. 
-o IO-321:  ByteOrderMark UTF_32LE is incorrect. Thanks to ggregory. 
-o IO-318:  Add Charset sister APIs to method that take a String charset name. Thanks to ggregory. 
-
-Compatibility with 2.2 and 1.4:
-Binary compatible: Yes.
-Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-
-Commons IO 2.3 requires JDK 1.6 or later.
-Commons IO 2.2 requires JDK 1.5 or later.
-Commons IO 1.4 requires JDK 1.3 or later.
-
-==============================================================================
-Apache Commons IO Version 2.2
-==============================================================================
-
-Changes in this version include:
-
-New features:
-o Add IOUTils.toBufferedReader(Reader)  Issue: IO-313. Thanks to ggregory. 
-o Allow applications to provide buffer (or size) for copyLarge methods.  Issue: IO-308. Thanks to Manoj Mokashi. 
-o New copyLarge() method in IOUtils that takes additional offset, length arguments  Issue: IO-305. Thanks to Manoj Mokashi. 
-o Use terabyte (TB), petabyte (PB) and exabyte (EB) in FileUtils.byteCountToDisplaySize(long size)  Issue: IO-287. Thanks to Ron Kuris, Gary Gregory. 
-o FileUtils.listFiles() doesn't return directories  Issue: IO-173. Thanks to Marcos Vinícius da Silva. 
-o CharSequenceInputStream to efficiently stream content of a CharSequence  Issue: IO-297. Thanks to Oleg Kalnichevski. 
-o The second constructor of Tailer class does not pass 'delay' to the third one  Issue: IO-304. Thanks to liangly. 
-o TeeOutputStream does not call branch.close() when main.close() throws an exception  Issue: IO-303. Thanks to fabian.barney. 
-o ArrayIndexOutOfBoundsException in BOMInputStream when reading a file without BOM multiple times  Issue: IO-302. Thanks to jsteuerwald, detinho. 
-o Add IOUtils.closeQuietly(Selector) necessary  Issue: IO-301. Thanks to kaykay.unique. 
-o IOUtils.closeQuietly() should take a ServerSocket as a parameter  Issue: IO-292. Thanks to sebb. 
-o Add read/readFully methods to IOUtils  Issue: IO-290. Thanks to sebb. 
-o Supply a ReversedLinesFileReader  Issue: IO-288. Thanks to Georg Henzler. 
-o Add new function FileUtils.directoryContains.  Issue: IO-291. Thanks to ggregory. 
-o FileUtils.contentEquals and IOUtils.contentEquals - Add option to ignore "line endings"
-        Added contentEqualsIgnoreEOL methods to both classes  Issue: IO-275. Thanks to CJ Aspromgos. 
-
-Fixed Bugs:
-o IOUtils.read(InputStream/Reader) ignores the offset parameter  Issue: IO-311. Thanks to Robert Muir. 
-o CharSequenceInputStream(CharSequence s, Charset charset, int bufferSize) ignores bufferSize  Issue: IO-312. 
-o FileUtils.moveDirectoryToDirectory removes source directory if destination is a subdirectory  Issue: IO-300. 
-o ReaderInputStream#read(byte[] b, int off, int len) should check for valid parameters  Issue: IO-307. 
-o ReaderInputStream#read(byte[] b, int off, int len) should always return 0 for length == 0  Issue: IO-306. 
-o "FileUtils#deleteDirectoryOnExit(File)" does not work  Issue: IO-276. Thanks to nkami. 
-o BoundedInputStream.read() treats max differently from BoundedInputStream.read(byte[]...)  Issue: IO-273. Thanks to sebb. 
-o Various methods of class 'org.apache.commons.io.FileUtils' incorrectly suppress 'java.io.IOException'  Issue: IO-298. Thanks to Christian Schulte. 
-
-Changes:
-o ReaderInputStream optimization: more efficient reading of small chunks of data  Issue: IO-296. Thanks to Oleg Kalnichevski. 
-
-
-Compatibility with 2.1 and 1.4:
-Binary compatible: Yes
-Source compatible: Yes
-Semantic compatible: Yes. Check the bug fixes section for semantic bug fixes
-
-Commons IO 2.2 requires a minimum of JDK 1.5. 
-Commons IO 1.4 requires a minimum of JDK 1.3. 
-
-==============================================================================
-Apache Commons IO Version 2.1
-==============================================================================
-
-New features:
-o Use standard Maven directory layout  Issue: IO-285. Thanks to ggregory. 
-o Add IOUtils API toString for URL and URI to get contents  Issue: IO-284. Thanks to ggregory. 
-o Add API FileUtils.copyFile(File input, OutputStream output)  Issue: IO-282. Thanks to ggregory. 
-o FileAlterationObserver has no getter for FileFilter  Issue: IO-262. 
-o Add FileUtils.getFile API with varargs parameter  Issue: IO-261. 
-o Add new APPEND parameter for writing string into files  Issue: IO-182. 
-o Add new read method "toByteArray" to handle InputStream with known size.  Issue: IO-251. Thanks to Marco Albini. 
-
-Fixed Bugs:
-o Dubious use of mkdirs() return code  Issue: IO-280. Thanks to sebb. 
-o ReaderInputStream enters infinite loop when it encounters an unmappable character  Issue: IO-277. 
-o FileUtils.moveFile() JavaDoc should specify FileExistsException thrown  Issue: IO-264. 
-o ClassLoaderObjectInputStream does not handle Proxy classes  Issue: IO-260. 
-o Tailer returning partial lines when reaching EOF before EOL  Issue: IO-274. Thanks to Frank Grimes. 
-o FileUtils.copyFile() throws IOException when copying large files to a shared directory (on Windows)  Issue: IO-266. Thanks to Igor Smereka. 
-o FileSystemUtils.freeSpaceKb throws exception for Windows volumes with no visible files.
-        Improve coverage by also looking for hidden files.  Issue: IO-263. Thanks to Gil Adam. 
-
-Changes:
-o FileAlterationMonitor.stop(boolean allowIntervalToFinish)  Issue: IO-259. 
-
-==============================================================================
-Apache Commons IO Package 2.0.1
-==============================================================================
-
-Compatibility with 2.0 and 1.4
-------------------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-Commons IO 2.0.1 requires a minimum of JDK 1.5
- (Commons IO 1.4 had a minimum of JDK 1.3) 
-
-Enhancements from 2.0
----------------------
-
-   * [IO-256] - Provide thread factory for FileAlternationMonitor
-
-Bug fixes from 2.0
-------------------
-
-   * [IO-257] - BOMInputStream.read(byte[]) can return 0 which it should not
-   * [IO-258] - XmlStreamReader consumes the stream during encoding detection
-
-==============================================================================
-Apache Commons IO Package 2.0
-==============================================================================
-
-Compatibility with 1.4
-----------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-Commons IO 2.0 requires a minimum of JDK 1.5
- (Commons IO 1.4 had a minimum of JDK 1.3) 
-
-Deprecations from 1.4
----------------------
-
-- IOUtils
-  - write(StringBuffer, Writer) in favour of write(CharSequence, Writer)
-  - write(StringBuffer, OutputStream)  in favour of write(CharSequence, OutputStream)
-  - write(StringBuffer, OutputStream, String) in favour of write(CharSequence, OutputStream, String)
-
-- FileFilterUtils
-  - andFileFilter(IOFileFilter, IOFileFilter) in favour of and(IOFileFilter...) 
-  - orFileFilter(IOFileFilter, IOFileFilter)  in favour of or(IOFileFilter...)
-
-Enhancements from 1.4
----------------------
-
-  * [IO-140] Move minimum Java requirement from JDK 1.3 to JDK 1.5
-             - use Generics
-             - add new CharSequence write() flavour methods to IOUtils and FileUtils
-             - replace StringBuffer with StringBuilder, where appropriate
-             - add new Reader/Writer methods to ProxyReader and ProxyWriter
-             - Annotate with @Override and @Deprecated
-
-  * [IO-178] New BOMInputStream and ByteOrderMark implementations - to detect and optionally exclude an initial Byte Order mark (BOM)
-  * [IO-197] New BoundedInputStream (copied from from Apache JackRabbit)
-  * [IO-193] New Broken Input and Output streams
-  * [IO-132] New File Listener/Monitor facility
-  * [IO-158] New ReaderInputStream and WriterOutputStream implementations
-  * [IO-139] New StringBuilder Writer implementation
-  * [IO-192] New Tagged Input and Output streams
-  * [IO-177] New Tailer class - simple implementation of the Unix "tail -f" functionality
-  * [IO-162] New XML Stream Reader/Writer implementations (from ROME via plexus-utils)
-
-  * [IO-142] Comparators - add facility to sort file lists/arrays
-  * [IO-186] Comparators - new Composite and Directory File Comparator implementations
-  * [IO-176] DirectoryWalker - add filterDirectoryContents() callback method for filtering directory contents
-  * [IO-210] FileFilter - new Magic Number FileFilter
-  * [IO-221] FileFilterUtils - add methods for suffix and prefix filters which take an IOCase object
-  * [IO-232] FileFilterUtils - add method for name filters which take an IOCase object
-  * [IO-229] FileFilterUtils - add varargs and() and or() methods
-  * [IO-198] FileFilterUtils - add ability to apply file filters to collections and arrays
-  * [IO-156] FilenameUtils - add normalize() and normalizeNoEndSeparator() methods which allow the separator character to be specified
-  * [IO-194] FileSystemUtils - add freeSpaceKb() method with no input arguments
-  * [IO-185] FileSystemUtils - add freeSpaceKb() methods that take a timeout parameter - fixes freeSpaceWindows() blocks
-  * [IO-155] FileUtils - use NIO to copy files
-  * [IO-168] FileUtils - add new isSymlink() method
-  * [IO-219] FileUtils - throw FileExistsException when moving a file or directory if the destination already exists
-  * [IO-234] FileUtils - add Methods for retrieving System User/Temp directories/paths
-  * [IO-208] FileUtils - add timeout (connection and read) support for copyURLToFile() method 
-  * [IO-238] FileUtils - add sizeOf(File) method
-  * [IO-181] LineIterator now implements Iterable
-  * [IO-224] IOUtils - add closeQuietly(Closeable) and closeQuietly(Socket) methods
-  * [IO-203] IOUtils - add skipFully() method for InputStreams
-  * [IO-137] IOUtils and ByteArrayOutputStream - add toBufferedInputStream() method to avoid unnecessary array allocation/copy
-  * [IO-195] Proxy streams/Reader/Writer - provide exception handling methods
-  * [IO-211] Proxy Input/Output streams - add pre/post processing support
-  * [IO-242] Proxy Reader/Writer - add pre/post processing support
-
-Bug fixes from 1.4
-------------------
-  * [IO-214] ByteArrayOutputStream - fix inconsistent synchronization of fields
-  * [IO-201] Counting Input/Output streams - fix inconsistent synchronization
-  * [IO-159] FileCleaningTracker - fix remove() never returns null
-  * [IO-220] FileCleaningTracker - fix Vector performs badly under load
-  * [IO-167] FilenameUtils - fix case-insensitive string handling in FilenameUtils and FilesystemUtils
-  * [IO-179] FilenameUtils - fix StringIndexOutOfBounds exception in getPathNoEndSeparator()
-  * [IO-248] FilenameUtils - fix getFullPathNoEndSeparator() returns empty while path is a one level directory
-  * [IO-246] FilenameUtils - fix wildcardMatch gives incorrect results 
-  * [IO-187] FileSystemUtils - fix freeSpaceKb() doesn't work with relative paths on Linux
-  * [IO-160] FileSystemUtils - fix freeSpace() fails on solaris
-  * [IO-209] FileSystemUtils - fix freeSpaceKb() fails to return correct size for a windows mount point
-  * [IO-163] FileUtils - fix toURLs() using deprecated method of conversion to URL
-  * [IO-168] FileUtils - fix Symbolic links followed when deleting directory
-  * [IO-231] FileUtils - fix wrong exception message generated in isFileNewer() method
-  * [IO-207] FileUtils - fix race condition in forceMkdir() method
-  * [IO-217] FileUtils - fix copyDirectoryToDirectory() makes infinite loops
-  * [IO-166] FileUtils - fix URL decoding in toFile(URL)
-  * [IO-190] FileUtils - fix copyDirectory not preserving lastmodified date on sub-directories
-  * [IO-240] FileFilterUtils - ensure cvsFilter and svnFilter are only created once.
-  * [IO-175] IOUtils - fix copyFile() issues with very large files
-  * [IO-191] Improvements from static analysis
-  * [IO-216] LockableFileWriter - delete files quietly when an exception is thrown during initialization
-  * [IO-243] SwappedDataInputStream - fix readBoolean is inverted
-  * [IO-235] Tests - remove unused YellOnFlushAndCloseOutputStream from CopyUtilsTest
-  * [IO-161] Tests - fix FileCleaningTrackerTestCase hanging
-
-Documentation changes from 1.4
-------------------------------
-  * [IO-183 FilenameUtils.getExtension() method documentation improvements
-  * [IO-226 FileUtils.byteCountToDisplaySize() documentation corrections
-  * [IO-205 FileUtils.forceMkdir() documentation improvements
-  * [IO-215 FileUtils copy file/directory improve documentation regarding preserving the last modified date
-  * [IO-189 HexDump.dump() method documentation improvements
-  * [IO-171 IOCase document that it assumes there are only two OSes: Windows and Unix
-  * [IO-223 IOUtils.copy() documentation corrections
-  * [IO-247 IOUtils.closeQuietly() improve documentation with examples
-  * [IO-202 NotFileFilter documentation corrections
-  * [IO-206 ProxyInputStream - fix misleading parameter names
-  * [IO-212 ProxyInputStream.skip() documentation corrections
-
-==============================================================================
-Apache Commons IO Version 1.4
-==============================================================================
-
-Compatibility with 1.3.2
-------------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-Commons IO 1.4 introduces four new implementations which depend on JDK 1.4 features
-(CharSequenceReader, FileWriterWithEncoding, IOExceptionWithCause and RegexFileFilter).
-It has been built with the JDK source and target options set to JDK 1.3 and, except for
-those implementations, can be used with JDK 1.3 (see IO IO-127).
-
-Deprecations from 1.3.2
------------------------
-- FileCleaner deprecated in favour of FileCleaningTracker [see IO-116]
-
-Bug fixes from 1.3.2
---------------------
-- FileUtils
-  - forceDelete of orphaned Softlinks does not work [IO-147]
-  - Infinite loop on FileUtils.copyDirectory when the destination directory is within
-    the source directory [IO-141]
-  - Add a copyDirectory() method that makes use of FileFilter [IO-105]
-  - Add moveDirectory() and moveFile() methods [IO-77]
-
-- HexDump
-  - HexDump's use of static StringBuffers isn't thread-safe [IO-136]
-
-Enhancements from 1.3.2
------------------------
-- FileUtils
-  - Add a deleteQuietly method [IO-135]
-
-- FilenameUtils
-  - Add file name extension separator constants[IO-149]
-
-- IOExceptionWithCause [IO-148]
-  - Add a new IOException implementation with constructors which take a cause
-
-- TeeInputStream [IO-129]
-  - Add new Tee input stream implementation
-
-- FileWriterWithEncoding [IO-153]
-  - Add new File Writer implementation that accepts an encoding
-
-- CharSequenceReader [IO-138]
-  - Add new Reader implementation that handles any CharSequence (String,
-    StringBuffer, StringBuilder or CharBuffer) 
-
-- ThesholdingOuputStream [IO-121]
-  - Add a reset() method which sets the count of the bytes written back to zero.
-
-- DeferredFileOutputStream [IO-130]
-  - Add support for temporary files
-
-- ByteArrayOutputStream
-  - Add a new write(InputStream) method [IO-152]
-
-- New Closed Input/Output stream implementations [IO-122]
-  - AutoCloseInputStream - automatically closes and discards the underlying input stream
-  - ClosedInputStream - returns -1 for any read attempts
-  - ClosedOutputStream - throws an IOException for any write attempts
-  - CloseShieldInputStream - prevents the underlying input stream from being closed.
-  - CloseShieldOutputStream - prevents the underlying output stream from being closed.
-
-- Add Singleton Constants to several stream classes [IO-143]
-
-- PrefixFileFilter [IO-126]
-  - Add faciltiy to specify case sensitivity on prefix matching
-
-- SuffixFileFilter [IO-126]
-  - Add faciltiy to specify case sensitivity on suffix matching
-
-- RegexFileFilter [IO-74]
-  - Add new regular expression file filter implementation
-
-- Make IOFileFilter implementations Serializable [IO-131]
-
-- Improve IOFileFilter toString() methods [IO-120]
-
-- Make fields final so classes are immutable/threadsafe [IO-133]
-  - changes to Age, Delegate, Name, Not, Prefix, Regex, Size, Suffix and Wildcard IOFileFilter
-    implementations.
-
-- IOCase
-  - Add a compare method to IOCase [IO-144]
-
-- Add a package of java.util.Comparator implementations for files [IO-145]
-  - DefaultFileComparator - compare files using the default File.compareTo(File) method.
-  - ExtensionFileComparator - compares files using file name extensions.
-  - LastModifiedFileComparator - compares files using the last modified date/time.
-  - NameFileComparator - compares files using file names.
-  - PathFileComparator - compares files using file paths.
-  - SizeFileComparator - compares files using file sizes.
-  
-==============================================================================
-Apache Commons IO Version 1.3.2
-==============================================================================
-
-Compatibility with 1.3.1
-----------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-
-Compatibility with 1.3
-----------------------
-Binary compatible - No
-  See [IO-113]
-
-Source compatible - No
-  See [IO-113]
-
-Semantic compatible - Yes
-
-Enhancements since 1.3.1
-------------------------
-
-- Created the FileCleaningTracker, basically a non-static version of the
-  FileCleaner, which can be controlled by the user. [IO-116]
-- The FileCleaner is deprecated.
-
-Bug fixes from 1.3.1
---------------------
-
-- Some tests, which are implicitly assuming a Unix-like file system, are
-  now skipped on Windows. [IO-115]
-- EndianUtils
-  - Both readSwappedUnsignedInteger(...) methods could return negative 
-    numbers due to int/long casting. [IO-117]
-
-Bug fixes from 1.3
-------------------
-
-- FileUtils
-  - NPE in openOutputStream(File) when file has no parent in path [IO-112]
-  - readFileToString(File) is not static [IO-113]
-
-==============================================================================
-Apache Commons IO Version 1.3.1
-==============================================================================
-
-Compatibility with 1.3
-----------------------
-Binary compatible - No
-  See [IO-113]
-
-Source compatible - No
-  See [IO-113]
-
-Semantic compatible - Yes
-
-Bug fixes from 1.3
-------------------
-
-- FileUtils
-  - NPE in openOutputStream(File) when file has no parent in path [IO-112]
-  - readFileToString(File) is not static [IO-113]
-  
-==============================================================================
-Apache Commons IO Version 1.3
-==============================================================================
-
-Compatibility with 1.2
-----------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-Deprecations from 1.2
----------------------
-- WildcardFilter deprecated, replaced by WildcardFileFilter
-  - old class only accepted files, thus had a confusing dual purpose
-
-- FileSystemUtils.freeSpace deprecated, replaced by freeSpaceKb
-  - freeSpace returns a result that varies by operating system and
-    thus isn't that useful
-  - freeSpaceKb returns much better and more consistent results
-  - freeSpaceKb existed in v1.2, so this is a gentle cutover
-
-Bug fixes from 1.2
-------------------
-- LineIterator now implements Iterator
-  - It was always supposed to...
-
-- FileSystemUtils.freeSpace/freeSpaceKb [IO-83]
-  - These should now work on AIX and HP-UX
-
-- FileSystemUtils.freeSpace/freeSpaceKb [IO-90]
-  - Avoid infinite looping in Windows
-  - Catch more errors with nice messages
-
-- FileSystemUtils.freeSpace [IO-91]
-  - This is now documented not to work on SunOS 5
-
-- FileSystemUtils [IO-93]
-  - Fixed resource leak leading to 'Too many open files' error
-  - Previously did not destroy Process instances (as JDK Javadoc is so poor)
-  - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4801027
-
-- FileUtils.touch [IO-100]
-  - The touch method previously gave no indication when the file could not
-    be touched successfully (such as due to access restrictions) - it now
-    throws an IOException if the last modified date cannot be changed
-
-- FileCleaner
-  - This now handles the situation where an error occurs when deleting the file
-
-- IOUtils.copy [IO-84]
-  - Copy methods could return inaccurate byte/char count for large streams
-  - The copy(InputStream, OutputStream) method now returns -1 if the count is greater than an int
-  - The copy(Reader, Writer) method now throws now returns -1 if the count is greater than an int
-  - Added a new copyLarge(InputStream, OutputStream) method that returns a long
-  - Added a new copyLarge(Reader, Writer) method that returns a long
-
-- CountingInputStream/CountingOutputStream [IO-84]
-  - Methods were declared as int thus the count was innacurate for large streams
-  - new long based methods getByteCount()/resetByteCount() added
-  - existing methods changed to throw an exception if the count is greater than an int
-
-- FileBasedTestCase
-  - Fixed bug in compare content methods identified by GNU classpath
-
-- EndianUtils.writeSwappedLong(byte[], int) [IO-101]
-  - An int overrun in the bit shifting when it should have been a long
-
-- EndianUtils.writeSwappedLong(InputStream) [IO-102]
-  - The return of input.read(byte[]) was not being checked to ensure all 8 bytes were read
-
-Enhancements from 1.2
----------------------
-- DirectoryWalker [IO-86]
-  - New class designed for subclassing to walk through a set of files.
-    DirectoryWalker provides the walk of the directories, filtering of
-    directories and files, and cancellation support. The subclass must provide
-    the specific behaviour, such as text searching or image processing.
-
-- IOCase
-  - New class/enumeration for case-sensitivity control
-
-- FilenameUtils
-  - New methods to handle case-sensitivity
-  - wildcardMatch - new method that has IOCase as a parameter
-  - equals - new method that has IOCase as a parameter
-
-- FileUtils [IO-108] - new default encoding methods for:
-  - readFileToString(File)
-  - readLines(File)
-  - lineIterator(File)
-  - writeStringToFile(File, String)
-  - writeLines(File, Collection)
-  - writeLines(File, Collection, String)
-
-- FileUtils.openOutputStream  [IO-107]
-  - new method to open a FileOutputStream, creating parent directories if required
-- FileUtils.touch
-- FileUtils.copyURLToFile
-- FileUtils.writeStringToFile
-- FileUtils.writeByteArrayToFile
-- FileUtils.writeLines
-  - enhanced to create parent directories if required
-- FileUtils.openInputStream  [IO-107]
-  - new method to open a FileInputStream, providing better error messages than the JDK
-
-- FileUtils.isFileOlder
-  - new methods to check if a file is older (i.e. isFileOlder()) - counterparts
-    to the existing isFileNewer() methods.
-
-- FileUtils.checksum, FileUtils.checksumCRC32
-  - new methods to create a checksum of a file
-
-- FileUtils.copyFileToDirectory  [IO-104]
-  - new variant that optionally retains the file date
-
-- FileDeleteStrategy
-- FileCleaner    [IO-56,IO-70]
-  - FileDeleteStrategy is a strategy for handling file deletion
-  - This can be used as a calback in FileCleaner
-  - Together these allow FileCleaner to do a forceDelete to kill directories
-
-- FileCleaner.exitWhenFinished [IO-99]
-  - A new method that allows the internal cleaner thread to be cleanly terminated
-
-- WildcardFileFilter
-  - Replacement for WildcardFilter
-  - Accepts both files and directories
-  - Ability to control case-sensitivity
-
-- NameFileFilter
-  - Ability to control case-sensitivity
-
-- FileFileFilter
-  - New IOFileFilter implementation
-  - Accepts files where File.isFile() is true
-  - In other words it filters out directories
-  - Singleton instance provided (FILE)
-
-- CanReadFileFilter
-  - New IOFileFilter implementation
-  - Accepts files where File.canRead() is true
-  - Singleton instances provided (CAN_READ/CANNOT_READ/READ_ONLY)
-
-- CanWriteFileFilter
-  - New IOFileFilter implementation
-  - Accepts files where File.canWrite() is true
-  - Singleton instances provided (CAN_WRITE/CANNOT_WRITE)
-
-- HiddenFileFilter
-  - New IOFileFilter implementation
-  - Accepts files where File.isHidden() is true
-  - Singleton instances provided (HIDDEN/VISIBLE)
-
-- EmptyFileFilter
-  - New IOFileFilter implementation
-  - Accepts files or directories that are empty
-  - Singleton instances provided (EMPTY/NOT_EMPTY)
-
-- TrueFileFilter/FalseFileFilter/DirectoryFileFilter
-  - New singleton instance constants (TRUE/FALSE/DIRECTORY)
-  - The new constants are more JDK 1.5 friendly with regards to static imports
-    (whereas if everything uses INSTANCE, then they just clash)
-  - The old INSTANCE constants are still present and have not been deprecated
-
-- FileFilterUtils.sizeRangeFileFilter
-  - new sizeRangeFileFilter(long minimumSize, long maximumSize) method which 
-    creates a filter that accepts files within the specified size range.
-
-- FileFilterUtils.makeDirectoryOnly/makeFileOnly
-  - two new methods that decorate a file filter to make it apply to
-    directories only or files only
-
-- NullWriter
-  - New writer that acts as a sink for all data, as per /dev/null
-
-- NullInputStream
-  - New input stream that emulates a stream of a specified size
-
-- NullReader
-  - New reader that emulates a reader of a specified size
-
-- ByteArrayOutputStream  [IO-97]
-  - Performance enhancements
-
-==============================================================================
-Apache Commons IO Version 1.2
-==============================================================================
-
-Compatibility with 1.1
-----------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-
-Deprecations from 1.1
----------------------
-
-Bug fixes from 1.1
-------------------
-- FileSystemUtils.freeSpace(drive)
-  Fix to allow Windows based command to function in French locale
-
-- FileUtils.read*
-  Increase certainty that files are closed in case of error
-
-- LockableFileWriter
-  Locking mechanism was broken and only provided limited protection [38942]
-  File deletion and locking in case of constructor error was broken
-
-Enhancements from 1.1
----------------------
-- AgeFileFilter/SizeFileFilter
-  New file filters that compares against the age and size of the file
-
-- FileSystemUtils.freeSpaceKb(drive)
-  New method that unifies result to be in kilobytes [38574]
-
-- FileUtils.contentEquals(File,File)
-  Performance improved by adding length and file location checking
-
-- FileUtils.iterateFiles
-  Two new method to provide direct access to iterators over files
-
-- FileUtils.lineIterator
-  IOUtils.lineIterator
-  New methods to provide an iterator over the lines in a file [38083]
-
-- FileUtils.copyDirectoryToDirectory
-  New method to copy a directory to within another directory [36315]
-  
-==============================================================================
-Apache Commons IO Version 1.1
-==============================================================================
-
-Incompatible changes from 1.0
------------------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes, except:
-- FileUtils.writeStringToFile()
-    A null encoding previously used 'ISO-8859-1', now it uses the platform default
-    Generally this will make no difference
-
-- LockableFileWriter
-    Improved validation and now create directories if necesssary
-
-plus these bug fixes may affect you semantically:
-- FileUtils.touch()  (Bug fix 29821)
-    Now creates the file if it did not previously exist
-
-- FileUtils.toFile(URL) (Bug fix 32575)
-    Now handles escape syntax such as %20
-
-- FileUtils.sizeOfDirectory()  (Bug fix 36801)
-    May now return a size of 0 if the directory is security restricted
-
-Deprecations from 1.0
----------------------
-- CopyUtils has been deprecated.
-    Its methods have been moved to IOUtils.
-    The new IOUtils methods handle nulls better, and have clearer names.
-
-- IOUtils.toByteArray(String) - Use {@link String#getBytes()}
-- IOUtils.toString(byte[]) - Use {@link String#String(byte[])}
-- IOUtils.toString(byte[],String) - Use {@link String#String(byte[],String)}
-
-Bug fixes from 1.0
-------------------
-- FileUtils - touch()  [29821]
-    Now creates the file if it did not previously exist
-
-- FileUtils - toFile(URL)  [32575]
-    Now handles escape syntax such as %20
-
-- FileFilterUtils - makeCVSAware(IOFileFilter)  [33023]
-    Fixed bug that caused method to be completely broken
-
-- CountingInputStream  [33336]
-    Fixed bug that caused the count to reduce by one at the end of the stream
-
-- CountingInputStream - skip(long)  [34311]
-    Bytes from calls to this method were not previously counted
-
-- NullOutputStream  [33481]
-    Remove unnecessary synchronization
-
-- AbstractFileFilter - accept(File, String)  [30992]
-    Fixed broken implementation
-
-- FileUtils  [36801]
-    Previously threw NPE when listing files in a security restricted directory
-    Now throw IOException with a better message
-
-- FileUtils - writeStringToFile()
-    Null encoding now correctly uses the platform default
-
-Enhancements from 1.0
----------------------
-- FilenameUtils - new class  [33303,29351]
-    A static utility class for working with filenames
-    Seeks to ease the pain of developing on Windows and deploying on Unix
-
-- FileSystemUtils - new class  [32982,36325]
-    A static utility class for working with file systems
-    Provides one method at present, to get the free space on the filing system
-
-- IOUtils - new public constants
-    Constants for directory and line separators on Windows and Unix
-
-- IOUtils - toByteArray(Reader,encoding)
-    Handles encodings when reading to a byte array
-
-- IOUtils - toCharArray(InputStream)  [28979]
-          - toCharArray(InputStream,encoding)
-          - toCharArray(Reader)
-    Reads a stream/reader into a charatcter array
-
-- IOUtils - readLines(InputStream)  [36214]
-          - readLines(InputStream,encoding)
-          - readLines(Reader)
-    Reads a stream/reader line by line into a List of Strings
-
-- IOUtils - toInputStream(String)  [32958]
-          - toInputStream(String,encoding)
-    Creates an input stream that uses the string as a source of data
-
-- IOUtils - writeLines(Collection,lineEnding,OutputStream)  [36214]
-          - writeLines(Collection,lineEnding,OutputStream,encoding)
-          - writeLines(Collection,lineEnding,Writer)
-    Writes a collection to a stream/writer line by line
-
-- IOUtils - write(...)
-    Write data to a stream/writer (moved from CopyUtils with better null handling)
-
-- IOUtils - copy(...)
-    Copy data between streams (moved from CopyUtils with better null handling)
-
-- IOUtils - contentEquals(Reader,Reader)
-    Method to compare the contents of two readers
-
-- FileUtils - toFiles(URL[])
-    Converts an array of URLs to an array of Files
-
-- FileUtils - copyDirectory()  [32944]
-    New methods to copy a directory
-
-- FileUtils - readFileToByteArray(File)
-    Reads an entire file into a byte array
-
-- FileUtils - writeByteArrayToFile(File,byte[])
-    Writes a byte array to a file
-
-- FileUtils - readLines(File,encoding)  [36214]
-    Reads a file line by line into a List of Strings
-
-- FileUtils - writeLines(File,encoding,List)
-              writeLines(File,encoding,List,lineEnding)
-    Writes a collection to a file line by line
-
-- FileUtils - EMPTY_FILE_ARRAY
-    Constant for an empty array of File objects
-
-- ConditionalFileFilter - new interface  [30705]
-    Defines the behaviour of list based filters
-
-- AndFileFilter, OrFileFilter  [30705]
-    Now support a list of filters to and/or
-
-- WildcardFilter  [31115]
-    New filter that can match using wildcard file names
-
-- FileFilterUtils - makeSVNAware(IOFileFilter)
-    New method, like makeCVSAware, that ignores Subversion source control directories
-
-- ClassLoaderObjectInputStream
-    An ObjectInputStream that supports a ClassLoader
-
-- CountingInputStream,CountingOutputStream - resetCount()  [28976]
-    Adds the ability to reset the count part way through reading/writing the stream
-
-- DeferredFileOutputStream - writeTo(OutputStream)  [34173]
-    New method to allow current contents to be written to a stream
-
-- DeferredFileOutputStream  [34142]
-    Performance optimizations avoiding double buffering
-
-- LockableFileWriter - encoding support [36825]
-    Add support for character encodings to LockableFileWriter
-    Improve the validation
-    Create directories if necesssary
-
-- IOUtils and EndianUtils are no longer final  [28978]
-    Allows developers to have subclasses if desired   
-
-==============================================================================
-Feedback
-==============================================================================
-
-Open source works best when you give feedback:
-http://commons.apache.org/io/
-
-Please direct all bug reports to JIRA
-http://issues.apache.org/jira/browse/IO
-
-Or subscribe to the commons-user mailing list (prefix emails by [io])
-http://commons.apache.org/mail-lists.html
-
-The Commons-IO Team
diff --git a/trunk/build.xml b/trunk/build.xml
deleted file mode 100644
index e3b4ff9..0000000
--- a/trunk/build.xml
+++ /dev/null
@@ -1,355 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-   
-         http://www.apache.org/licenses/LICENSE-2.0
-   
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<project name="Commons IO" default="jar" basedir=".">
-
-
-<!--
-        "IO" component of the Apache Commons Subproject
-        $Id$
--->
-
-
-<!-- ========== Initialize Properties ===================================== -->
-
-
-  <property file="project.properties"/>              <!-- Project local   -->
-  <property file="build.properties"/>                <!-- Component local   -->
-  <property file="${user.home}/build.properties"/>   <!-- User local        -->
-
-
-<!-- ========== External Dependencies ===================================== -->
-
-  <!-- Repository base path -->
-  <property name="repository"              value="${user.home}/.m2/repository"/>
-
-  <!-- The directories corresponding to your necessary dependencies -->
-  <property name="junit.version"           value="4.12"/>
-  <property name="junit.home"              value="${repository}/junit/junit/${junit.version}"/>
-  <property name="junit.jar"               value="${junit.home}/junit-${junit.version}.jar"/>
-
-
-<!-- ========== Component Declarations ==================================== -->
-
-
-  <!-- The name of this component -->
-  <property name="component.name"          value="commons-io"/>
-
-  <!-- The primary package name of this component -->
-  <property name="component.package"       value="org.apache.commons.io"/>
-
-  <!-- The title of this component -->
-  <property name="component.title"         value="Commons IO"/>
-
-  <!-- The current version number of this component -->
-  <property name="component.version"       value="2.5-SNAPSHOT"/>
-
-  <!-- The base directory for component sources -->
-  <property name="source.home"             value="src/main/java"/>
-
-  <!-- The base directory for unit test sources -->
-  <property name="test.home"               value="src/test/java"/>
-
-  <!-- The base directory for unit test resources -->
-  <property name="test.resources.home"               value="src/test/resources"/>
-
-  <!-- Download lib dir -->
-  <property name="download.lib.dir"        value="lib"/>
-
-  <!-- The base directory for compilation targets -->
-  <property name="build.home"              value="target"/>
-
-  <!-- The base directory for distribution targets -->
-  <property name="dist.home"               value="${build.home}"/>
-
-  <!-- Base file name for dist files -->
-  <property name="final.name"        value="${component.name}-${component.version}"/>
-
-  <!-- Directory where binary release files are staged -->
-  <property name="stage.bin.dir"           value="${dist.home}/stage-bin"/>
-
-  <!-- Directory where source release files are staged -->
-  <property name="stage.src.dir"           value="${dist.home}/stage-src"/>
-
-<!-- ========== Compiler Defaults ========================================= -->
-
-  <!-- compiler source JDK version -->
-  <property name="compile.source"          value="1.6"/>
-
-  <!-- compiler target JDK version -->
-  <property name="compile.target"          value="1.6"/>
-
-  <!-- Should Java compilations set the 'debug' compiler option? -->
-  <property name="compile.debug"           value="true"/>
-
-  <!-- Should Java compilations set the 'deprecation' compiler option? -->
-  <property name="compile.deprecation"     value="false"/>
-
-  <!-- Should Java compilations set the 'optimize' compiler option? -->
-  <property name="compile.optimize"        value="true"/>
-
-  <!-- Construct compile classpath -->
-  <path id="compile.classpath">
-    <pathelement location="${build.home}/classes"/>
-  </path>
-
-  <!-- Construct compile classpath -->
-  <path id="downloaded.lib.classpath">
-    <pathelement location="${download.lib.dir}/junit-${junit.version}.jar"/>
-    <pathelement location="${download.lib.dir}/hamcrest-core-1.3.jar"/>
-  </path>
-
-<!-- ========== Test Execution Defaults =================================== -->
-
-
-  <!-- Construct unit test classpath -->
-  <path id="test.classpath">
-    <pathelement location="${build.home}/classes"/>
-    <pathelement location="${build.home}/test-classes"/>
-    <pathelement location="${build.home}/test-resources"/>
-    <pathelement location="${junit.jar}"/>
-    <path refid="downloaded.lib.classpath"/>
-  </path>
-
-  <!-- Should all tests fail if one does? -->
-  <property name="test.failonerror"        value="true"/>
-
-  <!-- The test runner to execute -->
-  <property name="test.runner"             value="junit.textui.TestRunner"/>
-
-
-<!-- ========== Executable Targets ======================================== -->
-
-  <target name="clean" description="Clean build and distribution directories">
-    <delete    dir="${build.home}"/>
-    <delete    dir="test"/>
-  </target>
-
-
-  <target name="init"
-   description="Initialize and evaluate conditionals">
-    <echo message="-------- ${component.title} ${component.version} --------"/>
-    <filter  token="name"                  value="${component.name}"/>
-    <filter  token="package"               value="${component.package}"/>
-    <filter  token="version"               value="${component.version}"/>
-    <filter  token="compilesource"         value="${compile.source}"/>
-    <filter  token="compiletarget"         value="${compile.target}"/>
-    <tstamp/>
-    <mkdir dir="${build.home}"/>
-    <mkdir dir="${build.home}/classes"/>
-    <mkdir dir="${build.home}/test-classes"/>
-  </target>
-
-<!-- ========== Compile Targets =========================================== -->
-
-  <target name="compile" depends="init" description="Compile">
-
-    <javac srcdir="${source.home}"
-           destdir="${build.home}/classes"
-           source="${compile.source}"
-           target="${compile.target}"
-           debug="${compile.debug}"
-           deprecation="${compile.deprecation}"
-           optimize="${compile.optimize}"
-           includeantruntime="false">
-      <classpath refid="compile.classpath"/>
-    </javac>
-  </target>
-
-
-<!-- ========== Unit Test Targets ========================================= -->
-
-    <target name="compile.tests" depends="compile, download-dependencies" description="Compile unit test cases dependent on JDK version">
-
-      <javac srcdir="${test.home}"
-             destdir="${build.home}/test-classes"
-             debug="${compile.debug}"
-             deprecation="${compile.deprecation}"
-             optimize="${compile.optimize}"
-             includeantruntime="false">
-          <classpath refid="test.classpath"/>
-      </javac>
-      <copy todir="${build.home}/test-resources">
-        <fileset dir="${test.resources.home}"/>
-      </copy>
-    </target>
-
-  <target name="test"  depends="compile.tests"
-                       description="Run all unit test cases">
-    <mkdir dir="${build.home}/ant-reports"/>
-    <junit printsummary="true" showoutput="true" fork="yes" haltonfailure="${test.failonerror}">
-      <classpath refid="test.classpath"/>
-      <formatter type="plain" usefile="true" />
-      <!-- If test.entry is defined, run a single test, otherwise run all valid tests -->
-      <test name="${test.entry}" if="test.entry"/>
-      <batchtest todir="${build.home}/ant-reports" unless="test.entry">
-        <fileset dir="${test.home}">
-          <include name="**/*Test*.java"/>
-          <!-- Test support files -->
-          <exclude name="**/testtools/**"/>
-          <!-- Ant JUnit does not handle abstract classes -->
-          <exclude name="**/*AbstractTestCase*"/>
-            <exclude name="**/Abstract*TestCase*"/>
-        </fileset>
-      </batchtest>
-    </junit>
-  </target>
-
-
-<!-- ========== Produce JavaDocs ========================================== -->
-
-  <target name="javadoc" depends="compile" description="Create component Javadoc documentation">
-    <mkdir dir="${build.home}/apidocs"/>
-    <tstamp>
-        <format property="current.year" pattern="yyyy"/>
-    </tstamp>
-    <javadoc sourcepath="${source.home}"
-                destdir="${build.home}/apidocs"
-           packagenames="org.apache.commons.*"
-                 author="true"
-                private="true"
-                version="true"
-               doctitle="&lt;h1&gt;${component.title} ${component.version}&lt;/h1&gt;"
-            windowtitle="${component.title} ${component.version}"
-                 bottom="Copyright (c) 2002-${current.year}  Apache Software Foundation"
-           classpathref="compile.classpath">
-        <link href="http://java.sun.com/javaee/5/docs/api/"/>
-        <link href="http://download.oracle.com/javase/1.5.0/docs/api/index.html"/>
-    </javadoc>
-  </target>
-
-
-<!-- ========== Create Jar ================================================ -->
-
-  <target name="jar" depends="compile" description="Create jar file">
-
-    <mkdir dir="${build.home}/classes/META-INF"/>
-    <copy file="LICENSE.txt" tofile="${build.home}/classes/META-INF/LICENSE.txt"/>
-    <copy file="NOTICE.txt"  tofile="${build.home}/classes/META-INF/NOTICE.txt"/>
-
-    <manifest file="${build.home}/MANIFEST.MF">
-        <attribute name="Specification-Title"      value="${component.title}"/>
-        <attribute name="Specification-Version"    value="${component.version}"/>
-        <attribute name="Specification-Vendor"     value="The Apache Software Foundation"/>
-        <attribute name="Implementation-Title"     value="${component.title}"/>
-        <attribute name="Implementation-Version"   value="${component.version}"/>
-        <attribute name="Implementation-Vendor"    value="The Apache Software Foundation"/>
-        <attribute name="Implementation-Vendor-Id" value="org.apache"/>
-        <attribute name="X-Compile-Source-JDK"     value="${compile.source}"/>
-        <attribute name="X-Compile-Target-JDK"     value="${compile.target}"/>
-    </manifest>
-
-    <jar jarfile="${build.home}/${final.name}.jar"
-         basedir="${build.home}/classes"
-        manifest="${build.home}/MANIFEST.MF"/>
-  </target>
-
-
-<!-- ========== Distribution Target =========================================== -->
-
-  <target name="dist" depends="clean,jar,javadoc" description="Create distribution artifacts">
-
-    <mkdir dir="${dist.home}"/>
-
-    <!-- jar(s) -->
-    <copy todir="${dist.home}">
-      <fileset dir=".">
-        <include name="RELEASE-NOTES.txt"/>
-      </fileset>
-      <fileset dir="${build.home}">
-        <include name="*.jar"/>
-      </fileset>
-    </copy>
-
-    <!-- Binary Distro -->
-    <mkdir dir="${stage.bin.dir}/${final.name}"/>
-    <copy todir="${stage.bin.dir}/${final.name}">
-      <fileset dir=".">
-        <include name="LICENSE.txt"/>
-        <include name="NOTICE.txt"/>
-        <include name="RELEASE-NOTES.txt"/>
-      </fileset>
-      <fileset dir="${build.home}">
-        <include name="*.jar"/>
-      </fileset>
-    </copy>
-    <copy todir="${stage.bin.dir}/${final.name}/apidocs">
-      <fileset dir="${build.home}/apidocs" />
-    </copy>
-
-    <!-- Source Distro -->
-    <mkdir dir="${stage.src.dir}/${final.name}-src"/>
-    <copy todir="${stage.src.dir}/${final.name}-src">
-      <fileset dir=".">
-        <include name="build.xml"/>
-        <include name="checkstyle.xml"/>
-        <include name="LICENSE.txt"/>
-        <include name="NOTICE.txt"/>
-        <include name="pom.xml"/>
-        <include name="PROPOSAL.html"/>
-        <include name="RELEASE-NOTES.txt"/>
-      </fileset>
-    </copy>
-    <copy todir="${stage.src.dir}/${final.name}-src/src">
-      <fileset dir="src" />
-    </copy>
-
-    <zip  zipfile="${dist.home}/${final.name}.zip"     basedir="${stage.bin.dir}"/>
-    <zip  zipfile="${dist.home}/${final.name}-src.zip" basedir="${stage.src.dir}"/>
-    <tar  tarfile="${dist.home}/${final.name}.tar"     basedir="${stage.bin.dir}" longfile="gnu"/>
-    <tar  tarfile="${dist.home}/${final.name}-src.tar" basedir="${stage.src.dir}" longfile="gnu"/>
-    <gzip     src="${dist.home}/${final.name}.tar"     zipfile="${dist.home}/${final.name}.tar.gz"/>
-    <gzip     src="${dist.home}/${final.name}-src.tar" zipfile="${dist.home}/${final.name}-src.tar.gz"/>
-
-    <!-- clean up staging directories -->
-    <delete    dir="${stage.bin.dir}"/>
-    <delete    dir="${stage.src.dir}"/>
-
-  </target>
-
-
-<!-- ========== Gump Target ===================================================== -->
-
-  <target name="gump" depends="clean,test,javadoc,jar" description="Gump Target - clean,test,javadoc,jar"/>
-
-
-<!-- ========== Download Dependencies =========================================== -->
-
-    <target name="download-dependencies"
-           depends="check-availability" unless="skip.download">
-        <echo message="doing download-dependencies..." />
-        <antcall target="download-junit" />
-    </target>
-
-    <target name="check-availability">
-        <echo message="doing check-availability..." />
-        <available file="${download.lib.dir}/junit-${junit.version}.jar" property="junit.found"/>
-    </target>
-
-    <target name="download-junit" unless="junit.found">
-        <echo message="Downloading junit..."/>
-        <mkdir dir="${download.lib.dir}" />
-        <!-- TODO check hash of jar -->
-        <get dest="${download.lib.dir}"
-            usetimestamp="true" ignoreerrors="true"
-            src="http://repo1.maven.org/maven2/junit/junit/${junit.version}/junit-${junit.version}.jar"/>
-        <get dest="${download.lib.dir}"
-            usetimestamp="true" ignoreerrors="true"
-            src="https://hamcrest.googlecode.com/files/hamcrest-core-1.3.jar"/>
-    </target>
-
-</project>
-
diff --git a/trunk/checkstyle.xml b/trunk/checkstyle.xml
deleted file mode 100644
index d58c348..0000000
--- a/trunk/checkstyle.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-
-<!DOCTYPE module PUBLIC
-    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
-    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
-
-<!-- commons lang customization of default Checkstyle behavior -->
-<module name="Checker">
-  <property name="localeLanguage" value="en"/>
-  <module name="JavadocPackage">
-    <!-- setting allowLegacy means it will check for package.html instead of just package-info.java -->
-    <property name="allowLegacy" value="true"/>
-  </module>
-  <module name="FileTabCharacter">
-    <property name="fileExtensions" value="java,xml"/>
-  </module>
-  <module name="TreeWalker">
-    <property name="cacheFile" value="target/cachefile"/>
-    <module name="AvoidStarImport"/>
-    <module name="RedundantImport"/>
-    <module name="UnusedImports"/>
-    <module name="NeedBraces"/>
-    <module name="RedundantThrows">
-      <property name="allowUnchecked" value="true"/>
-      <property name="allowSubclasses" value="true"/>
-    </module>
-    <module name="LineLength">
-      <property name="max" value="120"/>
-    </module>
-    <module name="JavadocMethod">
-      <property name="allowUndeclaredRTE" value="true"/>
-      <property name="allowThrowsTagsForSubclasses" value="true"/>
-    </module>
- </module>
-</module>
diff --git a/trunk/doap_io.rdf b/trunk/doap_io.rdf
deleted file mode 100644
index a77eefc..0000000
--- a/trunk/doap_io.rdf
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:asfext="http://projects.apache.org/ns/asfext#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:doap="http://usefulinc.com/ns/doap#" xml:lang="en">
-  <Project rdf:about="http://commons.apache.org/io/">
-    <name>Apache Commons IO</name>
-    <homepage rdf:resource="http://commons.apache.org/io/"/>
-    <programming-language>Java</programming-language>
-    <category rdf:resource="http://projects.apache.org/category/library"/>
-    <license rdf:resource="http://usefulinc.com/doap/licenses/asl20"/>
-    <bug-database rdf:resource="http://issues.apache.org/jira/browse/IO"/>
-    <download-page rdf:resource="http://commons.apache.org/io/download_io.cgi"/>
-    <asfext:pmc rdf:resource="http://commons.apache.org/"/>
-    <shortdesc xml:lang="en">Commons IO</shortdesc>
-    <description xml:lang="en">
-        Commons-IO contains utility classes, stream implementations, file filters, file comparators and endian classes.
-  </description>
-    <repository>
-      <SVNRepository>
-        <browse rdf:resource="http://svn.apache.org/repos/asf/commons/proper/io/trunk"/>
-        <location rdf:resource="http://svn.apache.org/repos/asf/commons/proper/io"/>
-      </SVNRepository>
-    </repository>
-    <release>
-      <Version>
-        <name>commons-io</name>
-        <created>2005-10-10</created>
-        <revision>1.1</revision>
-      </Version>
-    </release>
-    <release>
-      <Version>
-        <name>commons-io</name>
-        <created>2006-03-19</created>
-        <revision>1.2</revision>
-      </Version>
-    </release>
-    <release>
-      <Version>
-        <name>commons-io</name>
-        <created>2007-01-30</created>
-        <revision>1.3</revision>
-      </Version>
-    </release>
-    <release>
-      <Version>
-        <name>commons-io</name>
-        <created>2007-02-13</created>
-        <revision>1.3.1</revision>
-      </Version>
-    </release>
-    <release>
-      <Version>
-        <name>commons-io</name>
-        <created>2007-06-27</created>
-        <revision>1.3.2</revision>
-      </Version>
-    </release>
-    <release>
-      <Version>
-        <name>commons-io</name>
-        <created>2008-01-20</created>
-        <revision>1.4</revision>
-      </Version>
-    </release>
-    <release>
-      <Version>
-        <name>commons-io</name>
-        <created>2010-10-18</created>
-        <revision>2.0</revision>
-      </Version>
-    </release>
-    <release>
-      <Version>
-        <name>commons-io</name>
-        <created>2010-12-26</created>
-        <revision>2.0.1</revision>
-      </Version>
-    </release>
-    <release>
-      <Version>
-        <name>commons-io</name>
-        <created>2011-09-28</created>
-        <revision>2.1</revision>
-      </Version>
-    </release>
-    <mailing-list rdf:resource="http://commons.apache.org/mail-lists.html"/>
-  </Project>
-</rdf:RDF>
diff --git a/trunk/findbugs-exclude-filter.xml b/trunk/findbugs-exclude-filter.xml
deleted file mode 100644
index 506146a..0000000
--- a/trunk/findbugs-exclude-filter.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-
-<!--
-  This file contains some false positive bugs detected by findbugs. Their
-  false positive nature has been analyzed individually and they have been
-  put here to instruct findbugs it must ignore them.
--->
-<FindBugsFilter>
-
-
-  <!--  See discussion on https://issues.apache.org/jira/browse/IO-215 -->
-  <Match>
-    <Class name="org.apache.commons.io.FileUtils" />
-    <Or>
-      <Method name="doCopyDirectory" params="java.io.File,java.io.File,java.io.FileFilter,boolean,java.util.List" returns="void" />
-      <Method name="doCopyFile" params="java.io.File,java.io.File,boolean" returns="void" />
-    </Or>
-    <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
-  </Match>
-
-
-  <!--
-       Ignoring the return from mkdirs() is a false positives since the
-       following line in both those methods checks for the existence of
-       the directory and throws an exception if it doesn't exist. 
-    -->
-  <Match>
-    <Class name="org.apache.commons.io.FileUtils" />
-    <Or>
-      <Method name="moveDirectoryToDirectory" params="java.io.File,java.io.File,boolean" returns="void" />
-      <Method name="moveFileToDirectory" params="java.io.File,java.io.File,boolean" returns="void" />
-    </Or>
-    <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
-  </Match>
-
-
-  <!--
-      FileEntry is used internally by FileAlterationObserver to refresh and
-      update the state of files it is monitoring and in that context this is
-      not an issue. If people re-use it elsewhere then they need to
-      take care - but its not its primary purpose here and so its OK
-    -->
-  <Match>
-    <Class name="org.apache.commons.io.monitor.FileEntry" />
-    <Method name="setChildren" params="org.apache.commons.io.monitor.FileEntry[]" returns="void" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-
-
-  <!--  See discussion on https://issues.apache.org/jira/browse/IO-214 -->
-  <Match>
-    <Class name="org.apache.commons.io.output.ByteArrayOutputStream" />
-    <Bug pattern="IS2_INCONSISTENT_SYNC" />
-  </Match>
-
-
-  <!-- This is a false positive since close() does nothing in the Stream implementation being used -->
-  <Match>
-    <Class name="org.apache.commons.io.output.ByteArrayOutputStream" />
-    <Method name="toBufferedInputStream" params="java.io.InputStream" returns="java.io.InputStream" />
-    <Bug pattern="OS_OPEN_STREAM" />
-  </Match>
-
-
-  <!--  See discussion on https://issues.apache.org/jira/browse/IO-216 -->
-  <Match>
-    <Class name="org.apache.commons.io.output.LockableFileWriter" />
-    <Method name="close" params="" returns="void" />
-    <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
-  </Match>
-
-  <Match>
-    <Class name="org.apache.commons.io.output.DeferredFileOutputStream" />
-    <Or>
-      <Method name="thresholdReached" params="" returns="void" />
-    </Or>
-    <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
-  </Match>
-</FindBugsFilter>
diff --git a/trunk/pom.xml b/trunk/pom.xml
deleted file mode 100644
index 8ffa6e4..0000000
--- a/trunk/pom.xml
+++ /dev/null
@@ -1,421 +0,0 @@
-<?xml version="1.0"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.apache.commons</groupId>
-    <artifactId>commons-parent</artifactId>
-    <version>39</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>commons-io</groupId>
-  <artifactId>commons-io</artifactId>
-  <version>2.5</version>
-  <name>Apache Commons IO</name>
-
-  <inceptionYear>2002</inceptionYear>
-  <description>
-The Apache Commons IO library contains utility classes, stream implementations, file filters, 
-file comparators, endian transformation classes, and much more.
-  </description>
-
-  <url>http://commons.apache.org/proper/commons-io/</url>
-
-  <issueManagement>
-    <system>jira</system>
-    <url>http://issues.apache.org/jira/browse/IO</url>
-  </issueManagement>
-
-  <distributionManagement>
-    <site>
-      <id>apache.website</id>
-      <name>Apache Commons Site</name>
-      <url>scm:svn:https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-i/</url>
-    </site>
-  </distributionManagement>
-
-  <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/io/tags/commons-io-2.5</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/io/tags/commons-io-2.5</developerConnection>
-    <url>http://svn.apache.org/viewvc/commons/proper/io/tags/commons-io-2.5</url>
-  </scm>
-
-  <developers>
-    <developer>
-      <name>Scott Sanders</name>
-      <id>sanders</id>
-      <email>sanders@apache.org</email>
-      <organization />
-      <roles>
-        <role>Java Developer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>dIon Gillard</name>
-      <!-- Note: first name is correctly capitalised above -->
-      <id>dion</id>
-      <email>dion@apache.org</email>
-      <organization />
-      <roles>
-        <role>Java Developer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Nicola Ken Barozzi</name>
-      <id>nicolaken</id>
-      <email>nicolaken@apache.org</email>
-      <organization />
-      <roles>
-        <role>Java Developer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Henri Yandell</name>
-      <id>bayard</id>
-      <email>bayard@apache.org</email>
-      <organization />
-      <roles>
-        <role>Java Developer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Stephen Colebourne</name>
-      <id>scolebourne</id>
-      <organization />
-      <roles>
-        <role>Java Developer</role>
-      </roles>
-      <timezone>0</timezone>
-    </developer>
-    <developer>
-      <name>Jeremias Maerki</name>
-      <id>jeremias</id>
-      <email>jeremias@apache.org</email>
-      <organization />
-      <roles>
-        <role>Java Developer</role>
-      </roles>
-      <timezone>+1</timezone>
-    </developer>
-    <developer>
-      <name>Matthew Hawthorne</name>
-      <id>matth</id>
-      <email>matth@apache.org</email>
-      <organization />
-      <roles>
-        <role>Java Developer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Martin Cooper</name>
-      <id>martinc</id>
-      <email>martinc@apache.org</email>
-      <organization />
-      <roles>
-        <role>Java Developer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Rob Oxspring</name>
-      <id>roxspring</id>
-      <email>roxspring@apache.org</email>
-      <organization />
-      <roles>
-        <role>Java Developer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Jochen Wiedmann</name>
-      <id>jochen</id>
-      <email>jochen.wiedmann@gmail.com</email>
-    </developer>
-    <developer>
-      <name>Niall Pemberton</name>
-      <id>niallp</id>
-      <roles>
-        <role>Java Developer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Jukka Zitting</name>
-      <id>jukka</id>
-      <roles>
-        <role>Java Developer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Gary Gregory</name>
-      <id>ggregory</id>
-      <email>ggregory@apache.org</email>
-      <url>http://www.garygregory.com</url>
-      <timezone>-5</timezone>
-    </developer>
-    <developer>
-      <name>Kristian Rosenvold</name>
-      <id>krosenvold</id>
-      <email>krosenvold@apache.org</email>
-      <timezone>+1</timezone>
-    </developer>
-  </developers>
-
-  <contributors>
-    <contributor>
-      <name>Rahul Akolkar</name>
-    </contributor>
-    <contributor>
-      <name>Jason Anderson</name>
-    </contributor>
-    <contributor>
-      <name>Nathan Beyer</name>
-    </contributor>
-    <contributor>
-      <name>Emmanuel Bourg</name>
-    </contributor>
-    <contributor>
-      <name>Chris Eldredge</name>
-    </contributor>
-    <contributor>
-      <name>Magnus Grimsell</name>
-    </contributor>
-    <contributor>
-      <name>Jim Harrington</name>
-    </contributor>
-    <contributor>
-      <name>Thomas Ledoux</name>
-    </contributor>
-    <contributor>
-      <name>Andy Lehane</name>
-    </contributor>
-    <contributor>
-      <name>Marcelo Liberato</name>
-    </contributor>
-    <contributor>
-      <name>Alban Peignier</name>
-      <email>alban.peignier at free.fr</email>
-    </contributor>
-    <contributor>
-      <name>Ian Springer</name>
-    </contributor>
-    <contributor>
-      <name>Dominik Stadler</name>
-    </contributor>
-    <contributor>
-      <name>Masato Tezuka</name>
-    </contributor>
-    <contributor>
-      <name>James Urie</name>
-    </contributor>
-    <contributor>
-      <name>Frank W. Zammetti</name>
-    </contributor>
-  </contributors>
-
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.12</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <properties>
-    <maven.compiler.source>1.6</maven.compiler.source>
-    <maven.compiler.target>1.6</maven.compiler.target>
-    <commons.componentid>io</commons.componentid>
-    <commons.rc.version>RC1</commons.rc.version>
-    <commons.release.version>2.5</commons.release.version>
-    <commons.release.desc>(requires JDK 1.6+)</commons.release.desc>
-    <commons.jira.id>IO</commons.jira.id>
-    <commons.jira.pid>12310477</commons.jira.pid>
-    <commons.osgi.export>
-        <!-- Explicit list of packages from IO 1.4 -->
-        org.apache.commons.io;
-        org.apache.commons.io.comparator;
-        org.apache.commons.io.filefilter;
-        org.apache.commons.io.input;
-        org.apache.commons.io.output;version=1.4.9999;-noimport:=true,
-        <!-- Same list plus * for new packages -->
-        org.apache.commons.io;
-        org.apache.commons.io.comparator;
-        org.apache.commons.io.filefilter;
-        org.apache.commons.io.input;
-        org.apache.commons.io.output;
-        org.apache.commons.io.*;version=${project.version};-noimport:=true
-    </commons.osgi.export>
-
-    <commons.scmPubCheckoutDirectory>site-content</commons.scmPubCheckoutDirectory>
-  </properties>
-
-  <build>
-    <pluginManagement>
-    </pluginManagement>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <classpathDependencyExcludes>
-            <classpathDependencyExclude>xerces:xercesImpl</classpathDependencyExclude>
-          </classpathDependencyExcludes>
-          <forkMode>pertest</forkMode>
-          <!-- limit memory size see IO-161 -->
-          <argLine>-Xmx25M</argLine>
-          <includes>
-            <!-- Only include test classes, not test data -->
-            <include>**/*Test*.class</include>
-          </includes>
-          <excludes>
-            <exclude>**/*AbstractTestCase*</exclude>
-            <exclude>**/testtools/**</exclude>
-            <!-- http://jira.codehaus.org/browse/SUREFIRE-44 -->
-            <exclude>**/*$*</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
-      <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <descriptors>
-            <descriptor>src/assembly/bin.xml</descriptor>
-            <descriptor>src/assembly/src.xml</descriptor>
-          </descriptors>
-          <tarLongFileMode>gnu</tarLongFileMode>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-scm-publish-plugin</artifactId>
-        <configuration>
-          <ignorePathsToDelete>
-            <ignorePathToDelete>javadocs</ignorePathToDelete>
-          </ignorePathsToDelete>
-        </configuration>
-      </plugin>
-      <!-- Configure RAT for CLI invocation: mvn apache-rat:rat -->
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-        <!-- Must agree with report section RAT config -->
-        <configuration>
-          <excludes>
-            <exclude>src/test/resources/**/*.bin</exclude>
-            <exclude>test/**</exclude>
-
-            <!-- The next 3 excludes can be dropped when using CP30 -->
-            <exclude>site-content/**</exclude>
-            <exclude>.pmd</exclude>
-            <exclude>src/site/resources/download_*.cgi</exclude>
-
-          </excludes>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-  <reporting>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>cobertura-maven-plugin</artifactId>
-        <version>2.7</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>2.12.1</version>
-        <configuration>
-          <configLocation>${basedir}/checkstyle.xml</configLocation>
-          <enableRulesSummary>false</enableRulesSummary>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>findbugs-maven-plugin</artifactId>
-        <version>${commons.findbugs.version}</version>
-        <configuration>
-          <threshold>Normal</threshold>
-          <effort>Default</effort>
-          <excludeFilterFile>${basedir}/findbugs-exclude-filter.xml</excludeFilterFile>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-        <!-- Must agree with build section RAT config -->
-        <configuration>
-          <excludes>
-            <exclude>src/test/resources/**/*.bin</exclude>
-            <exclude>test/**</exclude>
-
-            <!-- The next 3 excludes can be dropped when using CP30 -->
-            <exclude>site-content/**</exclude>
-            <exclude>.pmd</exclude>
-            <exclude>src/site/resources/download_*.cgi</exclude>
-
-          </excludes>
-        </configuration>
-      </plugin>
-    </plugins>
-  </reporting>
-  <profiles>
-    <profile>
-      <id>setup-checkout</id>
-      <activation>
-        <file>
-          <missing>site-content</missing>
-        </file>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
-            <version>1.8</version>
-            <executions>
-              <execution>
-                <id>prepare-checkout</id>
-                <phase>pre-site</phase>
-                <goals>
-                  <goal>run</goal>
-                </goals>
-                <configuration>
-                  <target>
-                    <exec executable="svn">
-                      <arg line="checkout --depth immediates ${commons.scmPubUrl} ${commons.scmPubCheckoutDirectory}" />
-                    </exec>
-
-                    <exec executable="svn">
-                      <arg line="update --set-depth exclude ${commons.scmPubCheckoutDirectory}/javadocs" />
-                    </exec>
-
-                    <pathconvert pathsep=" " property="dirs">
-                      <dirset dir="${commons.scmPubCheckoutDirectory}" includes="*" />
-                    </pathconvert>
-                    <exec executable="svn">
-                      <arg line="update --set-depth infinity ${dirs}" />
-                    </exec>
-                  </target>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-</project>
diff --git a/trunk/src/assembly/bin.xml b/trunk/src/assembly/bin.xml
deleted file mode 100644
index cf3f008..0000000
--- a/trunk/src/assembly/bin.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<assembly>
-    <id>bin</id>
-    <formats>
-        <format>tar.gz</format>
-        <format>zip</format>
-    </formats>
-    <includeSiteDirectory>false</includeSiteDirectory>
-    <fileSets>
-        <fileSet>
-            <includes>
-                <include>LICENSE.txt</include>
-                <include>NOTICE.txt</include>
-                <include>RELEASE-NOTES.txt</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>target</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>*.jar</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>target/site/apidocs</directory>
-            <outputDirectory>docs</outputDirectory>
-            <excludes>
-                <exclude>**/customsorttypes.js</exclude>
-                <exclude>**/sortabletable.js</exclude>
-                <exclude>**/stringbuilder.js</exclude>
-            </excludes>
-        </fileSet>
-    </fileSets>
-</assembly>
diff --git a/trunk/src/assembly/src.xml b/trunk/src/assembly/src.xml
deleted file mode 100644
index 453264d..0000000
--- a/trunk/src/assembly/src.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<assembly>
-    <id>src</id>
-    <formats>
-        <format>tar.gz</format>
-        <format>zip</format>
-    </formats>
-    <baseDirectory>${artifactId}-${commons.release.version}-src</baseDirectory>
-    <fileSets>
-        <fileSet>
-            <includes>
-                <include>build.xml</include>
-                <include>checkstyle.xml</include>
-                <include>findbugs-exclude-filter.xml</include>
-                <include>LICENSE.txt</include>
-                <include>NOTICE.txt</include>
-                <include>pom.xml</include>
-                <include>PROPOSAL.html</include>
-                <include>RELEASE-NOTES.txt</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>src</directory>
-        </fileSet>
-    </fileSets>
-</assembly>
diff --git a/trunk/src/changes/changes.xml b/trunk/src/changes/changes.xml
deleted file mode 100644
index 55c4d38..0000000
--- a/trunk/src/changes/changes.xml
+++ /dev/null
@@ -1,482 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!--
-This file is used by the maven-changes-plugin to generate the release notes.
-Useful ways of finding items to add to this file are:
-
-1.  Add items when you fix a bug or add a feature (this makes the
-release process easy :-).
-
-2.  Do a Jira search for tickets closed since the previous release.
-
-3.  Use the report generated by the maven-changelog-plugin to see all
-CVS commits.  Set the project.properties' maven.changelog.range
-property to the number of days since the last release.
-
-
-To generate the release notes from this file:
-
-mvn changes:announcement-generate -Prelease-notes [-Dchanges.version=nnn]
-
-then tweak the source formatting if necessary and regenerate, then commit
-
-The <action> type attribute can be add,update,fix,remove.
--->
-
-<document>
-  <properties>
-    <title>Release Notes</title>
-  </properties>
-
-  <body>
-    <!-- The release date is the date RC is cut -->
-    <release version="2.5" date="2015-??-??" description="New features and bug fixes.">
-      <action issue="IO-487" dev="bdelacretaz" type="add">
-        Add ValidatingObjectInputStream for controlled deserialization
-      </action>
-      <action issue="IO-446" dev="krosenvold" type="fix" due-to="Jeffrey Barrus">
-        adds an endOfFileReached method to the TailerListener
-      </action>
-      <action issue="IO-484" dev="krosenvold" type="fix" due-to="Philippe Arteau">
-        FilenameUtils should handle embedded null bytes
-      </action>
-      <action issue="IO-481" dev="krosenvold" type="fix">
-        Changed/Corrected algorithm for waitFor
-      </action>
-      <action issue="IO-471" dev="krosenvold" type="add" due-to="Leandro Reis">
-        Support for additional encodings in ReversedLinesFileReader
-      </action>
-      <action issue="IO-428" dev="krosenvold" type="fix" due-to="Stefan Gmeiner">
-        BOMInputStream.skip returns wrong count if stream contains no BOM
-      </action>
-      <action issue="IO-425" dev="krosenvold" type="add" due-to="Craig Swank">
-        Setter method for threshold on ThresholdingOutputStream
-      </action>
-      <action issue="IO-488" dev="krosenvold" type="fix" due-to="Björn Buchner">
-        FileUtils.waitFor(...) swallows thread interrupted status
-      </action>
-      <action issue="IO-452" dev="krosenvold" type="fix" due-to="David Standish">
-        Support for symlinks with missing target. Added support for JDK7 symlink features when present
-      </action>
-      <action issue="IO-466" dev="krosenvold" type="update">
-        Added testcase to show this was fixed with IO-423
-      </action>
-      <action issue="IO-479" dev="sebb" type="update" due-to="Zhouce Chen">
-        Correct exception message in FileUtils.getFile(File, String...)
-      </action>
-      <action issue="IO-406" dev="britter" type="add" due-to="Niall Pemberton">
-        Introduce new class AppendableOutputStream
-      </action>
-      <action issue="IO-465" dev="britter" type="update" due-to="based2">
-         Update to JUnit 4.12
-      </action>
-      <action issue="IO-462" dev="sebb" type="update">
-         IOExceptionWithCause no longer needed
-      </action>
-      <action issue="IO-459" dev="olamy" type="add" due-to="Kristian Rosenvold">
-        Add WindowsLineEndingInputStream and UnixLineEndingInputStream.
-      </action>
-      <action issue="IO-457" dev="olamy" type="add" due-to="Kristian Rosenvold">
-        Add a BoundedReader, a wrapper that can be used to constrain access
-        to an underlying stream when used with mark/reset -
-        to avoid overflowing the mark limit of the underlying buffer.
-      </action>
-      <action issue="IO-453" dev="sebb" type="fix" due-to="Steven Christou">
-         Regression in FileUtils.readFileToString from 2.0.1
-      </action>
-      <action issue="IO-451" dev="sebb" type="fix" due-to="David Standish">
-         ant test fails - resources missing from test classpath
-      </action>
-      <action issue="IO-435" dev="tn" type="fix" due-to="Dominik Stadler">
-         Document that FileUtils.deleteDirectory, directoryContains and cleanDirectory
-         may throw an IllegalArgumentException in case the passed directory does not
-         exist or is not a directory.
-      </action>
-      <action issue="IO-426" dev="ggregory" type="add">
-         Add API IOUtils.closeQuietly(Closeable...)
-      </action>
-      <action issue="IO-424" dev="ggregory" type="fix" due-to="Ville Skyttä">
-         Javadoc fixes, mostly to appease 1.8.0
-      </action>
-      <action issue="IO-422" dev="ggregory" type="update">
-         Deprecate Charsets Charset constants in favor of Java 7's java.nio.charset.StandardCharsets
-      </action>
-      <action issue="IO-410" dev="sebb" type="add" due-to="Beluga Behr">
-         Readfully() That Returns A Byte Array
-      </action>
-      <action issue="IO-395" dev="brentworden" type="add" due-to="Beluga Behr">
-         Overload IOUtils buffer methods to accept buffer size
-      </action>
-      <action issue="IO-389" dev="sebb" type="fix" due-to="Austin Doupnik">
-         FileUtils.sizeOfDirectory can throw IllegalArgumentException
-      </action>
-      <action issue="IO-390" dev="sebb" type="fix">
-         FileUtils.sizeOfDirectoryAsBigInteger can overflow.
-         Ensure that recursive calls all use BigInteger
-      </action>
-      <action issue="IO-382" dev="sebb" type="add">
-         Chunked IO for large arrays.
-         Added writeChunked(byte[], OutputStream) and writeChunked(char[] Writer)
-         Added ChunkedOutputStream, ChunkedWriter
-      </action>
-      <action issue="IO-385" dev="sebb" type="fix">
-         FileUtils.doCopyFile can potentially loop for ever
-         Exit loop if no data to copy
-      </action>
-      <action issue="IO-383" dev="sebb" type="fix">
-         FileUtils.doCopyFile caches the file size; needs to be documented
-         Added Javadoc; show file lengths in exception message
-      </action>
-      <action issue="IO-239" dev="sebb" type="update">
-         Convert IOCase to a Java 1.5+ Enumeration
-         [N.B. this is binary compatible]
-      </action>
-      <action issue="IO-233" dev="sebb" type="add">
-         Add Methods for Buffering Streams/Writers To IOUtils
-         Added overloaded buffer() methods - see also IO-330
-      </action>
-      <action issue="IO-330" dev="sebb" type="add">
-         IOUtils#toBufferedOutputStream/toBufferedWriter to conditionally wrap the output
-         Added overloaded buffer() methods - see also IO-233
-      </action>
-      <action issue="IO-381" dev="ggregory" type="add">
-        Add FileUtils.copyInputStreamToFile API with option to leave the source open.
-        See copyInputStreamToFile(final InputStream source, final File destination, boolean closeSource)
-      </action>
-      <action issue="IO-380" dev="sebb" type="fix" due-to="claudio_ch">
-        FileUtils.copyInputStreamToFile should document it closes the input source
-      </action>
-      <action issue="IO-279" dev="sebb" type="fix">
-        Tailer erroneously considers file as new.
-        Fix to use file.lastModified() rather than System.currentTimeMillis()
-      </action>
-      <action issue="IO-356" dev="sebb" type="fix">
-         CharSequenceInputStream#reset() behaves incorrectly in case when buffer size is not dividable by data size.
-         Fix code so skip relates to the encoded bytes; reset now re-encodes the data up to the point of the mark
-      </action>
-      <action issue="IO-379" dev="sebb" type="add">
-         CharSequenceInputStream - add tests for available()
-         Fix code so it really does reflect a minimum available.
-      </action>
-      <action issue="IO-328" dev="sebb" type="update">
-        getPrefixLength returns null if filename has leading slashes
-        Javadoc: add examples to show correct behaviour; add unit tests
-      </action>
-      <action issue="IO-299" dev="sebb" type="update">
-        FileUtils.listFilesAndDirs includes original dir in results even when it doesn't match filter
-        Javadoc: clarify that original dir is included in the results
-      </action>
-      <action issue="IO-346" dev="sebb" type="add">
-         Add ByteArrayOutputStream.toInputStream()
-      </action>
-      <action issue="IO-368" dev="sebb" type="fix">
-        ClassLoaderObjectInputStream does not handle primitive typed members
-      </action>
-      <action issue="IO-341" dev="sebb" type="add">
-         A constant for holding the BOM character (U+FEFF)
-      </action>
-      <action issue="IO-314" dev="sebb" type="fix">
-        Deprecate all methods that use the default encoding
-      </action>
-      <action issue="IO-338" dev="sebb" type="fix">
-        When a file is rotated, finish reading previous file prior to starting new one
-      </action>
-      <action issue="IO-354" dev="sebb" type="fix">
-        Commons IO Tailer does not respect UTF-8 Charset.
-      </action>
-      <action issue="IO-323" dev="sebb" type="fix">
-        What should happen in FileUtils.sizeOf[Directory] when an overflow takes place?
-        Added Javadoc.
-      </action>
-      <action issue="IO-372" dev="sebb" type="fix">
-        FileUtils.moveDirectory can produce misleading error message on failiure
-      </action>
-      <action issue="IO-375" dev="sebb" type="update">
-        FilenameUtils.splitOnTokens(String text) check for '**' could be simplified
-      </action>
-      <action issue="IO-374" dev="sebb" type="update">
-        WildcardFileFilter ctors should not use null to mean IOCase.SENSITIVE when delegating to other ctors
-      </action>
-      <action issue="IO-362" dev="ggregory" type="fix" due-to="mmadson, ggregory">
-        IOUtils.contentEquals* methods returns false if input1 == input2, should return true.
-      </action>
-      <action issue="IO-361" dev="ggregory" type="add">
-        Add API FileUtils.forceMkdirsParent().
-      </action>
-      <action issue="IO-360" dev="ggregory" type="add">
-        Add API Charsets.requiredCharsets().
-      </action>
-      <action issue="IO-359" dev="ggregory" type="add" due-to="yukoba">
-        Add IOUtils.skip and skipFully(ReadableByteChannel, long).
-      </action>
-      <action issue="IO-358" dev="ggregory" type="add" due-to="yukoba">
-        Add IOUtils.read and readFully(ReadableByteChannel, ByteBuffer buffer).
-      </action>
-      <action issue="IO-357" dev="ggregory" type="fix" due-to="mortenh">
-        [Tailer] InterruptedException while the thread is sleeping is silently ignored
-      </action>
-      <action issue="IO-353" dev="ggregory" type="add" due-to="ggregory">
-        Add API IOUtils.copy(InputStream, OutputStream, int)
-      </action>
-      <action issue="IO-349" dev="ggregory" type="add" due-to="scop">
-        Add API with array offset and length argument to FileUtils.writeByteArrayToFile.
-      </action>
-      <action issue="IO-352" dev="ggregory" type="fix" due-to="scop">
-        Spelling fixes.
-      </action>
-      <action issue="IO-348" dev="ggregory" type="add" due-to="plcstpierre">
-        Missing information in IllegalArgumentException thrown by org.apache.commons.io.FileUtils#validateListFilesParameters.
-      </action>
-      <action issue="IO-345" dev="ggregory" type="add" due-to="mkresse">
-        Supply a hook method allowing Tailer actively determining stop condition.
-      </action>
-      <action issue="IO-436" dev="ggregory" type="fix" due-to="christoph.schneegans">
-        Improper JavaDoc comment for FilenameUtils.indexOfExtension.
-      </action>
-      <action issue="IO-437" dev="ggregory" type="add">
-        Make IOUtils.EOF public and reuse it in various classes.
-      </action>
-    </release>
-    <!-- The release date is the date RC is cut -->
-    <release version="2.4" date="2012-06-12" description="New features and bug fixes.">
-      <action issue="IO-343" dev="ggregory" type="fix" due-to="igorlash">
-        org.apache.commons.io.comparator Javadoc is inconsistent with real code.
-      </action>
-      <action issue="IO-336" dev="ggregory" type="fix" due-to="rleavelle">
-        Yottabyte (YB) incorrectly defined in FileUtils.
-      </action>
-      <action issue="IO-269" dev="ggregory" type="add" due-to="sebb">
-        Tailer locks file from deletion/rename on Windows.
-      </action>
-      <action issue="IO-279" dev="sebb" type="fix" due-to="Sergio Bossa, Chris Baron">
-        Tailer erroneously considers file as new.
-      </action>
-      <action issue="IO-335" dev="sebb" type="fix">
-        Tailer#readLines - incorrect CR handling.
-      </action>
-      <action issue="IO-334" dev="sebb" type="fix">
-        FileUtils.toURLs throws NPE for null parameter; document the behavior.
-      </action>
-      <action issue="IO-333" dev="ggregory" type="add" due-to="fmeschbe">
-        Export OSGi packages at version 1.x in addition to 2.x.
-      </action>
-      <action issue="IO-320" dev="ggregory" type="add" due-to="ggregory">
-        Add XmlStreamReader support for UTF-32.
-      </action>
-      <action issue="IO-331" dev="ggregory" type="add" due-to="ggregory">
-        BOMInputStream wrongly detects UTF-32LE_BOM files as UTF-16LE_BOM files in method getBOM().
-      </action>
-      <action issue="IO-332" dev="ggregory" type="fix" due-to="liangly">
-        Improve tailer's reading performance.
-      </action>
-      <action issue="IO-279" dev="ggregory" type="fix">
-        Improve Tailer performance with buffered reads (see IO-332).
-      </action>
-      <action issue="IO-329" dev="ggregory" type="fix" due-to="tivv">
-        FileUtils.writeLines uses unbuffered IO.
-      </action>
-      <action issue="IO-327" dev="ggregory" type="add" due-to="ggregory">
-        Add byteCountToDisplaySize(BigInteger).
-      </action>
-      <action issue="IO-326" dev="ggregory" type="add" due-to="ggregory, kinow">
-        Add new FileUtils.sizeOf[Directory] APIs to return BigInteger.
-      </action>
-      <action issue="IO-325" dev="ggregory" type="add" due-to="raviprak">
-        Add IOUtils.toByteArray methods to work with URL and URI.
-      </action>
-      <action issue="IO-324" dev="ggregory" type="add" due-to="raviprak">
-        Add missing Charset sister APIs to method that take a String charset name.
-      </action>
-      <action issue="IO-319" dev="ggregory" type="fix" due-to="raviprak">
-        FileUtils.sizeOfDirectory follows symbolic links.
-      </action>
-    </release>
-    <!-- The release date is the date RC is cut -->
-    <release version="2.3" date="2012-April-10" description="New features and bug fixes.">
-      <action issue="IO-322" dev="ggregory" type="add" due-to="ggregory">
-        Add and use class Charsets.
-      </action>
-      <action issue="IO-321" dev="ggregory" type="add" due-to="ggregory">
-        ByteOrderMark UTF_32LE is incorrect.
-      </action>
-      <action issue="IO-318" dev="ggregory" type="add" due-to="ggregory">
-        Add Charset sister APIs to method that take a String charset name.
-      </action>
-    </release>
-    <release version="2.2" date="2012-March-26" description="New features and bug fixes.">
-      <action issue="IO-313" dev="ggregory" type="add" due-to="ggregory">
-        Add IOUTils.toBufferedReader(Reader)
-      </action>
-      <!-- Note: the issue was not raised by Manoj, but arose from IO-305 and tests he performed -->
-      <action issue="IO-308" dev="sebb" type="add" due-to="Manoj Mokashi">
-        Allow applications to provide buffer (or size) for copyLarge methods.
-      </action>
-      <action issue="IO-311" dev="sebb" type="fix" due-to="Robert Muir">
-        IOUtils.read(InputStream/Reader) ignores the offset parameter
-      </action>
-      <action issue="IO-312" dev="sebb" type="fix">
-        CharSequenceInputStream(CharSequence s, Charset charset, int bufferSize) ignores bufferSize
-      </action>
-      <action issue="IO-305" dev="sebb" type="add" due-to="Manoj Mokashi">
-        New copyLarge() method in IOUtils that takes additional offset, length arguments
-      </action>
-      <action issue="IO-300" dev="sebb" type="fix">
-        FileUtils.moveDirectoryToDirectory removes source directory if destination is a sub-directory
-      </action>
-      <action issue="IO-307" dev="sebb" type="fix">
-        ReaderInputStream#read(byte[] b, int off, int len) should check for valid parameters
-      </action>
-      <action issue="IO-287" dev="bayard" type="add" due-to="Ron Kuris, Gary Gregory">
-        Use terabyte (TB), petabyte (PB) and exabyte (EB) in FileUtils.byteCountToDisplaySize(long size)
-      </action>
-      <action issue="IO-306" dev="sebb" type="fix">
-        ReaderInputStream#read(byte[] b, int off, int len) should always return 0 for length == 0
-      </action>
-      <action issue="IO-173" dev="sebb" type="add" due-to="Marcos Vinícius da Silva">
-        FileUtils.listFiles() doesn't return directories
-      </action>
-      <action issue="IO-276" dev="sebb" type="fix" due-to="nkami">
-        "FileUtils#deleteDirectoryOnExit(File)" does not work
-      </action>
-      <action issue="IO-273" dev="sebb" type="fix" due-to="sebb">
-        BoundedInputStream.read() treats max differently from BoundedInputStream.read(byte[]...)
-      </action>
-      <action issue="IO-297" dev="sebb" type="add" due-to="Oleg Kalnichevski">
-        CharSequenceInputStream to efficiently stream content of a CharSequence
-      </action>
-      <action issue="IO-296" dev="sebb" type="update" due-to="Oleg Kalnichevski">
-        ReaderInputStream optimization: more efficient reading of small chunks of data
-      </action>
-      <action issue="IO-298" dev="sebb" type="fix" due-to="Christian Schulte">
-        Various methods of class 'org.apache.commons.io.FileUtils' incorrectly suppress 'java.io.IOException'
-      </action>
-      <action issue="IO-304" dev="ggregory" type="add" due-to="liangly">
-        The second constructor of Tailer class does not pass 'delay' to the third one
-      </action>
-      <action issue="IO-303" dev="ggregory" type="add" due-to="fabian.barney">
-        TeeOutputStream does not call branch.close() when main.close() throws an exception
-      </action>
-      <action issue="IO-302" dev="ggregory" type="add" due-to="jsteuerwald, detinho">
-        ArrayIndexOutOfBoundsException in BOMInputStream when reading a file without BOM multiple times
-      </action>
-      <action issue="IO-301" dev="ggregory" type="add" due-to="kaykay.unique">
-        Add IOUtils.closeQuietly(Selector) necessary
-      </action>
-      <action issue="IO-292" dev="sebb" type="add" due-to="sebb">
-        IOUtils.closeQuietly() should take a ServerSocket as a parameter
-      </action>
-      <action issue="IO-290" dev="sebb" type="add" due-to="sebb">
-        Add read/readFully methods to IOUtils
-      </action>
-      <action issue="IO-288" dev="sebb" type="add" due-to="Georg Henzler">
-        Supply a ReversedLinesFileReader
-      </action>
-      <action issue="IO-291" dev="ggregory" type="add" due-to="ggregory">
-        Add new function FileUtils.directoryContains.
-      </action>
-      <action issue="IO-275" dev="sebb" type="add" due-to="CJ Aspromgos">
-        FileUtils.contentEquals and IOUtils.contentEquals - Add option to ignore "line endings"
-        Added contentEqualsIgnoreEOL methods to both classes
-      </action>
-    </release>
-    <release version="2.1" date="2011-Sep-28" description="New features and bug fixes.">
-      <action dev="ggregory" type="add" issue="IO-285" due-to="ggregory">
-        Use standard Maven directory layout
-      </action>
-      <action dev="ggregory" type="add" issue="IO-284" due-to="ggregory">
-        Add IOUtils API toString for URL and URI to get contents
-      </action>
-      <action dev="ggregory" type="add" issue="IO-282" due-to="ggregory">
-        Add API FileUtils.copyFile(File input, OutputStream output)
-      </action>
-      <action dev="sebb" type="fix" issue="IO-280" due-to="sebb">
-        Dubious use of mkdirs() return code
-      </action>
-      <action type="fix" issue="IO-277">
-        ReaderInputStream enters infinite loop when it encounters an unmappable character
-      </action>
-      <action type="fix" issue="IO-264">
-        FileUtils.moveFile() JavaDoc should specify FileExistsException thrown
-      </action>
-      <action type="add" issue="IO-262">
-        FileAlterationObserver has no getter for FileFilter
-      </action>
-      <action type="add" issue="IO-261">
-        Add FileUtils.getFile API with varargs parameter
-      </action>
-      <action type="fix" issue="IO-260">
-        ClassLoaderObjectInputStream does not handle Proxy classes
-      </action>
-      <action type="update" issue="IO-259">
-        FileAlterationMonitor.stop(boolean allowIntervalToFinish)
-      </action>
-      <action type="add" issue="IO-182">
-        Add new APPEND parameter for writing string into files
-      </action>
-      <action dev="sebb" type="fix" issue="IO-274" due-to="Frank Grimes">
-        Tailer returning partial lines when reaching EOF before EOL
-      </action>
-      <action dev="sebb" type="fix" issue="IO-266" due-to="Igor Smereka">
-        FileUtils.copyFile() throws IOException when copying large files to a shared directory (on Windows)
-      </action>
-      <action dev="sebb" type="fix" issue="IO-263" due-to="Gil Adam">
-        FileSystemUtils.freeSpaceKb throws exception for Windows volumes with no visible files.
-        Improve coverage by also looking for hidden files.
-      </action>
-      <action dev="sebb" type="add" issue="IO-251" due-to="Marco Albini">
-        Add new read method "toByteArray" to handle InputStream with known size.
-      </action>
-
-    </release>
-
-    <release version="2.0.1" date="2010-Dec-26">
-      <action type="update">
-        TODO: Convert RELEASE-NOTES.txt from 2.0.1?
-      </action>
-    </release>
-
-    <release version="2.0" date="2010-Oct-18">
-      <action type="update">
-        TODO: Convert RELEASE-NOTES.txt from 2.0?
-      </action>
-    </release>
-
-    <release version="1.4" date="2008-Jan-21">
-      <action type="update">
-        TODO: Convert RELEASE-NOTES.txt from 1.4?
-      </action>
-    </release>
-
-    <release version="1.3.2" date="2007-Jul-02" description="Bug fixes.">
-      <action dev="jochen" type="fix" issue="IO-115">
-        Some tests, which are implicitly assuming a Unix-like file
-        system, are now skipped on Windows.
-      </action>
-      <action dev="jochen" type="fix" issue="IO-116">
-        Created the FileCleaningTracker, basically a non-static
-        version of the FileCleaner, which can be controlled by
-        the user.
-      </action>
-      <action dev="bayard" type="fix" issue="IO-117" due-to="Hiroshi Ikeda">
-        EndianUtils - both readSwappedUnsignedInteger(...) methods could
-        return negative numbers due to int/long casting.
-      </action>
-    </release>
-  </body>
-</document>
diff --git a/trunk/src/changes/release-notes.vm b/trunk/src/changes/release-notes.vm
deleted file mode 100644
index b39b90a..0000000
--- a/trunk/src/changes/release-notes.vm
+++ /dev/null
@@ -1,1029 +0,0 @@
-## Licensed to the Apache Software Foundation (ASF) under one
-## or more contributor license agreements.  See the NOTICE file
-## distributed with this work for additional information
-## regarding copyright ownership.  The ASF licenses this file
-## to you under the Apache License, Version 2.0 (the
-## "License"); you may not use this file except in compliance
-## with the License.  You may obtain a copy of the License at
-##
-##  http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing,
-## software distributed under the License is distributed on an
-## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-## KIND, either express or implied.  See the License for the
-## specific language governing permissions and limitations
-## under the License.
-
-Apache Commons IO 
-Version ${version}
-Release Notes
-
-INTRODUCTION:
-
-Commons IO is a package of Java utility classes like java.io.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-$introduction.replaceAll("(?<!\015)\012", "
-")
-
-==============================================================================
-Apache Commons IO Version ${version}
-==============================================================================
-##
-## N.B. the available variables are described here:
-## http://maven.apache.org/plugins/maven-changes-plugin/examples/using-a-custom-announcement-template.html
-##
-## Hack to improve layout: replace all pairs of spaces with a single new-line
-$release.description.replaceAll("  ", "
-")
-
-##
-#if ($release.getActions().size() == 0)
-No changes defined in this version.
-#else
-Changes in this version include:
-
-## indent to be used if there is no issue attribute.
-## should be the same as the indent in the changes.xml file
-## less 2 spaces for the 'o' and trailing space
-#set($indent='          ')
-#if ($release.getActions('add').size() !=0)
-New features:
-#foreach($actionItem in $release.getActions('add'))
-## Use replaceAll to fix up LF-only line ends on Windows.
-#set($action=$actionItem.getAction().replaceAll("\n","
-"))
-#if ($actionItem.getIssue())
-#set($issue=$actionItem.getIssue())
-#else
-#set($issue="")
-#end
-#if ($actionItem.getDueTo())
-#set($dueto=$actionItem.getDueTo())
-#else
-#set($dueto="")
-#end
-o#if($!issue != "") $issue: #else$indent#end ${action} #if($!dueto != "")Thanks to $dueto. #end
-
-#set($issue="")
-#set($dueto="")
-#end 
-#end
-
-#if ($release.getActions('fix').size() !=0)
-Fixed Bugs:
-#foreach($actionItem in $release.getActions('fix'))
-## Use replaceAll to fix up LF-only line ends on Windows.
-#set($action=$actionItem.getAction().replaceAll("\n","
-"))
-#if ($actionItem.getIssue())
-#set($issue=$actionItem.getIssue())
-#else
-#set($issue="")
-#end
-#if ($actionItem.getDueTo())
-#set($dueto=$actionItem.getDueTo())
-#else
-#set($dueto="")
-#end
-o#if($!issue != "") $issue: #else$indent#end ${action} #if($!dueto != "")Thanks to $dueto. #end
-
-#set($issue="")
-#set($dueto="")
-#end
-#end
-
-#if ($release.getActions('update').size() !=0)
-Changes:
-#foreach($actionItem in $release.getActions('update'))
-## Use replaceAll to fix up LF-only line ends on Windows.
-#set($action=$actionItem.getAction().replaceAll("\n","
-"))
-#if ($actionItem.getIssue())
-#set($issue=$actionItem.getIssue())
-#else
-#set($issue="")
-#end
-#if ($actionItem.getDueTo())
-#set($dueto=$actionItem.getDueTo())
-#else
-#set($dueto="")
-#end
-o#if($!issue != "") $issue: #else$indent#end ${action} #if($!dueto != "")Thanks to $dueto. #end
-
-#set($issue="")
-#set($dueto="")
-#end
-#end
-
-#if ($release.getActions('remove').size() !=0)
-Removed:
-#foreach($actionItem in $release.getActions('remove'))
-## Use replaceAll to fix up LF-only line ends on Windows.
-#set($action=$actionItem.getAction().replaceAll("\n","
-"))
-#if ($actionItem.getIssue())
-#set($issue=$actionItem.getIssue())
-#else
-#set($issue="")
-#end
-#if ($actionItem.getDueTo())
-#set($dueto=$actionItem.getDueTo())
-#else
-#set($dueto="")
-#end
-o#if($!issue != "") $issue: #else$indent#end ${action} #if($!dueto != "")Thanks to $dueto. #end
-##
-#set($issue="")
-#set($dueto="")
-#end
-#end
-## End of main loop
-#end
-##
-Compatibility with 2.4:
-Binary compatible: Yes.
-Source compatible: Yes.
-Semantic compatible: Yes.
-
-Compatibility with 2.2 and 1.4:
-Binary compatible: Yes.
-Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-
-Commons IO 2.5 requires JDK 1.6 or later.
-Commons IO 2.4 requires JDK 1.6 or later.
-Commons IO 2.3 requires JDK 1.6 or later.
-Commons IO 2.2 requires JDK 1.5 or later.
-Commons IO 1.4 requires JDK 1.3 or later.
-
-==============================================================================
-Apache Commons IO Version 2.4
-==============================================================================
-
-Changes in this version include:
-
-New features:
-o IO-269:  Tailer locks file from deletion/rename on Windows. Thanks to
-sebb.
-o IO-333:  Export OSGi packages at version 1.x in addition to 2.x. Thanks
-to fmeschbe.
-o IO-320:  Add XmlStreamReader support for UTF-32. Thanks to ggregory.
-o IO-331:  BOMInputStream wrongly detects UTF-32LE_BOM files as
-UTF-16LE_BOM files in method getBOM(). Thanks to ggregory.
-o IO-327:  Add byteCountToDisplaySize(BigInteger). Thanks to ggregory.
-o IO-326:  Add new FileUtils.sizeOf[Directory] APIs to return BigInteger.
-Thanks to ggregory.
-o IO-325:  Add IOUtils.toByteArray methods to work with URL and URI. Thanks
-to raviprak.
-o IO-324:  Add missing Charset sister APIs to method that take a String
-charset name. Thanks to raviprak.
-
-Fixed Bugs:
-o IO-336:  Yottabyte (YB) incorrectly defined in FileUtils. Thanks to
-rleavelle.
-o IO-279:  Tailer erroneously considers file as new. Thanks to Sergio
-Bossa, Chris Baron.
-o IO-335:  Tailer#readLines - incorrect CR handling.
-o IO-334:  FileUtils.toURLs throws NPE for null parameter; document the
-behavior.
-o IO-332:  Improve tailer's reading performance. Thanks to liangly.
-o IO-279:  Improve Tailer performance with buffered reads (see IO-332).
-o IO-329:  FileUtils.writeLines uses unbuffered IO. Thanks to tivv.
-o IO-319:  FileUtils.sizeOfDirectory follows symbolic links. Thanks to
-raviprak.
-
-
-Compatibility with 2.3:
-Binary compatible: Yes.
-Source compatible: Yes.
-Semantic compatible: Yes.
-
-Compatibility with 2.2 and 1.4:
-Binary compatible: Yes.
-Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-
-Commons IO 2.4 requires JDK 1.6 or later.
-Commons IO 2.3 requires JDK 1.6 or later.
-Commons IO 2.2 requires JDK 1.5 or later.
-Commons IO 1.4 requires JDK 1.3 or later.
-
-==============================================================================
-Apache Commons IO Version 2.3
-==============================================================================
-
-Changes in this version include:
-
-New features:
-o IO-322:  Add and use class Charsets. Thanks to ggregory. 
-o IO-321:  ByteOrderMark UTF_32LE is incorrect. Thanks to ggregory. 
-o IO-318:  Add Charset sister APIs to method that take a String charset name. Thanks to ggregory. 
-
-Compatibility with 2.2 and 1.4:
-Binary compatible: Yes.
-Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-
-Commons IO 2.3 requires JDK 1.6 or later.
-Commons IO 2.2 requires JDK 1.5 or later.
-Commons IO 1.4 requires JDK 1.3 or later.
-
-==============================================================================
-Apache Commons IO Version 2.2
-==============================================================================
-
-Changes in this version include:
-
-New features:
-o Add IOUTils.toBufferedReader(Reader)  Issue: IO-313. Thanks to ggregory. 
-o Allow applications to provide buffer (or size) for copyLarge methods.  Issue: IO-308. Thanks to Manoj Mokashi. 
-o New copyLarge() method in IOUtils that takes additional offset, length arguments  Issue: IO-305. Thanks to Manoj Mokashi. 
-o Use terabyte (TB), petabyte (PB) and exabyte (EB) in FileUtils.byteCountToDisplaySize(long size)  Issue: IO-287. Thanks to Ron Kuris, Gary Gregory. 
-o FileUtils.listFiles() doesn't return directories  Issue: IO-173. Thanks to Marcos Vinícius da Silva. 
-o CharSequenceInputStream to efficiently stream content of a CharSequence  Issue: IO-297. Thanks to Oleg Kalnichevski. 
-o The second constructor of Tailer class does not pass 'delay' to the third one  Issue: IO-304. Thanks to liangly. 
-o TeeOutputStream does not call branch.close() when main.close() throws an exception  Issue: IO-303. Thanks to fabian.barney. 
-o ArrayIndexOutOfBoundsException in BOMInputStream when reading a file without BOM multiple times  Issue: IO-302. Thanks to jsteuerwald, detinho. 
-o Add IOUtils.closeQuietly(Selector) necessary  Issue: IO-301. Thanks to kaykay.unique. 
-o IOUtils.closeQuietly() should take a ServerSocket as a parameter  Issue: IO-292. Thanks to sebb. 
-o Add read/readFully methods to IOUtils  Issue: IO-290. Thanks to sebb. 
-o Supply a ReversedLinesFileReader  Issue: IO-288. Thanks to Georg Henzler. 
-o Add new function FileUtils.directoryContains.  Issue: IO-291. Thanks to ggregory. 
-o FileUtils.contentEquals and IOUtils.contentEquals - Add option to ignore "line endings"
-        Added contentEqualsIgnoreEOL methods to both classes  Issue: IO-275. Thanks to CJ Aspromgos. 
-
-Fixed Bugs:
-o IOUtils.read(InputStream/Reader) ignores the offset parameter  Issue: IO-311. Thanks to Robert Muir. 
-o CharSequenceInputStream(CharSequence s, Charset charset, int bufferSize) ignores bufferSize  Issue: IO-312. 
-o FileUtils.moveDirectoryToDirectory removes source directory if destination is a subdirectory  Issue: IO-300. 
-o ReaderInputStream#read(byte[] b, int off, int len) should check for valid parameters  Issue: IO-307. 
-o ReaderInputStream#read(byte[] b, int off, int len) should always return 0 for length == 0  Issue: IO-306. 
-o "FileUtils#deleteDirectoryOnExit(File)" does not work  Issue: IO-276. Thanks to nkami. 
-o BoundedInputStream.read() treats max differently from BoundedInputStream.read(byte[]...)  Issue: IO-273. Thanks to sebb. 
-o Various methods of class 'org.apache.commons.io.FileUtils' incorrectly suppress 'java.io.IOException'  Issue: IO-298. Thanks to Christian Schulte. 
-
-Changes:
-o ReaderInputStream optimization: more efficient reading of small chunks of data  Issue: IO-296. Thanks to Oleg Kalnichevski. 
-
-
-Compatibility with 2.1 and 1.4:
-Binary compatible: Yes
-Source compatible: Yes
-Semantic compatible: Yes. Check the bug fixes section for semantic bug fixes
-
-Commons IO 2.2 requires a minimum of JDK 1.5. 
-Commons IO 1.4 requires a minimum of JDK 1.3. 
-
-==============================================================================
-Apache Commons IO Version 2.1
-==============================================================================
-
-New features:
-o Use standard Maven directory layout  Issue: IO-285. Thanks to ggregory. 
-o Add IOUtils API toString for URL and URI to get contents  Issue: IO-284. Thanks to ggregory. 
-o Add API FileUtils.copyFile(File input, OutputStream output)  Issue: IO-282. Thanks to ggregory. 
-o FileAlterationObserver has no getter for FileFilter  Issue: IO-262. 
-o Add FileUtils.getFile API with varargs parameter  Issue: IO-261. 
-o Add new APPEND parameter for writing string into files  Issue: IO-182. 
-o Add new read method "toByteArray" to handle InputStream with known size.  Issue: IO-251. Thanks to Marco Albini. 
-
-Fixed Bugs:
-o Dubious use of mkdirs() return code  Issue: IO-280. Thanks to sebb. 
-o ReaderInputStream enters infinite loop when it encounters an unmappable character  Issue: IO-277. 
-o FileUtils.moveFile() JavaDoc should specify FileExistsException thrown  Issue: IO-264. 
-o ClassLoaderObjectInputStream does not handle Proxy classes  Issue: IO-260. 
-o Tailer returning partial lines when reaching EOF before EOL  Issue: IO-274. Thanks to Frank Grimes. 
-o FileUtils.copyFile() throws IOException when copying large files to a shared directory (on Windows)  Issue: IO-266. Thanks to Igor Smereka. 
-o FileSystemUtils.freeSpaceKb throws exception for Windows volumes with no visible files.
-        Improve coverage by also looking for hidden files.  Issue: IO-263. Thanks to Gil Adam. 
-
-Changes:
-o FileAlterationMonitor.stop(boolean allowIntervalToFinish)  Issue: IO-259. 
-
-==============================================================================
-Apache Commons IO Package 2.0.1
-==============================================================================
-
-Compatibility with 2.0 and 1.4
-------------------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-Commons IO 2.0.1 requires a minimum of JDK 1.5
- (Commons IO 1.4 had a minimum of JDK 1.3) 
-
-Enhancements from 2.0
----------------------
-
-   * [IO-256] - Provide thread factory for FileAlternationMonitor
-
-Bug fixes from 2.0
-------------------
-
-   * [IO-257] - BOMInputStream.read(byte[]) can return 0 which it should not
-   * [IO-258] - XmlStreamReader consumes the stream during encoding detection
-
-==============================================================================
-Apache Commons IO Package 2.0
-==============================================================================
-
-Compatibility with 1.4
-----------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-Commons IO 2.0 requires a minimum of JDK 1.5
- (Commons IO 1.4 had a minimum of JDK 1.3) 
-
-Deprecations from 1.4
----------------------
-
-- IOUtils
-  - write(StringBuffer, Writer) in favour of write(CharSequence, Writer)
-  - write(StringBuffer, OutputStream)  in favour of write(CharSequence, OutputStream)
-  - write(StringBuffer, OutputStream, String) in favour of write(CharSequence, OutputStream, String)
-
-- FileFilterUtils
-  - andFileFilter(IOFileFilter, IOFileFilter) in favour of and(IOFileFilter...) 
-  - orFileFilter(IOFileFilter, IOFileFilter)  in favour of or(IOFileFilter...)
-
-Enhancements from 1.4
----------------------
-
-  * [IO-140] Move minimum Java requirement from JDK 1.3 to JDK 1.5
-             - use Generics
-             - add new CharSequence write() flavour methods to IOUtils and FileUtils
-             - replace StringBuffer with StringBuilder, where appropriate
-             - add new Reader/Writer methods to ProxyReader and ProxyWriter
-             - Annotate with @Override and @Deprecated
-
-  * [IO-178] New BOMInputStream and ByteOrderMark implementations - to detect and optionally exclude an initial Byte Order mark (BOM)
-  * [IO-197] New BoundedInputStream (copied from from Apache JackRabbit)
-  * [IO-193] New Broken Input and Output streams
-  * [IO-132] New File Listener/Monitor facility
-  * [IO-158] New ReaderInputStream and WriterOutputStream implementations
-  * [IO-139] New StringBuilder Writer implementation
-  * [IO-192] New Tagged Input and Output streams
-  * [IO-177] New Tailer class - simple implementation of the Unix "tail -f" functionality
-  * [IO-162] New XML Stream Reader/Writer implementations (from ROME via plexus-utils)
-
-  * [IO-142] Comparators - add facility to sort file lists/arrays
-  * [IO-186] Comparators - new Composite and Directory File Comparator implementations
-  * [IO-176] DirectoryWalker - add filterDirectoryContents() callback method for filtering directory contents
-  * [IO-210] FileFilter - new Magic Number FileFilter
-  * [IO-221] FileFilterUtils - add methods for suffix and prefix filters which take an IOCase object
-  * [IO-232] FileFilterUtils - add method for name filters which take an IOCase object
-  * [IO-229] FileFilterUtils - add varargs and() and or() methods
-  * [IO-198] FileFilterUtils - add ability to apply file filters to collections and arrays
-  * [IO-156] FilenameUtils - add normalize() and normalizeNoEndSeparator() methods which allow the separator character to be specified
-  * [IO-194] FileSystemUtils - add freeSpaceKb() method with no input arguments
-  * [IO-185] FileSystemUtils - add freeSpaceKb() methods that take a timeout parameter - fixes freeSpaceWindows() blocks
-  * [IO-155] FileUtils - use NIO to copy files
-  * [IO-168] FileUtils - add new isSymlink() method
-  * [IO-219] FileUtils - throw FileExistsException when moving a file or directory if the destination already exists
-  * [IO-234] FileUtils - add Methods for retrieving System User/Temp directories/paths
-  * [IO-208] FileUtils - add timeout (connection and read) support for copyURLToFile() method 
-  * [IO-238] FileUtils - add sizeOf(File) method
-  * [IO-181] LineIterator now implements Iterable
-  * [IO-224] IOUtils - add closeQuietly(Closeable) and closeQuietly(Socket) methods
-  * [IO-203] IOUtils - add skipFully() method for InputStreams
-  * [IO-137] IOUtils and ByteArrayOutputStream - add toBufferedInputStream() method to avoid unnecessary array allocation/copy
-  * [IO-195] Proxy streams/Reader/Writer - provide exception handling methods
-  * [IO-211] Proxy Input/Output streams - add pre/post processing support
-  * [IO-242] Proxy Reader/Writer - add pre/post processing support
-
-Bug fixes from 1.4
-------------------
-  * [IO-214] ByteArrayOutputStream - fix inconsistent synchronization of fields
-  * [IO-201] Counting Input/Output streams - fix inconsistent synchronization
-  * [IO-159] FileCleaningTracker - fix remove() never returns null
-  * [IO-220] FileCleaningTracker - fix Vector performs badly under load
-  * [IO-167] FilenameUtils - fix case-insensitive string handling in FilenameUtils and FilesystemUtils
-  * [IO-179] FilenameUtils - fix StringIndexOutOfBounds exception in getPathNoEndSeparator()
-  * [IO-248] FilenameUtils - fix getFullPathNoEndSeparator() returns empty while path is a one level directory
-  * [IO-246] FilenameUtils - fix wildcardMatch gives incorrect results 
-  * [IO-187] FileSystemUtils - fix freeSpaceKb() doesn't work with relative paths on Linux
-  * [IO-160] FileSystemUtils - fix freeSpace() fails on solaris
-  * [IO-209] FileSystemUtils - fix freeSpaceKb() fails to return correct size for a windows mount point
-  * [IO-163] FileUtils - fix toURLs() using deprecated method of conversion to URL
-  * [IO-168] FileUtils - fix Symbolic links followed when deleting directory
-  * [IO-231] FileUtils - fix wrong exception message generated in isFileNewer() method
-  * [IO-207] FileUtils - fix race condition in forceMkdir() method
-  * [IO-217] FileUtils - fix copyDirectoryToDirectory() makes infinite loops
-  * [IO-166] FileUtils - fix URL decoding in toFile(URL)
-  * [IO-190] FileUtils - fix copyDirectory not preserving lastmodified date on sub-directories
-  * [IO-240] FileFilterUtils - ensure cvsFilter and svnFilter are only created once.
-  * [IO-175] IOUtils - fix copyFile() issues with very large files
-  * [IO-191] Improvements from static analysis
-  * [IO-216] LockableFileWriter - delete files quietly when an exception is thrown during initialization
-  * [IO-243] SwappedDataInputStream - fix readBoolean is inverted
-  * [IO-235] Tests - remove unused YellOnFlushAndCloseOutputStream from CopyUtilsTest
-  * [IO-161] Tests - fix FileCleaningTrackerTestCase hanging
-
-Documentation changes from 1.4
-------------------------------
-  * [IO-183 FilenameUtils.getExtension() method documentation improvements
-  * [IO-226 FileUtils.byteCountToDisplaySize() documentation corrections
-  * [IO-205 FileUtils.forceMkdir() documentation improvements
-  * [IO-215 FileUtils copy file/directory improve documentation regarding preserving the last modified date
-  * [IO-189 HexDump.dump() method documentation improvements
-  * [IO-171 IOCase document that it assumes there are only two OSes: Windows and Unix
-  * [IO-223 IOUtils.copy() documentation corrections
-  * [IO-247 IOUtils.closeQuietly() improve documentation with examples
-  * [IO-202 NotFileFilter documentation corrections
-  * [IO-206 ProxyInputStream - fix misleading parameter names
-  * [IO-212 ProxyInputStream.skip() documentation corrections
-
-==============================================================================
-Apache Commons IO Version 1.4
-==============================================================================
-
-Compatibility with 1.3.2
-------------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-Commons IO 1.4 introduces four new implementations which depend on JDK 1.4 features
-(CharSequenceReader, FileWriterWithEncoding, IOExceptionWithCause and RegexFileFilter).
-It has been built with the JDK source and target options set to JDK 1.3 and, except for
-those implementations, can be used with JDK 1.3 (see IO IO-127).
-
-Deprecations from 1.3.2
------------------------
-- FileCleaner deprecated in favour of FileCleaningTracker [see IO-116]
-
-Bug fixes from 1.3.2
---------------------
-- FileUtils
-  - forceDelete of orphaned Softlinks does not work [IO-147]
-  - Infinite loop on FileUtils.copyDirectory when the destination directory is within
-    the source directory [IO-141]
-  - Add a copyDirectory() method that makes use of FileFilter [IO-105]
-  - Add moveDirectory() and moveFile() methods [IO-77]
-
-- HexDump
-  - HexDump's use of static StringBuffers isn't thread-safe [IO-136]
-
-Enhancements from 1.3.2
------------------------
-- FileUtils
-  - Add a deleteQuietly method [IO-135]
-
-- FilenameUtils
-  - Add file name extension separator constants[IO-149]
-
-- IOExceptionWithCause [IO-148]
-  - Add a new IOException implementation with constructors which take a cause
-
-- TeeInputStream [IO-129]
-  - Add new Tee input stream implementation
-
-- FileWriterWithEncoding [IO-153]
-  - Add new File Writer implementation that accepts an encoding
-
-- CharSequenceReader [IO-138]
-  - Add new Reader implementation that handles any CharSequence (String,
-    StringBuffer, StringBuilder or CharBuffer) 
-
-- ThesholdingOuputStream [IO-121]
-  - Add a reset() method which sets the count of the bytes written back to zero.
-
-- DeferredFileOutputStream [IO-130]
-  - Add support for temporary files
-
-- ByteArrayOutputStream
-  - Add a new write(InputStream) method [IO-152]
-
-- New Closed Input/Output stream implementations [IO-122]
-  - AutoCloseInputStream - automatically closes and discards the underlying input stream
-  - ClosedInputStream - returns -1 for any read attempts
-  - ClosedOutputStream - throws an IOException for any write attempts
-  - CloseShieldInputStream - prevents the underlying input stream from being closed.
-  - CloseShieldOutputStream - prevents the underlying output stream from being closed.
-
-- Add Singleton Constants to several stream classes [IO-143]
-
-- PrefixFileFilter [IO-126]
-  - Add faciltiy to specify case sensitivity on prefix matching
-
-- SuffixFileFilter [IO-126]
-  - Add faciltiy to specify case sensitivity on suffix matching
-
-- RegexFileFilter [IO-74]
-  - Add new regular expression file filter implementation
-
-- Make IOFileFilter implementations Serializable [IO-131]
-
-- Improve IOFileFilter toString() methods [IO-120]
-
-- Make fields final so classes are immutable/threadsafe [IO-133]
-  - changes to Age, Delegate, Name, Not, Prefix, Regex, Size, Suffix and Wildcard IOFileFilter
-    implementations.
-
-- IOCase
-  - Add a compare method to IOCase [IO-144]
-
-- Add a package of java.util.Comparator implementations for files [IO-145]
-  - DefaultFileComparator - compare files using the default File.compareTo(File) method.
-  - ExtensionFileComparator - compares files using file name extensions.
-  - LastModifiedFileComparator - compares files using the last modified date/time.
-  - NameFileComparator - compares files using file names.
-  - PathFileComparator - compares files using file paths.
-  - SizeFileComparator - compares files using file sizes.
-  
-==============================================================================
-Apache Commons IO Version 1.3.2
-==============================================================================
-
-Compatibility with 1.3.1
-----------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-
-Compatibility with 1.3
-----------------------
-Binary compatible - No
-  See [IO-113]
-
-Source compatible - No
-  See [IO-113]
-
-Semantic compatible - Yes
-
-Enhancements since 1.3.1
-------------------------
-
-- Created the FileCleaningTracker, basically a non-static version of the
-  FileCleaner, which can be controlled by the user. [IO-116]
-- The FileCleaner is deprecated.
-
-Bug fixes from 1.3.1
---------------------
-
-- Some tests, which are implicitly assuming a Unix-like file system, are
-  now skipped on Windows. [IO-115]
-- EndianUtils
-  - Both readSwappedUnsignedInteger(...) methods could return negative 
-    numbers due to int/long casting. [IO-117]
-
-Bug fixes from 1.3
-------------------
-
-- FileUtils
-  - NPE in openOutputStream(File) when file has no parent in path [IO-112]
-  - readFileToString(File) is not static [IO-113]
-
-==============================================================================
-Apache Commons IO Version 1.3.1
-==============================================================================
-
-Compatibility with 1.3
-----------------------
-Binary compatible - No
-  See [IO-113]
-
-Source compatible - No
-  See [IO-113]
-
-Semantic compatible - Yes
-
-Bug fixes from 1.3
-------------------
-
-- FileUtils
-  - NPE in openOutputStream(File) when file has no parent in path [IO-112]
-  - readFileToString(File) is not static [IO-113]
-  
-==============================================================================
-Apache Commons IO Version 1.3
-==============================================================================
-
-Compatibility with 1.2
-----------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-Deprecations from 1.2
----------------------
-- WildcardFilter deprecated, replaced by WildcardFileFilter
-  - old class only accepted files, thus had a confusing dual purpose
-
-- FileSystemUtils.freeSpace deprecated, replaced by freeSpaceKb
-  - freeSpace returns a result that varies by operating system and
-    thus isn't that useful
-  - freeSpaceKb returns much better and more consistent results
-  - freeSpaceKb existed in v1.2, so this is a gentle cutover
-
-Bug fixes from 1.2
-------------------
-- LineIterator now implements Iterator
-  - It was always supposed to...
-
-- FileSystemUtils.freeSpace/freeSpaceKb [IO-83]
-  - These should now work on AIX and HP-UX
-
-- FileSystemUtils.freeSpace/freeSpaceKb [IO-90]
-  - Avoid infinite looping in Windows
-  - Catch more errors with nice messages
-
-- FileSystemUtils.freeSpace [IO-91]
-  - This is now documented not to work on SunOS 5
-
-- FileSystemUtils [IO-93]
-  - Fixed resource leak leading to 'Too many open files' error
-  - Previously did not destroy Process instances (as JDK Javadoc is so poor)
-  - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4801027
-
-- FileUtils.touch [IO-100]
-  - The touch method previously gave no indication when the file could not
-    be touched successfully (such as due to access restrictions) - it now
-    throws an IOException if the last modified date cannot be changed
-
-- FileCleaner
-  - This now handles the situation where an error occurs when deleting the file
-
-- IOUtils.copy [IO-84]
-  - Copy methods could return inaccurate byte/char count for large streams
-  - The copy(InputStream, OutputStream) method now returns -1 if the count is greater than an int
-  - The copy(Reader, Writer) method now throws now returns -1 if the count is greater than an int
-  - Added a new copyLarge(InputStream, OutputStream) method that returns a long
-  - Added a new copyLarge(Reader, Writer) method that returns a long
-
-- CountingInputStream/CountingOutputStream [IO-84]
-  - Methods were declared as int thus the count was innacurate for large streams
-  - new long based methods getByteCount()/resetByteCount() added
-  - existing methods changed to throw an exception if the count is greater than an int
-
-- FileBasedTestCase
-  - Fixed bug in compare content methods identified by GNU classpath
-
-- EndianUtils.writeSwappedLong(byte[], int) [IO-101]
-  - An int overrun in the bit shifting when it should have been a long
-
-- EndianUtils.writeSwappedLong(InputStream) [IO-102]
-  - The return of input.read(byte[]) was not being checked to ensure all 8 bytes were read
-
-Enhancements from 1.2
----------------------
-- DirectoryWalker [IO-86]
-  - New class designed for subclassing to walk through a set of files.
-    DirectoryWalker provides the walk of the directories, filtering of
-    directories and files, and cancellation support. The subclass must provide
-    the specific behaviour, such as text searching or image processing.
-
-- IOCase
-  - New class/enumeration for case-sensitivity control
-
-- FilenameUtils
-  - New methods to handle case-sensitivity
-  - wildcardMatch - new method that has IOCase as a parameter
-  - equals - new method that has IOCase as a parameter
-
-- FileUtils [IO-108] - new default encoding methods for:
-  - readFileToString(File)
-  - readLines(File)
-  - lineIterator(File)
-  - writeStringToFile(File, String)
-  - writeLines(File, Collection)
-  - writeLines(File, Collection, String)
-
-- FileUtils.openOutputStream  [IO-107]
-  - new method to open a FileOutputStream, creating parent directories if required
-- FileUtils.touch
-- FileUtils.copyURLToFile
-- FileUtils.writeStringToFile
-- FileUtils.writeByteArrayToFile
-- FileUtils.writeLines
-  - enhanced to create parent directories if required
-- FileUtils.openInputStream  [IO-107]
-  - new method to open a FileInputStream, providing better error messages than the JDK
-
-- FileUtils.isFileOlder
-  - new methods to check if a file is older (i.e. isFileOlder()) - counterparts
-    to the existing isFileNewer() methods.
-
-- FileUtils.checksum, FileUtils.checksumCRC32
-  - new methods to create a checksum of a file
-
-- FileUtils.copyFileToDirectory  [IO-104]
-  - new variant that optionally retains the file date
-
-- FileDeleteStrategy
-- FileCleaner    [IO-56,IO-70]
-  - FileDeleteStrategy is a strategy for handling file deletion
-  - This can be used as a calback in FileCleaner
-  - Together these allow FileCleaner to do a forceDelete to kill directories
-
-- FileCleaner.exitWhenFinished [IO-99]
-  - A new method that allows the internal cleaner thread to be cleanly terminated
-
-- WildcardFileFilter
-  - Replacement for WildcardFilter
-  - Accepts both files and directories
-  - Ability to control case-sensitivity
-
-- NameFileFilter
-  - Ability to control case-sensitivity
-
-- FileFileFilter
-  - New IOFileFilter implementation
-  - Accepts files where File.isFile() is true
-  - In other words it filters out directories
-  - Singleton instance provided (FILE)
-
-- CanReadFileFilter
-  - New IOFileFilter implementation
-  - Accepts files where File.canRead() is true
-  - Singleton instances provided (CAN_READ/CANNOT_READ/READ_ONLY)
-
-- CanWriteFileFilter
-  - New IOFileFilter implementation
-  - Accepts files where File.canWrite() is true
-  - Singleton instances provided (CAN_WRITE/CANNOT_WRITE)
-
-- HiddenFileFilter
-  - New IOFileFilter implementation
-  - Accepts files where File.isHidden() is true
-  - Singleton instances provided (HIDDEN/VISIBLE)
-
-- EmptyFileFilter
-  - New IOFileFilter implementation
-  - Accepts files or directories that are empty
-  - Singleton instances provided (EMPTY/NOT_EMPTY)
-
-- TrueFileFilter/FalseFileFilter/DirectoryFileFilter
-  - New singleton instance constants (TRUE/FALSE/DIRECTORY)
-  - The new constants are more JDK 1.5 friendly with regards to static imports
-    (whereas if everything uses INSTANCE, then they just clash)
-  - The old INSTANCE constants are still present and have not been deprecated
-
-- FileFilterUtils.sizeRangeFileFilter
-  - new sizeRangeFileFilter(long minimumSize, long maximumSize) method which 
-    creates a filter that accepts files within the specified size range.
-
-- FileFilterUtils.makeDirectoryOnly/makeFileOnly
-  - two new methods that decorate a file filter to make it apply to
-    directories only or files only
-
-- NullWriter
-  - New writer that acts as a sink for all data, as per /dev/null
-
-- NullInputStream
-  - New input stream that emulates a stream of a specified size
-
-- NullReader
-  - New reader that emulates a reader of a specified size
-
-- ByteArrayOutputStream  [IO-97]
-  - Performance enhancements
-
-==============================================================================
-Apache Commons IO Version 1.2
-==============================================================================
-
-Compatibility with 1.1
-----------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-
-Deprecations from 1.1
----------------------
-
-Bug fixes from 1.1
-------------------
-- FileSystemUtils.freeSpace(drive)
-  Fix to allow Windows based command to function in French locale
-
-- FileUtils.read*
-  Increase certainty that files are closed in case of error
-
-- LockableFileWriter
-  Locking mechanism was broken and only provided limited protection [38942]
-  File deletion and locking in case of constructor error was broken
-
-Enhancements from 1.1
----------------------
-- AgeFileFilter/SizeFileFilter
-  New file filters that compares against the age and size of the file
-
-- FileSystemUtils.freeSpaceKb(drive)
-  New method that unifies result to be in kilobytes [38574]
-
-- FileUtils.contentEquals(File,File)
-  Performance improved by adding length and file location checking
-
-- FileUtils.iterateFiles
-  Two new method to provide direct access to iterators over files
-
-- FileUtils.lineIterator
-  IOUtils.lineIterator
-  New methods to provide an iterator over the lines in a file [38083]
-
-- FileUtils.copyDirectoryToDirectory
-  New method to copy a directory to within another directory [36315]
-  
-==============================================================================
-Apache Commons IO Version 1.1
-==============================================================================
-
-Incompatible changes from 1.0
------------------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes, except:
-- FileUtils.writeStringToFile()
-    A null encoding previously used 'ISO-8859-1', now it uses the platform default
-    Generally this will make no difference
-
-- LockableFileWriter
-    Improved validation and now create directories if necesssary
-
-plus these bug fixes may affect you semantically:
-- FileUtils.touch()  (Bug fix 29821)
-    Now creates the file if it did not previously exist
-
-- FileUtils.toFile(URL) (Bug fix 32575)
-    Now handles escape syntax such as %20
-
-- FileUtils.sizeOfDirectory()  (Bug fix 36801)
-    May now return a size of 0 if the directory is security restricted
-
-Deprecations from 1.0
----------------------
-- CopyUtils has been deprecated.
-    Its methods have been moved to IOUtils.
-    The new IOUtils methods handle nulls better, and have clearer names.
-
-- IOUtils.toByteArray(String) - Use {@link String#getBytes()}
-- IOUtils.toString(byte[]) - Use {@link String#String(byte[])}
-- IOUtils.toString(byte[],String) - Use {@link String#String(byte[],String)}
-
-Bug fixes from 1.0
-------------------
-- FileUtils - touch()  [29821]
-    Now creates the file if it did not previously exist
-
-- FileUtils - toFile(URL)  [32575]
-    Now handles escape syntax such as %20
-
-- FileFilterUtils - makeCVSAware(IOFileFilter)  [33023]
-    Fixed bug that caused method to be completely broken
-
-- CountingInputStream  [33336]
-    Fixed bug that caused the count to reduce by one at the end of the stream
-
-- CountingInputStream - skip(long)  [34311]
-    Bytes from calls to this method were not previously counted
-
-- NullOutputStream  [33481]
-    Remove unnecessary synchronization
-
-- AbstractFileFilter - accept(File, String)  [30992]
-    Fixed broken implementation
-
-- FileUtils  [36801]
-    Previously threw NPE when listing files in a security restricted directory
-    Now throw IOException with a better message
-
-- FileUtils - writeStringToFile()
-    Null encoding now correctly uses the platform default
-
-Enhancements from 1.0
----------------------
-- FilenameUtils - new class  [33303,29351]
-    A static utility class for working with filenames
-    Seeks to ease the pain of developing on Windows and deploying on Unix
-
-- FileSystemUtils - new class  [32982,36325]
-    A static utility class for working with file systems
-    Provides one method at present, to get the free space on the filing system
-
-- IOUtils - new public constants
-    Constants for directory and line separators on Windows and Unix
-
-- IOUtils - toByteArray(Reader,encoding)
-    Handles encodings when reading to a byte array
-
-- IOUtils - toCharArray(InputStream)  [28979]
-          - toCharArray(InputStream,encoding)
-          - toCharArray(Reader)
-    Reads a stream/reader into a charatcter array
-
-- IOUtils - readLines(InputStream)  [36214]
-          - readLines(InputStream,encoding)
-          - readLines(Reader)
-    Reads a stream/reader line by line into a List of Strings
-
-- IOUtils - toInputStream(String)  [32958]
-          - toInputStream(String,encoding)
-    Creates an input stream that uses the string as a source of data
-
-- IOUtils - writeLines(Collection,lineEnding,OutputStream)  [36214]
-          - writeLines(Collection,lineEnding,OutputStream,encoding)
-          - writeLines(Collection,lineEnding,Writer)
-    Writes a collection to a stream/writer line by line
-
-- IOUtils - write(...)
-    Write data to a stream/writer (moved from CopyUtils with better null handling)
-
-- IOUtils - copy(...)
-    Copy data between streams (moved from CopyUtils with better null handling)
-
-- IOUtils - contentEquals(Reader,Reader)
-    Method to compare the contents of two readers
-
-- FileUtils - toFiles(URL[])
-    Converts an array of URLs to an array of Files
-
-- FileUtils - copyDirectory()  [32944]
-    New methods to copy a directory
-
-- FileUtils - readFileToByteArray(File)
-    Reads an entire file into a byte array
-
-- FileUtils - writeByteArrayToFile(File,byte[])
-    Writes a byte array to a file
-
-- FileUtils - readLines(File,encoding)  [36214]
-    Reads a file line by line into a List of Strings
-
-- FileUtils - writeLines(File,encoding,List)
-              writeLines(File,encoding,List,lineEnding)
-    Writes a collection to a file line by line
-
-- FileUtils - EMPTY_FILE_ARRAY
-    Constant for an empty array of File objects
-
-- ConditionalFileFilter - new interface  [30705]
-    Defines the behaviour of list based filters
-
-- AndFileFilter, OrFileFilter  [30705]
-    Now support a list of filters to and/or
-
-- WildcardFilter  [31115]
-    New filter that can match using wildcard file names
-
-- FileFilterUtils - makeSVNAware(IOFileFilter)
-    New method, like makeCVSAware, that ignores Subversion source control directories
-
-- ClassLoaderObjectInputStream
-    An ObjectInputStream that supports a ClassLoader
-
-- CountingInputStream,CountingOutputStream - resetCount()  [28976]
-    Adds the ability to reset the count part way through reading/writing the stream
-
-- DeferredFileOutputStream - writeTo(OutputStream)  [34173]
-    New method to allow current contents to be written to a stream
-
-- DeferredFileOutputStream  [34142]
-    Performance optimizations avoiding double buffering
-
-- LockableFileWriter - encoding support [36825]
-    Add support for character encodings to LockableFileWriter
-    Improve the validation
-    Create directories if necesssary
-
-- IOUtils and EndianUtils are no longer final  [28978]
-    Allows developers to have subclasses if desired   
-
-==============================================================================
-Feedback
-==============================================================================
-
-Open source works best when you give feedback:
-http://commons.apache.org/io/
-
-Please direct all bug reports to JIRA
-http://issues.apache.org/jira/browse/IO
-
-Or subscribe to the commons-user mailing list (prefix emails by [io])
-http://commons.apache.org/mail-lists.html
-
-The Commons-IO Team
diff --git a/trunk/src/main/java/org/apache/commons/io/ByteOrderMark.java b/trunk/src/main/java/org/apache/commons/io/ByteOrderMark.java
deleted file mode 100644
index 109c402..0000000
--- a/trunk/src/main/java/org/apache/commons/io/ByteOrderMark.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.Serializable;
-
-/**
- * Byte Order Mark (BOM) representation - see {@link org.apache.commons.io.input.BOMInputStream}.
- *
- * @see org.apache.commons.io.input.BOMInputStream
- * @see <a href="http://en.wikipedia.org/wiki/Byte_order_mark">Wikipedia: Byte Order Mark</a>
- * @see <a href="http://www.w3.org/TR/2006/REC-xml-20060816/#sec-guessing">W3C: Autodetection of Character Encodings
- *      (Non-Normative)</a>
- * @version $Id$
- * @since 2.0
- */
-public class ByteOrderMark implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /** UTF-8 BOM */
-    public static final ByteOrderMark UTF_8    = new ByteOrderMark("UTF-8",    0xEF, 0xBB, 0xBF);
-
-    /** UTF-16BE BOM (Big-Endian) */
-    public static final ByteOrderMark UTF_16BE = new ByteOrderMark("UTF-16BE", 0xFE, 0xFF);
-
-    /** UTF-16LE BOM (Little-Endian) */
-    public static final ByteOrderMark UTF_16LE = new ByteOrderMark("UTF-16LE", 0xFF, 0xFE);
-
-    /**
-     * UTF-32BE BOM (Big-Endian)
-     * @since 2.2
-     */
-    public static final ByteOrderMark UTF_32BE = new ByteOrderMark("UTF-32BE", 0x00, 0x00, 0xFE, 0xFF);
-
-    /**
-     * UTF-32LE BOM (Little-Endian)
-     * @since 2.2
-     */
-    public static final ByteOrderMark UTF_32LE = new ByteOrderMark("UTF-32LE", 0xFF, 0xFE, 0x00, 0x00);
-
-    /**
-     * Unicode BOM character; external form depends on the encoding.
-     * @see <a href="http://unicode.org/faq/utf_bom.html#BOM">Byte Order Mark (BOM) FAQ</a>
-     * @since 2.5
-     */
-    public static final char UTF_BOM = '\uFEFF';
-
-    private final String charsetName;
-    private final int[] bytes;
-
-    /**
-     * Construct a new BOM.
-     *
-     * @param charsetName The name of the charset the BOM represents
-     * @param bytes The BOM's bytes
-     * @throws IllegalArgumentException if the charsetName is null or
-     * zero length
-     * @throws IllegalArgumentException if the bytes are null or zero
-     * length
-     */
-    public ByteOrderMark(final String charsetName, final int... bytes) {
-        if (charsetName == null || charsetName.isEmpty()) {
-            throw new IllegalArgumentException("No charsetName specified");
-        }
-        if (bytes == null || bytes.length == 0) {
-            throw new IllegalArgumentException("No bytes specified");
-        }
-        this.charsetName = charsetName;
-        this.bytes = new int[bytes.length];
-        System.arraycopy(bytes, 0, this.bytes, 0, bytes.length);
-    }
-
-    /**
-     * Return the name of the {@link java.nio.charset.Charset} the BOM represents.
-     *
-     * @return the character set name
-     */
-    public String getCharsetName() {
-        return charsetName;
-    }
-
-    /**
-     * Return the length of the BOM's bytes.
-     *
-     * @return the length of the BOM's bytes
-     */
-    public int length() {
-        return bytes.length;
-    }
-
-    /**
-     * The byte at the specified position.
-     *
-     * @param pos The position
-     * @return The specified byte
-     */
-    public int get(final int pos) {
-        return bytes[pos];
-    }
-
-    /**
-     * Return a copy of the BOM's bytes.
-     *
-     * @return a copy of the BOM's bytes
-     */
-    public byte[] getBytes() {
-        final byte[] copy = new byte[bytes.length];
-        for (int i = 0; i < bytes.length; i++) {
-            copy[i] = (byte)bytes[i];
-        }
-        return copy;
-    }
-
-    /**
-     * Indicates if this BOM's bytes equals another.
-     *
-     * @param obj The object to compare to
-     * @return true if the bom's bytes are equal, otherwise
-     * false
-     */
-    @Override
-    public boolean equals(final Object obj) {
-        if (!(obj instanceof ByteOrderMark)) {
-            return false;
-        }
-        final ByteOrderMark bom = (ByteOrderMark)obj;
-        if (bytes.length != bom.length()) {
-            return false;
-        }
-        for (int i = 0; i < bytes.length; i++) {
-            if (bytes[i] != bom.get(i)) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Return the hashcode for this BOM.
-     *
-     * @return the hashcode for this BOM.
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        int hashCode = getClass().hashCode();
-        for (final int b : bytes) {
-            hashCode += b;
-        }
-        return hashCode;
-    }
-
-    /**
-     * Provide a String representation of the BOM.
-     *
-     * @return the length of the BOM's bytes
-     */
-    @Override
-    public String toString() {
-        final StringBuilder builder = new StringBuilder();
-        builder.append(getClass().getSimpleName());
-        builder.append('[');
-        builder.append(charsetName);
-        builder.append(": ");
-        for (int i = 0; i < bytes.length; i++) {
-            if (i > 0) {
-                builder.append(",");
-            }
-            builder.append("0x");
-            builder.append(Integer.toHexString(0xFF & bytes[i]).toUpperCase());
-        }
-        builder.append(']');
-        return builder.toString();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/Charsets.java b/trunk/src/main/java/org/apache/commons/io/Charsets.java
deleted file mode 100644
index 195c7c6..0000000
--- a/trunk/src/main/java/org/apache/commons/io/Charsets.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*

- * Licensed to the Apache Software Foundation (ASF) under one or more

- * contributor license agreements.  See the NOTICE file distributed with

- * this work for additional information regarding copyright ownership.

- * The ASF licenses this file to You under the Apache License, Version 2.0

- * (the "License"); you may not use this file except in compliance with

- * the License.  You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.commons.io;

-

-import java.nio.charset.Charset;

-import java.util.Collections;

-import java.util.SortedMap;

-import java.util.TreeMap;

-

-/**

- * Charsets required of every implementation of the Java platform.

- * 

- * From the Java documentation <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">

- * Standard charsets</a>:

- * <p>

- * <cite>Every implementation of the Java platform is required to support the following character encodings. Consult

- * the release documentation for your implementation to see if any other encodings are supported. Consult the release

- * documentation for your implementation to see if any other encodings are supported. </cite>

- * </p>

- * 

- * <ul>

- * <li><code>US-ASCII</code><br>

- * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</li>

- * <li><code>ISO-8859-1</code><br>

- * ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.</li>

- * <li><code>UTF-8</code><br>

- * Eight-bit Unicode Transformation Format.</li>

- * <li><code>UTF-16BE</code><br>

- * Sixteen-bit Unicode Transformation Format, big-endian byte order.</li>

- * <li><code>UTF-16LE</code><br>

- * Sixteen-bit Unicode Transformation Format, little-endian byte order.</li>

- * <li><code>UTF-16</code><br>

- * Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order

- * accepted on input, big-endian used on output.)</li>

- * </ul>

- * 

- * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>

- * @since 2.3

- * @version $Id$

- */

-public class Charsets {

-    //

-    // This class should only contain Charset instances for required encodings. This guarantees that it will load

-    // correctly and without delay on all Java platforms.

-    //

-

-    /**

-     * Constructs a sorted map from canonical charset names to charset objects required of every implementation of the

-     * Java platform.

-     * <p>

-     * From the Java documentation <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">

-     * Standard charsets</a>:

-     * </p>

-     * 

-     * @return An immutable, case-insensitive map from canonical charset names to charset objects.

-     * @see Charset#availableCharsets()

-     * @since 2.5

-     */

-    public static SortedMap<String, Charset> requiredCharsets() {

-        // maybe cache?

-        // TODO Re-implement on Java 7 to use java.nio.charset.StandardCharsets

-        final TreeMap<String, Charset> m = new TreeMap<String, Charset>(String.CASE_INSENSITIVE_ORDER);

-        m.put(ISO_8859_1.name(), ISO_8859_1);

-        m.put(US_ASCII.name(), US_ASCII);

-        m.put(UTF_16.name(), UTF_16);

-        m.put(UTF_16BE.name(), UTF_16BE);

-        m.put(UTF_16LE.name(), UTF_16LE);

-        m.put(UTF_8.name(), UTF_8);

-        return Collections.unmodifiableSortedMap(m);

-    }

-

-    /**

-     * Returns the given Charset or the default Charset if the given Charset is null.

-     * 

-     * @param charset

-     *            A charset or null.

-     * @return the given Charset or the default Charset if the given Charset is null

-     */

-    public static Charset toCharset(final Charset charset) {

-        return charset == null ? Charset.defaultCharset() : charset;

-    }

-

-    /**

-     * Returns a Charset for the named charset. If the name is null, return the default Charset.

-     * 

-     * @param charset

-     *            The name of the requested charset, may be null.

-     * @return a Charset for the named charset

-     * @throws java.nio.charset.UnsupportedCharsetException

-     *             If the named charset is unavailable

-     */

-    public static Charset toCharset(final String charset) {

-        return charset == null ? Charset.defaultCharset() : Charset.forName(charset);

-    }

-

-    /**

-     * CharEncodingISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.

-     * <p>

-     * Every implementation of the Java platform is required to support this character encoding.

-     * </p>

-     * 

-     * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>

-     * @deprecated Use Java 7's {@link java.nio.charset.StandardCharsets}

-     */

-    @Deprecated

-    public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");

-

-    /**

-     * <p>

-     * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.

-     * </p>

-     * <p>

-     * Every implementation of the Java platform is required to support this character encoding.

-     * </p>

-     * 

-     * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>

-     * @deprecated Use Java 7's {@link java.nio.charset.StandardCharsets}

-     */

-    @Deprecated

-    public static final Charset US_ASCII = Charset.forName("US-ASCII");

-

-    /**

-     * <p>

-     * Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark

-     * (either order accepted on input, big-endian used on output)

-     * </p>

-     * <p>

-     * Every implementation of the Java platform is required to support this character encoding.

-     * </p>

-     * 

-     * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>

-     * @deprecated Use Java 7's {@link java.nio.charset.StandardCharsets}

-     */

-    @Deprecated

-    public static final Charset UTF_16 = Charset.forName("UTF-16");

-

-    /**

-     * <p>

-     * Sixteen-bit Unicode Transformation Format, big-endian byte order.

-     * </p>

-     * <p>

-     * Every implementation of the Java platform is required to support this character encoding.

-     * </p>

-     * 

-     * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>

-     * @deprecated Use Java 7's {@link java.nio.charset.StandardCharsets}

-     */

-    @Deprecated

-    public static final Charset UTF_16BE = Charset.forName("UTF-16BE");

-

-    /**

-     * <p>

-     * Sixteen-bit Unicode Transformation Format, little-endian byte order.

-     * </p>

-     * <p>

-     * Every implementation of the Java platform is required to support this character encoding.

-     * </p>

-     * 

-     * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>

-     * @deprecated Use Java 7's {@link java.nio.charset.StandardCharsets}

-     */

-    @Deprecated

-    public static final Charset UTF_16LE = Charset.forName("UTF-16LE");

-

-    /**

-     * <p>

-     * Eight-bit Unicode Transformation Format.

-     * </p>

-     * <p>

-     * Every implementation of the Java platform is required to support this character encoding.

-     * </p>

-     * 

-     * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>

-     * @deprecated Use Java 7's {@link java.nio.charset.StandardCharsets}

-     */

-    @Deprecated

-    public static final Charset UTF_8 = Charset.forName("UTF-8");

-}

diff --git a/trunk/src/main/java/org/apache/commons/io/CopyUtils.java b/trunk/src/main/java/org/apache/commons/io/CopyUtils.java
deleted file mode 100644
index bde4b38..0000000
--- a/trunk/src/main/java/org/apache/commons/io/CopyUtils.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.Writer;
-import java.nio.charset.Charset;
-
-/**
- * This class provides static utility methods for buffered
- * copying between sources (<code>InputStream</code>, <code>Reader</code>,
- * <code>String</code> and <code>byte[]</code>) and destinations
- * (<code>OutputStream</code>, <code>Writer</code>, <code>String</code> and
- * <code>byte[]</code>).
- * <p>
- * Unless otherwise noted, these <code>copy</code> methods do <em>not</em>
- * flush or close the streams. Often doing so would require making non-portable
- * assumptions about the streams' origin and further use. This means that both
- * streams' <code>close()</code> methods must be called after copying. if one
- * omits this step, then the stream resources (sockets, file descriptors) are
- * released when the associated Stream is garbage-collected. It is not a good
- * idea to rely on this mechanism. For a good overview of the distinction
- * between "memory management" and "resource management", see
- * <a href="http://www.unixreview.com/articles/1998/9804/9804ja/ja.htm">this
- * UnixReview article</a>.
- * <p>
- * For byte-to-char methods, a <code>copy</code> variant allows the encoding
- * to be selected (otherwise the platform default is used). We would like to
- * encourage you to always specify the encoding because relying on the platform
- * default can lead to unexpected results.
- * <p>
- * We don't provide special variants for the <code>copy</code> methods that
- * let you specify the buffer size because in modern VMs the impact on speed
- * seems to be minimal. We're using a default buffer size of 4 KB.
- * <p>
- * The <code>copy</code> methods use an internal buffer when copying. It is
- * therefore advisable <em>not</em> to deliberately wrap the stream arguments
- * to the <code>copy</code> methods in <code>Buffered*</code> streams. For
- * example, don't do the following:
- * <pre>
- *  copy( new BufferedInputStream( in ), new BufferedOutputStream( out ) );
- *  </pre>
- * The rationale is as follows:
- * <p>
- * Imagine that an InputStream's read() is a very expensive operation, which
- * would usually suggest wrapping in a BufferedInputStream. The
- * BufferedInputStream works by issuing infrequent
- * {@link java.io.InputStream#read(byte[] b, int off, int len)} requests on the
- * underlying InputStream, to fill an internal buffer, from which further
- * <code>read</code> requests can inexpensively get their data (until the buffer
- * runs out).
- * <p>
- * However, the <code>copy</code> methods do the same thing, keeping an
- * internal buffer, populated by
- * {@link InputStream#read(byte[] b, int off, int len)} requests. Having two
- * buffers (or three if the destination stream is also buffered) is pointless,
- * and the unnecessary buffer management hurts performance slightly (about 3%,
- * according to some simple experiments).
- * <p>
- * Behold, intrepid explorers; a map of this class:
- * <pre>
- *       Method      Input               Output          Dependency
- *       ------      -----               ------          -------
- * 1     copy        InputStream         OutputStream    (primitive)
- * 2     copy        Reader              Writer          (primitive)
- *
- * 3     copy        InputStream         Writer          2
- *
- * 4     copy        Reader              OutputStream    2
- *
- * 5     copy        String              OutputStream    2
- * 6     copy        String              Writer          (trivial)
- *
- * 7     copy        byte[]              Writer          3
- * 8     copy        byte[]              OutputStream    (trivial)
- * </pre>
- * <p>
- * Note that only the first two methods shuffle bytes; the rest use these
- * two, or (if possible) copy using native Java copy methods. As there are
- * method variants to specify the encoding, each row may
- * correspond to up to 2 methods.
- * <p>
- * Origin of code: Excalibur.
- *
- * @version $Id$
- * @deprecated Use IOUtils. Will be removed in 2.0.
- *  Methods renamed to IOUtils.write() or IOUtils.copy().
- *  Null handling behaviour changed in IOUtils (null data does not
- *  throw NullPointerException).
- */
-@Deprecated
-public class CopyUtils {
-
-    /**
-     * The default size of the buffer.
-     */
-    private static final int DEFAULT_BUFFER_SIZE = 1024 * 4;
-
-    /**
-     * Instances should NOT be constructed in standard programming.
-     */
-    public CopyUtils() { }
-
-    // ----------------------------------------------------------------
-    // byte[] -> OutputStream
-    // ----------------------------------------------------------------
-
-    /**
-     * Copy bytes from a <code>byte[]</code> to an <code>OutputStream</code>.
-     * @param input the byte array to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @throws IOException In case of an I/O problem
-     */
-    public static void copy(final byte[] input, final OutputStream output)
-            throws IOException {
-        output.write(input);
-    }
-
-    // ----------------------------------------------------------------
-    // byte[] -> Writer
-    // ----------------------------------------------------------------
-
-    /**
-     * Copy and convert bytes from a <code>byte[]</code> to chars on a
-     * <code>Writer</code>.
-     * The platform's default encoding is used for the byte-to-char conversion.
-     * @param input the byte array to read from
-     * @param output the <code>Writer</code> to write to
-     * @throws IOException In case of an I/O problem
-     * @deprecated 2.5 use {@link #copy(byte[], Writer, String)} instead
-     */
-    @Deprecated
-    public static void copy(final byte[] input, final Writer output)
-            throws IOException {
-        final ByteArrayInputStream in = new ByteArrayInputStream(input);
-        copy(in, output);
-    }
-
-
-    /**
-     * Copy and convert bytes from a <code>byte[]</code> to chars on a
-     * <code>Writer</code>, using the specified encoding.
-     * @param input the byte array to read from
-     * @param output the <code>Writer</code> to write to
-     * @param encoding The name of a supported character encoding. See the
-     * <a href="http://www.iana.org/assignments/character-sets">IANA
-     * Charset Registry</a> for a list of valid encoding types.
-     * @throws IOException In case of an I/O problem
-     */
-    public static void copy(
-            final byte[] input,
-            final Writer output,
-            final String encoding)
-                throws IOException {
-        final ByteArrayInputStream in = new ByteArrayInputStream(input);
-        copy(in, output, encoding);
-    }
-
-
-    // ----------------------------------------------------------------
-    // Core copy methods
-    // ----------------------------------------------------------------
-
-    /**
-     * Copy bytes from an <code>InputStream</code> to an
-     * <code>OutputStream</code>.
-     * @param input the <code>InputStream</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @return the number of bytes copied
-     * @throws IOException In case of an I/O problem
-     */
-    public static int copy(
-            final InputStream input,
-            final OutputStream output)
-                throws IOException {
-        final byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
-        int count = 0;
-        int n = 0;
-        while (-1 != (n = input.read(buffer))) {
-            output.write(buffer, 0, n);
-            count += n;
-        }
-        return count;
-    }
-
-    // ----------------------------------------------------------------
-    // Reader -> Writer
-    // ----------------------------------------------------------------
-
-    /**
-     * Copy chars from a <code>Reader</code> to a <code>Writer</code>.
-     * @param input the <code>Reader</code> to read from
-     * @param output the <code>Writer</code> to write to
-     * @return the number of characters copied
-     * @throws IOException In case of an I/O problem
-     */
-    public static int copy(
-            final Reader input,
-            final Writer output)
-                throws IOException {
-        final char[] buffer = new char[DEFAULT_BUFFER_SIZE];
-        int count = 0;
-        int n = 0;
-        while (-1 != (n = input.read(buffer))) {
-            output.write(buffer, 0, n);
-            count += n;
-        }
-        return count;
-    }
-
-    // ----------------------------------------------------------------
-    // InputStream -> Writer
-    // ----------------------------------------------------------------
-
-    /**
-     * Copy and convert bytes from an <code>InputStream</code> to chars on a
-     * <code>Writer</code>.
-     * The platform's default encoding is used for the byte-to-char conversion.
-     * @param input the <code>InputStream</code> to read from
-     * @param output the <code>Writer</code> to write to
-     * @throws IOException In case of an I/O problem
-     * @deprecated 2.5 use {@link #copy(InputStream, Writer, String)} instead
-     */
-    @Deprecated
-    public static void copy(
-            final InputStream input,
-            final Writer output)
-                throws IOException {
-        // make explicit the dependency on the default encoding
-        final InputStreamReader in = new InputStreamReader(input, Charset.defaultCharset());
-        copy(in, output);
-    }
-
-    /**
-     * Copy and convert bytes from an <code>InputStream</code> to chars on a
-     * <code>Writer</code>, using the specified encoding.
-     * @param input the <code>InputStream</code> to read from
-     * @param output the <code>Writer</code> to write to
-     * @param encoding The name of a supported character encoding. See the
-     * <a href="http://www.iana.org/assignments/character-sets">IANA
-     * Charset Registry</a> for a list of valid encoding types.
-     * @throws IOException In case of an I/O problem
-     */
-    public static void copy(
-            final InputStream input,
-            final Writer output,
-            final String encoding)
-                throws IOException {
-        final InputStreamReader in = new InputStreamReader(input, encoding);
-        copy(in, output);
-    }
-
-
-    // ----------------------------------------------------------------
-    // Reader -> OutputStream
-    // ----------------------------------------------------------------
-
-    /**
-     * Serialize chars from a <code>Reader</code> to bytes on an
-     * <code>OutputStream</code>, and flush the <code>OutputStream</code>.
-     * Uses the default platform encoding.
-     * @param input the <code>Reader</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @throws IOException In case of an I/O problem
-     * @deprecated 2.5 use {@link #copy(Reader, OutputStream, String)} instead
-     */
-    @Deprecated
-    public static void copy(
-            final Reader input,
-            final OutputStream output)
-                throws IOException {
-        // make explicit the dependency on the default encoding
-        final OutputStreamWriter out = new OutputStreamWriter(output, Charset.defaultCharset());
-        copy(input, out);
-        // XXX Unless anyone is planning on rewriting OutputStreamWriter, we
-        // have to flush here.
-        out.flush();
-    }
-
-    /**
-     * Serialize chars from a <code>Reader</code> to bytes on an
-     * <code>OutputStream</code>, and flush the <code>OutputStream</code>.
-     * @param input the <code>Reader</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @param encoding The name of a supported character encoding. See the
-     * <a href="http://www.iana.org/assignments/character-sets">IANA
-     * Charset Registry</a> for a list of valid encoding types.
-     * @throws IOException In case of an I/O problem
-     * @since 2.5
-     */
-    public static void copy(
-            final Reader input,
-            final OutputStream output,
-            final String encoding)
-                throws IOException {
-        final OutputStreamWriter out = new OutputStreamWriter(output, encoding);
-        copy(input, out);
-        // XXX Unless anyone is planning on rewriting OutputStreamWriter, we
-        // have to flush here.
-        out.flush();
-    }
-
-    // ----------------------------------------------------------------
-    // String -> OutputStream
-    // ----------------------------------------------------------------
-
-    /**
-     * Serialize chars from a <code>String</code> to bytes on an
-     * <code>OutputStream</code>, and
-     * flush the <code>OutputStream</code>.
-     * Uses the platform default encoding.
-     * @param input the <code>String</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @throws IOException In case of an I/O problem
-     * @deprecated 2.5 use {@link #copy(String, OutputStream, String)} instead
-     */
-    @Deprecated
-    public static void copy(
-            final String input,
-            final OutputStream output)
-                throws IOException {
-        final StringReader in = new StringReader(input);
-        // make explicit the dependency on the default encoding
-        final OutputStreamWriter out = new OutputStreamWriter(output, Charset.defaultCharset());
-        copy(in, out);
-        // XXX Unless anyone is planning on rewriting OutputStreamWriter, we
-        // have to flush here.
-        out.flush();
-    }
-
-    /**
-     * Serialize chars from a <code>String</code> to bytes on an
-     * <code>OutputStream</code>, and
-     * flush the <code>OutputStream</code>.
-     * @param input the <code>String</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @param encoding The name of a supported character encoding. See the
-     * <a href="http://www.iana.org/assignments/character-sets">IANA
-     * Charset Registry</a> for a list of valid encoding types.
-     * @throws IOException In case of an I/O problem
-     * @since 2.5
-     */
-    public static void copy(
-            final String input,
-            final OutputStream output,
-            final String encoding)
-                throws IOException {
-        final StringReader in = new StringReader(input);
-        final OutputStreamWriter out = new OutputStreamWriter(output, encoding);
-        copy(in, out);
-        // XXX Unless anyone is planning on rewriting OutputStreamWriter, we
-        // have to flush here.
-        out.flush();
-    }
-
-    // ----------------------------------------------------------------
-    // String -> Writer
-    // ----------------------------------------------------------------
-
-    /**
-     * Copy chars from a <code>String</code> to a <code>Writer</code>.
-     * @param input the <code>String</code> to read from
-     * @param output the <code>Writer</code> to write to
-     * @throws IOException In case of an I/O problem
-     */
-    public static void copy(final String input, final Writer output)
-                throws IOException {
-        output.write(input);
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/DirectoryWalker.java b/trunk/src/main/java/org/apache/commons/io/DirectoryWalker.java
deleted file mode 100644
index 98d1bfb..0000000
--- a/trunk/src/main/java/org/apache/commons/io/DirectoryWalker.java
+++ /dev/null
@@ -1,642 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.util.Collection;
-
-import org.apache.commons.io.filefilter.FileFilterUtils;
-import org.apache.commons.io.filefilter.IOFileFilter;
-import org.apache.commons.io.filefilter.TrueFileFilter;
-
-/**
- * Abstract class that walks through a directory hierarchy and provides
- * subclasses with convenient hooks to add specific behaviour.
- * <p>
- * This class operates with a {@link FileFilter} and maximum depth to
- * limit the files and direcories visited.
- * Commons IO supplies many common filter implementations in the
- * <a href="filefilter/package-summary.html"> filefilter</a> package.
- * <p>
- * The following sections describe:
- *   <ul>
- *      <li><a href="#example">1. Example Implementation</a> - example
- *          <code>FileCleaner</code> implementation.</li>
- *      <li><a href="#filter">2. Filter Example</a> - using
- *          {@link FileFilter}(s) with <code>DirectoryWalker</code>.</li>
- *      <li><a href="#cancel">3. Cancellation</a> - how to implement cancellation
- *          behaviour.</li>
- *   </ul>
- *
- * <a name="example"></a>
- * <h3>1. Example Implementation</h3>
- *
- * There are many possible extensions, for example, to delete all
- * files and '.svn' directories, and return a list of deleted files:
- * <pre>
- *  public class FileCleaner extends DirectoryWalker {
- *
- *    public FileCleaner() {
- *      super();
- *    }
- *
- *    public List clean(File startDirectory) {
- *      List results = new ArrayList();
- *      walk(startDirectory, results);
- *      return results;
- *    }
- *
- *    protected boolean handleDirectory(File directory, int depth, Collection results) {
- *      // delete svn directories and then skip
- *      if (".svn".equals(directory.getName())) {
- *        directory.delete();
- *        return false;
- *      } else {
- *        return true;
- *      }
- *
- *    }
- *
- *    protected void handleFile(File file, int depth, Collection results) {
- *      // delete file and add to list of deleted
- *      file.delete();
- *      results.add(file);
- *    }
- *  }
- * </pre>
- *
- * <a name="filter"></a>
- * <h3>2. Filter Example</h3>
- *
- * Choosing which directories and files to process can be a key aspect
- * of using this class. This information can be setup in three ways,
- * via three different constructors.
- * <p>
- * The first option is to visit all directories and files.
- * This is achieved via the no-args constructor.
- * <p>
- * The second constructor option is to supply a single {@link FileFilter}
- * that describes the files and directories to visit. Care must be taken
- * with this option as the same filter is used for both directories
- * and files.
- * <p>
- * For example, if you wanted all directories which are not hidden
- * and files which end in ".txt":
- * <pre>
- *  public class FooDirectoryWalker extends DirectoryWalker {
- *    public FooDirectoryWalker(FileFilter filter) {
- *      super(filter, -1);
- *    }
- *  }
- *
- *  // Build up the filters and create the walker
- *    // Create a filter for Non-hidden directories
- *    IOFileFilter fooDirFilter =
- *        FileFilterUtils.andFileFilter(FileFilterUtils.directoryFileFilter,
- *                                      HiddenFileFilter.VISIBLE);
- *
- *    // Create a filter for Files ending in ".txt"
- *    IOFileFilter fooFileFilter =
- *        FileFilterUtils.andFileFilter(FileFilterUtils.fileFileFilter,
- *                                      FileFilterUtils.suffixFileFilter(".txt"));
- *
- *    // Combine the directory and file filters using an OR condition
- *    java.io.FileFilter fooFilter =
- *        FileFilterUtils.orFileFilter(fooDirFilter, fooFileFilter);
- *
- *    // Use the filter to construct a DirectoryWalker implementation
- *    FooDirectoryWalker walker = new FooDirectoryWalker(fooFilter);
- * </pre>
- * <p>
- * The third constructor option is to specify separate filters, one for
- * directories and one for files. These are combined internally to form
- * the correct <code>FileFilter</code>, something which is very easy to
- * get wrong when attempted manually, particularly when trying to
- * express constructs like 'any file in directories named docs'.
- * <p>
- * For example, if you wanted all directories which are not hidden
- * and files which end in ".txt":
- * <pre>
- *  public class FooDirectoryWalker extends DirectoryWalker {
- *    public FooDirectoryWalker(IOFileFilter dirFilter, IOFileFilter fileFilter) {
- *      super(dirFilter, fileFilter, -1);
- *    }
- *  }
- *
- *  // Use the filters to construct the walker
- *  FooDirectoryWalker walker = new FooDirectoryWalker(
- *    HiddenFileFilter.VISIBLE,
- *    FileFilterUtils.suffixFileFilter(".txt"),
- *  );
- * </pre>
- * This is much simpler than the previous example, and is why it is the preferred
- * option for filtering.
- *
- * <a name="cancel"></a>
- * <h3>3. Cancellation</h3>
- *
- * The DirectoryWalker contains some of the logic required for cancel processing.
- * Subclasses must complete the implementation.
- * <p>
- * What <code>DirectoryWalker</code> does provide for cancellation is:
- * <ul>
- *    <li>{@link CancelException} which can be thrown in any of the
- *        <i>lifecycle</i> methods to stop processing.</li>
- *    <li>The <code>walk()</code> method traps thrown {@link CancelException}
- *        and calls the <code>handleCancelled()</code> method, providing
- *        a place for custom cancel processing.</li>
- * </ul>
- * <p>
- * Implementations need to provide:
- * <ul>
- *    <li>The decision logic on whether to cancel processing or not.</li>
- *    <li>Constructing and throwing a {@link CancelException}.</li>
- *    <li>Custom cancel processing in the <code>handleCancelled()</code> method.
- * </ul>
- * <p>
- * Two possible scenarios are envisaged for cancellation:
- * <ul>
- *    <li><a href="#external">3.1 External / Mult-threaded</a> - cancellation being
- *        decided/initiated by an external process.</li>
- *    <li><a href="#internal">3.2 Internal</a> - cancellation being decided/initiated
- *        from within a DirectoryWalker implementation.</li>
- * </ul>
- * <p>
- * The following sections provide example implementations for these two different
- * scenarios.
- *
- * <a name="external"></a>
- * <h4>3.1 External / Multi-threaded</h4>
- *
- * This example provides a public <code>cancel()</code> method that can be
- * called by another thread to stop the processing. A typical example use-case
- * would be a cancel button on a GUI. Calling this method sets a
- * <a href="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#36930">
- * volatile</a> flag to ensure it will work properly in a multi-threaded environment.
- * The flag is returned by the <code>handleIsCancelled()</code> method, which
- * will cause the walk to stop immediately. The <code>handleCancelled()</code>
- * method will be the next, and last, callback method received once cancellation
- * has occurred.
- *
- * <pre>
- *  public class FooDirectoryWalker extends DirectoryWalker {
- *
- *    private volatile boolean cancelled = false;
- *
- *    public void cancel() {
- *        cancelled = true;
- *    }
- *
- *    private void handleIsCancelled(File file, int depth, Collection results) {
- *        return cancelled;
- *    }
- *
- *    protected void handleCancelled(File startDirectory, Collection results, CancelException cancel) {
- *        // implement processing required when a cancellation occurs
- *    }
- *  }
- * </pre>
- *
- * <a name="internal"></a>
- * <h4>3.2 Internal</h4>
- *
- * This shows an example of how internal cancellation processing could be implemented.
- * <b>Note</b> the decision logic and throwing a {@link CancelException} could be implemented
- * in any of the <i>lifecycle</i> methods.
- *
- * <pre>
- *  public class BarDirectoryWalker extends DirectoryWalker {
- *
- *    protected boolean handleDirectory(File directory, int depth, Collection results) throws IOException {
- *        // cancel if hidden directory
- *        if (directory.isHidden()) {
- *            throw new CancelException(file, depth);
- *        }
- *        return true;
- *    }
- *
- *    protected void handleFile(File file, int depth, Collection results) throws IOException {
- *        // cancel if read-only file
- *        if (!file.canWrite()) {
- *            throw new CancelException(file, depth);
- *        }
- *        results.add(file);
- *    }
- *
- *    protected void handleCancelled(File startDirectory, Collection results, CancelException cancel) {
- *        // implement processing required when a cancellation occurs
- *    }
- *  }
- * </pre>
- *
- * @since 1.3
- * @version $Id$
- */
-public abstract class DirectoryWalker<T> {
-
-    /**
-     * The file filter to use to filter files and directories.
-     */
-    private final FileFilter filter;
-    /**
-     * The limit on the directory depth to walk.
-     */
-    private final int depthLimit;
-
-    /**
-     * Construct an instance with no filtering and unlimited <i>depth</i>.
-     */
-    protected DirectoryWalker() {
-        this(null, -1);
-    }
-
-    /**
-     * Construct an instance with a filter and limit the <i>depth</i> navigated to.
-     * <p>
-     * The filter controls which files and directories will be navigated to as
-     * part of the walk. The {@link FileFilterUtils} class is useful for combining
-     * various filters together. A {@code null} filter means that no
-     * filtering should occur and all files and directories will be visited.
-     *
-     * @param filter  the filter to apply, null means visit all files
-     * @param depthLimit  controls how <i>deep</i> the hierarchy is
-     *  navigated to (less than 0 means unlimited)
-     */
-    protected DirectoryWalker(final FileFilter filter, final int depthLimit) {
-        this.filter = filter;
-        this.depthLimit = depthLimit;
-    }
-
-    /**
-     * Construct an instance with a directory and a file filter and an optional
-     * limit on the <i>depth</i> navigated to.
-     * <p>
-     * The filters control which files and directories will be navigated to as part
-     * of the walk. This constructor uses {@link FileFilterUtils#makeDirectoryOnly(IOFileFilter)}
-     * and {@link FileFilterUtils#makeFileOnly(IOFileFilter)} internally to combine the filters.
-     * A {@code null} filter means that no filtering should occur.
-     *
-     * @param directoryFilter  the filter to apply to directories, null means visit all directories
-     * @param fileFilter  the filter to apply to files, null means visit all files
-     * @param depthLimit  controls how <i>deep</i> the hierarchy is
-     *  navigated to (less than 0 means unlimited)
-     */
-    protected DirectoryWalker(IOFileFilter directoryFilter, IOFileFilter fileFilter, final int depthLimit) {
-        if (directoryFilter == null && fileFilter == null) {
-            this.filter = null;
-        } else {
-            directoryFilter = directoryFilter != null ? directoryFilter : TrueFileFilter.TRUE;
-            fileFilter = fileFilter != null ? fileFilter : TrueFileFilter.TRUE;
-            directoryFilter = FileFilterUtils.makeDirectoryOnly(directoryFilter);
-            fileFilter = FileFilterUtils.makeFileOnly(fileFilter);
-            this.filter = FileFilterUtils.or(directoryFilter, fileFilter);
-        }
-        this.depthLimit = depthLimit;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Internal method that walks the directory hierarchy in a depth-first manner.
-     * <p>
-     * Users of this class do not need to call this method. This method will
-     * be called automatically by another (public) method on the specific subclass.
-     * <p>
-     * Writers of subclasses should call this method to start the directory walk.
-     * Once called, this method will emit events as it walks the hierarchy.
-     * The event methods have the prefix <code>handle</code>.
-     *
-     * @param startDirectory  the directory to start from, not null
-     * @param results  the collection of result objects, may be updated
-     * @throws NullPointerException if the start directory is null
-     * @throws IOException if an I/O Error occurs
-     */
-    protected final void walk(final File startDirectory, final Collection<T> results) throws IOException {
-        if (startDirectory == null) {
-            throw new NullPointerException("Start Directory is null");
-        }
-        try {
-            handleStart(startDirectory, results);
-            walk(startDirectory, 0, results);
-            handleEnd(results);
-        } catch(final CancelException cancel) {
-            handleCancelled(startDirectory, results, cancel);
-        }
-    }
-
-    /**
-     * Main recursive method to examine the directory hierarchy.
-     *
-     * @param directory  the directory to examine, not null
-     * @param depth  the directory level (starting directory = 0)
-     * @param results  the collection of result objects, may be updated
-     * @throws IOException if an I/O Error occurs
-     */
-    private void walk(final File directory, final int depth, final Collection<T> results) throws IOException {
-        checkIfCancelled(directory, depth, results);
-        if (handleDirectory(directory, depth, results)) {
-            handleDirectoryStart(directory, depth, results);
-            final int childDepth = depth + 1;
-            if (depthLimit < 0 || childDepth <= depthLimit) {
-                checkIfCancelled(directory, depth, results);
-                File[] childFiles = filter == null ? directory.listFiles() : directory.listFiles(filter);
-                childFiles = filterDirectoryContents(directory, depth, childFiles);
-                if (childFiles == null) {
-                    handleRestricted(directory, childDepth, results);
-                } else {
-                    for (final File childFile : childFiles) {
-                        if (childFile.isDirectory()) {
-                            walk(childFile, childDepth, results);
-                        } else {
-                            checkIfCancelled(childFile, childDepth, results);
-                            handleFile(childFile, childDepth, results);
-                            checkIfCancelled(childFile, childDepth, results);
-                        }
-                    }
-                }
-            }
-            handleDirectoryEnd(directory, depth, results);
-        }
-        checkIfCancelled(directory, depth, results);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Checks whether the walk has been cancelled by calling {@link #handleIsCancelled},
-     * throwing a <code>CancelException</code> if it has.
-     * <p>
-     * Writers of subclasses should not normally call this method as it is called
-     * automatically by the walk of the tree. However, sometimes a single method,
-     * typically {@link #handleFile}, may take a long time to run. In that case,
-     * you may wish to check for cancellation by calling this method.
-     *
-     * @param file  the current file being processed
-     * @param depth  the current file level (starting directory = 0)
-     * @param results  the collection of result objects, may be updated
-     * @throws IOException if an I/O Error occurs
-     */
-    protected final void checkIfCancelled(final File file, final int depth, final Collection<T> results) throws
-            IOException {
-        if (handleIsCancelled(file, depth, results)) {
-            throw new CancelException(file, depth);
-        }
-    }
-
-    /**
-     * Overridable callback method invoked to determine if the entire walk
-     * operation should be immediately cancelled.
-     * <p>
-     * This method should be implemented by those subclasses that want to
-     * provide a public <code>cancel()</code> method available from another
-     * thread. The design pattern for the subclass should be as follows:
-     * <pre>
-     *  public class FooDirectoryWalker extends DirectoryWalker {
-     *    private volatile boolean cancelled = false;
-     *
-     *    public void cancel() {
-     *        cancelled = true;
-     *    }
-     *    private void handleIsCancelled(File file, int depth, Collection results) {
-     *        return cancelled;
-     *    }
-     *    protected void handleCancelled(File startDirectory,
-     *              Collection results, CancelException cancel) {
-     *        // implement processing required when a cancellation occurs
-     *    }
-     *  }
-     * </pre>
-     * <p>
-     * If this method returns true, then the directory walk is immediately
-     * cancelled. The next callback method will be {@link #handleCancelled}.
-     * <p>
-     * This implementation returns false.
-     *
-     * @param file  the file or directory being processed
-     * @param depth  the current directory level (starting directory = 0)
-     * @param results  the collection of result objects, may be updated
-     * @return true if the walk has been cancelled
-     * @throws IOException if an I/O Error occurs
-     */
-    protected boolean handleIsCancelled(
-            final File file, final int depth, final Collection<T> results) throws IOException {
-        // do nothing - overridable by subclass
-        return false;  // not cancelled
-    }
-
-    /**
-     * Overridable callback method invoked when the operation is cancelled.
-     * The file being processed when the cancellation occurred can be
-     * obtained from the exception.
-     * <p>
-     * This implementation just re-throws the {@link CancelException}.
-     *
-     * @param startDirectory  the directory that the walk started from
-     * @param results  the collection of result objects, may be updated
-     * @param cancel  the exception throw to cancel further processing
-     * containing details at the point of cancellation.
-     * @throws IOException if an I/O Error occurs
-     */
-    protected void handleCancelled(final File startDirectory, final Collection<T> results,
-                       final CancelException cancel) throws IOException {
-        // re-throw exception - overridable by subclass
-        throw cancel;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Overridable callback method invoked at the start of processing.
-     * <p>
-     * This implementation does nothing.
-     *
-     * @param startDirectory  the directory to start from
-     * @param results  the collection of result objects, may be updated
-     * @throws IOException if an I/O Error occurs
-     */
-    protected void handleStart(final File startDirectory, final Collection<T> results) throws IOException {
-        // do nothing - overridable by subclass
-    }
-
-    /**
-     * Overridable callback method invoked to determine if a directory should be processed.
-     * <p>
-     * This method returns a boolean to indicate if the directory should be examined or not.
-     * If you return false, the entire directory and any subdirectories will be skipped.
-     * Note that this functionality is in addition to the filtering by file filter.
-     * <p>
-     * This implementation does nothing and returns true.
-     *
-     * @param directory  the current directory being processed
-     * @param depth  the current directory level (starting directory = 0)
-     * @param results  the collection of result objects, may be updated
-     * @return true to process this directory, false to skip this directory
-     * @throws IOException if an I/O Error occurs
-     */
-    protected boolean handleDirectory(final File directory, final int depth, final Collection<T> results) throws
-            IOException {
-        // do nothing - overridable by subclass
-        return true;  // process directory
-    }
-
-    /**
-     * Overridable callback method invoked at the start of processing each directory.
-     * <p>
-     * This implementation does nothing.
-     *
-     * @param directory  the current directory being processed
-     * @param depth  the current directory level (starting directory = 0)
-     * @param results  the collection of result objects, may be updated
-     * @throws IOException if an I/O Error occurs
-     */
-    protected void handleDirectoryStart(final File directory, final int depth, final Collection<T> results) throws
-            IOException {
-        // do nothing - overridable by subclass
-    }
-
-    /**
-     * Overridable callback method invoked with the contents of each directory.
-     * <p>
-     * This implementation returns the files unchanged
-     *
-     * @param directory  the current directory being processed
-     * @param depth  the current directory level (starting directory = 0)
-     * @param files the files (possibly filtered) in the directory, may be {@code null}
-     * @return the filtered list of files
-     * @throws IOException if an I/O Error occurs
-     * @since 2.0
-     */
-    protected File[] filterDirectoryContents(final File directory, final int depth, final File[] files) throws
-            IOException {
-        return files;
-    }
-
-    /**
-     * Overridable callback method invoked for each (non-directory) file.
-     * <p>
-     * This implementation does nothing.
-     *
-     * @param file  the current file being processed
-     * @param depth  the current directory level (starting directory = 0)
-     * @param results  the collection of result objects, may be updated
-     * @throws IOException if an I/O Error occurs
-     */
-    protected void handleFile(final File file, final int depth, final Collection<T> results) throws IOException {
-        // do nothing - overridable by subclass
-    }
-
-    /**
-     * Overridable callback method invoked for each restricted directory.
-     * <p>
-     * This implementation does nothing.
-     *
-     * @param directory  the restricted directory
-     * @param depth  the current directory level (starting directory = 0)
-     * @param results  the collection of result objects, may be updated
-     * @throws IOException if an I/O Error occurs
-     */
-    protected void handleRestricted(final File directory, final int depth, final Collection<T> results) throws
-            IOException {
-        // do nothing - overridable by subclass
-    }
-
-    /**
-     * Overridable callback method invoked at the end of processing each directory.
-     * <p>
-     * This implementation does nothing.
-     *
-     * @param directory  the directory being processed
-     * @param depth  the current directory level (starting directory = 0)
-     * @param results  the collection of result objects, may be updated
-     * @throws IOException if an I/O Error occurs
-     */
-    protected void handleDirectoryEnd(final File directory, final int depth, final Collection<T> results) throws
-            IOException {
-        // do nothing - overridable by subclass
-    }
-
-    /**
-     * Overridable callback method invoked at the end of processing.
-     * <p>
-     * This implementation does nothing.
-     *
-     * @param results  the collection of result objects, may be updated
-     * @throws IOException if an I/O Error occurs
-     */
-    protected void handleEnd(final Collection<T> results) throws IOException {
-        // do nothing - overridable by subclass
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * CancelException is thrown in DirectoryWalker to cancel the current
-     * processing.
-     */
-    public static class CancelException extends IOException {
-
-        /** Serialization id. */
-        private static final long serialVersionUID = 1347339620135041008L;
-
-        /** The file being processed when the exception was thrown. */
-        private final File file;
-        /** The file depth when the exception was thrown. */
-        private final int depth;
-
-        /**
-         * Constructs a <code>CancelException</code> with
-         * the file and depth when cancellation occurred.
-         *
-         * @param file  the file when the operation was cancelled, may be null
-         * @param depth  the depth when the operation was cancelled, may be null
-         */
-        public CancelException(final File file, final int depth) {
-            this("Operation Cancelled", file, depth);
-        }
-
-        /**
-         * Constructs a <code>CancelException</code> with
-         * an appropriate message and the file and depth when
-         * cancellation occurred.
-         *
-         * @param message  the detail message
-         * @param file  the file when the operation was cancelled
-         * @param depth  the depth when the operation was cancelled
-         */
-        public CancelException(final String message, final File file, final int depth) {
-            super(message);
-            this.file = file;
-            this.depth = depth;
-        }
-
-        /**
-         * Return the file when the operation was cancelled.
-         *
-         * @return the file when the operation was cancelled
-         */
-        public File getFile() {
-            return file;
-        }
-
-        /**
-         * Return the depth when the operation was cancelled.
-         *
-         * @return the depth when the operation was cancelled
-         */
-        public int getDepth() {
-            return depth;
-        }
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/EndianUtils.java b/trunk/src/main/java/org/apache/commons/io/EndianUtils.java
deleted file mode 100644
index 1f2d602..0000000
--- a/trunk/src/main/java/org/apache/commons/io/EndianUtils.java
+++ /dev/null
@@ -1,482 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * Utility code for dealing with different endian systems.
- * <p>
- * Different computer architectures adopt different conventions for
- * byte ordering. In so-called "Little Endian" architectures (eg Intel),
- * the low-order byte is stored in memory at the lowest address, and
- * subsequent bytes at higher addresses. For "Big Endian" architectures
- * (eg Motorola), the situation is reversed.
- * This class helps you solve this incompatibility.
- * <p>
- * Origin of code: Excalibur
- *
- * @version $Id$
- * @see org.apache.commons.io.input.SwappedDataInputStream
- */
-public class EndianUtils {
-
-    /**
-     * Instances should NOT be constructed in standard programming.
-     */
-    public EndianUtils() {
-        super();
-    }
-
-    // ========================================== Swapping routines
-
-    /**
-     * Converts a "short" value between endian systems.
-     * @param value value to convert
-     * @return the converted value
-     */
-    public static short swapShort(final short value) {
-        return (short) ( ( ( ( value >> 0 ) & 0xff ) << 8 ) +
-            ( ( ( value >> 8 ) & 0xff ) << 0 ) );
-    }
-
-    /**
-     * Converts a "int" value between endian systems.
-     * @param value value to convert
-     * @return the converted value
-     */
-    public static int swapInteger(final int value) {
-        return
-            ( ( ( value >> 0 ) & 0xff ) << 24 ) +
-            ( ( ( value >> 8 ) & 0xff ) << 16 ) +
-            ( ( ( value >> 16 ) & 0xff ) << 8 ) +
-            ( ( ( value >> 24 ) & 0xff ) << 0 );
-    }
-
-    /**
-     * Converts a "long" value between endian systems.
-     * @param value value to convert
-     * @return the converted value
-     */
-    public static long swapLong(final long value) {
-        return
-            ( ( ( value >> 0 ) & 0xff ) << 56 ) +
-            ( ( ( value >> 8 ) & 0xff ) << 48 ) +
-            ( ( ( value >> 16 ) & 0xff ) << 40 ) +
-            ( ( ( value >> 24 ) & 0xff ) << 32 ) +
-            ( ( ( value >> 32 ) & 0xff ) << 24 ) +
-            ( ( ( value >> 40 ) & 0xff ) << 16 ) +
-            ( ( ( value >> 48 ) & 0xff ) << 8 ) +
-            ( ( ( value >> 56 ) & 0xff ) << 0 );
-    }
-
-    /**
-     * Converts a "float" value between endian systems.
-     * @param value value to convert
-     * @return the converted value
-     */
-    public static float swapFloat(final float value) {
-        return Float.intBitsToFloat( swapInteger( Float.floatToIntBits( value ) ) );
-    }
-
-    /**
-     * Converts a "double" value between endian systems.
-     * @param value value to convert
-     * @return the converted value
-     */
-    public static double swapDouble(final double value) {
-        return Double.longBitsToDouble( swapLong( Double.doubleToLongBits( value ) ) );
-    }
-
-    // ========================================== Swapping read/write routines
-
-    /**
-     * Writes a "short" value to a byte array at a given offset. The value is
-     * converted to the opposed endian system while writing.
-     * @param data target byte array
-     * @param offset starting offset in the byte array
-     * @param value value to write
-     */
-    public static void writeSwappedShort(final byte[] data, final int offset, final short value) {
-        data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff );
-        data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff );
-    }
-
-    /**
-     * Reads a "short" value from a byte array at a given offset. The value is
-     * converted to the opposed endian system while reading.
-     * @param data source byte array
-     * @param offset starting offset in the byte array
-     * @return the value read
-     */
-    public static short readSwappedShort(final byte[] data, final int offset) {
-        return (short)( ( ( data[ offset + 0 ] & 0xff ) << 0 ) +
-            ( ( data[ offset + 1 ] & 0xff ) << 8 ) );
-    }
-
-    /**
-     * Reads an unsigned short (16-bit) value from a byte array at a given
-     * offset. The value is converted to the opposed endian system while
-     * reading.
-     * @param data source byte array
-     * @param offset starting offset in the byte array
-     * @return the value read
-     */
-    public static int readSwappedUnsignedShort(final byte[] data, final int offset) {
-        return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) +
-            ( ( data[ offset + 1 ] & 0xff ) << 8 ) );
-    }
-
-    /**
-     * Writes a "int" value to a byte array at a given offset. The value is
-     * converted to the opposed endian system while writing.
-     * @param data target byte array
-     * @param offset starting offset in the byte array
-     * @param value value to write
-     */
-    public static void writeSwappedInteger(final byte[] data, final int offset, final int value) {
-        data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff );
-        data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff );
-        data[ offset + 2 ] = (byte)( ( value >> 16 ) & 0xff );
-        data[ offset + 3 ] = (byte)( ( value >> 24 ) & 0xff );
-    }
-
-    /**
-     * Reads a "int" value from a byte array at a given offset. The value is
-     * converted to the opposed endian system while reading.
-     * @param data source byte array
-     * @param offset starting offset in the byte array
-     * @return the value read
-     */
-    public static int readSwappedInteger(final byte[] data, final int offset) {
-        return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) +
-            ( ( data[ offset + 1 ] & 0xff ) << 8 ) +
-            ( ( data[ offset + 2 ] & 0xff ) << 16 ) +
-            ( ( data[ offset + 3 ] & 0xff ) << 24 ) );
-    }
-
-    /**
-     * Reads an unsigned integer (32-bit) value from a byte array at a given
-     * offset. The value is converted to the opposed endian system while
-     * reading.
-     * @param data source byte array
-     * @param offset starting offset in the byte array
-     * @return the value read
-     */
-    public static long readSwappedUnsignedInteger(final byte[] data, final int offset) {
-        final long low = ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) +
-                     ( ( data[ offset + 1 ] & 0xff ) << 8 ) +
-                     ( ( data[ offset + 2 ] & 0xff ) << 16 ) );
-
-        final long high = data[ offset + 3 ] & 0xff;
-
-        return (high << 24) + (0xffffffffL & low); 
-    }
-
-    /**
-     * Writes a "long" value to a byte array at a given offset. The value is
-     * converted to the opposed endian system while writing.
-     * @param data target byte array
-     * @param offset starting offset in the byte array
-     * @param value value to write
-     */
-    public static void writeSwappedLong(final byte[] data, final int offset, final long value) {
-        data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff );
-        data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff );
-        data[ offset + 2 ] = (byte)( ( value >> 16 ) & 0xff );
-        data[ offset + 3 ] = (byte)( ( value >> 24 ) & 0xff );
-        data[ offset + 4 ] = (byte)( ( value >> 32 ) & 0xff );
-        data[ offset + 5 ] = (byte)( ( value >> 40 ) & 0xff );
-        data[ offset + 6 ] = (byte)( ( value >> 48 ) & 0xff );
-        data[ offset + 7 ] = (byte)( ( value >> 56 ) & 0xff );
-    }
-
-    /**
-     * Reads a "long" value from a byte array at a given offset. The value is
-     * converted to the opposed endian system while reading.
-     * @param data source byte array
-     * @param offset starting offset in the byte array
-     * @return the value read
-     */
-    public static long readSwappedLong(final byte[] data, final int offset) {
-        final long low = readSwappedInteger(data, offset);
-        final long high = readSwappedInteger(data, offset + 4);
-        return (high << 32) + (0xffffffffL & low);
-    }
-
-    /**
-     * Writes a "float" value to a byte array at a given offset. The value is
-     * converted to the opposed endian system while writing.
-     * @param data target byte array
-     * @param offset starting offset in the byte array
-     * @param value value to write
-     */
-    public static void writeSwappedFloat(final byte[] data, final int offset, final float value) {
-        writeSwappedInteger( data, offset, Float.floatToIntBits( value ) );
-    }
-
-    /**
-     * Reads a "float" value from a byte array at a given offset. The value is
-     * converted to the opposed endian system while reading.
-     * @param data source byte array
-     * @param offset starting offset in the byte array
-     * @return the value read
-     */
-    public static float readSwappedFloat(final byte[] data, final int offset) {
-        return Float.intBitsToFloat( readSwappedInteger( data, offset ) );
-    }
-
-    /**
-     * Writes a "double" value to a byte array at a given offset. The value is
-     * converted to the opposed endian system while writing.
-     * @param data target byte array
-     * @param offset starting offset in the byte array
-     * @param value value to write
-     */
-    public static void writeSwappedDouble(final byte[] data, final int offset, final double value) {
-        writeSwappedLong( data, offset, Double.doubleToLongBits( value ) );
-    }
-
-    /**
-     * Reads a "double" value from a byte array at a given offset. The value is
-     * converted to the opposed endian system while reading.
-     * @param data source byte array
-     * @param offset starting offset in the byte array
-     * @return the value read
-     */
-    public static double readSwappedDouble(final byte[] data, final int offset) {
-        return Double.longBitsToDouble( readSwappedLong( data, offset ) );
-    }
-
-    /**
-     * Writes a "short" value to an OutputStream. The value is
-     * converted to the opposed endian system while writing.
-     * @param output target OutputStream
-     * @param value value to write
-     * @throws IOException in case of an I/O problem
-     */
-    public static void writeSwappedShort(final OutputStream output, final short value)
-        throws IOException
-    {
-        output.write( (byte)( ( value >> 0 ) & 0xff ) );
-        output.write( (byte)( ( value >> 8 ) & 0xff ) );
-    }
-
-    /**
-     * Reads a "short" value from an InputStream. The value is
-     * converted to the opposed endian system while reading.
-     * @param input source InputStream
-     * @return the value just read
-     * @throws IOException in case of an I/O problem
-     */
-    public static short readSwappedShort(final InputStream input)
-        throws IOException
-    {
-        return (short)( ( ( read( input ) & 0xff ) << 0 ) +
-            ( ( read( input ) & 0xff ) << 8 ) );
-    }
-
-    /**
-     * Reads a unsigned short (16-bit) from an InputStream. The value is
-     * converted to the opposed endian system while reading.
-     * @param input source InputStream
-     * @return the value just read
-     * @throws IOException in case of an I/O problem
-     */
-    public static int readSwappedUnsignedShort(final InputStream input)
-        throws IOException
-    {
-        final int value1 = read( input );
-        final int value2 = read( input );
-
-        return ( ( ( value1 & 0xff ) << 0 ) +
-            ( ( value2 & 0xff ) << 8 ) );
-    }
-
-    /**
-     * Writes a "int" value to an OutputStream. The value is
-     * converted to the opposed endian system while writing.
-     * @param output target OutputStream
-     * @param value value to write
-     * @throws IOException in case of an I/O problem
-     */
-    public static void writeSwappedInteger(final OutputStream output, final int value)
-        throws IOException
-    {
-        output.write( (byte)( ( value >> 0 ) & 0xff ) );
-        output.write( (byte)( ( value >> 8 ) & 0xff ) );
-        output.write( (byte)( ( value >> 16 ) & 0xff ) );
-        output.write( (byte)( ( value >> 24 ) & 0xff ) );
-    }
-
-    /**
-     * Reads a "int" value from an InputStream. The value is
-     * converted to the opposed endian system while reading.
-     * @param input source InputStream
-     * @return the value just read
-     * @throws IOException in case of an I/O problem
-     */
-    public static int readSwappedInteger(final InputStream input)
-        throws IOException
-    {
-        final int value1 = read( input );
-        final int value2 = read( input );
-        final int value3 = read( input );
-        final int value4 = read( input );
-
-        return ( ( value1 & 0xff ) << 0 ) +
-            ( ( value2 & 0xff ) << 8 ) +
-            ( ( value3 & 0xff ) << 16 ) +
-            ( ( value4 & 0xff ) << 24 );
-    }
-
-    /**
-     * Reads a unsigned integer (32-bit) from an InputStream. The value is
-     * converted to the opposed endian system while reading.
-     * @param input source InputStream
-     * @return the value just read
-     * @throws IOException in case of an I/O problem
-     */
-    public static long readSwappedUnsignedInteger(final InputStream input)
-        throws IOException
-    {
-        final int value1 = read( input );
-        final int value2 = read( input );
-        final int value3 = read( input );
-        final int value4 = read( input );
-
-        final long low = ( ( ( value1 & 0xff ) << 0 ) +
-                     ( ( value2 & 0xff ) << 8 ) +
-                     ( ( value3 & 0xff ) << 16 ) );
-
-        final long high = value4 & 0xff;
-
-        return (high << 24) + (0xffffffffL & low); 
-    }
-
-    /**
-     * Writes a "long" value to an OutputStream. The value is
-     * converted to the opposed endian system while writing.
-     * @param output target OutputStream
-     * @param value value to write
-     * @throws IOException in case of an I/O problem
-     */
-    public static void writeSwappedLong(final OutputStream output, final long value)
-        throws IOException
-    {
-        output.write( (byte)( ( value >> 0 ) & 0xff ) );
-        output.write( (byte)( ( value >> 8 ) & 0xff ) );
-        output.write( (byte)( ( value >> 16 ) & 0xff ) );
-        output.write( (byte)( ( value >> 24 ) & 0xff ) );
-        output.write( (byte)( ( value >> 32 ) & 0xff ) );
-        output.write( (byte)( ( value >> 40 ) & 0xff ) );
-        output.write( (byte)( ( value >> 48 ) & 0xff ) );
-        output.write( (byte)( ( value >> 56 ) & 0xff ) );
-    }
-
-    /**
-     * Reads a "long" value from an InputStream. The value is
-     * converted to the opposed endian system while reading.
-     * @param input source InputStream
-     * @return the value just read
-     * @throws IOException in case of an I/O problem
-     */
-    public static long readSwappedLong(final InputStream input)
-        throws IOException
-    {
-        final byte[] bytes = new byte[8];
-        for ( int i=0; i<8; i++ ) {
-            bytes[i] = (byte) read( input );
-        }
-        return readSwappedLong( bytes, 0 );
-    }
-
-    /**
-     * Writes a "float" value to an OutputStream. The value is
-     * converted to the opposed endian system while writing.
-     * @param output target OutputStream
-     * @param value value to write
-     * @throws IOException in case of an I/O problem
-     */
-    public static void writeSwappedFloat(final OutputStream output, final float value)
-        throws IOException
-    {
-        writeSwappedInteger( output, Float.floatToIntBits( value ) );
-    }
-
-    /**
-     * Reads a "float" value from an InputStream. The value is
-     * converted to the opposed endian system while reading.
-     * @param input source InputStream
-     * @return the value just read
-     * @throws IOException in case of an I/O problem
-     */
-    public static float readSwappedFloat(final InputStream input)
-        throws IOException
-    {
-        return Float.intBitsToFloat( readSwappedInteger( input ) );
-    }
-
-    /**
-     * Writes a "double" value to an OutputStream. The value is
-     * converted to the opposed endian system while writing.
-     * @param output target OutputStream
-     * @param value value to write
-     * @throws IOException in case of an I/O problem
-     */
-    public static void writeSwappedDouble(final OutputStream output, final double value)
-        throws IOException
-    {
-        writeSwappedLong( output, Double.doubleToLongBits( value ) );
-    }
-
-    /**
-     * Reads a "double" value from an InputStream. The value is
-     * converted to the opposed endian system while reading.
-     * @param input source InputStream
-     * @return the value just read
-     * @throws IOException in case of an I/O problem
-     */
-    public static double readSwappedDouble(final InputStream input)
-        throws IOException
-    {
-        return Double.longBitsToDouble( readSwappedLong( input ) );
-    }
-
-    /**
-     * Reads the next byte from the input stream.
-     * @param input  the stream
-     * @return the byte
-     * @throws IOException if the end of file is reached
-     */
-    private static int read(final InputStream input)
-        throws IOException
-    {
-        final int value = input.read();
-
-        if( EOF == value ) {
-            throw new EOFException( "Unexpected EOF reached" );
-        }
-
-        return value;
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/FileCleaner.java b/trunk/src/main/java/org/apache/commons/io/FileCleaner.java
deleted file mode 100644
index a497ae0..0000000
--- a/trunk/src/main/java/org/apache/commons/io/FileCleaner.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-
-/**
- * Keeps track of files awaiting deletion, and deletes them when an associated
- * marker object is reclaimed by the garbage collector.
- * <p>
- * This utility creates a background thread to handle file deletion.
- * Each file to be deleted is registered with a handler object.
- * When the handler object is garbage collected, the file is deleted.
- * <p>
- * In an environment with multiple class loaders (a servlet container, for
- * example), you should consider stopping the background thread if it is no
- * longer needed. This is done by invoking the method
- * {@link #exitWhenFinished}, typically in
- * {@code javax.servlet.ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)} or similar.
- *
- * @version $Id$
- * @deprecated Use {@link FileCleaningTracker}
- */
-@Deprecated
-public class FileCleaner {
-    /**
-     * The instance to use for the deprecated, static methods.
-     */
-    static final FileCleaningTracker theInstance = new FileCleaningTracker();
-
-    //-----------------------------------------------------------------------
-    /**
-     * Track the specified file, using the provided marker, deleting the file
-     * when the marker instance is garbage collected.
-     * The {@link FileDeleteStrategy#NORMAL normal} deletion strategy will be used.
-     *
-     * @param file  the file to be tracked, not null
-     * @param marker  the marker object used to track the file, not null
-     * @throws NullPointerException if the file is null
-     * @deprecated Use {@link FileCleaningTracker#track(File, Object)}.
-     */
-    @Deprecated
-    public static void track(final File file, final Object marker) {
-        theInstance.track(file, marker);
-    }
-
-    /**
-     * Track the specified file, using the provided marker, deleting the file
-     * when the marker instance is garbage collected.
-     * The speified deletion strategy is used.
-     *
-     * @param file  the file to be tracked, not null
-     * @param marker  the marker object used to track the file, not null
-     * @param deleteStrategy  the strategy to delete the file, null means normal
-     * @throws NullPointerException if the file is null
-     * @deprecated Use {@link FileCleaningTracker#track(File, Object, FileDeleteStrategy)}.
-     */
-    @Deprecated
-    public static void track(final File file, final Object marker, final FileDeleteStrategy deleteStrategy) {
-        theInstance.track(file, marker, deleteStrategy);
-    }
-
-    /**
-     * Track the specified file, using the provided marker, deleting the file
-     * when the marker instance is garbage collected.
-     * The {@link FileDeleteStrategy#NORMAL normal} deletion strategy will be used.
-     *
-     * @param path  the full path to the file to be tracked, not null
-     * @param marker  the marker object used to track the file, not null
-     * @throws NullPointerException if the path is null
-     * @deprecated Use {@link FileCleaningTracker#track(String, Object)}.
-     */
-    @Deprecated
-    public static void track(final String path, final Object marker) {
-        theInstance.track(path, marker);
-    }
-
-    /**
-     * Track the specified file, using the provided marker, deleting the file
-     * when the marker instance is garbage collected.
-     * The speified deletion strategy is used.
-     *
-     * @param path  the full path to the file to be tracked, not null
-     * @param marker  the marker object used to track the file, not null
-     * @param deleteStrategy  the strategy to delete the file, null means normal
-     * @throws NullPointerException if the path is null
-     * @deprecated Use {@link FileCleaningTracker#track(String, Object, FileDeleteStrategy)}.
-     */
-    @Deprecated
-    public static void track(final String path, final Object marker, final FileDeleteStrategy deleteStrategy) {
-        theInstance.track(path, marker, deleteStrategy);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Retrieve the number of files currently being tracked, and therefore
-     * awaiting deletion.
-     *
-     * @return the number of files being tracked
-     * @deprecated Use {@link FileCleaningTracker#getTrackCount()}.
-     */
-    @Deprecated
-    public static int getTrackCount() {
-        return theInstance.getTrackCount();
-    }
-
-    /**
-     * Call this method to cause the file cleaner thread to terminate when
-     * there are no more objects being tracked for deletion.
-     * <p>
-     * In a simple environment, you don't need this method as the file cleaner
-     * thread will simply exit when the JVM exits. In a more complex environment,
-     * with multiple class loaders (such as an application server), you should be
-     * aware that the file cleaner thread will continue running even if the class
-     * loader it was started from terminates. This can consitute a memory leak.
-     * <p>
-     * For example, suppose that you have developed a web application, which
-     * contains the commons-io jar file in your WEB-INF/lib directory. In other
-     * words, the FileCleaner class is loaded through the class loader of your
-     * web application. If the web application is terminated, but the servlet
-     * container is still running, then the file cleaner thread will still exist,
-     * posing a memory leak.
-     * <p>
-     * This method allows the thread to be terminated. Simply call this method
-     * in the resource cleanup code, such as 
-     * {@code javax.servlet.ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)}.
-     * One called, no new objects can be tracked by the file cleaner.
-     * @deprecated Use {@link FileCleaningTracker#exitWhenFinished()}.
-     */
-    @Deprecated
-    public static synchronized void exitWhenFinished() {
-        theInstance.exitWhenFinished();
-    }
-
-    /**
-     * Returns the singleton instance, which is used by the deprecated, static methods.
-     * This is mainly useful for code, which wants to support the new
-     * {@link FileCleaningTracker} class while maintain compatibility with the
-     * deprecated {@link FileCleaner}.
-     * 
-     * @return the singleton instance
-     */
-    public static FileCleaningTracker getInstance() {
-        return theInstance;
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/FileCleaningTracker.java b/trunk/src/main/java/org/apache/commons/io/FileCleaningTracker.java
deleted file mode 100644
index 5072711..0000000
--- a/trunk/src/main/java/org/apache/commons/io/FileCleaningTracker.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.lang.ref.PhantomReference;
-import java.lang.ref.ReferenceQueue;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-
-/**
- * Keeps track of files awaiting deletion, and deletes them when an associated
- * marker object is reclaimed by the garbage collector.
- * <p>
- * This utility creates a background thread to handle file deletion.
- * Each file to be deleted is registered with a handler object.
- * When the handler object is garbage collected, the file is deleted.
- * <p>
- * In an environment with multiple class loaders (a servlet container, for
- * example), you should consider stopping the background thread if it is no
- * longer needed. This is done by invoking the method
- * {@link #exitWhenFinished}, typically in
- * {@code javax.servlet.ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)} or similar.
- *
- * @version $Id$
- */
-public class FileCleaningTracker {
-
-    // Note: fields are package protected to allow use by test cases
-
-    /**
-     * Queue of <code>Tracker</code> instances being watched.
-     */
-    ReferenceQueue<Object> q = new ReferenceQueue<Object>();
-    /**
-     * Collection of <code>Tracker</code> instances in existence.
-     */
-    final Collection<Tracker> trackers = Collections.synchronizedSet(new HashSet<Tracker>()); // synchronized
-    /**
-     * Collection of File paths that failed to delete.
-     */
-    final List<String> deleteFailures = Collections.synchronizedList(new ArrayList<String>());
-    /**
-     * Whether to terminate the thread when the tracking is complete.
-     */
-    volatile boolean exitWhenFinished = false;
-    /**
-     * The thread that will clean up registered files.
-     */
-    Thread reaper;
-
-    //-----------------------------------------------------------------------
-    /**
-     * Track the specified file, using the provided marker, deleting the file
-     * when the marker instance is garbage collected.
-     * The {@link FileDeleteStrategy#NORMAL normal} deletion strategy will be used.
-     *
-     * @param file  the file to be tracked, not null
-     * @param marker  the marker object used to track the file, not null
-     * @throws NullPointerException if the file is null
-     */
-    public void track(final File file, final Object marker) {
-        track(file, marker, null);
-    }
-
-    /**
-     * Track the specified file, using the provided marker, deleting the file
-     * when the marker instance is garbage collected.
-     * The speified deletion strategy is used.
-     *
-     * @param file  the file to be tracked, not null
-     * @param marker  the marker object used to track the file, not null
-     * @param deleteStrategy  the strategy to delete the file, null means normal
-     * @throws NullPointerException if the file is null
-     */
-    public void track(final File file, final Object marker, final FileDeleteStrategy deleteStrategy) {
-        if (file == null) {
-            throw new NullPointerException("The file must not be null");
-        }
-        addTracker(file.getPath(), marker, deleteStrategy);
-    }
-
-    /**
-     * Track the specified file, using the provided marker, deleting the file
-     * when the marker instance is garbage collected.
-     * The {@link FileDeleteStrategy#NORMAL normal} deletion strategy will be used.
-     *
-     * @param path  the full path to the file to be tracked, not null
-     * @param marker  the marker object used to track the file, not null
-     * @throws NullPointerException if the path is null
-     */
-    public void track(final String path, final Object marker) {
-        track(path, marker, null);
-    }
-
-    /**
-     * Track the specified file, using the provided marker, deleting the file
-     * when the marker instance is garbage collected.
-     * The speified deletion strategy is used.
-     *
-     * @param path  the full path to the file to be tracked, not null
-     * @param marker  the marker object used to track the file, not null
-     * @param deleteStrategy  the strategy to delete the file, null means normal
-     * @throws NullPointerException if the path is null
-     */
-    public void track(final String path, final Object marker, final FileDeleteStrategy deleteStrategy) {
-        if (path == null) {
-            throw new NullPointerException("The path must not be null");
-        }
-        addTracker(path, marker, deleteStrategy);
-    }
-
-    /**
-     * Adds a tracker to the list of trackers.
-     *
-     * @param path  the full path to the file to be tracked, not null
-     * @param marker  the marker object used to track the file, not null
-     * @param deleteStrategy  the strategy to delete the file, null means normal
-     */
-    private synchronized void addTracker(final String path, final Object marker, final FileDeleteStrategy
-            deleteStrategy) {
-        // synchronized block protects reaper
-        if (exitWhenFinished) {
-            throw new IllegalStateException("No new trackers can be added once exitWhenFinished() is called");
-        }
-        if (reaper == null) {
-            reaper = new Reaper();
-            reaper.start();
-        }
-        trackers.add(new Tracker(path, deleteStrategy, marker, q));
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Retrieve the number of files currently being tracked, and therefore
-     * awaiting deletion.
-     *
-     * @return the number of files being tracked
-     */
-    public int getTrackCount() {
-        return trackers.size();
-    }
-
-    /**
-     * Return the file paths that failed to delete.
-     *
-     * @return the file paths that failed to delete
-     * @since 2.0
-     */
-    public List<String> getDeleteFailures() {
-        return deleteFailures;
-    }
-
-    /**
-     * Call this method to cause the file cleaner thread to terminate when
-     * there are no more objects being tracked for deletion.
-     * <p>
-     * In a simple environment, you don't need this method as the file cleaner
-     * thread will simply exit when the JVM exits. In a more complex environment,
-     * with multiple class loaders (such as an application server), you should be
-     * aware that the file cleaner thread will continue running even if the class
-     * loader it was started from terminates. This can consitute a memory leak.
-     * <p>
-     * For example, suppose that you have developed a web application, which
-     * contains the commons-io jar file in your WEB-INF/lib directory. In other
-     * words, the FileCleaner class is loaded through the class loader of your
-     * web application. If the web application is terminated, but the servlet
-     * container is still running, then the file cleaner thread will still exist,
-     * posing a memory leak.
-     * <p>
-     * This method allows the thread to be terminated. Simply call this method
-     * in the resource cleanup code, such as
-     * {@code javax.servlet.ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)}.
-     * Once called, no new objects can be tracked by the file cleaner.
-     */
-    public synchronized void exitWhenFinished() {
-        // synchronized block protects reaper
-        exitWhenFinished = true;
-        if (reaper != null) {
-            synchronized (reaper) {
-                reaper.interrupt();
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * The reaper thread.
-     */
-    private final class Reaper extends Thread {
-        /** Construct a new Reaper */
-        Reaper() {
-            super("File Reaper");
-            setPriority(Thread.MAX_PRIORITY);
-            setDaemon(true);
-        }
-
-        /**
-         * Run the reaper thread that will delete files as their associated
-         * marker objects are reclaimed by the garbage collector.
-         */
-        @Override
-        public void run() {
-            // thread exits when exitWhenFinished is true and there are no more tracked objects
-            while (exitWhenFinished == false || trackers.size() > 0) {
-                try {
-                    // Wait for a tracker to remove.
-                    final Tracker tracker = (Tracker) q.remove(); // cannot return null
-                    trackers.remove(tracker);
-                    if (!tracker.delete()) {
-                        deleteFailures.add(tracker.getPath());
-                    }
-                    tracker.clear();
-                } catch (final InterruptedException e) {
-                    continue;
-                }
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Inner class which acts as the reference for a file pending deletion.
-     */
-    private static final class Tracker extends PhantomReference<Object> {
-
-        /**
-         * The full path to the file being tracked.
-         */
-        private final String path;
-        /**
-         * The strategy for deleting files.
-         */
-        private final FileDeleteStrategy deleteStrategy;
-
-        /**
-         * Constructs an instance of this class from the supplied parameters.
-         *
-         * @param path  the full path to the file to be tracked, not null
-         * @param deleteStrategy  the strategy to delete the file, null means normal
-         * @param marker  the marker object used to track the file, not null
-         * @param queue  the queue on to which the tracker will be pushed, not null
-         */
-        Tracker(final String path, final FileDeleteStrategy deleteStrategy, final Object marker,
-                final ReferenceQueue<? super Object> queue) {
-            super(marker, queue);
-            this.path = path;
-            this.deleteStrategy = deleteStrategy == null ? FileDeleteStrategy.NORMAL : deleteStrategy;
-        }
-
-        /**
-         * Return the path.
-         *
-         * @return the path
-         */
-        public String getPath() {
-            return path;
-        }
-
-        /**
-         * Deletes the file associated with this tracker instance.
-         *
-         * @return {@code true} if the file was deleted successfully;
-         *         {@code false} otherwise.
-         */
-        public boolean delete() {
-            return deleteStrategy.deleteQuietly(new File(path));
-        }
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/FileDeleteStrategy.java b/trunk/src/main/java/org/apache/commons/io/FileDeleteStrategy.java
deleted file mode 100644
index edf9381..0000000
--- a/trunk/src/main/java/org/apache/commons/io/FileDeleteStrategy.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Strategy for deleting files.
- * <p>
- * There is more than one way to delete a file.
- * You may want to limit access to certain directories, to only delete
- * directories if they are empty, or maybe to force deletion.
- * <p>
- * This class captures the strategy to use and is designed for user subclassing.
- *
- * @version $Id$
- * @since 1.3
- */
-public class FileDeleteStrategy {
-
-    /**
-     * The singleton instance for normal file deletion, which does not permit
-     * the deletion of directories that are not empty.
-     */
-    public static final FileDeleteStrategy NORMAL = new FileDeleteStrategy("Normal");
-    /**
-     * The singleton instance for forced file deletion, which always deletes,
-     * even if the file represents a non-empty directory.
-     */
-    public static final FileDeleteStrategy FORCE = new ForceFileDeleteStrategy();
-
-    /** The name of the strategy. */
-    private final String name;
-
-    //-----------------------------------------------------------------------
-    /**
-     * Restricted constructor.
-     *
-     * @param name  the name by which the strategy is known
-     */
-    protected FileDeleteStrategy(final String name) {
-        this.name = name;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Deletes the file object, which may be a file or a directory.
-     * All <code>IOException</code>s are caught and false returned instead.
-     * If the file does not exist or is null, true is returned.
-     * <p>
-     * Subclass writers should override {@link #doDelete(File)}, not this method.
-     *
-     * @param fileToDelete  the file to delete, null returns true
-     * @return true if the file was deleted, or there was no such file
-     */
-    public boolean deleteQuietly(final File fileToDelete) {
-        if (fileToDelete == null || fileToDelete.exists() == false) {
-            return true;
-        }
-        try {
-            return doDelete(fileToDelete);
-        } catch (final IOException ex) {
-            return false;
-        }
-    }
-
-    /**
-     * Deletes the file object, which may be a file or a directory.
-     * If the file does not exist, the method just returns.
-     * <p>
-     * Subclass writers should override {@link #doDelete(File)}, not this method.
-     *
-     * @param fileToDelete  the file to delete, not null
-     * @throws NullPointerException if the file is null
-     * @throws IOException if an error occurs during file deletion
-     */
-    public void delete(final File fileToDelete) throws IOException {
-        if (fileToDelete.exists() && doDelete(fileToDelete) == false) {
-            throw new IOException("Deletion failed: " + fileToDelete);
-        }
-    }
-
-    /**
-     * Actually deletes the file object, which may be a file or a directory.
-     * <p>
-     * This method is designed for subclasses to override.
-     * The implementation may return either false or an <code>IOException</code>
-     * when deletion fails. The {@link #delete(File)} and {@link #deleteQuietly(File)}
-     * methods will handle either response appropriately.
-     * A check has been made to ensure that the file will exist.
-     * <p>
-     * This implementation uses {@link File#delete()}.
-     *
-     * @param fileToDelete  the file to delete, exists, not null
-     * @return true if the file was deleteds
-     * @throws NullPointerException if the file is null
-     * @throws IOException if an error occurs during file deletion
-     */
-    protected boolean doDelete(final File fileToDelete) throws IOException {
-        return fileToDelete.delete();
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Gets a string describing the delete strategy.
-     *
-     * @return a string describing the delete strategy
-     */
-    @Override
-    public String toString() {
-        return "FileDeleteStrategy[" + name + "]";
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Force file deletion strategy.
-     */
-    static class ForceFileDeleteStrategy extends FileDeleteStrategy {
-        /** Default Constructor */
-        ForceFileDeleteStrategy() {
-            super("Force");
-        }
-
-        /**
-         * Deletes the file object.
-         * <p>
-         * This implementation uses <code>FileUtils.forceDelete()</code>
-         * if the file exists.
-         *
-         * @param fileToDelete  the file to delete, not null
-         * @return Always returns {@code true}
-         * @throws NullPointerException if the file is null
-         * @throws IOException if an error occurs during file deletion
-         */
-        @Override
-        protected boolean doDelete(final File fileToDelete) throws IOException {
-            FileUtils.forceDelete(fileToDelete);
-            return true;
-        }
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/FileExistsException.java b/trunk/src/main/java/org/apache/commons/io/FileExistsException.java
deleted file mode 100644
index 7d8e240..0000000
--- a/trunk/src/main/java/org/apache/commons/io/FileExistsException.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Indicates that a file already exists.
- * 
- * @version $Id$
- * @since 2.0
- */
-public class FileExistsException extends IOException {
-
-    /**
-     * Defines the serial version UID.
-     */
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * Default Constructor.
-     */
-    public FileExistsException() {
-        super();
-    }
-
-    /**
-     * Construct an instance with the specified message.
-     *
-     * @param message The error message
-     */
-    public FileExistsException(final String message) {
-        super(message);
-    }
-
-    /**
-     * Construct an instance with the specified file.
-     *
-     * @param file The file that exists
-     */
-    public FileExistsException(final File file) {
-        super("File " + file + " exists");
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java b/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java
deleted file mode 100644
index ee52f1e..0000000
--- a/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java
+++ /dev/null
@@ -1,541 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Locale;
-import java.util.StringTokenizer;
-
-/**
- * General File System utilities.
- * <p>
- * This class provides static utility methods for general file system
- * functions not provided via the JDK {@link java.io.File File} class.
- * <p>
- * The current functions provided are:
- * <ul>
- * <li>Get the free space on a drive
- * </ul>
- *
- * @version $Id$
- * @since 1.1
- */
-public class FileSystemUtils {
-
-    /** Singleton instance, used mainly for testing. */
-    private static final FileSystemUtils INSTANCE = new FileSystemUtils();
-
-    /** Operating system state flag for error. */
-    private static final int INIT_PROBLEM = -1;
-    /** Operating system state flag for neither Unix nor Windows. */
-    private static final int OTHER = 0;
-    /** Operating system state flag for Windows. */
-    private static final int WINDOWS = 1;
-    /** Operating system state flag for Unix. */
-    private static final int UNIX = 2;
-    /** Operating system state flag for Posix flavour Unix. */
-    private static final int POSIX_UNIX = 3;
-
-    /** The operating system flag. */
-    private static final int OS;
-
-    /** The path to df */
-    private static final String DF;
-
-    static {
-        int os = OTHER;
-        String dfPath = "df";
-        try {
-            String osName = System.getProperty("os.name");
-            if (osName == null) {
-                throw new IOException("os.name not found");
-            }
-            osName = osName.toLowerCase(Locale.ENGLISH);
-            // match
-            if (osName.contains("windows")) {
-                os = WINDOWS;
-            } else if (osName.contains("linux") ||
-                    osName.contains("mpe/ix") ||
-                    osName.contains("freebsd") ||
-                    osName.contains("irix") ||
-                    osName.contains("digital unix") ||
-                    osName.contains("unix") ||
-                    osName.contains("mac os x")) {
-                os = UNIX;
-            } else if (osName.contains("sun os") ||
-                    osName.contains("sunos") ||
-                    osName.contains("solaris")) {
-                os = POSIX_UNIX;
-                dfPath = "/usr/xpg4/bin/df";
-            } else if (osName.contains("hp-ux") ||
-                    osName.contains("aix")) {
-                os = POSIX_UNIX;
-            } else {
-                os = OTHER;
-            }
-
-        } catch (final Exception ex) {
-            os = INIT_PROBLEM;
-        }
-        OS = os;
-        DF = dfPath;
-    }
-
-    /**
-     * Instances should NOT be constructed in standard programming.
-     */
-    public FileSystemUtils() {
-        super();
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns the free space on a drive or volume by invoking
-     * the command line.
-     * This method does not normalize the result, and typically returns
-     * bytes on Windows, 512 byte units on OS X and kilobytes on Unix.
-     * As this is not very useful, this method is deprecated in favour
-     * of {@link #freeSpaceKb(String)} which returns a result in kilobytes.
-     * <p>
-     * Note that some OS's are NOT currently supported, including OS/390,
-     * OpenVMS.
-     * <pre>
-     * FileSystemUtils.freeSpace("C:");       // Windows
-     * FileSystemUtils.freeSpace("/volume");  // *nix
-     * </pre>
-     * The free space is calculated via the command line.
-     * It uses 'dir /-c' on Windows and 'df' on *nix.
-     *
-     * @param path  the path to get free space for, not null, not empty on Unix
-     * @return the amount of free drive space on the drive or volume
-     * @throws IllegalArgumentException if the path is invalid
-     * @throws IllegalStateException if an error occurred in initialisation
-     * @throws IOException if an error occurs when finding the free space
-     * @since 1.1, enhanced OS support in 1.2 and 1.3
-     * @deprecated Use freeSpaceKb(String)
-     *  Deprecated from 1.3, may be removed in 2.0
-     */
-    @Deprecated
-    public static long freeSpace(final String path) throws IOException {
-        return INSTANCE.freeSpaceOS(path, OS, false, -1);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns the free space on a drive or volume in kilobytes by invoking
-     * the command line.
-     * <pre>
-     * FileSystemUtils.freeSpaceKb("C:");       // Windows
-     * FileSystemUtils.freeSpaceKb("/volume");  // *nix
-     * </pre>
-     * The free space is calculated via the command line.
-     * It uses 'dir /-c' on Windows, 'df -kP' on AIX/HP-UX and 'df -k' on other Unix.
-     * <p>
-     * In order to work, you must be running Windows, or have a implementation of
-     * Unix df that supports GNU format when passed -k (or -kP). If you are going
-     * to rely on this code, please check that it works on your OS by running
-     * some simple tests to compare the command line with the output from this class.
-     * If your operating system isn't supported, please raise a JIRA call detailing
-     * the exact result from df -k and as much other detail as possible, thanks.
-     *
-     * @param path  the path to get free space for, not null, not empty on Unix
-     * @return the amount of free drive space on the drive or volume in kilobytes
-     * @throws IllegalArgumentException if the path is invalid
-     * @throws IllegalStateException if an error occurred in initialisation
-     * @throws IOException if an error occurs when finding the free space
-     * @since 1.2, enhanced OS support in 1.3
-     */
-    public static long freeSpaceKb(final String path) throws IOException {
-        return freeSpaceKb(path, -1);
-    }
-    /**
-     * Returns the free space on a drive or volume in kilobytes by invoking
-     * the command line.
-     * <pre>
-     * FileSystemUtils.freeSpaceKb("C:");       // Windows
-     * FileSystemUtils.freeSpaceKb("/volume");  // *nix
-     * </pre>
-     * The free space is calculated via the command line.
-     * It uses 'dir /-c' on Windows, 'df -kP' on AIX/HP-UX and 'df -k' on other Unix.
-     * <p>
-     * In order to work, you must be running Windows, or have a implementation of
-     * Unix df that supports GNU format when passed -k (or -kP). If you are going
-     * to rely on this code, please check that it works on your OS by running
-     * some simple tests to compare the command line with the output from this class.
-     * If your operating system isn't supported, please raise a JIRA call detailing
-     * the exact result from df -k and as much other detail as possible, thanks.
-     *
-     * @param path  the path to get free space for, not null, not empty on Unix
-     * @param timeout The timeout amount in milliseconds or no timeout if the value
-     *  is zero or less
-     * @return the amount of free drive space on the drive or volume in kilobytes
-     * @throws IllegalArgumentException if the path is invalid
-     * @throws IllegalStateException if an error occurred in initialisation
-     * @throws IOException if an error occurs when finding the free space
-     * @since 2.0
-     */
-    public static long freeSpaceKb(final String path, final long timeout) throws IOException {
-        return INSTANCE.freeSpaceOS(path, OS, true, timeout);
-    }
-
-    /**
-     * Returns the disk size of the volume which holds the working directory.
-     * <p>
-     * Identical to:
-     * <pre>
-     * freeSpaceKb(new File(".").getAbsolutePath())
-     * </pre>
-     * @return the amount of free drive space on the drive or volume in kilobytes
-     * @throws IllegalStateException if an error occurred in initialisation
-     * @throws IOException if an error occurs when finding the free space
-     * @since 2.0
-     */
-    public static long freeSpaceKb() throws IOException {
-        return freeSpaceKb(-1);
-    }
-
-    /**
-     * Returns the disk size of the volume which holds the working directory.
-     * <p>
-     * Identical to:
-     * <pre>
-     * freeSpaceKb(new File(".").getAbsolutePath())
-     * </pre>
-     * @param timeout The timeout amount in milliseconds or no timeout if the value
-     *  is zero or less
-     * @return the amount of free drive space on the drive or volume in kilobytes
-     * @throws IllegalStateException if an error occurred in initialisation
-     * @throws IOException if an error occurs when finding the free space
-     * @since 2.0
-     */
-    public static long freeSpaceKb(final long timeout) throws IOException {
-        return freeSpaceKb(new File(".").getAbsolutePath(), timeout);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns the free space on a drive or volume in a cross-platform manner.
-     * Note that some OS's are NOT currently supported, including OS/390.
-     * <pre>
-     * FileSystemUtils.freeSpace("C:");  // Windows
-     * FileSystemUtils.freeSpace("/volume");  // *nix
-     * </pre>
-     * The free space is calculated via the command line.
-     * It uses 'dir /-c' on Windows and 'df' on *nix.
-     *
-     * @param path  the path to get free space for, not null, not empty on Unix
-     * @param os  the operating system code
-     * @param kb  whether to normalize to kilobytes
-     * @param timeout The timeout amount in milliseconds or no timeout if the value
-     *  is zero or less
-     * @return the amount of free drive space on the drive or volume
-     * @throws IllegalArgumentException if the path is invalid
-     * @throws IllegalStateException if an error occurred in initialisation
-     * @throws IOException if an error occurs when finding the free space
-     */
-    long freeSpaceOS(final String path, final int os, final boolean kb, final long timeout) throws IOException {
-        if (path == null) {
-            throw new IllegalArgumentException("Path must not be null");
-        }
-        switch (os) {
-            case WINDOWS:
-                return kb ? freeSpaceWindows(path, timeout) / FileUtils.ONE_KB : freeSpaceWindows(path, timeout);
-            case UNIX:
-                return freeSpaceUnix(path, kb, false, timeout);
-            case POSIX_UNIX:
-                return freeSpaceUnix(path, kb, true, timeout);
-            case OTHER:
-                throw new IllegalStateException("Unsupported operating system");
-            default:
-                throw new IllegalStateException(
-                  "Exception caught when determining operating system");
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Find free space on the Windows platform using the 'dir' command.
-     *
-     * @param path  the path to get free space for, including the colon
-     * @param timeout The timeout amount in milliseconds or no timeout if the value
-     *  is zero or less
-     * @return the amount of free drive space on the drive
-     * @throws IOException if an error occurs
-     */
-    long freeSpaceWindows(String path, final long timeout) throws IOException {
-        path = FilenameUtils.normalize(path, false);
-        if (path.length() > 0 && path.charAt(0) != '"') {
-            path = "\"" + path + "\"";
-        }
-
-        // build and run the 'dir' command
-        final String[] cmdAttribs = new String[] {"cmd.exe", "/C", "dir /a /-c " + path};
-
-        // read in the output of the command to an ArrayList
-        final List<String> lines = performCommand(cmdAttribs, Integer.MAX_VALUE, timeout);
-
-        // now iterate over the lines we just read and find the LAST
-        // non-empty line (the free space bytes should be in the last element
-        // of the ArrayList anyway, but this will ensure it works even if it's
-        // not, still assuming it is on the last non-blank line)
-        for (int i = lines.size() - 1; i >= 0; i--) {
-            final String line = lines.get(i);
-            if (line.length() > 0) {
-                return parseDir(line, path);
-            }
-        }
-        // all lines are blank
-        throw new IOException(
-                "Command line 'dir /-c' did not return any info " +
-                "for path '" + path + "'");
-    }
-
-    /**
-     * Parses the Windows dir response last line
-     *
-     * @param line  the line to parse
-     * @param path  the path that was sent
-     * @return the number of bytes
-     * @throws IOException if an error occurs
-     */
-    long parseDir(final String line, final String path) throws IOException {
-        // read from the end of the line to find the last numeric
-        // character on the line, then continue until we find the first
-        // non-numeric character, and everything between that and the last
-        // numeric character inclusive is our free space bytes count
-        int bytesStart = 0;
-        int bytesEnd = 0;
-        int j = line.length() - 1;
-        innerLoop1: while (j >= 0) {
-            final char c = line.charAt(j);
-            if (Character.isDigit(c)) {
-              // found the last numeric character, this is the end of
-              // the free space bytes count
-              bytesEnd = j + 1;
-              break innerLoop1;
-            }
-            j--;
-        }
-        innerLoop2: while (j >= 0) {
-            final char c = line.charAt(j);
-            if (!Character.isDigit(c) && c != ',' && c != '.') {
-              // found the next non-numeric character, this is the
-              // beginning of the free space bytes count
-              bytesStart = j + 1;
-              break innerLoop2;
-            }
-            j--;
-        }
-        if (j < 0) {
-            throw new IOException(
-                    "Command line 'dir /-c' did not return valid info " +
-                    "for path '" + path + "'");
-        }
-
-        // remove commas and dots in the bytes count
-        final StringBuilder buf = new StringBuilder(line.substring(bytesStart, bytesEnd));
-        for (int k = 0; k < buf.length(); k++) {
-            if (buf.charAt(k) == ',' || buf.charAt(k) == '.') {
-                buf.deleteCharAt(k--);
-            }
-        }
-        return parseBytes(buf.toString(), path);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Find free space on the *nix platform using the 'df' command.
-     *
-     * @param path  the path to get free space for
-     * @param kb  whether to normalize to kilobytes
-     * @param posix  whether to use the POSIX standard format flag
-     * @param timeout The timeout amount in milliseconds or no timeout if the value
-     *  is zero or less
-     * @return the amount of free drive space on the volume
-     * @throws IOException if an error occurs
-     */
-    long freeSpaceUnix(final String path, final boolean kb, final boolean posix, final long timeout)
-            throws IOException {
-        if (path.isEmpty()) {
-            throw new IllegalArgumentException("Path must not be empty");
-        }
-
-        // build and run the 'dir' command
-        String flags = "-";
-        if (kb) {
-            flags += "k";
-        }
-        if (posix) {
-            flags += "P";
-        }
-        final String[] cmdAttribs =
-            flags.length() > 1 ? new String[] {DF, flags, path} : new String[] {DF, path};
-
-        // perform the command, asking for up to 3 lines (header, interesting, overflow)
-        final List<String> lines = performCommand(cmdAttribs, 3, timeout);
-        if (lines.size() < 2) {
-            // unknown problem, throw exception
-            throw new IOException(
-                    "Command line '" + DF + "' did not return info as expected " +
-                    "for path '" + path + "'- response was " + lines);
-        }
-        final String line2 = lines.get(1); // the line we're interested in
-
-        // Now, we tokenize the string. The fourth element is what we want.
-        StringTokenizer tok = new StringTokenizer(line2, " ");
-        if (tok.countTokens() < 4) {
-            // could be long Filesystem, thus data on third line
-            if (tok.countTokens() == 1 && lines.size() >= 3) {
-                final String line3 = lines.get(2); // the line may be interested in
-                tok = new StringTokenizer(line3, " ");
-            } else {
-                throw new IOException(
-                        "Command line '" + DF + "' did not return data as expected " +
-                        "for path '" + path + "'- check path is valid");
-            }
-        } else {
-            tok.nextToken(); // Ignore Filesystem
-        }
-        tok.nextToken(); // Ignore 1K-blocks
-        tok.nextToken(); // Ignore Used
-        final String freeSpace = tok.nextToken();
-        return parseBytes(freeSpace, path);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Parses the bytes from a string.
-     *
-     * @param freeSpace  the free space string
-     * @param path  the path
-     * @return the number of bytes
-     * @throws IOException if an error occurs
-     */
-    long parseBytes(final String freeSpace, final String path) throws IOException {
-        try {
-            final long bytes = Long.parseLong(freeSpace);
-            if (bytes < 0) {
-                throw new IOException(
-                        "Command line '" + DF + "' did not find free space in response " +
-                        "for path '" + path + "'- check path is valid");
-            }
-            return bytes;
-
-        } catch (final NumberFormatException ex) {
-            throw new IOException(
-                    "Command line '" + DF + "' did not return numeric data as expected " +
-                    "for path '" + path + "'- check path is valid", ex);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Performs the os command.
-     *
-     * @param cmdAttribs  the command line parameters
-     * @param max The maximum limit for the lines returned
-     * @param timeout The timeout amount in milliseconds or no timeout if the value
-     *  is zero or less
-     * @return the lines returned by the command, converted to lower-case
-     * @throws IOException if an error occurs
-     */
-    List<String> performCommand(final String[] cmdAttribs, final int max, final long timeout) throws IOException {
-        // this method does what it can to avoid the 'Too many open files' error
-        // based on trial and error and these links:
-        // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4784692
-        // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4801027
-        // http://forum.java.sun.com/thread.jspa?threadID=533029&messageID=2572018
-        // however, its still not perfect as the JDK support is so poor
-        // (see commons-exec or Ant for a better multi-threaded multi-os solution)
-
-        final List<String> lines = new ArrayList<String>(20);
-        Process proc = null;
-        InputStream in = null;
-        OutputStream out = null;
-        InputStream err = null;
-        BufferedReader inr = null;
-        try {
-
-            final Thread monitor = ThreadMonitor.start(timeout);
-
-            proc = openProcess(cmdAttribs);
-            in = proc.getInputStream();
-            out = proc.getOutputStream();
-            err = proc.getErrorStream();
-            // default charset is most likely appropriate here
-            inr = new BufferedReader(new InputStreamReader(in, Charset.defaultCharset()));
-            String line = inr.readLine();
-            while (line != null && lines.size() < max) {
-                line = line.toLowerCase(Locale.ENGLISH).trim();
-                lines.add(line);
-                line = inr.readLine();
-            }
-
-            proc.waitFor();
-
-            ThreadMonitor.stop(monitor);
-
-            if (proc.exitValue() != 0) {
-                // os command problem, throw exception
-                throw new IOException(
-                        "Command line returned OS error code '" + proc.exitValue() +
-                        "' for command " + Arrays.asList(cmdAttribs));
-            }
-            if (lines.isEmpty()) {
-                // unknown problem, throw exception
-                throw new IOException(
-                        "Command line did not return any info " +
-                        "for command " + Arrays.asList(cmdAttribs));
-            }
-            return lines;
-
-        } catch (final InterruptedException ex) {
-            throw new IOException(
-                    "Command line threw an InterruptedException " +
-                    "for command " + Arrays.asList(cmdAttribs) + " timeout=" + timeout, ex);
-        } finally {
-            IOUtils.closeQuietly(in);
-            IOUtils.closeQuietly(out);
-            IOUtils.closeQuietly(err);
-            IOUtils.closeQuietly(inr);
-            if (proc != null) {
-                proc.destroy();
-            }
-        }
-    }
-
-    /**
-     * Opens the process to the operating system.
-     *
-     * @param cmdAttribs  the command line parameters
-     * @return the process
-     * @throws IOException if an error occurs
-     */
-    Process openProcess(final String[] cmdAttribs) throws IOException {
-        return Runtime.getRuntime().exec(cmdAttribs);
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/FileUtils.java b/trunk/src/main/java/org/apache/commons/io/FileUtils.java
deleted file mode 100644
index 57ac5c7..0000000
--- a/trunk/src/main/java/org/apache/commons/io/FileUtils.java
+++ /dev/null
@@ -1,3146 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.math.BigInteger;
-import java.net.URL;
-import java.net.URLConnection;
-import java.nio.ByteBuffer;
-import java.nio.channels.FileChannel;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-import java.util.zip.CRC32;
-import java.util.zip.CheckedInputStream;
-import java.util.zip.Checksum;
-
-import org.apache.commons.io.filefilter.DirectoryFileFilter;
-import org.apache.commons.io.filefilter.FalseFileFilter;
-import org.apache.commons.io.filefilter.FileFilterUtils;
-import org.apache.commons.io.filefilter.IOFileFilter;
-import org.apache.commons.io.filefilter.SuffixFileFilter;
-import org.apache.commons.io.filefilter.TrueFileFilter;
-import org.apache.commons.io.output.NullOutputStream;
-
-/**
- * General file manipulation utilities.
- * <p>
- * Facilities are provided in the following areas:
- * <ul>
- * <li>writing to a file
- * <li>reading from a file
- * <li>make a directory including parent directories
- * <li>copying files and directories
- * <li>deleting files and directories
- * <li>converting to and from a URL
- * <li>listing files and directories by filter and extension
- * <li>comparing file content
- * <li>file last changed date
- * <li>calculating a checksum
- * </ul>
- * <p>
- * Origin of code: Excalibur, Alexandria, Commons-Utils
- *
- * @version $Id$
- */
-public class FileUtils {
-
-    /**
-     * Instances should NOT be constructed in standard programming.
-     */
-    public FileUtils() {
-        super();
-    }
-
-    /**
-     * The number of bytes in a kilobyte.
-     */
-    public static final long ONE_KB = 1024;
-
-    /**
-     * The number of bytes in a kilobyte.
-     *
-     * @since 2.4
-     */
-    public static final BigInteger ONE_KB_BI = BigInteger.valueOf(ONE_KB);
-
-    /**
-     * The number of bytes in a megabyte.
-     */
-    public static final long ONE_MB = ONE_KB * ONE_KB;
-
-    /**
-     * The number of bytes in a megabyte.
-     *
-     * @since 2.4
-     */
-    public static final BigInteger ONE_MB_BI = ONE_KB_BI.multiply(ONE_KB_BI);
-
-    /**
-     * The file copy buffer size (30 MB)
-     */
-    private static final long FILE_COPY_BUFFER_SIZE = ONE_MB * 30;
-
-    /**
-     * The number of bytes in a gigabyte.
-     */
-    public static final long ONE_GB = ONE_KB * ONE_MB;
-
-    /**
-     * The number of bytes in a gigabyte.
-     *
-     * @since 2.4
-     */
-    public static final BigInteger ONE_GB_BI = ONE_KB_BI.multiply(ONE_MB_BI);
-
-    /**
-     * The number of bytes in a terabyte.
-     */
-    public static final long ONE_TB = ONE_KB * ONE_GB;
-
-    /**
-     * The number of bytes in a terabyte.
-     *
-     * @since 2.4
-     */
-    public static final BigInteger ONE_TB_BI = ONE_KB_BI.multiply(ONE_GB_BI);
-
-    /**
-     * The number of bytes in a petabyte.
-     */
-    public static final long ONE_PB = ONE_KB * ONE_TB;
-
-    /**
-     * The number of bytes in a petabyte.
-     *
-     * @since 2.4
-     */
-    public static final BigInteger ONE_PB_BI = ONE_KB_BI.multiply(ONE_TB_BI);
-
-    /**
-     * The number of bytes in an exabyte.
-     */
-    public static final long ONE_EB = ONE_KB * ONE_PB;
-
-    /**
-     * The number of bytes in an exabyte.
-     *
-     * @since 2.4
-     */
-    public static final BigInteger ONE_EB_BI = ONE_KB_BI.multiply(ONE_PB_BI);
-
-    /**
-     * The number of bytes in a zettabyte.
-     */
-    public static final BigInteger ONE_ZB = BigInteger.valueOf(ONE_KB).multiply(BigInteger.valueOf(ONE_EB));
-
-    /**
-     * The number of bytes in a yottabyte.
-     */
-    public static final BigInteger ONE_YB = ONE_KB_BI.multiply(ONE_ZB);
-
-    /**
-     * An empty array of type <code>File</code>.
-     */
-    public static final File[] EMPTY_FILE_ARRAY = new File[0];
-
-    //-----------------------------------------------------------------------
-    /**
-     * Construct a file from the set of name elements.
-     *
-     * @param directory the parent directory
-     * @param names the name elements
-     * @return the file
-     * @since 2.1
-     */
-    public static File getFile(final File directory, final String... names) {
-        if (directory == null) {
-            throw new NullPointerException("directory must not be null");
-        }
-        if (names == null) {
-            throw new NullPointerException("names must not be null");
-        }
-        File file = directory;
-        for (final String name : names) {
-            file = new File(file, name);
-        }
-        return file;
-    }
-
-    /**
-     * Construct a file from the set of name elements.
-     *
-     * @param names the name elements
-     * @return the file
-     * @since 2.1
-     */
-    public static File getFile(final String... names) {
-        if (names == null) {
-            throw new NullPointerException("names must not be null");
-        }
-        File file = null;
-        for (final String name : names) {
-            if (file == null) {
-                file = new File(name);
-            } else {
-                file = new File(file, name);
-            }
-        }
-        return file;
-    }
-
-    /**
-     * Returns the path to the system temporary directory.
-     *
-     * @return the path to the system temporary directory.
-     *
-     * @since 2.0
-     */
-    public static String getTempDirectoryPath() {
-        return System.getProperty("java.io.tmpdir");
-    }
-
-    /**
-     * Returns a {@link File} representing the system temporary directory.
-     *
-     * @return the system temporary directory.
-     *
-     * @since 2.0
-     */
-    public static File getTempDirectory() {
-        return new File(getTempDirectoryPath());
-    }
-
-    /**
-     * Returns the path to the user's home directory.
-     *
-     * @return the path to the user's home directory.
-     *
-     * @since 2.0
-     */
-    public static String getUserDirectoryPath() {
-        return System.getProperty("user.home");
-    }
-
-    /**
-     * Returns a {@link File} representing the user's home directory.
-     *
-     * @return the user's home directory.
-     *
-     * @since 2.0
-     */
-    public static File getUserDirectory() {
-        return new File(getUserDirectoryPath());
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Opens a {@link FileInputStream} for the specified file, providing better
-     * error messages than simply calling <code>new FileInputStream(file)</code>.
-     * <p>
-     * At the end of the method either the stream will be successfully opened,
-     * or an exception will have been thrown.
-     * <p>
-     * An exception is thrown if the file does not exist.
-     * An exception is thrown if the file object exists but is a directory.
-     * An exception is thrown if the file exists but cannot be read.
-     *
-     * @param file the file to open for input, must not be {@code null}
-     * @return a new {@link FileInputStream} for the specified file
-     * @throws FileNotFoundException if the file does not exist
-     * @throws IOException           if the file object is a directory
-     * @throws IOException           if the file cannot be read
-     * @since 1.3
-     */
-    public static FileInputStream openInputStream(final File file) throws IOException {
-        if (file.exists()) {
-            if (file.isDirectory()) {
-                throw new IOException("File '" + file + "' exists but is a directory");
-            }
-            if (file.canRead() == false) {
-                throw new IOException("File '" + file + "' cannot be read");
-            }
-        } else {
-            throw new FileNotFoundException("File '" + file + "' does not exist");
-        }
-        return new FileInputStream(file);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Opens a {@link FileOutputStream} for the specified file, checking and
-     * creating the parent directory if it does not exist.
-     * <p>
-     * At the end of the method either the stream will be successfully opened,
-     * or an exception will have been thrown.
-     * <p>
-     * The parent directory will be created if it does not exist.
-     * The file will be created if it does not exist.
-     * An exception is thrown if the file object exists but is a directory.
-     * An exception is thrown if the file exists but cannot be written to.
-     * An exception is thrown if the parent directory cannot be created.
-     *
-     * @param file the file to open for output, must not be {@code null}
-     * @return a new {@link FileOutputStream} for the specified file
-     * @throws IOException if the file object is a directory
-     * @throws IOException if the file cannot be written to
-     * @throws IOException if a parent directory needs creating but that fails
-     * @since 1.3
-     */
-    public static FileOutputStream openOutputStream(final File file) throws IOException {
-        return openOutputStream(file, false);
-    }
-
-    /**
-     * Opens a {@link FileOutputStream} for the specified file, checking and
-     * creating the parent directory if it does not exist.
-     * <p>
-     * At the end of the method either the stream will be successfully opened,
-     * or an exception will have been thrown.
-     * <p>
-     * The parent directory will be created if it does not exist.
-     * The file will be created if it does not exist.
-     * An exception is thrown if the file object exists but is a directory.
-     * An exception is thrown if the file exists but cannot be written to.
-     * An exception is thrown if the parent directory cannot be created.
-     *
-     * @param file   the file to open for output, must not be {@code null}
-     * @param append if {@code true}, then bytes will be added to the
-     *               end of the file rather than overwriting
-     * @return a new {@link FileOutputStream} for the specified file
-     * @throws IOException if the file object is a directory
-     * @throws IOException if the file cannot be written to
-     * @throws IOException if a parent directory needs creating but that fails
-     * @since 2.1
-     */
-    public static FileOutputStream openOutputStream(final File file, final boolean append) throws IOException {
-        if (file.exists()) {
-            if (file.isDirectory()) {
-                throw new IOException("File '" + file + "' exists but is a directory");
-            }
-            if (file.canWrite() == false) {
-                throw new IOException("File '" + file + "' cannot be written to");
-            }
-        } else {
-            final File parent = file.getParentFile();
-            if (parent != null) {
-                if (!parent.mkdirs() && !parent.isDirectory()) {
-                    throw new IOException("Directory '" + parent + "' could not be created");
-                }
-            }
-        }
-        return new FileOutputStream(file, append);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns a human-readable version of the file size, where the input represents a specific number of bytes.
-     * <p>
-     * If the size is over 1GB, the size is returned as the number of whole GB, i.e. the size is rounded down to the
-     * nearest GB boundary.
-     * </p>
-     * <p>
-     * Similarly for the 1MB and 1KB boundaries.
-     * </p>
-     *
-     * @param size the number of bytes
-     * @return a human-readable display value (includes units - EB, PB, TB, GB, MB, KB or bytes)
-     * @see <a href="https://issues.apache.org/jira/browse/IO-226">IO-226 - should the rounding be changed?</a>
-     * @since 2.4
-     */
-    // See https://issues.apache.org/jira/browse/IO-226 - should the rounding be changed?
-    public static String byteCountToDisplaySize(final BigInteger size) {
-        String displaySize;
-
-        if (size.divide(ONE_EB_BI).compareTo(BigInteger.ZERO) > 0) {
-            displaySize = String.valueOf(size.divide(ONE_EB_BI)) + " EB";
-        } else if (size.divide(ONE_PB_BI).compareTo(BigInteger.ZERO) > 0) {
-            displaySize = String.valueOf(size.divide(ONE_PB_BI)) + " PB";
-        } else if (size.divide(ONE_TB_BI).compareTo(BigInteger.ZERO) > 0) {
-            displaySize = String.valueOf(size.divide(ONE_TB_BI)) + " TB";
-        } else if (size.divide(ONE_GB_BI).compareTo(BigInteger.ZERO) > 0) {
-            displaySize = String.valueOf(size.divide(ONE_GB_BI)) + " GB";
-        } else if (size.divide(ONE_MB_BI).compareTo(BigInteger.ZERO) > 0) {
-            displaySize = String.valueOf(size.divide(ONE_MB_BI)) + " MB";
-        } else if (size.divide(ONE_KB_BI).compareTo(BigInteger.ZERO) > 0) {
-            displaySize = String.valueOf(size.divide(ONE_KB_BI)) + " KB";
-        } else {
-            displaySize = String.valueOf(size) + " bytes";
-        }
-        return displaySize;
-    }
-
-    /**
-     * Returns a human-readable version of the file size, where the input represents a specific number of bytes.
-     * <p>
-     * If the size is over 1GB, the size is returned as the number of whole GB, i.e. the size is rounded down to the
-     * nearest GB boundary.
-     * </p>
-     * <p>
-     * Similarly for the 1MB and 1KB boundaries.
-     * </p>
-     *
-     * @param size the number of bytes
-     * @return a human-readable display value (includes units - EB, PB, TB, GB, MB, KB or bytes)
-     * @see <a href="https://issues.apache.org/jira/browse/IO-226">IO-226 - should the rounding be changed?</a>
-     */
-    // See https://issues.apache.org/jira/browse/IO-226 - should the rounding be changed?
-    public static String byteCountToDisplaySize(final long size) {
-        return byteCountToDisplaySize(BigInteger.valueOf(size));
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Implements the same behaviour as the "touch" utility on Unix. It creates
-     * a new file with size 0 or, if the file exists already, it is opened and
-     * closed without modifying it, but updating the file date and time.
-     * <p>
-     * NOTE: As from v1.3, this method throws an IOException if the last
-     * modified date of the file cannot be set. Also, as from v1.3 this method
-     * creates parent directories if they do not exist.
-     *
-     * @param file the File to touch
-     * @throws IOException If an I/O problem occurs
-     */
-    public static void touch(final File file) throws IOException {
-        if (!file.exists()) {
-            final OutputStream out = openOutputStream(file);
-            IOUtils.closeQuietly(out);
-        }
-        final boolean success = file.setLastModified(System.currentTimeMillis());
-        if (!success) {
-            throw new IOException("Unable to set the last modification time for " + file);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Converts a Collection containing java.io.File instanced into array
-     * representation. This is to account for the difference between
-     * File.listFiles() and FileUtils.listFiles().
-     *
-     * @param files a Collection containing java.io.File instances
-     * @return an array of java.io.File
-     */
-    public static File[] convertFileCollectionToFileArray(final Collection<File> files) {
-        return files.toArray(new File[files.size()]);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Finds files within a given directory (and optionally its
-     * subdirectories). All files found are filtered by an IOFileFilter.
-     *
-     * @param files                 the collection of files found.
-     * @param directory             the directory to search in.
-     * @param filter                the filter to apply to files and directories.
-     * @param includeSubDirectories indicates if will include the subdirectories themselves
-     */
-    private static void innerListFiles(final Collection<File> files, final File directory,
-                                       final IOFileFilter filter, final boolean includeSubDirectories) {
-        final File[] found = directory.listFiles((FileFilter) filter);
-
-        if (found != null) {
-            for (final File file : found) {
-                if (file.isDirectory()) {
-                    if (includeSubDirectories) {
-                        files.add(file);
-                    }
-                    innerListFiles(files, file, filter, includeSubDirectories);
-                } else {
-                    files.add(file);
-                }
-            }
-        }
-    }
-
-    /**
-     * Finds files within a given directory (and optionally its
-     * subdirectories). All files found are filtered by an IOFileFilter.
-     * <p>
-     * If your search should recurse into subdirectories you can pass in
-     * an IOFileFilter for directories. You don't need to bind a
-     * DirectoryFileFilter (via logical AND) to this filter. This method does
-     * that for you.
-     * <p>
-     * An example: If you want to search through all directories called
-     * "temp" you pass in <code>FileFilterUtils.NameFileFilter("temp")</code>
-     * <p>
-     * Another common usage of this method is find files in a directory
-     * tree but ignoring the directories generated CVS. You can simply pass
-     * in <code>FileFilterUtils.makeCVSAware(null)</code>.
-     *
-     * @param directory  the directory to search in
-     * @param fileFilter filter to apply when finding files.
-     * @param dirFilter  optional filter to apply when finding subdirectories.
-     *                   If this parameter is {@code null}, subdirectories will not be included in the
-     *                   search. Use TrueFileFilter.INSTANCE to match all directories.
-     * @return an collection of java.io.File with the matching files
-     * @see org.apache.commons.io.filefilter.FileFilterUtils
-     * @see org.apache.commons.io.filefilter.NameFileFilter
-     */
-    public static Collection<File> listFiles(
-            final File directory, final IOFileFilter fileFilter, final IOFileFilter dirFilter) {
-        validateListFilesParameters(directory, fileFilter);
-
-        final IOFileFilter effFileFilter = setUpEffectiveFileFilter(fileFilter);
-        final IOFileFilter effDirFilter = setUpEffectiveDirFilter(dirFilter);
-
-        //Find files
-        final Collection<File> files = new java.util.LinkedList<File>();
-        innerListFiles(files, directory,
-                FileFilterUtils.or(effFileFilter, effDirFilter), false);
-        return files;
-    }
-
-    /**
-     * Validates the given arguments.
-     * <ul>
-     * <li>Throws {@link IllegalArgumentException} if {@code directory} is not a directory</li>
-     * <li>Throws {@link NullPointerException} if {@code fileFilter} is null</li>
-     * </ul>
-     *
-     * @param directory  The File to test
-     * @param fileFilter The IOFileFilter to test
-     */
-    private static void validateListFilesParameters(final File directory, final IOFileFilter fileFilter) {
-        if (!directory.isDirectory()) {
-            throw new IllegalArgumentException("Parameter 'directory' is not a directory: " + directory);
-        }
-        if (fileFilter == null) {
-            throw new NullPointerException("Parameter 'fileFilter' is null");
-        }
-    }
-
-    /**
-     * Returns a filter that accepts files in addition to the {@link File} objects accepted by the given filter.
-     *
-     * @param fileFilter a base filter to add to
-     * @return a filter that accepts files
-     */
-    private static IOFileFilter setUpEffectiveFileFilter(final IOFileFilter fileFilter) {
-        return FileFilterUtils.and(fileFilter, FileFilterUtils.notFileFilter(DirectoryFileFilter.INSTANCE));
-    }
-
-    /**
-     * Returns a filter that accepts directories in addition to the {@link File} objects accepted by the given filter.
-     *
-     * @param dirFilter a base filter to add to
-     * @return a filter that accepts directories
-     */
-    private static IOFileFilter setUpEffectiveDirFilter(final IOFileFilter dirFilter) {
-        return dirFilter == null ? FalseFileFilter.INSTANCE : FileFilterUtils.and(dirFilter,
-                DirectoryFileFilter.INSTANCE);
-    }
-
-    /**
-     * Finds files within a given directory (and optionally its
-     * subdirectories). All files found are filtered by an IOFileFilter.
-     * <p>
-     * The resulting collection includes the starting directory and
-     * any subdirectories that match the directory filter.
-     * <p>
-     *
-     * @param directory  the directory to search in
-     * @param fileFilter filter to apply when finding files.
-     * @param dirFilter  optional filter to apply when finding subdirectories.
-     *                   If this parameter is {@code null}, subdirectories will not be included in the
-     *                   search. Use TrueFileFilter.INSTANCE to match all directories.
-     * @return an collection of java.io.File with the matching files
-     * @see org.apache.commons.io.FileUtils#listFiles
-     * @see org.apache.commons.io.filefilter.FileFilterUtils
-     * @see org.apache.commons.io.filefilter.NameFileFilter
-     * @since 2.2
-     */
-    public static Collection<File> listFilesAndDirs(
-            final File directory, final IOFileFilter fileFilter, final IOFileFilter dirFilter) {
-        validateListFilesParameters(directory, fileFilter);
-
-        final IOFileFilter effFileFilter = setUpEffectiveFileFilter(fileFilter);
-        final IOFileFilter effDirFilter = setUpEffectiveDirFilter(dirFilter);
-
-        //Find files
-        final Collection<File> files = new java.util.LinkedList<File>();
-        if (directory.isDirectory()) {
-            files.add(directory);
-        }
-        innerListFiles(files, directory,
-                FileFilterUtils.or(effFileFilter, effDirFilter), true);
-        return files;
-    }
-
-    /**
-     * Allows iteration over the files in given directory (and optionally
-     * its subdirectories).
-     * <p>
-     * All files found are filtered by an IOFileFilter. This method is
-     * based on {@link #listFiles(File, IOFileFilter, IOFileFilter)},
-     * which supports Iterable ('foreach' loop).
-     * <p>
-     * @param directory  the directory to search in
-     * @param fileFilter filter to apply when finding files.
-     * @param dirFilter  optional filter to apply when finding subdirectories.
-     *                   If this parameter is {@code null}, subdirectories will not be included in the
-     *                   search. Use TrueFileFilter.INSTANCE to match all directories.
-     * @return an iterator of java.io.File for the matching files
-     * @see org.apache.commons.io.filefilter.FileFilterUtils
-     * @see org.apache.commons.io.filefilter.NameFileFilter
-     * @since 1.2
-     */
-    public static Iterator<File> iterateFiles(
-            final File directory, final IOFileFilter fileFilter, final IOFileFilter dirFilter) {
-        return listFiles(directory, fileFilter, dirFilter).iterator();
-    }
-
-    /**
-     * Allows iteration over the files in given directory (and optionally
-     * its subdirectories).
-     * <p>
-     * All files found are filtered by an IOFileFilter. This method is
-     * based on {@link #listFilesAndDirs(File, IOFileFilter, IOFileFilter)},
-     * which supports Iterable ('foreach' loop).
-     * <p>
-     * The resulting iterator includes the subdirectories themselves.
-     *
-     * @param directory  the directory to search in
-     * @param fileFilter filter to apply when finding files.
-     * @param dirFilter  optional filter to apply when finding subdirectories.
-     *                   If this parameter is {@code null}, subdirectories will not be included in the
-     *                   search. Use TrueFileFilter.INSTANCE to match all directories.
-     * @return an iterator of java.io.File for the matching files
-     * @see org.apache.commons.io.filefilter.FileFilterUtils
-     * @see org.apache.commons.io.filefilter.NameFileFilter
-     * @since 2.2
-     */
-    public static Iterator<File> iterateFilesAndDirs(final File directory, final IOFileFilter fileFilter,
-                                                     final IOFileFilter dirFilter) {
-        return listFilesAndDirs(directory, fileFilter, dirFilter).iterator();
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Converts an array of file extensions to suffixes for use
-     * with IOFileFilters.
-     *
-     * @param extensions an array of extensions. Format: {"java", "xml"}
-     * @return an array of suffixes. Format: {".java", ".xml"}
-     */
-    private static String[] toSuffixes(final String[] extensions) {
-        final String[] suffixes = new String[extensions.length];
-        for (int i = 0; i < extensions.length; i++) {
-            suffixes[i] = "." + extensions[i];
-        }
-        return suffixes;
-    }
-
-
-    /**
-     * Finds files within a given directory (and optionally its subdirectories)
-     * which match an array of extensions.
-     *
-     * @param directory  the directory to search in
-     * @param extensions an array of extensions, ex. {"java","xml"}. If this
-     *                   parameter is {@code null}, all files are returned.
-     * @param recursive  if true all subdirectories are searched as well
-     * @return an collection of java.io.File with the matching files
-     */
-    public static Collection<File> listFiles(
-            final File directory, final String[] extensions, final boolean recursive) {
-        IOFileFilter filter;
-        if (extensions == null) {
-            filter = TrueFileFilter.INSTANCE;
-        } else {
-            final String[] suffixes = toSuffixes(extensions);
-            filter = new SuffixFileFilter(suffixes);
-        }
-        return listFiles(directory, filter,
-                recursive ? TrueFileFilter.INSTANCE : FalseFileFilter.INSTANCE);
-    }
-
-    /**
-     * Allows iteration over the files in a given directory (and optionally
-     * its subdirectories) which match an array of extensions. This method
-     * is based on {@link #listFiles(File, String[], boolean)},
-     * which supports Iterable ('foreach' loop).
-     *
-     * @param directory  the directory to search in
-     * @param extensions an array of extensions, ex. {"java","xml"}. If this
-     *                   parameter is {@code null}, all files are returned.
-     * @param recursive  if true all subdirectories are searched as well
-     * @return an iterator of java.io.File with the matching files
-     * @since 1.2
-     */
-    public static Iterator<File> iterateFiles(
-            final File directory, final String[] extensions, final boolean recursive) {
-        return listFiles(directory, extensions, recursive).iterator();
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Compares the contents of two files to determine if they are equal or not.
-     * <p>
-     * This method checks to see if the two files are different lengths
-     * or if they point to the same file, before resorting to byte-by-byte
-     * comparison of the contents.
-     * <p>
-     * Code origin: Avalon
-     *
-     * @param file1 the first file
-     * @param file2 the second file
-     * @return true if the content of the files are equal or they both don't
-     * exist, false otherwise
-     * @throws IOException in case of an I/O error
-     */
-    public static boolean contentEquals(final File file1, final File file2) throws IOException {
-        final boolean file1Exists = file1.exists();
-        if (file1Exists != file2.exists()) {
-            return false;
-        }
-
-        if (!file1Exists) {
-            // two not existing files are equal
-            return true;
-        }
-
-        if (file1.isDirectory() || file2.isDirectory()) {
-            // don't want to compare directory contents
-            throw new IOException("Can't compare directories, only files");
-        }
-
-        if (file1.length() != file2.length()) {
-            // lengths differ, cannot be equal
-            return false;
-        }
-
-        if (file1.getCanonicalFile().equals(file2.getCanonicalFile())) {
-            // same file
-            return true;
-        }
-
-        InputStream input1 = null;
-        InputStream input2 = null;
-        try {
-            input1 = new FileInputStream(file1);
-            input2 = new FileInputStream(file2);
-            return IOUtils.contentEquals(input1, input2);
-
-        } finally {
-            IOUtils.closeQuietly(input1);
-            IOUtils.closeQuietly(input2);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Compares the contents of two files to determine if they are equal or not.
-     * <p>
-     * This method checks to see if the two files point to the same file,
-     * before resorting to line-by-line comparison of the contents.
-     * <p>
-     *
-     * @param file1       the first file
-     * @param file2       the second file
-     * @param charsetName the character encoding to be used.
-     *                    May be null, in which case the platform default is used
-     * @return true if the content of the files are equal or neither exists,
-     * false otherwise
-     * @throws IOException in case of an I/O error
-     * @see IOUtils#contentEqualsIgnoreEOL(Reader, Reader)
-     * @since 2.2
-     */
-    public static boolean contentEqualsIgnoreEOL(final File file1, final File file2, final String charsetName)
-            throws IOException {
-        final boolean file1Exists = file1.exists();
-        if (file1Exists != file2.exists()) {
-            return false;
-        }
-
-        if (!file1Exists) {
-            // two not existing files are equal
-            return true;
-        }
-
-        if (file1.isDirectory() || file2.isDirectory()) {
-            // don't want to compare directory contents
-            throw new IOException("Can't compare directories, only files");
-        }
-
-        if (file1.getCanonicalFile().equals(file2.getCanonicalFile())) {
-            // same file
-            return true;
-        }
-
-        Reader input1 = null;
-        Reader input2 = null;
-        try {
-            if (charsetName == null) {
-                // N.B. make explicit the use of the default charset
-                input1 = new InputStreamReader(new FileInputStream(file1), Charset.defaultCharset());
-                input2 = new InputStreamReader(new FileInputStream(file2), Charset.defaultCharset());
-            } else {
-                input1 = new InputStreamReader(new FileInputStream(file1), charsetName);
-                input2 = new InputStreamReader(new FileInputStream(file2), charsetName);
-            }
-            return IOUtils.contentEqualsIgnoreEOL(input1, input2);
-
-        } finally {
-            IOUtils.closeQuietly(input1);
-            IOUtils.closeQuietly(input2);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Convert from a <code>URL</code> to a <code>File</code>.
-     * <p>
-     * From version 1.1 this method will decode the URL.
-     * Syntax such as <code>file:///my%20docs/file.txt</code> will be
-     * correctly decoded to <code>/my docs/file.txt</code>. Starting with version
-     * 1.5, this method uses UTF-8 to decode percent-encoded octets to characters.
-     * Additionally, malformed percent-encoded octets are handled leniently by
-     * passing them through literally.
-     *
-     * @param url the file URL to convert, {@code null} returns {@code null}
-     * @return the equivalent <code>File</code> object, or {@code null}
-     * if the URL's protocol is not <code>file</code>
-     */
-    public static File toFile(final URL url) {
-        if (url == null || !"file".equalsIgnoreCase(url.getProtocol())) {
-            return null;
-        } else {
-            String filename = url.getFile().replace('/', File.separatorChar);
-            filename = decodeUrl(filename);
-            return new File(filename);
-        }
-    }
-
-    /**
-     * Decodes the specified URL as per RFC 3986, i.e. transforms
-     * percent-encoded octets to characters by decoding with the UTF-8 character
-     * set. This function is primarily intended for usage with
-     * {@link java.net.URL} which unfortunately does not enforce proper URLs. As
-     * such, this method will leniently accept invalid characters or malformed
-     * percent-encoded octets and simply pass them literally through to the
-     * result string. Except for rare edge cases, this will make unencoded URLs
-     * pass through unaltered.
-     *
-     * @param url The URL to decode, may be {@code null}.
-     * @return The decoded URL or {@code null} if the input was
-     * {@code null}.
-     */
-    @SuppressWarnings("deprecation") // unavoidable until Java 7
-    static String decodeUrl(final String url) {
-        String decoded = url;
-        if (url != null && url.indexOf('%') >= 0) {
-            final int n = url.length();
-            final StringBuilder buffer = new StringBuilder();
-            final ByteBuffer bytes = ByteBuffer.allocate(n);
-            for (int i = 0; i < n; ) {
-                if (url.charAt(i) == '%') {
-                    try {
-                        do {
-                            final byte octet = (byte) Integer.parseInt(url.substring(i + 1, i + 3), 16);
-                            bytes.put(octet);
-                            i += 3;
-                        } while (i < n && url.charAt(i) == '%');
-                        continue;
-                    } catch (final RuntimeException e) {
-                        // malformed percent-encoded octet, fall through and
-                        // append characters literally
-                    } finally {
-                        if (bytes.position() > 0) {
-                            bytes.flip();
-                            buffer.append(Charsets.UTF_8.decode(bytes).toString());
-                            bytes.clear();
-                        }
-                    }
-                }
-                buffer.append(url.charAt(i++));
-            }
-            decoded = buffer.toString();
-        }
-        return decoded;
-    }
-
-    /**
-     * Converts each of an array of <code>URL</code> to a <code>File</code>.
-     * <p>
-     * Returns an array of the same size as the input.
-     * If the input is {@code null}, an empty array is returned.
-     * If the input contains {@code null}, the output array contains {@code null} at the same
-     * index.
-     * <p>
-     * This method will decode the URL.
-     * Syntax such as <code>file:///my%20docs/file.txt</code> will be
-     * correctly decoded to <code>/my docs/file.txt</code>.
-     *
-     * @param urls the file URLs to convert, {@code null} returns empty array
-     * @return a non-{@code null} array of Files matching the input, with a {@code null} item
-     * if there was a {@code null} at that index in the input array
-     * @throws IllegalArgumentException if any file is not a URL file
-     * @throws IllegalArgumentException if any file is incorrectly encoded
-     * @since 1.1
-     */
-    public static File[] toFiles(final URL[] urls) {
-        if (urls == null || urls.length == 0) {
-            return EMPTY_FILE_ARRAY;
-        }
-        final File[] files = new File[urls.length];
-        for (int i = 0; i < urls.length; i++) {
-            final URL url = urls[i];
-            if (url != null) {
-                if (url.getProtocol().equals("file") == false) {
-                    throw new IllegalArgumentException(
-                            "URL could not be converted to a File: " + url);
-                }
-                files[i] = toFile(url);
-            }
-        }
-        return files;
-    }
-
-    /**
-     * Converts each of an array of <code>File</code> to a <code>URL</code>.
-     * <p>
-     * Returns an array of the same size as the input.
-     *
-     * @param files the files to convert, must not be {@code null}
-     * @return an array of URLs matching the input
-     * @throws IOException          if a file cannot be converted
-     * @throws NullPointerException if the parameter is null
-     */
-    public static URL[] toURLs(final File[] files) throws IOException {
-        final URL[] urls = new URL[files.length];
-
-        for (int i = 0; i < urls.length; i++) {
-            urls[i] = files[i].toURI().toURL();
-        }
-
-        return urls;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Copies a file to a directory preserving the file date.
-     * <p>
-     * This method copies the contents of the specified source file
-     * to a file of the same name in the specified destination directory.
-     * The destination directory is created if it does not exist.
-     * If the destination file exists, then this method will overwrite it.
-     * <p>
-     * <strong>Note:</strong> This method tries to preserve the file's last
-     * modified date/times using {@link File#setLastModified(long)}, however
-     * it is not guaranteed that the operation will succeed.
-     * If the modification operation fails, no indication is provided.
-     *
-     * @param srcFile an existing file to copy, must not be {@code null}
-     * @param destDir the directory to place the copy in, must not be {@code null}
-     *
-     * @throws NullPointerException if source or destination is null
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs during copying
-     * @see #copyFile(File, File, boolean)
-     */
-    public static void copyFileToDirectory(final File srcFile, final File destDir) throws IOException {
-        copyFileToDirectory(srcFile, destDir, true);
-    }
-
-    /**
-     * Copies a file to a directory optionally preserving the file date.
-     * <p>
-     * This method copies the contents of the specified source file
-     * to a file of the same name in the specified destination directory.
-     * The destination directory is created if it does not exist.
-     * If the destination file exists, then this method will overwrite it.
-     * <p>
-     * <strong>Note:</strong> Setting <code>preserveFileDate</code> to
-     * {@code true} tries to preserve the file's last modified
-     * date/times using {@link File#setLastModified(long)}, however it is
-     * not guaranteed that the operation will succeed.
-     * If the modification operation fails, no indication is provided.
-     *
-     * @param srcFile          an existing file to copy, must not be {@code null}
-     * @param destDir          the directory to place the copy in, must not be {@code null}
-     * @param preserveFileDate true if the file date of the copy
-     *                         should be the same as the original
-     *
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs during copying
-     * @throws IOException          if the output file length is not the same as the input file length after the copy
-     * completes
-     * @see #copyFile(File, File, boolean)
-     * @since 1.3
-     */
-    public static void copyFileToDirectory(final File srcFile, final File destDir, final boolean preserveFileDate)
-            throws IOException {
-        if (destDir == null) {
-            throw new NullPointerException("Destination must not be null");
-        }
-        if (destDir.exists() && destDir.isDirectory() == false) {
-            throw new IllegalArgumentException("Destination '" + destDir + "' is not a directory");
-        }
-        final File destFile = new File(destDir, srcFile.getName());
-        copyFile(srcFile, destFile, preserveFileDate);
-    }
-
-    /**
-     * Copies a file to a new location preserving the file date.
-     * <p>
-     * This method copies the contents of the specified source file to the
-     * specified destination file. The directory holding the destination file is
-     * created if it does not exist. If the destination file exists, then this
-     * method will overwrite it.
-     * <p>
-     * <strong>Note:</strong> This method tries to preserve the file's last
-     * modified date/times using {@link File#setLastModified(long)}, however
-     * it is not guaranteed that the operation will succeed.
-     * If the modification operation fails, no indication is provided.
-     *
-     * @param srcFile  an existing file to copy, must not be {@code null}
-     * @param destFile the new file, must not be {@code null}
-     *
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs during copying
-     * @throws IOException          if the output file length is not the same as the input file length after the copy
-     * completes
-     * @see #copyFileToDirectory(File, File)
-     * @see #copyFile(File, File, boolean)
-     */
-    public static void copyFile(final File srcFile, final File destFile) throws IOException {
-        copyFile(srcFile, destFile, true);
-    }
-
-    /**
-     * Copies a file to a new location.
-     * <p>
-     * This method copies the contents of the specified source file
-     * to the specified destination file.
-     * The directory holding the destination file is created if it does not exist.
-     * If the destination file exists, then this method will overwrite it.
-     * <p>
-     * <strong>Note:</strong> Setting <code>preserveFileDate</code> to
-     * {@code true} tries to preserve the file's last modified
-     * date/times using {@link File#setLastModified(long)}, however it is
-     * not guaranteed that the operation will succeed.
-     * If the modification operation fails, no indication is provided.
-     *
-     * @param srcFile          an existing file to copy, must not be {@code null}
-     * @param destFile         the new file, must not be {@code null}
-     * @param preserveFileDate true if the file date of the copy
-     *                         should be the same as the original
-     *
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs during copying
-     * @throws IOException          if the output file length is not the same as the input file length after the copy
-     * completes
-     * @see #copyFileToDirectory(File, File, boolean)
-     * @see #doCopyFile(File, File, boolean)
-     */
-    public static void copyFile(final File srcFile, final File destFile,
-                                final boolean preserveFileDate) throws IOException {
-        checkFileRequirements(srcFile, destFile);
-        if (srcFile.isDirectory()) {
-            throw new IOException("Source '" + srcFile + "' exists but is a directory");
-        }
-        if (srcFile.getCanonicalPath().equals(destFile.getCanonicalPath())) {
-            throw new IOException("Source '" + srcFile + "' and destination '" + destFile + "' are the same");
-        }
-        final File parentFile = destFile.getParentFile();
-        if (parentFile != null) {
-            if (!parentFile.mkdirs() && !parentFile.isDirectory()) {
-                throw new IOException("Destination '" + parentFile + "' directory cannot be created");
-            }
-        }
-        if (destFile.exists() && destFile.canWrite() == false) {
-            throw new IOException("Destination '" + destFile + "' exists but is read-only");
-        }
-        doCopyFile(srcFile, destFile, preserveFileDate);
-    }
-
-    /**
-     * Copy bytes from a <code>File</code> to an <code>OutputStream</code>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
-     * </p>
-     *
-     * @param input  the <code>File</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @return the number of bytes copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.1
-     */
-    public static long copyFile(final File input, final OutputStream output) throws IOException {
-        final FileInputStream fis = new FileInputStream(input);
-        try {
-            return IOUtils.copyLarge(fis, output);
-        } finally {
-            fis.close();
-        }
-    }
-
-    /**
-     * Internal copy file method.
-     * This caches the original file length, and throws an IOException
-     * if the output file length is different from the current input file length.
-     * So it may fail if the file changes size.
-     * It may also fail with "IllegalArgumentException: Negative size" if the input file is truncated part way
-     * through copying the data and the new file size is less than the current position.
-     *
-     * @param srcFile          the validated source file, must not be {@code null}
-     * @param destFile         the validated destination file, must not be {@code null}
-     * @param preserveFileDate whether to preserve the file date
-     * @throws IOException              if an error occurs
-     * @throws IOException              if the output file length is not the same as the input file length after the
-     * copy completes
-     * @throws IllegalArgumentException "Negative size" if the file is truncated so that the size is less than the
-     * position
-     */
-    private static void doCopyFile(final File srcFile, final File destFile, final boolean preserveFileDate)
-            throws IOException {
-        if (destFile.exists() && destFile.isDirectory()) {
-            throw new IOException("Destination '" + destFile + "' exists but is a directory");
-        }
-
-        FileInputStream fis = null;
-        FileOutputStream fos = null;
-        FileChannel input = null;
-        FileChannel output = null;
-        try {
-            fis = new FileInputStream(srcFile);
-            fos = new FileOutputStream(destFile);
-            input = fis.getChannel();
-            output = fos.getChannel();
-            final long size = input.size(); // TODO See IO-386
-            long pos = 0;
-            long count = 0;
-            while (pos < size) {
-                final long remain = size - pos;
-                count = remain > FILE_COPY_BUFFER_SIZE ? FILE_COPY_BUFFER_SIZE : remain;
-                final long bytesCopied = output.transferFrom(input, pos, count);
-                if (bytesCopied == 0) { // IO-385 - can happen if file is truncated after caching the size
-                    break; // ensure we don't loop forever
-                }
-                pos += bytesCopied;
-            }
-        } finally {
-            IOUtils.closeQuietly(output, fos, input, fis);
-        }
-
-        final long srcLen = srcFile.length(); // TODO See IO-386
-        final long dstLen = destFile.length(); // TODO See IO-386
-        if (srcLen != dstLen) {
-            throw new IOException("Failed to copy full contents from '" +
-                    srcFile + "' to '" + destFile + "' Expected length: " + srcLen + " Actual: " + dstLen);
-        }
-        if (preserveFileDate) {
-            destFile.setLastModified(srcFile.lastModified());
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Copies a directory to within another directory preserving the file dates.
-     * <p>
-     * This method copies the source directory and all its contents to a
-     * directory of the same name in the specified destination directory.
-     * <p>
-     * The destination directory is created if it does not exist.
-     * If the destination directory did exist, then this method merges
-     * the source with the destination, with the source taking precedence.
-     * <p>
-     * <strong>Note:</strong> This method tries to preserve the files' last
-     * modified date/times using {@link File#setLastModified(long)}, however
-     * it is not guaranteed that those operations will succeed.
-     * If the modification operation fails, no indication is provided.
-     *
-     * @param srcDir  an existing directory to copy, must not be {@code null}
-     * @param destDir the directory to place the copy in, must not be {@code null}
-     *
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs during copying
-     * @since 1.2
-     */
-    public static void copyDirectoryToDirectory(final File srcDir, final File destDir) throws IOException {
-        if (srcDir == null) {
-            throw new NullPointerException("Source must not be null");
-        }
-        if (srcDir.exists() && srcDir.isDirectory() == false) {
-            throw new IllegalArgumentException("Source '" + destDir + "' is not a directory");
-        }
-        if (destDir == null) {
-            throw new NullPointerException("Destination must not be null");
-        }
-        if (destDir.exists() && destDir.isDirectory() == false) {
-            throw new IllegalArgumentException("Destination '" + destDir + "' is not a directory");
-        }
-        copyDirectory(srcDir, new File(destDir, srcDir.getName()), true);
-    }
-
-    /**
-     * Copies a whole directory to a new location preserving the file dates.
-     * <p>
-     * This method copies the specified directory and all its child
-     * directories and files to the specified destination.
-     * The destination is the new location and name of the directory.
-     * <p>
-     * The destination directory is created if it does not exist.
-     * If the destination directory did exist, then this method merges
-     * the source with the destination, with the source taking precedence.
-     * <p>
-     * <strong>Note:</strong> This method tries to preserve the files' last
-     * modified date/times using {@link File#setLastModified(long)}, however
-     * it is not guaranteed that those operations will succeed.
-     * If the modification operation fails, no indication is provided.
-     *
-     * @param srcDir  an existing directory to copy, must not be {@code null}
-     * @param destDir the new directory, must not be {@code null}
-     *
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs during copying
-     * @since 1.1
-     */
-    public static void copyDirectory(final File srcDir, final File destDir) throws IOException {
-        copyDirectory(srcDir, destDir, true);
-    }
-
-    /**
-     * Copies a whole directory to a new location.
-     * <p>
-     * This method copies the contents of the specified source directory
-     * to within the specified destination directory.
-     * <p>
-     * The destination directory is created if it does not exist.
-     * If the destination directory did exist, then this method merges
-     * the source with the destination, with the source taking precedence.
-     * <p>
-     * <strong>Note:</strong> Setting <code>preserveFileDate</code> to
-     * {@code true} tries to preserve the files' last modified
-     * date/times using {@link File#setLastModified(long)}, however it is
-     * not guaranteed that those operations will succeed.
-     * If the modification operation fails, no indication is provided.
-     *
-     * @param srcDir           an existing directory to copy, must not be {@code null}
-     * @param destDir          the new directory, must not be {@code null}
-     * @param preserveFileDate true if the file date of the copy
-     *                         should be the same as the original
-     *
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs during copying
-     * @since 1.1
-     */
-    public static void copyDirectory(final File srcDir, final File destDir,
-                                     final boolean preserveFileDate) throws IOException {
-        copyDirectory(srcDir, destDir, null, preserveFileDate);
-    }
-
-    /**
-     * Copies a filtered directory to a new location preserving the file dates.
-     * <p>
-     * This method copies the contents of the specified source directory
-     * to within the specified destination directory.
-     * <p>
-     * The destination directory is created if it does not exist.
-     * If the destination directory did exist, then this method merges
-     * the source with the destination, with the source taking precedence.
-     * <p>
-     * <strong>Note:</strong> This method tries to preserve the files' last
-     * modified date/times using {@link File#setLastModified(long)}, however
-     * it is not guaranteed that those operations will succeed.
-     * If the modification operation fails, no indication is provided.
-     * </p>
-     * <h3>Example: Copy directories only</h3>
-     * <pre>
-     *  // only copy the directory structure
-     *  FileUtils.copyDirectory(srcDir, destDir, DirectoryFileFilter.DIRECTORY);
-     *  </pre>
-     *
-     * <h3>Example: Copy directories and txt files</h3>
-     * <pre>
-     *  // Create a filter for ".txt" files
-     *  IOFileFilter txtSuffixFilter = FileFilterUtils.suffixFileFilter(".txt");
-     *  IOFileFilter txtFiles = FileFilterUtils.andFileFilter(FileFileFilter.FILE, txtSuffixFilter);
-     *
-     *  // Create a filter for either directories or ".txt" files
-     *  FileFilter filter = FileFilterUtils.orFileFilter(DirectoryFileFilter.DIRECTORY, txtFiles);
-     *
-     *  // Copy using the filter
-     *  FileUtils.copyDirectory(srcDir, destDir, filter);
-     *  </pre>
-     *
-     * @param srcDir  an existing directory to copy, must not be {@code null}
-     * @param destDir the new directory, must not be {@code null}
-     * @param filter  the filter to apply, null means copy all directories and files
-     *                should be the same as the original
-     *
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs during copying
-     * @since 1.4
-     */
-    public static void copyDirectory(final File srcDir, final File destDir,
-                                     final FileFilter filter) throws IOException {
-        copyDirectory(srcDir, destDir, filter, true);
-    }
-
-    /**
-     * Copies a filtered directory to a new location.
-     * <p>
-     * This method copies the contents of the specified source directory
-     * to within the specified destination directory.
-     * <p>
-     * The destination directory is created if it does not exist.
-     * If the destination directory did exist, then this method merges
-     * the source with the destination, with the source taking precedence.
-     * <p>
-     * <strong>Note:</strong> Setting <code>preserveFileDate</code> to
-     * {@code true} tries to preserve the files' last modified
-     * date/times using {@link File#setLastModified(long)}, however it is
-     * not guaranteed that those operations will succeed.
-     * If the modification operation fails, no indication is provided.
-     * </p>
-     * <h3>Example: Copy directories only</h3>
-     * <pre>
-     *  // only copy the directory structure
-     *  FileUtils.copyDirectory(srcDir, destDir, DirectoryFileFilter.DIRECTORY, false);
-     *  </pre>
-     *
-     * <h3>Example: Copy directories and txt files</h3>
-     * <pre>
-     *  // Create a filter for ".txt" files
-     *  IOFileFilter txtSuffixFilter = FileFilterUtils.suffixFileFilter(".txt");
-     *  IOFileFilter txtFiles = FileFilterUtils.andFileFilter(FileFileFilter.FILE, txtSuffixFilter);
-     *
-     *  // Create a filter for either directories or ".txt" files
-     *  FileFilter filter = FileFilterUtils.orFileFilter(DirectoryFileFilter.DIRECTORY, txtFiles);
-     *
-     *  // Copy using the filter
-     *  FileUtils.copyDirectory(srcDir, destDir, filter, false);
-     *  </pre>
-     *
-     * @param srcDir           an existing directory to copy, must not be {@code null}
-     * @param destDir          the new directory, must not be {@code null}
-     * @param filter           the filter to apply, null means copy all directories and files
-     * @param preserveFileDate true if the file date of the copy
-     *                         should be the same as the original
-     *
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs during copying
-     * @since 1.4
-     */
-    public static void copyDirectory(final File srcDir, final File destDir,
-                                     final FileFilter filter, final boolean preserveFileDate) throws IOException {
-        checkFileRequirements(srcDir, destDir);
-        if (!srcDir.isDirectory()) {
-            throw new IOException("Source '" + srcDir + "' exists but is not a directory");
-        }
-        if (srcDir.getCanonicalPath().equals(destDir.getCanonicalPath())) {
-            throw new IOException("Source '" + srcDir + "' and destination '" + destDir + "' are the same");
-        }
-
-        // Cater for destination being directory within the source directory (see IO-141)
-        List<String> exclusionList = null;
-        if (destDir.getCanonicalPath().startsWith(srcDir.getCanonicalPath())) {
-            final File[] srcFiles = filter == null ? srcDir.listFiles() : srcDir.listFiles(filter);
-            if (srcFiles != null && srcFiles.length > 0) {
-                exclusionList = new ArrayList<String>(srcFiles.length);
-                for (final File srcFile : srcFiles) {
-                    final File copiedFile = new File(destDir, srcFile.getName());
-                    exclusionList.add(copiedFile.getCanonicalPath());
-                }
-            }
-        }
-        doCopyDirectory(srcDir, destDir, filter, preserveFileDate, exclusionList);
-    }
-
-    /**
-     * checks requirements for file copy
-     * @param src the source file
-     * @param dest the destination
-     * @throws FileNotFoundException if the destination does not exist
-     */
-    private static void checkFileRequirements(File src, File dest) throws FileNotFoundException {
-        if (src == null) {
-            throw new NullPointerException("Source must not be null");
-        }
-        if (dest == null) {
-            throw new NullPointerException("Destination must not be null");
-        }
-        if (!src.exists()) {
-            throw new FileNotFoundException("Source '" + src + "' does not exist");
-        }
-    }
-
-    /**
-     * Internal copy directory method.
-     *
-     * @param srcDir           the validated source directory, must not be {@code null}
-     * @param destDir          the validated destination directory, must not be {@code null}
-     * @param filter           the filter to apply, null means copy all directories and files
-     * @param preserveFileDate whether to preserve the file date
-     * @param exclusionList    List of files and directories to exclude from the copy, may be null
-     * @throws IOException if an error occurs
-     * @since 1.1
-     */
-    private static void doCopyDirectory(final File srcDir, final File destDir, final FileFilter filter,
-                                        final boolean preserveFileDate, final List<String> exclusionList)
-            throws IOException {
-        // recurse
-        final File[] srcFiles = filter == null ? srcDir.listFiles() : srcDir.listFiles(filter);
-        if (srcFiles == null) {  // null if abstract pathname does not denote a directory, or if an I/O error occurs
-            throw new IOException("Failed to list contents of " + srcDir);
-        }
-        if (destDir.exists()) {
-            if (destDir.isDirectory() == false) {
-                throw new IOException("Destination '" + destDir + "' exists but is not a directory");
-            }
-        } else {
-            if (!destDir.mkdirs() && !destDir.isDirectory()) {
-                throw new IOException("Destination '" + destDir + "' directory cannot be created");
-            }
-        }
-        if (destDir.canWrite() == false) {
-            throw new IOException("Destination '" + destDir + "' cannot be written to");
-        }
-        for (final File srcFile : srcFiles) {
-            final File dstFile = new File(destDir, srcFile.getName());
-            if (exclusionList == null || !exclusionList.contains(srcFile.getCanonicalPath())) {
-                if (srcFile.isDirectory()) {
-                    doCopyDirectory(srcFile, dstFile, filter, preserveFileDate, exclusionList);
-                } else {
-                    doCopyFile(srcFile, dstFile, preserveFileDate);
-                }
-            }
-        }
-
-        // Do this last, as the above has probably affected directory metadata
-        if (preserveFileDate) {
-            destDir.setLastModified(srcDir.lastModified());
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Copies bytes from the URL <code>source</code> to a file
-     * <code>destination</code>. The directories up to <code>destination</code>
-     * will be created if they don't already exist. <code>destination</code>
-     * will be overwritten if it already exists.
-     * <p>
-     * Warning: this method does not set a connection or read timeout and thus
-     * might block forever. Use {@link #copyURLToFile(URL, File, int, int)}
-     * with reasonable timeouts to prevent this.
-     *
-     * @param source      the <code>URL</code> to copy bytes from, must not be {@code null}
-     * @param destination the non-directory <code>File</code> to write bytes to
-     *                    (possibly overwriting), must not be {@code null}
-     * @throws IOException if <code>source</code> URL cannot be opened
-     * @throws IOException if <code>destination</code> is a directory
-     * @throws IOException if <code>destination</code> cannot be written
-     * @throws IOException if <code>destination</code> needs creating but can't be
-     * @throws IOException if an IO error occurs during copying
-     */
-    public static void copyURLToFile(final URL source, final File destination) throws IOException {
-        copyInputStreamToFile(source.openStream(), destination);
-    }
-
-    /**
-     * Copies bytes from the URL <code>source</code> to a file
-     * <code>destination</code>. The directories up to <code>destination</code>
-     * will be created if they don't already exist. <code>destination</code>
-     * will be overwritten if it already exists.
-     *
-     * @param source            the <code>URL</code> to copy bytes from, must not be {@code null}
-     * @param destination       the non-directory <code>File</code> to write bytes to
-     *                          (possibly overwriting), must not be {@code null}
-     * @param connectionTimeout the number of milliseconds until this method
-     *                          will timeout if no connection could be established to the <code>source</code>
-     * @param readTimeout       the number of milliseconds until this method will
-     *                          timeout if no data could be read from the <code>source</code>
-     * @throws IOException if <code>source</code> URL cannot be opened
-     * @throws IOException if <code>destination</code> is a directory
-     * @throws IOException if <code>destination</code> cannot be written
-     * @throws IOException if <code>destination</code> needs creating but can't be
-     * @throws IOException if an IO error occurs during copying
-     * @since 2.0
-     */
-    public static void copyURLToFile(final URL source, final File destination,
-                                     final int connectionTimeout, final int readTimeout) throws IOException {
-        final URLConnection connection = source.openConnection();
-        connection.setConnectTimeout(connectionTimeout);
-        connection.setReadTimeout(readTimeout);
-        copyInputStreamToFile(connection.getInputStream(), destination);
-    }
-
-    /**
-     * Copies bytes from an {@link InputStream} <code>source</code> to a file
-     * <code>destination</code>. The directories up to <code>destination</code>
-     * will be created if they don't already exist. <code>destination</code>
-     * will be overwritten if it already exists.
-     * The {@code source} stream is closed.
-     * See {@link #copyToFile(InputStream, File)} for a method that does not close the input stream.
-     *
-     * @param source      the <code>InputStream</code> to copy bytes from, must not be {@code null}, will be closed
-     * @param destination the non-directory <code>File</code> to write bytes to
-     *                    (possibly overwriting), must not be {@code null}
-     * @throws IOException if <code>destination</code> is a directory
-     * @throws IOException if <code>destination</code> cannot be written
-     * @throws IOException if <code>destination</code> needs creating but can't be
-     * @throws IOException if an IO error occurs during copying
-     * @since 2.0
-     */
-    public static void copyInputStreamToFile(final InputStream source, final File destination) throws IOException {
-        try {
-            copyToFile(source, destination);
-        } finally {
-            IOUtils.closeQuietly(source);
-        }
-    }
-
-    /**
-     * Copies bytes from an {@link InputStream} <code>source</code> to a file
-     * <code>destination</code>. The directories up to <code>destination</code>
-     * will be created if they don't already exist. <code>destination</code>
-     * will be overwritten if it already exists.
-     * The {@code source} stream is left open, e.g. for use with {@link java.util.zip.ZipInputStream ZipInputStream}.
-     * See {@link #copyInputStreamToFile(InputStream, File)} for a method that closes the input stream.
-     *
-     * @param source      the <code>InputStream</code> to copy bytes from, must not be {@code null}
-     * @param destination the non-directory <code>File</code> to write bytes to
-     *                    (possibly overwriting), must not be {@code null}
-     * @throws IOException if <code>destination</code> is a directory
-     * @throws IOException if <code>destination</code> cannot be written
-     * @throws IOException if <code>destination</code> needs creating but can't be
-     * @throws IOException if an IO error occurs during copying
-     * @since 2.5
-     */
-    public static void copyToFile(final InputStream source, final File destination) throws IOException {
-        final FileOutputStream output = openOutputStream(destination);
-        try {
-            IOUtils.copy(source, output);
-            output.close(); // don't swallow close Exception if copy completes normally
-        } finally {
-            IOUtils.closeQuietly(output);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Deletes a directory recursively.
-     *
-     * @param directory directory to delete
-     * @throws IOException              in case deletion is unsuccessful
-     * @throws IllegalArgumentException if {@code directory} does not exist or is not a directory
-     */
-    public static void deleteDirectory(final File directory) throws IOException {
-        if (!directory.exists()) {
-            return;
-        }
-
-        if (!isSymlink(directory)) {
-            cleanDirectory(directory);
-        }
-
-        if (!directory.delete()) {
-            final String message =
-                    "Unable to delete directory " + directory + ".";
-            throw new IOException(message);
-        }
-    }
-
-    /**
-     * Deletes a file, never throwing an exception. If file is a directory, delete it and all sub-directories.
-     * <p>
-     * The difference between File.delete() and this method are:
-     * <ul>
-     * <li>A directory to be deleted does not have to be empty.</li>
-     * <li>No exceptions are thrown when a file or directory cannot be deleted.</li>
-     * </ul>
-     *
-     * @param file file or directory to delete, can be {@code null}
-     * @return {@code true} if the file or directory was deleted, otherwise
-     * {@code false}
-     *
-     * @since 1.4
-     */
-    public static boolean deleteQuietly(final File file) {
-        if (file == null) {
-            return false;
-        }
-        try {
-            if (file.isDirectory()) {
-                cleanDirectory(file);
-            }
-        } catch (final Exception ignored) {
-        }
-
-        try {
-            return file.delete();
-        } catch (final Exception ignored) {
-            return false;
-        }
-    }
-
-    /**
-     * Determines whether the {@code parent} directory contains the {@code child} element (a file or directory).
-     * <p>
-     * Files are normalized before comparison.
-     * </p>
-     *
-     * Edge cases:
-     * <ul>
-     * <li>A {@code directory} must not be null: if null, throw IllegalArgumentException</li>
-     * <li>A {@code directory} must be a directory: if not a directory, throw IllegalArgumentException</li>
-     * <li>A directory does not contain itself: return false</li>
-     * <li>A null child file is not contained in any parent: return false</li>
-     * </ul>
-     *
-     * @param directory the file to consider as the parent.
-     * @param child     the file to consider as the child.
-     * @return true is the candidate leaf is under by the specified composite. False otherwise.
-     * @throws IOException              if an IO error occurs while checking the files.
-     * @throws IllegalArgumentException if {@code directory} is null or not a directory.
-     * @see FilenameUtils#directoryContains(String, String)
-     * @since 2.2
-     */
-    public static boolean directoryContains(final File directory, final File child) throws IOException {
-
-        // Fail fast against NullPointerException
-        if (directory == null) {
-            throw new IllegalArgumentException("Directory must not be null");
-        }
-
-        if (!directory.isDirectory()) {
-            throw new IllegalArgumentException("Not a directory: " + directory);
-        }
-
-        if (child == null) {
-            return false;
-        }
-
-        if (!directory.exists() || !child.exists()) {
-            return false;
-        }
-
-        // Canonicalize paths (normalizes relative paths)
-        final String canonicalParent = directory.getCanonicalPath();
-        final String canonicalChild = child.getCanonicalPath();
-
-        return FilenameUtils.directoryContains(canonicalParent, canonicalChild);
-    }
-
-    /**
-     * Cleans a directory without deleting it.
-     *
-     * @param directory directory to clean
-     * @throws IOException              in case cleaning is unsuccessful
-     * @throws IllegalArgumentException if {@code directory} does not exist or is not a directory
-     */
-    public static void cleanDirectory(final File directory) throws IOException {
-        final File[] files = verifiedListFiles(directory);
-
-        IOException exception = null;
-        for (final File file : files) {
-            try {
-                forceDelete(file);
-            } catch (final IOException ioe) {
-                exception = ioe;
-            }
-        }
-
-        if (null != exception) {
-            throw exception;
-        }
-    }
-
-    /**
-     * Lists files in a directory, asserting that the supplied directory satisfies exists and is a directory
-     * @param directory The directory to list
-     * @return The files in the directory, never null.
-     * @throws IOException if an I/O error occurs
-     */
-    private static File[] verifiedListFiles(File directory) throws IOException {
-        if (!directory.exists()) {
-            final String message = directory + " does not exist";
-            throw new IllegalArgumentException(message);
-        }
-
-        if (!directory.isDirectory()) {
-            final String message = directory + " is not a directory";
-            throw new IllegalArgumentException(message);
-        }
-
-        final File[] files = directory.listFiles();
-        if (files == null) {  // null if security restricted
-            throw new IOException("Failed to list contents of " + directory);
-        }
-        return files;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Waits for NFS to propagate a file creation, imposing a timeout.
-     * <p>
-     * This method repeatedly tests {@link File#exists()} until it returns
-     * true up to the maximum time specified in seconds.
-     *
-     * @param file    the file to check, must not be {@code null}
-     * @param seconds the maximum time in seconds to wait
-     * @return true if file exists
-     * @throws NullPointerException if the file is {@code null}
-     */
-    public static boolean waitFor(final File file, final int seconds) {
-        long finishAt = System.currentTimeMillis() + (seconds * 1000);
-        boolean wasInterrupted = false;
-        try {
-            while (!file.exists()) {
-                long remaining = finishAt -  System.currentTimeMillis();
-                if (remaining < 0){
-                    return false;
-                }
-                try {
-                    Thread.sleep(Math.min(100, remaining));
-                } catch (final InterruptedException ignore) {
-                    wasInterrupted = true;
-                } catch (final Exception ex) {
-                    break;
-                }
-            }
-        } finally {
-            if (wasInterrupted) {
-                Thread.currentThread().interrupt();
-            }
-        }
-        return true;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Reads the contents of a file into a String.
-     * The file is always closed.
-     *
-     * @param file     the file to read, must not be {@code null}
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @return the file contents, never {@code null}
-     * @throws IOException in case of an I/O error
-     * @since 2.3
-     */
-    public static String readFileToString(final File file, final Charset encoding) throws IOException {
-        InputStream in = null;
-        try {
-            in = openInputStream(file);
-            return IOUtils.toString(in, Charsets.toCharset(encoding));
-        } finally {
-            IOUtils.closeQuietly(in);
-        }
-    }
-
-    /**
-     * Reads the contents of a file into a String. The file is always closed.
-     *
-     * @param file     the file to read, must not be {@code null}
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @return the file contents, never {@code null}
-     * @throws IOException                 in case of an I/O error
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     * .UnsupportedEncodingException} in version 2.2 if the encoding is not supported.
-     * @since 2.3
-     */
-    public static String readFileToString(final File file, final String encoding) throws IOException {
-        return readFileToString(file, Charsets.toCharset(encoding));
-    }
-
-
-    /**
-     * Reads the contents of a file into a String using the default encoding for the VM.
-     * The file is always closed.
-     *
-     * @param file the file to read, must not be {@code null}
-     * @return the file contents, never {@code null}
-     * @throws IOException in case of an I/O error
-     * @since 1.3.1
-     * @deprecated 2.5 use {@link #readFileToString(File, Charset)} instead
-     */
-    @Deprecated
-    public static String readFileToString(final File file) throws IOException {
-        return readFileToString(file, Charset.defaultCharset());
-    }
-
-    /**
-     * Reads the contents of a file into a byte array.
-     * The file is always closed.
-     *
-     * @param file the file to read, must not be {@code null}
-     * @return the file contents, never {@code null}
-     * @throws IOException in case of an I/O error
-     * @since 1.1
-     */
-    public static byte[] readFileToByteArray(final File file) throws IOException {
-        InputStream in = null;
-        try {
-            in = openInputStream(file);
-            return IOUtils.toByteArray(in); // Do NOT use file.length() - see IO-453
-        } finally {
-            IOUtils.closeQuietly(in);
-        }
-    }
-
-    /**
-     * Reads the contents of a file line by line to a List of Strings.
-     * The file is always closed.
-     *
-     * @param file     the file to read, must not be {@code null}
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @return the list of Strings representing each line in the file, never {@code null}
-     * @throws IOException in case of an I/O error
-     * @since 2.3
-     */
-    public static List<String> readLines(final File file, final Charset encoding) throws IOException {
-        InputStream in = null;
-        try {
-            in = openInputStream(file);
-            return IOUtils.readLines(in, Charsets.toCharset(encoding));
-        } finally {
-            IOUtils.closeQuietly(in);
-        }
-    }
-
-    /**
-     * Reads the contents of a file line by line to a List of Strings. The file is always closed.
-     *
-     * @param file     the file to read, must not be {@code null}
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @return the list of Strings representing each line in the file, never {@code null}
-     * @throws IOException                 in case of an I/O error
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     * .UnsupportedEncodingException} in version 2.2 if the encoding is not supported.
-     * @since 1.1
-     */
-    public static List<String> readLines(final File file, final String encoding) throws IOException {
-        return readLines(file, Charsets.toCharset(encoding));
-    }
-
-    /**
-     * Reads the contents of a file line by line to a List of Strings using the default encoding for the VM.
-     * The file is always closed.
-     *
-     * @param file the file to read, must not be {@code null}
-     * @return the list of Strings representing each line in the file, never {@code null}
-     * @throws IOException in case of an I/O error
-     * @since 1.3
-     * @deprecated 2.5 use {@link #readLines(File, Charset)} instead
-     */
-    @Deprecated
-    public static List<String> readLines(final File file) throws IOException {
-        return readLines(file, Charset.defaultCharset());
-    }
-
-    /**
-     * Returns an Iterator for the lines in a <code>File</code>.
-     * <p>
-     * This method opens an <code>InputStream</code> for the file.
-     * When you have finished with the iterator you should close the stream
-     * to free internal resources. This can be done by calling the
-     * {@link LineIterator#close()} or
-     * {@link LineIterator#closeQuietly(LineIterator)} method.
-     * <p>
-     * The recommended usage pattern is:
-     * <pre>
-     * LineIterator it = FileUtils.lineIterator(file, "UTF-8");
-     * try {
-     *   while (it.hasNext()) {
-     *     String line = it.nextLine();
-     *     /// do something with line
-     *   }
-     * } finally {
-     *   LineIterator.closeQuietly(iterator);
-     * }
-     * </pre>
-     * <p>
-     * If an exception occurs during the creation of the iterator, the
-     * underlying stream is closed.
-     *
-     * @param file     the file to open for input, must not be {@code null}
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @return an Iterator of the lines in the file, never {@code null}
-     * @throws IOException in case of an I/O error (file closed)
-     * @since 1.2
-     */
-    public static LineIterator lineIterator(final File file, final String encoding) throws IOException {
-        InputStream in = null;
-        try {
-            in = openInputStream(file);
-            return IOUtils.lineIterator(in, encoding);
-        } catch (final IOException ex) {
-            IOUtils.closeQuietly(in);
-            throw ex;
-        } catch (final RuntimeException ex) {
-            IOUtils.closeQuietly(in);
-            throw ex;
-        }
-    }
-
-    /**
-     * Returns an Iterator for the lines in a <code>File</code> using the default encoding for the VM.
-     *
-     * @param file the file to open for input, must not be {@code null}
-     * @return an Iterator of the lines in the file, never {@code null}
-     * @throws IOException in case of an I/O error (file closed)
-     * @see #lineIterator(File, String)
-     * @since 1.3
-     */
-    public static LineIterator lineIterator(final File file) throws IOException {
-        return lineIterator(file, null);
-    }
-
-    //-----------------------------------------------------------------------
-
-    /**
-     * Writes a String to a file creating the file if it does not exist.
-     * <p>
-     * NOTE: As from v1.3, the parent directories of the file will be created
-     * if they do not exist.
-     *
-     * @param file     the file to write
-     * @param data     the content to write to the file
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @throws IOException                          in case of an I/O error
-     * @throws java.io.UnsupportedEncodingException if the encoding is not supported by the VM
-     * @since 2.4
-     */
-    public static void writeStringToFile(final File file, final String data, final Charset encoding)
-            throws IOException {
-        writeStringToFile(file, data, encoding, false);
-    }
-
-    /**
-     * Writes a String to a file creating the file if it does not exist.
-     * <p>
-     * NOTE: As from v1.3, the parent directories of the file will be created
-     * if they do not exist.
-     *
-     * @param file     the file to write
-     * @param data     the content to write to the file
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @throws IOException                          in case of an I/O error
-     * @throws java.io.UnsupportedEncodingException if the encoding is not supported by the VM
-     */
-    public static void writeStringToFile(final File file, final String data, final String encoding) throws IOException {
-        writeStringToFile(file, data, encoding, false);
-    }
-
-    /**
-     * Writes a String to a file creating the file if it does not exist.
-     *
-     * @param file     the file to write
-     * @param data     the content to write to the file
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @param append   if {@code true}, then the String will be added to the
-     *                 end of the file rather than overwriting
-     * @throws IOException in case of an I/O error
-     * @since 2.3
-     */
-    public static void writeStringToFile(final File file, final String data, final Charset encoding, final boolean
-            append) throws IOException {
-        OutputStream out = null;
-        try {
-            out = openOutputStream(file, append);
-            IOUtils.write(data, out, encoding);
-            out.close(); // don't swallow close Exception if copy completes normally
-        } finally {
-            IOUtils.closeQuietly(out);
-        }
-    }
-
-    /**
-     * Writes a String to a file creating the file if it does not exist.
-     *
-     * @param file     the file to write
-     * @param data     the content to write to the file
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @param append   if {@code true}, then the String will be added to the
-     *                 end of the file rather than overwriting
-     * @throws IOException                 in case of an I/O error
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     * .UnsupportedEncodingException} in version 2.2 if the encoding is not supported by the VM
-     * @since 2.1
-     */
-    public static void writeStringToFile(final File file, final String data, final String encoding,
-                                         final boolean append) throws IOException {
-        writeStringToFile(file, data, Charsets.toCharset(encoding), append);
-    }
-
-    /**
-     * Writes a String to a file creating the file if it does not exist using the default encoding for the VM.
-     *
-     * @param file the file to write
-     * @param data the content to write to the file
-     * @throws IOException in case of an I/O error
-     * @deprecated 2.5 use {@link #writeStringToFile(File, String, Charset)} instead
-     */
-    @Deprecated
-    public static void writeStringToFile(final File file, final String data) throws IOException {
-        writeStringToFile(file, data, Charset.defaultCharset(), false);
-    }
-
-    /**
-     * Writes a String to a file creating the file if it does not exist using the default encoding for the VM.
-     *
-     * @param file   the file to write
-     * @param data   the content to write to the file
-     * @param append if {@code true}, then the String will be added to the
-     *               end of the file rather than overwriting
-     * @throws IOException in case of an I/O error
-     * @since 2.1
-     * @deprecated 2.5 use {@link #writeStringToFile(File, String, Charset, boolean)} instead
-     */
-    @Deprecated
-    public static void writeStringToFile(final File file, final String data, final boolean append) throws IOException {
-        writeStringToFile(file, data, Charset.defaultCharset(), append);
-    }
-
-    /**
-     * Writes a CharSequence to a file creating the file if it does not exist using the default encoding for the VM.
-     *
-     * @param file the file to write
-     * @param data the content to write to the file
-     * @throws IOException in case of an I/O error
-     * @since 2.0
-     * @deprecated 2.5 use {@link #write(File, CharSequence, Charset)} instead
-     */
-    @Deprecated
-    public static void write(final File file, final CharSequence data) throws IOException {
-        write(file, data, Charset.defaultCharset(), false);
-    }
-
-    /**
-     * Writes a CharSequence to a file creating the file if it does not exist using the default encoding for the VM.
-     *
-     * @param file   the file to write
-     * @param data   the content to write to the file
-     * @param append if {@code true}, then the data will be added to the
-     *               end of the file rather than overwriting
-     * @throws IOException in case of an I/O error
-     * @since 2.1
-     * @deprecated 2.5 use {@link #write(File, CharSequence, Charset, boolean)} instead
-     */
-    @Deprecated
-    public static void write(final File file, final CharSequence data, final boolean append) throws IOException {
-        write(file, data, Charset.defaultCharset(), append);
-    }
-
-    /**
-     * Writes a CharSequence to a file creating the file if it does not exist.
-     *
-     * @param file     the file to write
-     * @param data     the content to write to the file
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @throws IOException in case of an I/O error
-     * @since 2.3
-     */
-    public static void write(final File file, final CharSequence data, final Charset encoding) throws IOException {
-        write(file, data, encoding, false);
-    }
-
-    /**
-     * Writes a CharSequence to a file creating the file if it does not exist.
-     *
-     * @param file     the file to write
-     * @param data     the content to write to the file
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @throws IOException                          in case of an I/O error
-     * @throws java.io.UnsupportedEncodingException if the encoding is not supported by the VM
-     * @since 2.0
-     */
-    public static void write(final File file, final CharSequence data, final String encoding) throws IOException {
-        write(file, data, encoding, false);
-    }
-
-    /**
-     * Writes a CharSequence to a file creating the file if it does not exist.
-     *
-     * @param file     the file to write
-     * @param data     the content to write to the file
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @param append   if {@code true}, then the data will be added to the
-     *                 end of the file rather than overwriting
-     * @throws IOException in case of an I/O error
-     * @since 2.3
-     */
-    public static void write(final File file, final CharSequence data, final Charset encoding, final boolean append)
-            throws IOException {
-        final String str = data == null ? null : data.toString();
-        writeStringToFile(file, str, encoding, append);
-    }
-
-    /**
-     * Writes a CharSequence to a file creating the file if it does not exist.
-     *
-     * @param file     the file to write
-     * @param data     the content to write to the file
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @param append   if {@code true}, then the data will be added to the
-     *                 end of the file rather than overwriting
-     * @throws IOException                 in case of an I/O error
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     * .UnsupportedEncodingException} in version 2.2 if the encoding is not supported by the VM
-     * @since 2.1
-     */
-    public static void write(final File file, final CharSequence data, final String encoding, final boolean append)
-            throws IOException {
-        write(file, data, Charsets.toCharset(encoding), append);
-    }
-
-    /**
-     * Writes a byte array to a file creating the file if it does not exist.
-     * <p>
-     * NOTE: As from v1.3, the parent directories of the file will be created
-     * if they do not exist.
-     *
-     * @param file the file to write to
-     * @param data the content to write to the file
-     * @throws IOException in case of an I/O error
-     * @since 1.1
-     */
-    public static void writeByteArrayToFile(final File file, final byte[] data) throws IOException {
-        writeByteArrayToFile(file, data, false);
-    }
-
-    /**
-     * Writes a byte array to a file creating the file if it does not exist.
-     *
-     * @param file   the file to write to
-     * @param data   the content to write to the file
-     * @param append if {@code true}, then bytes will be added to the
-     *               end of the file rather than overwriting
-     * @throws IOException in case of an I/O error
-     * @since 2.1
-     */
-    public static void writeByteArrayToFile(final File file, final byte[] data, final boolean append)
-            throws IOException {
-        writeByteArrayToFile(file, data, 0, data.length, append);
-    }
-
-    /**
-     * Writes {@code len} bytes from the specified byte array starting
-     * at offset {@code off} to a file, creating the file if it does
-     * not exist.
-     *
-     * @param file the file to write to
-     * @param data the content to write to the file
-     * @param off  the start offset in the data
-     * @param len  the number of bytes to write
-     * @throws IOException in case of an I/O error
-     * @since 2.5
-     */
-    public static void writeByteArrayToFile(final File file, final byte[] data, final int off, final int len)
-            throws IOException {
-        writeByteArrayToFile(file, data, off, len, false);
-    }
-
-    /**
-     * Writes {@code len} bytes from the specified byte array starting
-     * at offset {@code off} to a file, creating the file if it does
-     * not exist.
-     *
-     * @param file   the file to write to
-     * @param data   the content to write to the file
-     * @param off    the start offset in the data
-     * @param len    the number of bytes to write
-     * @param append if {@code true}, then bytes will be added to the
-     *               end of the file rather than overwriting
-     * @throws IOException in case of an I/O error
-     * @since 2.5
-     */
-    public static void writeByteArrayToFile(final File file, final byte[] data, final int off, final int len,
-                                            final boolean append) throws IOException {
-        OutputStream out = null;
-        try {
-            out = openOutputStream(file, append);
-            out.write(data, off, len);
-            out.close(); // don't swallow close Exception if copy completes normally
-        } finally {
-            IOUtils.closeQuietly(out);
-        }
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * the specified <code>File</code> line by line.
-     * The specified character encoding and the default line ending will be used.
-     * <p>
-     * NOTE: As from v1.3, the parent directories of the file will be created
-     * if they do not exist.
-     *
-     * @param file     the file to write to
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @param lines    the lines to write, {@code null} entries produce blank lines
-     * @throws IOException                          in case of an I/O error
-     * @throws java.io.UnsupportedEncodingException if the encoding is not supported by the VM
-     * @since 1.1
-     */
-    public static void writeLines(final File file, final String encoding, final Collection<?> lines)
-            throws IOException {
-        writeLines(file, encoding, lines, null, false);
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * the specified <code>File</code> line by line, optionally appending.
-     * The specified character encoding and the default line ending will be used.
-     *
-     * @param file     the file to write to
-     * @param encoding the encoding to use, {@code null} means platform default
-     * @param lines    the lines to write, {@code null} entries produce blank lines
-     * @param append   if {@code true}, then the lines will be added to the
-     *                 end of the file rather than overwriting
-     * @throws IOException                          in case of an I/O error
-     * @throws java.io.UnsupportedEncodingException if the encoding is not supported by the VM
-     * @since 2.1
-     */
-    public static void writeLines(final File file, final String encoding, final Collection<?> lines,
-                                  final boolean append) throws IOException {
-        writeLines(file, encoding, lines, null, append);
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * the specified <code>File</code> line by line.
-     * The default VM encoding and the default line ending will be used.
-     *
-     * @param file  the file to write to
-     * @param lines the lines to write, {@code null} entries produce blank lines
-     * @throws IOException in case of an I/O error
-     * @since 1.3
-     */
-    public static void writeLines(final File file, final Collection<?> lines) throws IOException {
-        writeLines(file, null, lines, null, false);
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * the specified <code>File</code> line by line.
-     * The default VM encoding and the default line ending will be used.
-     *
-     * @param file   the file to write to
-     * @param lines  the lines to write, {@code null} entries produce blank lines
-     * @param append if {@code true}, then the lines will be added to the
-     *               end of the file rather than overwriting
-     * @throws IOException in case of an I/O error
-     * @since 2.1
-     */
-    public static void writeLines(final File file, final Collection<?> lines, final boolean append) throws IOException {
-        writeLines(file, null, lines, null, append);
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * the specified <code>File</code> line by line.
-     * The specified character encoding and the line ending will be used.
-     * <p>
-     * NOTE: As from v1.3, the parent directories of the file will be created
-     * if they do not exist.
-     *
-     * @param file       the file to write to
-     * @param encoding   the encoding to use, {@code null} means platform default
-     * @param lines      the lines to write, {@code null} entries produce blank lines
-     * @param lineEnding the line separator to use, {@code null} is system default
-     * @throws IOException                          in case of an I/O error
-     * @throws java.io.UnsupportedEncodingException if the encoding is not supported by the VM
-     * @since 1.1
-     */
-    public static void writeLines(final File file, final String encoding, final Collection<?> lines,
-                                  final String lineEnding) throws IOException {
-        writeLines(file, encoding, lines, lineEnding, false);
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * the specified <code>File</code> line by line.
-     * The specified character encoding and the line ending will be used.
-     *
-     * @param file       the file to write to
-     * @param encoding   the encoding to use, {@code null} means platform default
-     * @param lines      the lines to write, {@code null} entries produce blank lines
-     * @param lineEnding the line separator to use, {@code null} is system default
-     * @param append     if {@code true}, then the lines will be added to the
-     *                   end of the file rather than overwriting
-     * @throws IOException                          in case of an I/O error
-     * @throws java.io.UnsupportedEncodingException if the encoding is not supported by the VM
-     * @since 2.1
-     */
-    public static void writeLines(final File file, final String encoding, final Collection<?> lines,
-                                  final String lineEnding, final boolean append) throws IOException {
-        FileOutputStream out = null;
-        try {
-            out = openOutputStream(file, append);
-            final BufferedOutputStream buffer = new BufferedOutputStream(out);
-            IOUtils.writeLines(lines, lineEnding, buffer, encoding);
-            buffer.flush();
-            out.close(); // don't swallow close Exception if copy completes normally
-        } finally {
-            IOUtils.closeQuietly(out);
-        }
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * the specified <code>File</code> line by line.
-     * The default VM encoding and the specified line ending will be used.
-     *
-     * @param file       the file to write to
-     * @param lines      the lines to write, {@code null} entries produce blank lines
-     * @param lineEnding the line separator to use, {@code null} is system default
-     * @throws IOException in case of an I/O error
-     * @since 1.3
-     */
-    public static void writeLines(final File file, final Collection<?> lines, final String lineEnding)
-            throws IOException {
-        writeLines(file, null, lines, lineEnding, false);
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * the specified <code>File</code> line by line.
-     * The default VM encoding and the specified line ending will be used.
-     *
-     * @param file       the file to write to
-     * @param lines      the lines to write, {@code null} entries produce blank lines
-     * @param lineEnding the line separator to use, {@code null} is system default
-     * @param append     if {@code true}, then the lines will be added to the
-     *                   end of the file rather than overwriting
-     * @throws IOException in case of an I/O error
-     * @since 2.1
-     */
-    public static void writeLines(final File file, final Collection<?> lines, final String lineEnding,
-                                  final boolean append) throws IOException {
-        writeLines(file, null, lines, lineEnding, append);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Deletes a file. If file is a directory, delete it and all sub-directories.
-     * <p>
-     * The difference between File.delete() and this method are:
-     * <ul>
-     * <li>A directory to be deleted does not have to be empty.</li>
-     * <li>You get exceptions when a file or directory cannot be deleted.
-     * (java.io.File methods returns a boolean)</li>
-     * </ul>
-     *
-     * @param file file or directory to delete, must not be {@code null}
-     * @throws NullPointerException  if the directory is {@code null}
-     * @throws FileNotFoundException if the file was not found
-     * @throws IOException           in case deletion is unsuccessful
-     */
-    public static void forceDelete(final File file) throws IOException {
-        if (file.isDirectory()) {
-            deleteDirectory(file);
-        } else {
-            final boolean filePresent = file.exists();
-            if (!file.delete()) {
-                if (!filePresent) {
-                    throw new FileNotFoundException("File does not exist: " + file);
-                }
-                final String message =
-                        "Unable to delete file: " + file;
-                throw new IOException(message);
-            }
-        }
-    }
-
-    /**
-     * Schedules a file to be deleted when JVM exits.
-     * If file is directory delete it and all sub-directories.
-     *
-     * @param file file or directory to delete, must not be {@code null}
-     * @throws NullPointerException if the file is {@code null}
-     * @throws IOException          in case deletion is unsuccessful
-     */
-    public static void forceDeleteOnExit(final File file) throws IOException {
-        if (file.isDirectory()) {
-            deleteDirectoryOnExit(file);
-        } else {
-            file.deleteOnExit();
-        }
-    }
-
-    /**
-     * Schedules a directory recursively for deletion on JVM exit.
-     *
-     * @param directory directory to delete, must not be {@code null}
-     * @throws NullPointerException if the directory is {@code null}
-     * @throws IOException          in case deletion is unsuccessful
-     */
-    private static void deleteDirectoryOnExit(final File directory) throws IOException {
-        if (!directory.exists()) {
-            return;
-        }
-
-        directory.deleteOnExit();
-        if (!isSymlink(directory)) {
-            cleanDirectoryOnExit(directory);
-        }
-    }
-
-    /**
-     * Cleans a directory without deleting it.
-     *
-     * @param directory directory to clean, must not be {@code null}
-     * @throws NullPointerException if the directory is {@code null}
-     * @throws IOException          in case cleaning is unsuccessful
-     */
-    private static void cleanDirectoryOnExit(final File directory) throws IOException {
-        final File[] files = verifiedListFiles(directory);
-
-        IOException exception = null;
-        for (final File file : files) {
-            try {
-                forceDeleteOnExit(file);
-            } catch (final IOException ioe) {
-                exception = ioe;
-            }
-        }
-
-        if (null != exception) {
-            throw exception;
-        }
-    }
-
-    /**
-     * Makes a directory, including any necessary but nonexistent parent
-     * directories. If a file already exists with specified name but it is
-     * not a directory then an IOException is thrown.
-     * If the directory cannot be created (or does not already exist)
-     * then an IOException is thrown.
-     *
-     * @param directory directory to create, must not be {@code null}
-     * @throws NullPointerException if the directory is {@code null}
-     * @throws IOException          if the directory cannot be created or the file already exists but is not a directory
-     */
-    public static void forceMkdir(final File directory) throws IOException {
-        if (directory.exists()) {
-            if (!directory.isDirectory()) {
-                final String message =
-                        "File "
-                                + directory
-                                + " exists and is "
-                                + "not a directory. Unable to create directory.";
-                throw new IOException(message);
-            }
-        } else {
-            if (!directory.mkdirs()) {
-                // Double-check that some other thread or process hasn't made
-                // the directory in the background
-                if (!directory.isDirectory()) {
-                    final String message =
-                            "Unable to create directory " + directory;
-                    throw new IOException(message);
-                }
-            }
-        }
-    }
-
-    /**
-     * Makes any necessary but nonexistent parent directories for a given File. If the parent directory cannot be
-     * created then an IOException is thrown.
-     *
-     * @param file file with parent to create, must not be {@code null}
-     * @throws NullPointerException if the file is {@code null}
-     * @throws IOException          if the parent directory cannot be created
-     * @since 2.5
-     */
-    public static void forceMkdirParent(final File file) throws IOException {
-        final File parent = file.getParentFile();
-        if (parent == null) {
-            return;
-        }
-        forceMkdir(parent);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns the size of the specified file or directory. If the provided
-     * {@link File} is a regular file, then the file's length is returned.
-     * If the argument is a directory, then the size of the directory is
-     * calculated recursively. If a directory or subdirectory is security
-     * restricted, its size will not be included.
-     * <p>
-     * Note that overflow is not detected, and the return value may be negative if
-     * overflow occurs. See {@link #sizeOfAsBigInteger(File)} for an alternative
-     * method that does not overflow.
-     *
-     * @param file the regular file or directory to return the size
-     *             of (must not be {@code null}).
-     *
-     * @return the length of the file, or recursive size of the directory,
-     * provided (in bytes).
-     *
-     * @throws NullPointerException     if the file is {@code null}
-     * @throws IllegalArgumentException if the file does not exist.
-     *
-     * @since 2.0
-     */
-    public static long sizeOf(final File file) {
-
-        if (!file.exists()) {
-            final String message = file + " does not exist";
-            throw new IllegalArgumentException(message);
-        }
-
-        if (file.isDirectory()) {
-            return sizeOfDirectory0(file); // private method; expects directory
-        } else {
-            return file.length();
-        }
-
-    }
-
-    /**
-     * Returns the size of the specified file or directory. If the provided
-     * {@link File} is a regular file, then the file's length is returned.
-     * If the argument is a directory, then the size of the directory is
-     * calculated recursively. If a directory or subdirectory is security
-     * restricted, its size will not be included.
-     *
-     * @param file the regular file or directory to return the size
-     *             of (must not be {@code null}).
-     *
-     * @return the length of the file, or recursive size of the directory,
-     * provided (in bytes).
-     *
-     * @throws NullPointerException     if the file is {@code null}
-     * @throws IllegalArgumentException if the file does not exist.
-     *
-     * @since 2.4
-     */
-    public static BigInteger sizeOfAsBigInteger(final File file) {
-
-        if (!file.exists()) {
-            final String message = file + " does not exist";
-            throw new IllegalArgumentException(message);
-        }
-
-        if (file.isDirectory()) {
-            return sizeOfDirectoryBig0(file); // internal method
-        } else {
-            return BigInteger.valueOf(file.length());
-        }
-
-    }
-
-    /**
-     * Counts the size of a directory recursively (sum of the length of all files).
-     * <p>
-     * Note that overflow is not detected, and the return value may be negative if
-     * overflow occurs. See {@link #sizeOfDirectoryAsBigInteger(File)} for an alternative
-     * method that does not overflow.
-     *
-     * @param directory directory to inspect, must not be {@code null}
-     * @return size of directory in bytes, 0 if directory is security restricted, a negative number when the real total
-     * is greater than {@link Long#MAX_VALUE}.
-     * @throws NullPointerException if the directory is {@code null}
-     */
-    public static long sizeOfDirectory(final File directory) {
-        checkDirectory(directory);
-        return sizeOfDirectory0(directory);
-    }
-
-    // Private method, must be invoked will a directory parameter
-
-    /**
-     * the size of a director
-     * @param directory the directory to check
-     * @return the size
-     */
-    private static long sizeOfDirectory0(final File directory) {
-        final File[] files = directory.listFiles();
-        if (files == null) {  // null if security restricted
-            return 0L;
-        }
-        long size = 0;
-
-        for (final File file : files) {
-            try {
-                if (!isSymlink(file)) {
-                    size += sizeOf0(file); // internal method
-                    if (size < 0) {
-                        break;
-                    }
-                }
-            } catch (final IOException ioe) {
-                // Ignore exceptions caught when asking if a File is a symlink.
-            }
-        }
-
-        return size;
-    }
-
-    // Internal method - does not check existence
-
-    /**
-     * the size of a file
-     * @param file the file to check
-     * @return the size of the fil
-     */
-    private static long sizeOf0(File file) {
-        if (file.isDirectory()) {
-            return sizeOfDirectory0(file);
-        } else {
-            return file.length(); // will be 0 if file does not exist
-        }
-    }
-
-    /**
-     * Counts the size of a directory recursively (sum of the length of all files).
-     *
-     * @param directory directory to inspect, must not be {@code null}
-     * @return size of directory in bytes, 0 if directory is security restricted.
-     * @throws NullPointerException if the directory is {@code null}
-     * @since 2.4
-     */
-    public static BigInteger sizeOfDirectoryAsBigInteger(final File directory) {
-        checkDirectory(directory);
-        return sizeOfDirectoryBig0(directory);
-    }
-
-    // Must be called with a directory
-
-    /**
-     * Finds the size of a directory
-     *
-     * @param directory The directory
-     * @return the size
-     */
-    private static BigInteger sizeOfDirectoryBig0(final File directory) {
-        final File[] files = directory.listFiles();
-        if (files == null) {  // null if security restricted
-            return BigInteger.ZERO;
-        }
-        BigInteger size = BigInteger.ZERO;
-
-        for (final File file : files) {
-            try {
-                if (!isSymlink(file)) {
-                    size = size.add(sizeOfBig0(file));
-                }
-            } catch (final IOException ioe) {
-                // Ignore exceptions caught when asking if a File is a symlink.
-            }
-        }
-
-        return size;
-    }
-
-    // internal method; if file does not exist will return 0
-
-    /**
-     * Returns the sid of a file
-     * @param fileOrDir The file
-     * @return the size
-     */
-    private static BigInteger sizeOfBig0(final File fileOrDir) {
-        if (fileOrDir.isDirectory()) {
-            return sizeOfDirectoryBig0(fileOrDir);
-        } else {
-            return BigInteger.valueOf(fileOrDir.length());
-        }
-    }
-
-    /**
-     * Checks that the given {@code File} exists and is a directory.
-     *
-     * @param directory The {@code File} to check.
-     * @throws IllegalArgumentException if the given {@code File} does not exist or is not a directory.
-     */
-    private static void checkDirectory(final File directory) {
-        if (!directory.exists()) {
-            throw new IllegalArgumentException(directory + " does not exist");
-        }
-        if (!directory.isDirectory()) {
-            throw new IllegalArgumentException(directory + " is not a directory");
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Tests if the specified <code>File</code> is newer than the reference
-     * <code>File</code>.
-     *
-     * @param file      the <code>File</code> of which the modification date must
-     *                  be compared, must not be {@code null}
-     * @param reference the <code>File</code> of which the modification date
-     *                  is used, must not be {@code null}
-     * @return true if the <code>File</code> exists and has been modified more
-     * recently than the reference <code>File</code>
-     * @throws IllegalArgumentException if the file is {@code null}
-     * @throws IllegalArgumentException if the reference file is {@code null} or doesn't exist
-     */
-    public static boolean isFileNewer(final File file, final File reference) {
-        if (reference == null) {
-            throw new IllegalArgumentException("No specified reference file");
-        }
-        if (!reference.exists()) {
-            throw new IllegalArgumentException("The reference file '"
-                    + reference + "' doesn't exist");
-        }
-        return isFileNewer(file, reference.lastModified());
-    }
-
-    /**
-     * Tests if the specified <code>File</code> is newer than the specified
-     * <code>Date</code>.
-     *
-     * @param file the <code>File</code> of which the modification date
-     *             must be compared, must not be {@code null}
-     * @param date the date reference, must not be {@code null}
-     * @return true if the <code>File</code> exists and has been modified
-     * after the given <code>Date</code>.
-     * @throws IllegalArgumentException if the file is {@code null}
-     * @throws IllegalArgumentException if the date is {@code null}
-     */
-    public static boolean isFileNewer(final File file, final Date date) {
-        if (date == null) {
-            throw new IllegalArgumentException("No specified date");
-        }
-        return isFileNewer(file, date.getTime());
-    }
-
-    /**
-     * Tests if the specified <code>File</code> is newer than the specified
-     * time reference.
-     *
-     * @param file       the <code>File</code> of which the modification date must
-     *                   be compared, must not be {@code null}
-     * @param timeMillis the time reference measured in milliseconds since the
-     *                   epoch (00:00:00 GMT, January 1, 1970)
-     * @return true if the <code>File</code> exists and has been modified after
-     * the given time reference.
-     * @throws IllegalArgumentException if the file is {@code null}
-     */
-    public static boolean isFileNewer(final File file, final long timeMillis) {
-        if (file == null) {
-            throw new IllegalArgumentException("No specified file");
-        }
-        if (!file.exists()) {
-            return false;
-        }
-        return file.lastModified() > timeMillis;
-    }
-
-
-    //-----------------------------------------------------------------------
-    /**
-     * Tests if the specified <code>File</code> is older than the reference
-     * <code>File</code>.
-     *
-     * @param file      the <code>File</code> of which the modification date must
-     *                  be compared, must not be {@code null}
-     * @param reference the <code>File</code> of which the modification date
-     *                  is used, must not be {@code null}
-     * @return true if the <code>File</code> exists and has been modified before
-     * the reference <code>File</code>
-     * @throws IllegalArgumentException if the file is {@code null}
-     * @throws IllegalArgumentException if the reference file is {@code null} or doesn't exist
-     */
-    public static boolean isFileOlder(final File file, final File reference) {
-        if (reference == null) {
-            throw new IllegalArgumentException("No specified reference file");
-        }
-        if (!reference.exists()) {
-            throw new IllegalArgumentException("The reference file '"
-                    + reference + "' doesn't exist");
-        }
-        return isFileOlder(file, reference.lastModified());
-    }
-
-    /**
-     * Tests if the specified <code>File</code> is older than the specified
-     * <code>Date</code>.
-     *
-     * @param file the <code>File</code> of which the modification date
-     *             must be compared, must not be {@code null}
-     * @param date the date reference, must not be {@code null}
-     * @return true if the <code>File</code> exists and has been modified
-     * before the given <code>Date</code>.
-     * @throws IllegalArgumentException if the file is {@code null}
-     * @throws IllegalArgumentException if the date is {@code null}
-     */
-    public static boolean isFileOlder(final File file, final Date date) {
-        if (date == null) {
-            throw new IllegalArgumentException("No specified date");
-        }
-        return isFileOlder(file, date.getTime());
-    }
-
-    /**
-     * Tests if the specified <code>File</code> is older than the specified
-     * time reference.
-     *
-     * @param file       the <code>File</code> of which the modification date must
-     *                   be compared, must not be {@code null}
-     * @param timeMillis the time reference measured in milliseconds since the
-     *                   epoch (00:00:00 GMT, January 1, 1970)
-     * @return true if the <code>File</code> exists and has been modified before
-     * the given time reference.
-     * @throws IllegalArgumentException if the file is {@code null}
-     */
-    public static boolean isFileOlder(final File file, final long timeMillis) {
-        if (file == null) {
-            throw new IllegalArgumentException("No specified file");
-        }
-        if (!file.exists()) {
-            return false;
-        }
-        return file.lastModified() < timeMillis;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Computes the checksum of a file using the CRC32 checksum routine.
-     * The value of the checksum is returned.
-     *
-     * @param file the file to checksum, must not be {@code null}
-     * @return the checksum value
-     * @throws NullPointerException     if the file or checksum is {@code null}
-     * @throws IllegalArgumentException if the file is a directory
-     * @throws IOException              if an IO error occurs reading the file
-     * @since 1.3
-     */
-    public static long checksumCRC32(final File file) throws IOException {
-        final CRC32 crc = new CRC32();
-        checksum(file, crc);
-        return crc.getValue();
-    }
-
-    /**
-     * Computes the checksum of a file using the specified checksum object.
-     * Multiple files may be checked using one <code>Checksum</code> instance
-     * if desired simply by reusing the same checksum object.
-     * For example:
-     * <pre>
-     *   long csum = FileUtils.checksum(file, new CRC32()).getValue();
-     * </pre>
-     *
-     * @param file     the file to checksum, must not be {@code null}
-     * @param checksum the checksum object to be used, must not be {@code null}
-     * @return the checksum specified, updated with the content of the file
-     * @throws NullPointerException     if the file or checksum is {@code null}
-     * @throws IllegalArgumentException if the file is a directory
-     * @throws IOException              if an IO error occurs reading the file
-     * @since 1.3
-     */
-    public static Checksum checksum(final File file, final Checksum checksum) throws IOException {
-        if (file.isDirectory()) {
-            throw new IllegalArgumentException("Checksums can't be computed on directories");
-        }
-        InputStream in = null;
-        try {
-            in = new CheckedInputStream(new FileInputStream(file), checksum);
-            IOUtils.copy(in, new NullOutputStream());
-        } finally {
-            IOUtils.closeQuietly(in);
-        }
-        return checksum;
-    }
-
-    /**
-     * Moves a directory.
-     * <p>
-     * When the destination directory is on another file system, do a "copy and delete".
-     *
-     * @param srcDir  the directory to be moved
-     * @param destDir the destination directory
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws FileExistsException  if the destination directory exists
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs moving the file
-     * @since 1.4
-     */
-    public static void moveDirectory(final File srcDir, final File destDir) throws IOException {
-        if (srcDir == null) {
-            throw new NullPointerException("Source must not be null");
-        }
-        if (destDir == null) {
-            throw new NullPointerException("Destination must not be null");
-        }
-        if (!srcDir.exists()) {
-            throw new FileNotFoundException("Source '" + srcDir + "' does not exist");
-        }
-        if (!srcDir.isDirectory()) {
-            throw new IOException("Source '" + srcDir + "' is not a directory");
-        }
-        if (destDir.exists()) {
-            throw new FileExistsException("Destination '" + destDir + "' already exists");
-        }
-        final boolean rename = srcDir.renameTo(destDir);
-        if (!rename) {
-            if (destDir.getCanonicalPath().startsWith(srcDir.getCanonicalPath() + File.separator)) {
-                throw new IOException("Cannot move directory: " + srcDir + " to a subdirectory of itself: " + destDir);
-            }
-            copyDirectory(srcDir, destDir);
-            deleteDirectory(srcDir);
-            if (srcDir.exists()) {
-                throw new IOException("Failed to delete original directory '" + srcDir +
-                        "' after copy to '" + destDir + "'");
-            }
-        }
-    }
-
-    /**
-     * Moves a directory to another directory.
-     *
-     * @param src           the file to be moved
-     * @param destDir       the destination file
-     * @param createDestDir If {@code true} create the destination directory,
-     *                      otherwise if {@code false} throw an IOException
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws FileExistsException  if the directory exists in the destination directory
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs moving the file
-     * @since 1.4
-     */
-    public static void moveDirectoryToDirectory(final File src, final File destDir, final boolean createDestDir)
-            throws IOException {
-        if (src == null) {
-            throw new NullPointerException("Source must not be null");
-        }
-        if (destDir == null) {
-            throw new NullPointerException("Destination directory must not be null");
-        }
-        if (!destDir.exists() && createDestDir) {
-            destDir.mkdirs();
-        }
-        if (!destDir.exists()) {
-            throw new FileNotFoundException("Destination directory '" + destDir +
-                    "' does not exist [createDestDir=" + createDestDir + "]");
-        }
-        if (!destDir.isDirectory()) {
-            throw new IOException("Destination '" + destDir + "' is not a directory");
-        }
-        moveDirectory(src, new File(destDir, src.getName()));
-
-    }
-
-    /**
-     * Moves a file.
-     * <p>
-     * When the destination file is on another file system, do a "copy and delete".
-     *
-     * @param srcFile  the file to be moved
-     * @param destFile the destination file
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws FileExistsException  if the destination file exists
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs moving the file
-     * @since 1.4
-     */
-    public static void moveFile(final File srcFile, final File destFile) throws IOException {
-        if (srcFile == null) {
-            throw new NullPointerException("Source must not be null");
-        }
-        if (destFile == null) {
-            throw new NullPointerException("Destination must not be null");
-        }
-        if (!srcFile.exists()) {
-            throw new FileNotFoundException("Source '" + srcFile + "' does not exist");
-        }
-        if (srcFile.isDirectory()) {
-            throw new IOException("Source '" + srcFile + "' is a directory");
-        }
-        if (destFile.exists()) {
-            throw new FileExistsException("Destination '" + destFile + "' already exists");
-        }
-        if (destFile.isDirectory()) {
-            throw new IOException("Destination '" + destFile + "' is a directory");
-        }
-        final boolean rename = srcFile.renameTo(destFile);
-        if (!rename) {
-            copyFile(srcFile, destFile);
-            if (!srcFile.delete()) {
-                FileUtils.deleteQuietly(destFile);
-                throw new IOException("Failed to delete original file '" + srcFile +
-                        "' after copy to '" + destFile + "'");
-            }
-        }
-    }
-
-    /**
-     * Moves a file to a directory.
-     *
-     * @param srcFile       the file to be moved
-     * @param destDir       the destination file
-     * @param createDestDir If {@code true} create the destination directory,
-     *                      otherwise if {@code false} throw an IOException
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws FileExistsException  if the destination file exists
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs moving the file
-     * @since 1.4
-     */
-    public static void moveFileToDirectory(final File srcFile, final File destDir, final boolean createDestDir)
-            throws IOException {
-        if (srcFile == null) {
-            throw new NullPointerException("Source must not be null");
-        }
-        if (destDir == null) {
-            throw new NullPointerException("Destination directory must not be null");
-        }
-        if (!destDir.exists() && createDestDir) {
-            destDir.mkdirs();
-        }
-        if (!destDir.exists()) {
-            throw new FileNotFoundException("Destination directory '" + destDir +
-                    "' does not exist [createDestDir=" + createDestDir + "]");
-        }
-        if (!destDir.isDirectory()) {
-            throw new IOException("Destination '" + destDir + "' is not a directory");
-        }
-        moveFile(srcFile, new File(destDir, srcFile.getName()));
-    }
-
-    /**
-     * Moves a file or directory to the destination directory.
-     * <p>
-     * When the destination is on another file system, do a "copy and delete".
-     *
-     * @param src           the file or directory to be moved
-     * @param destDir       the destination directory
-     * @param createDestDir If {@code true} create the destination directory,
-     *                      otherwise if {@code false} throw an IOException
-     * @throws NullPointerException if source or destination is {@code null}
-     * @throws FileExistsException  if the directory or file exists in the destination directory
-     * @throws IOException          if source or destination is invalid
-     * @throws IOException          if an IO error occurs moving the file
-     * @since 1.4
-     */
-    public static void moveToDirectory(final File src, final File destDir, final boolean createDestDir)
-            throws IOException {
-        if (src == null) {
-            throw new NullPointerException("Source must not be null");
-        }
-        if (destDir == null) {
-            throw new NullPointerException("Destination must not be null");
-        }
-        if (!src.exists()) {
-            throw new FileNotFoundException("Source '" + src + "' does not exist");
-        }
-        if (src.isDirectory()) {
-            moveDirectoryToDirectory(src, destDir, createDestDir);
-        } else {
-            moveFileToDirectory(src, destDir, createDestDir);
-        }
-    }
-
-    /**
-     * Determines whether the specified file is a Symbolic Link rather than an actual file.
-     * <p>
-     * Will not return true if there is a Symbolic Link anywhere in the path,
-     * only if the specific file is.
-     * <p>
-     * When using jdk1.7, this method delegates to {@code boolean java.nio.file.Files.isSymbolicLink(Path path)}
-     *
-     * <b>Note:</b> the current implementation always returns {@code false} if running on
-     * jkd1.6 and the system is detected as Windows using {@link FilenameUtils#isSystemWindows()}
-     * <p>
-     * For code that runs on Java 1.7 or later, use the following method instead:
-     * <br>
-     * {@code boolean java.nio.file.Files.isSymbolicLink(Path path)}
-     * @param file the file to check
-     * @return true if the file is a Symbolic Link
-     * @throws IOException if an IO error occurs while checking the file
-     * @since 2.0
-     */
-    public static boolean isSymlink(final File file) throws IOException {
-        if ( Java7Support.isAtLeastJava7() )
-        {
-            return Java7Support.isSymLink( file );
-        }
-
-        if (file == null) {
-            throw new NullPointerException("File must not be null");
-        }
-        if (FilenameUtils.isSystemWindows()) {
-            return false;
-        }
-        File fileInCanonicalDir = null;
-        if (file.getParent() == null) {
-            fileInCanonicalDir = file;
-        } else {
-            final File canonicalDir = file.getParentFile().getCanonicalFile();
-            fileInCanonicalDir = new File(canonicalDir, file.getName());
-        }
-
-        if (fileInCanonicalDir.getCanonicalFile().equals(fileInCanonicalDir.getAbsoluteFile())) {
-            return isBrokenSymlink(file);
-        } else {
-            return true;
-        }
-    }
-
-    /**
-     * Determines if the specified file is possibly a broken symbolic link.
-     *
-     * @param file the file to check
-
-     * @return true if the file is a Symbolic Link
-     * @throws IOException if an IO error occurs while checking the file
-     */
-    private static boolean isBrokenSymlink(final File file) throws IOException {
-        // if file exists then if it is a symlink it's not broken
-        if (file.exists()) {
-            return false;
-        }
-        // a broken symlink will show up in the list of files of its parent directory
-        final File canon = file.getCanonicalFile();
-        File parentDir = canon.getParentFile();
-        if (parentDir == null || !parentDir.exists()) {
-            return false;
-        }
-
-        // is it worthwhile to create a FileFilterUtil method for this?
-        // is it worthwhile to create an "identity"  IOFileFilter for this?
-        File[] fileInDir = parentDir.listFiles(
-                new FileFilter() {
-                    public boolean accept(File aFile) {
-                        return aFile.equals(canon);
-                    }
-                }
-        );
-        return fileInDir != null && fileInDir.length > 0;
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/FilenameUtils.java b/trunk/src/main/java/org/apache/commons/io/FilenameUtils.java
deleted file mode 100644
index 2035622..0000000
--- a/trunk/src/main/java/org/apache/commons/io/FilenameUtils.java
+++ /dev/null
@@ -1,1452 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Stack;
-
-/**
- * General filename and filepath manipulation utilities.
- * <p>
- * When dealing with filenames you can hit problems when moving from a Windows
- * based development machine to a Unix based production machine.
- * This class aims to help avoid those problems.
- * <p>
- * <b>NOTE</b>: You may be able to avoid using this class entirely simply by
- * using JDK {@link java.io.File File} objects and the two argument constructor
- * {@link java.io.File#File(java.io.File, java.lang.String) File(File,String)}.
- * <p>
- * Most methods on this class are designed to work the same on both Unix and Windows.
- * Those that don't include 'System', 'Unix' or 'Windows' in their name.
- * <p>
- * Most methods recognise both separators (forward and back), and both
- * sets of prefixes. See the javadoc of each method for details.
- * <p>
- * This class defines six components within a filename
- * (example C:\dev\project\file.txt):
- * <ul>
- * <li>the prefix - C:\</li>
- * <li>the path - dev\project\</li>
- * <li>the full path - C:\dev\project\</li>
- * <li>the name - file.txt</li>
- * <li>the base name - file</li>
- * <li>the extension - txt</li>
- * </ul>
- * Note that this class works best if directory filenames end with a separator.
- * If you omit the last separator, it is impossible to determine if the filename
- * corresponds to a file or a directory. As a result, we have chosen to say
- * it corresponds to a file.
- * <p>
- * This class only supports Unix and Windows style names.
- * Prefixes are matched as follows:
- * <pre>
- * Windows:
- * a\b\c.txt           --&gt; ""          --&gt; relative
- * \a\b\c.txt          --&gt; "\"         --&gt; current drive absolute
- * C:a\b\c.txt         --&gt; "C:"        --&gt; drive relative
- * C:\a\b\c.txt        --&gt; "C:\"       --&gt; absolute
- * \\server\a\b\c.txt  --&gt; "\\server\" --&gt; UNC
- *
- * Unix:
- * a/b/c.txt           --&gt; ""          --&gt; relative
- * /a/b/c.txt          --&gt; "/"         --&gt; absolute
- * ~/a/b/c.txt         --&gt; "~/"        --&gt; current user
- * ~                   --&gt; "~/"        --&gt; current user (slash added)
- * ~user/a/b/c.txt     --&gt; "~user/"    --&gt; named user
- * ~user               --&gt; "~user/"    --&gt; named user (slash added)
- * </pre>
- * Both prefix styles are matched always, irrespective of the machine that you are
- * currently running on.
- * <p>
- * Origin of code: Excalibur, Alexandria, Tomcat, Commons-Utils.
- *
- * @version $Id$
- * @since 1.1
- */
-public class FilenameUtils {
-
-    private static final int NOT_FOUND = -1;
-
-    /**
-     * The extension separator character.
-     * @since 1.4
-     */
-    public static final char EXTENSION_SEPARATOR = '.';
-
-    /**
-     * The extension separator String.
-     * @since 1.4
-     */
-    public static final String EXTENSION_SEPARATOR_STR = Character.toString(EXTENSION_SEPARATOR);
-
-    /**
-     * The Unix separator character.
-     */
-    private static final char UNIX_SEPARATOR = '/';
-
-    /**
-     * The Windows separator character.
-     */
-    private static final char WINDOWS_SEPARATOR = '\\';
-
-    /**
-     * The system separator character.
-     */
-    private static final char SYSTEM_SEPARATOR = File.separatorChar;
-
-    /**
-     * The separator character that is the opposite of the system separator.
-     */
-    private static final char OTHER_SEPARATOR;
-    static {
-        if (isSystemWindows()) {
-            OTHER_SEPARATOR = UNIX_SEPARATOR;
-        } else {
-            OTHER_SEPARATOR = WINDOWS_SEPARATOR;
-        }
-    }
-
-    /**
-     * Instances should NOT be constructed in standard programming.
-     */
-    public FilenameUtils() {
-        super();
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Determines if Windows file system is in use.
-     *
-     * @return true if the system is Windows
-     */
-    static boolean isSystemWindows() {
-        return SYSTEM_SEPARATOR == WINDOWS_SEPARATOR;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Checks if the character is a separator.
-     *
-     * @param ch  the character to check
-     * @return true if it is a separator character
-     */
-    private static boolean isSeparator(final char ch) {
-        return ch == UNIX_SEPARATOR || ch == WINDOWS_SEPARATOR;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Normalizes a path, removing double and single dot path steps.
-     * <p>
-     * This method normalizes a path to a standard format.
-     * The input may contain separators in either Unix or Windows format.
-     * The output will contain separators in the format of the system.
-     * <p>
-     * A trailing slash will be retained.
-     * A double slash will be merged to a single slash (but UNC names are handled).
-     * A single dot path segment will be removed.
-     * A double dot will cause that path segment and the one before to be removed.
-     * If the double dot has no parent path segment to work with, {@code null}
-     * is returned.
-     * <p>
-     * The output will be the same on both Unix and Windows except
-     * for the separator character.
-     * <pre>
-     * /foo//               --&gt;   /foo/
-     * /foo/./              --&gt;   /foo/
-     * /foo/../bar          --&gt;   /bar
-     * /foo/../bar/         --&gt;   /bar/
-     * /foo/../bar/../baz   --&gt;   /baz
-     * //foo//./bar         --&gt;   /foo/bar
-     * /../                 --&gt;   null
-     * ../foo               --&gt;   null
-     * foo/bar/..           --&gt;   foo/
-     * foo/../../bar        --&gt;   null
-     * foo/../bar           --&gt;   bar
-     * //server/foo/../bar  --&gt;   //server/bar
-     * //server/../bar      --&gt;   null
-     * C:\foo\..\bar        --&gt;   C:\bar
-     * C:\..\bar            --&gt;   null
-     * ~/foo/../bar/        --&gt;   ~/bar/
-     * ~/../bar             --&gt;   null
-     * </pre>
-     * (Note the file separator returned will be correct for Windows/Unix)
-     *
-     * @param filename  the filename to normalize, null returns null
-     * @return the normalized filename, or null if invalid. Null bytes inside string will be removed
-     */
-    public static String normalize(final String filename) {
-        return doNormalize(filename, SYSTEM_SEPARATOR, true);
-    }
-    /**
-     * Normalizes a path, removing double and single dot path steps.
-     * <p>
-     * This method normalizes a path to a standard format.
-     * The input may contain separators in either Unix or Windows format.
-     * The output will contain separators in the format specified.
-     * <p>
-     * A trailing slash will be retained.
-     * A double slash will be merged to a single slash (but UNC names are handled).
-     * A single dot path segment will be removed.
-     * A double dot will cause that path segment and the one before to be removed.
-     * If the double dot has no parent path segment to work with, {@code null}
-     * is returned.
-     * <p>
-     * The output will be the same on both Unix and Windows except
-     * for the separator character.
-     * <pre>
-     * /foo//               --&gt;   /foo/
-     * /foo/./              --&gt;   /foo/
-     * /foo/../bar          --&gt;   /bar
-     * /foo/../bar/         --&gt;   /bar/
-     * /foo/../bar/../baz   --&gt;   /baz
-     * //foo//./bar         --&gt;   /foo/bar
-     * /../                 --&gt;   null
-     * ../foo               --&gt;   null
-     * foo/bar/..           --&gt;   foo/
-     * foo/../../bar        --&gt;   null
-     * foo/../bar           --&gt;   bar
-     * //server/foo/../bar  --&gt;   //server/bar
-     * //server/../bar      --&gt;   null
-     * C:\foo\..\bar        --&gt;   C:\bar
-     * C:\..\bar            --&gt;   null
-     * ~/foo/../bar/        --&gt;   ~/bar/
-     * ~/../bar             --&gt;   null
-     * </pre>
-     * The output will be the same on both Unix and Windows including
-     * the separator character.
-     *
-     * @param filename  the filename to normalize, null returns null
-     * @param unixSeparator {@code true} if a unix separator should
-     * be used or {@code false} if a windows separator should be used.
-     * @return the normalized filename, or null if invalid. Null bytes inside string will be removed
-     * @since 2.0
-     */
-    public static String normalize(final String filename, final boolean unixSeparator) {
-        final char separator = unixSeparator ? UNIX_SEPARATOR : WINDOWS_SEPARATOR;
-        return doNormalize(filename, separator, true);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Normalizes a path, removing double and single dot path steps,
-     * and removing any final directory separator.
-     * <p>
-     * This method normalizes a path to a standard format.
-     * The input may contain separators in either Unix or Windows format.
-     * The output will contain separators in the format of the system.
-     * <p>
-     * A trailing slash will be removed.
-     * A double slash will be merged to a single slash (but UNC names are handled).
-     * A single dot path segment will be removed.
-     * A double dot will cause that path segment and the one before to be removed.
-     * If the double dot has no parent path segment to work with, {@code null}
-     * is returned.
-     * <p>
-     * The output will be the same on both Unix and Windows except
-     * for the separator character.
-     * <pre>
-     * /foo//               --&gt;   /foo
-     * /foo/./              --&gt;   /foo
-     * /foo/../bar          --&gt;   /bar
-     * /foo/../bar/         --&gt;   /bar
-     * /foo/../bar/../baz   --&gt;   /baz
-     * //foo//./bar         --&gt;   /foo/bar
-     * /../                 --&gt;   null
-     * ../foo               --&gt;   null
-     * foo/bar/..           --&gt;   foo
-     * foo/../../bar        --&gt;   null
-     * foo/../bar           --&gt;   bar
-     * //server/foo/../bar  --&gt;   //server/bar
-     * //server/../bar      --&gt;   null
-     * C:\foo\..\bar        --&gt;   C:\bar
-     * C:\..\bar            --&gt;   null
-     * ~/foo/../bar/        --&gt;   ~/bar
-     * ~/../bar             --&gt;   null
-     * </pre>
-     * (Note the file separator returned will be correct for Windows/Unix)
-     *
-     * @param filename  the filename to normalize, null returns null
-     * @return the normalized filename, or null if invalid. Null bytes inside string will be removed
-     */
-    public static String normalizeNoEndSeparator(final String filename) {
-        return doNormalize(filename, SYSTEM_SEPARATOR, false);
-    }
-
-    /**
-     * Normalizes a path, removing double and single dot path steps,
-     * and removing any final directory separator.
-     * <p>
-     * This method normalizes a path to a standard format.
-     * The input may contain separators in either Unix or Windows format.
-     * The output will contain separators in the format specified.
-     * <p>
-     * A trailing slash will be removed.
-     * A double slash will be merged to a single slash (but UNC names are handled).
-     * A single dot path segment will be removed.
-     * A double dot will cause that path segment and the one before to be removed.
-     * If the double dot has no parent path segment to work with, {@code null}
-     * is returned.
-     * <p>
-     * The output will be the same on both Unix and Windows including
-     * the separator character.
-     * <pre>
-     * /foo//               --&gt;   /foo
-     * /foo/./              --&gt;   /foo
-     * /foo/../bar          --&gt;   /bar
-     * /foo/../bar/         --&gt;   /bar
-     * /foo/../bar/../baz   --&gt;   /baz
-     * //foo//./bar         --&gt;   /foo/bar
-     * /../                 --&gt;   null
-     * ../foo               --&gt;   null
-     * foo/bar/..           --&gt;   foo
-     * foo/../../bar        --&gt;   null
-     * foo/../bar           --&gt;   bar
-     * //server/foo/../bar  --&gt;   //server/bar
-     * //server/../bar      --&gt;   null
-     * C:\foo\..\bar        --&gt;   C:\bar
-     * C:\..\bar            --&gt;   null
-     * ~/foo/../bar/        --&gt;   ~/bar
-     * ~/../bar             --&gt;   null
-     * </pre>
-     *
-     * @param filename  the filename to normalize, null returns null
-     * @param unixSeparator {@code true} if a unix separator should
-     * be used or {@code false} if a windows separtor should be used.
-     * @return the normalized filename, or null if invalid. Null bytes inside string will be removed
-     * @since 2.0
-     */
-    public static String normalizeNoEndSeparator(final String filename, final boolean unixSeparator) {
-         final char separator = unixSeparator ? UNIX_SEPARATOR : WINDOWS_SEPARATOR;
-        return doNormalize(filename, separator, false);
-    }
-
-    /**
-     * Internal method to perform the normalization.
-     *
-     * @param filename  the filename
-     * @param separator The separator character to use
-     * @param keepSeparator  true to keep the final separator
-     * @return the normalized filename. Null bytes inside string will be removed.
-     */
-    private static String doNormalize(final String filename, final char separator, final boolean keepSeparator) {
-        if (filename == null) {
-            return null;
-        }
-
-        failIfNullBytePresent(filename);
-
-        int size = filename.length();
-        if (size == 0) {
-            return filename;
-        }
-        final int prefix = getPrefixLength(filename);
-        if (prefix < 0) {
-            return null;
-        }
-
-        final char[] array = new char[size + 2];  // +1 for possible extra slash, +2 for arraycopy
-        filename.getChars(0, filename.length(), array, 0);
-
-        // fix separators throughout
-        final char otherSeparator = separator == SYSTEM_SEPARATOR ? OTHER_SEPARATOR : SYSTEM_SEPARATOR;
-        for (int i = 0; i < array.length; i++) {
-            if (array[i] == otherSeparator) {
-                array[i] = separator;
-            }
-        }
-
-        // add extra separator on the end to simplify code below
-        boolean lastIsDirectory = true;
-        if (array[size - 1] != separator) {
-            array[size++] = separator;
-            lastIsDirectory = false;
-        }
-
-        // adjoining slashes
-        for (int i = prefix + 1; i < size; i++) {
-            if (array[i] == separator && array[i - 1] == separator) {
-                System.arraycopy(array, i, array, i - 1, size - i);
-                size--;
-                i--;
-            }
-        }
-
-        // dot slash
-        for (int i = prefix + 1; i < size; i++) {
-            if (array[i] == separator && array[i - 1] == '.' &&
-                    (i == prefix + 1 || array[i - 2] == separator)) {
-                if (i == size - 1) {
-                    lastIsDirectory = true;
-                }
-                System.arraycopy(array, i + 1, array, i - 1, size - i);
-                size -=2;
-                i--;
-            }
-        }
-
-        // double dot slash
-        outer:
-        for (int i = prefix + 2; i < size; i++) {
-            if (array[i] == separator && array[i - 1] == '.' && array[i - 2] == '.' &&
-                    (i == prefix + 2 || array[i - 3] == separator)) {
-                if (i == prefix + 2) {
-                    return null;
-                }
-                if (i == size - 1) {
-                    lastIsDirectory = true;
-                }
-                int j;
-                for (j = i - 4 ; j >= prefix; j--) {
-                    if (array[j] == separator) {
-                        // remove b/../ from a/b/../c
-                        System.arraycopy(array, i + 1, array, j + 1, size - i);
-                        size -= i - j;
-                        i = j + 1;
-                        continue outer;
-                    }
-                }
-                // remove a/../ from a/../c
-                System.arraycopy(array, i + 1, array, prefix, size - i);
-                size -= i + 1 - prefix;
-                i = prefix + 1;
-            }
-        }
-
-        if (size <= 0) {  // should never be less than 0
-            return "";
-        }
-        if (size <= prefix) {  // should never be less than prefix
-            return new String(array, 0, size);
-        }
-        if (lastIsDirectory && keepSeparator) {
-            return new String(array, 0, size);  // keep trailing separator
-        }
-        return new String(array, 0, size - 1);  // lose trailing separator
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Concatenates a filename to a base path using normal command line style rules.
-     * <p>
-     * The effect is equivalent to resultant directory after changing
-     * directory to the first argument, followed by changing directory to
-     * the second argument.
-     * <p>
-     * The first argument is the base path, the second is the path to concatenate.
-     * The returned path is always normalized via {@link #normalize(String)},
-     * thus <code>..</code> is handled.
-     * <p>
-     * If <code>pathToAdd</code> is absolute (has an absolute prefix), then
-     * it will be normalized and returned.
-     * Otherwise, the paths will be joined, normalized and returned.
-     * <p>
-     * The output will be the same on both Unix and Windows except
-     * for the separator character.
-     * <pre>
-     * /foo/ + bar          --&gt;   /foo/bar
-     * /foo + bar           --&gt;   /foo/bar
-     * /foo + /bar          --&gt;   /bar
-     * /foo + C:/bar        --&gt;   C:/bar
-     * /foo + C:bar         --&gt;   C:bar (*)
-     * /foo/a/ + ../bar     --&gt;   foo/bar
-     * /foo/ + ../../bar    --&gt;   null
-     * /foo/ + /bar         --&gt;   /bar
-     * /foo/.. + /bar       --&gt;   /bar
-     * /foo + bar/c.txt     --&gt;   /foo/bar/c.txt
-     * /foo/c.txt + bar     --&gt;   /foo/c.txt/bar (!)
-     * </pre>
-     * (*) Note that the Windows relative drive prefix is unreliable when
-     * used with this method.
-     * (!) Note that the first parameter must be a path. If it ends with a name, then
-     * the name will be built into the concatenated path. If this might be a problem,
-     * use {@link #getFullPath(String)} on the base path argument.
-     *
-     * @param basePath  the base path to attach to, always treated as a path
-     * @param fullFilenameToAdd  the filename (or path) to attach to the base
-     * @return the concatenated path, or null if invalid.  Null bytes inside string will be removed
-     */
-    public static String concat(final String basePath, final String fullFilenameToAdd) {
-        final int prefix = getPrefixLength(fullFilenameToAdd);
-        if (prefix < 0) {
-            return null;
-        }
-        if (prefix > 0) {
-            return normalize(fullFilenameToAdd);
-        }
-        if (basePath == null) {
-            return null;
-        }
-        final int len = basePath.length();
-        if (len == 0) {
-            return normalize(fullFilenameToAdd);
-        }
-        final char ch = basePath.charAt(len - 1);
-        if (isSeparator(ch)) {
-            return normalize(basePath + fullFilenameToAdd);
-        } else {
-            return normalize(basePath + '/' + fullFilenameToAdd);
-        }
-    }
-
-    /**
-     * Determines whether the {@code parent} directory contains the {@code child} element (a file or directory).
-     * <p>
-     * The files names are expected to be normalized.
-     * </p>
-     *
-     * Edge cases:
-     * <ul>
-     * <li>A {@code directory} must not be null: if null, throw IllegalArgumentException</li>
-     * <li>A directory does not contain itself: return false</li>
-     * <li>A null child file is not contained in any parent: return false</li>
-     * </ul>
-     *
-     * @param canonicalParent
-     *            the file to consider as the parent.
-     * @param canonicalChild
-     *            the file to consider as the child.
-     * @return true is the candidate leaf is under by the specified composite. False otherwise.
-     * @throws IOException
-     *             if an IO error occurs while checking the files.
-     * @since 2.2
-     * @see FileUtils#directoryContains(File, File)
-     */
-    public static boolean directoryContains(final String canonicalParent, final String canonicalChild)
-            throws IOException {
-
-        // Fail fast against NullPointerException
-        if (canonicalParent == null) {
-            throw new IllegalArgumentException("Directory must not be null");
-        }
-
-        if (canonicalChild == null) {
-            return false;
-        }
-
-        if (IOCase.SYSTEM.checkEquals(canonicalParent, canonicalChild)) {
-            return false;
-        }
-
-        return IOCase.SYSTEM.checkStartsWith(canonicalChild, canonicalParent);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Converts all separators to the Unix separator of forward slash.
-     *
-     * @param path  the path to be changed, null ignored
-     * @return the updated path
-     */
-    public static String separatorsToUnix(final String path) {
-        if (path == null || path.indexOf(WINDOWS_SEPARATOR) == NOT_FOUND) {
-            return path;
-        }
-        return path.replace(WINDOWS_SEPARATOR, UNIX_SEPARATOR);
-    }
-
-    /**
-     * Converts all separators to the Windows separator of backslash.
-     *
-     * @param path  the path to be changed, null ignored
-     * @return the updated path
-     */
-    public static String separatorsToWindows(final String path) {
-        if (path == null || path.indexOf(UNIX_SEPARATOR) == NOT_FOUND) {
-            return path;
-        }
-        return path.replace(UNIX_SEPARATOR, WINDOWS_SEPARATOR);
-    }
-
-    /**
-     * Converts all separators to the system separator.
-     *
-     * @param path  the path to be changed, null ignored
-     * @return the updated path
-     */
-    public static String separatorsToSystem(final String path) {
-        if (path == null) {
-            return null;
-        }
-        if (isSystemWindows()) {
-            return separatorsToWindows(path);
-        } else {
-            return separatorsToUnix(path);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns the length of the filename prefix, such as <code>C:/</code> or <code>~/</code>.
-     * <p>
-     * This method will handle a file in either Unix or Windows format.
-     * <p>
-     * The prefix length includes the first slash in the full filename
-     * if applicable. Thus, it is possible that the length returned is greater
-     * than the length of the input string.
-     * <pre>
-     * Windows:
-     * a\b\c.txt           --&gt; ""          --&gt; relative
-     * \a\b\c.txt          --&gt; "\"         --&gt; current drive absolute
-     * C:a\b\c.txt         --&gt; "C:"        --&gt; drive relative
-     * C:\a\b\c.txt        --&gt; "C:\"       --&gt; absolute
-     * \\server\a\b\c.txt  --&gt; "\\server\" --&gt; UNC
-     * \\\a\b\c.txt        --&gt;  error, length = -1
-     *
-     * Unix:
-     * a/b/c.txt           --&gt; ""          --&gt; relative
-     * /a/b/c.txt          --&gt; "/"         --&gt; absolute
-     * ~/a/b/c.txt         --&gt; "~/"        --&gt; current user
-     * ~                   --&gt; "~/"        --&gt; current user (slash added)
-     * ~user/a/b/c.txt     --&gt; "~user/"    --&gt; named user
-     * ~user               --&gt; "~user/"    --&gt; named user (slash added)
-     * //server/a/b/c.txt  --&gt; "//server/"
-     * ///a/b/c.txt        --&gt; error, length = -1
-     * </pre>
-     * <p>
-     * The output will be the same irrespective of the machine that the code is running on.
-     * ie. both Unix and Windows prefixes are matched regardless.
-     *
-     * Note that a leading // (or \\) is used to indicate a UNC name on Windows.
-     * These must be followed by a server name, so double-slashes are not collapsed
-     * to a single slash at the start of the filename.
-     *
-     * @param filename  the filename to find the prefix in, null returns -1
-     * @return the length of the prefix, -1 if invalid or null
-     */
-    public static int getPrefixLength(final String filename) {
-        if (filename == null) {
-            return NOT_FOUND;
-        }
-        final int len = filename.length();
-        if (len == 0) {
-            return 0;
-        }
-        char ch0 = filename.charAt(0);
-        if (ch0 == ':') {
-            return NOT_FOUND;
-        }
-        if (len == 1) {
-            if (ch0 == '~') {
-                return 2;  // return a length greater than the input
-            }
-            return isSeparator(ch0) ? 1 : 0;
-        } else {
-            if (ch0 == '~') {
-                int posUnix = filename.indexOf(UNIX_SEPARATOR, 1);
-                int posWin = filename.indexOf(WINDOWS_SEPARATOR, 1);
-                if (posUnix == NOT_FOUND && posWin == NOT_FOUND) {
-                    return len + 1;  // return a length greater than the input
-                }
-                posUnix = posUnix == NOT_FOUND ? posWin : posUnix;
-                posWin = posWin == NOT_FOUND ? posUnix : posWin;
-                return Math.min(posUnix, posWin) + 1;
-            }
-            final char ch1 = filename.charAt(1);
-            if (ch1 == ':') {
-                ch0 = Character.toUpperCase(ch0);
-                if (ch0 >= 'A' && ch0 <= 'Z') {
-                    if (len == 2 || isSeparator(filename.charAt(2)) == false) {
-                        return 2;
-                    }
-                    return 3;
-                }
-                return NOT_FOUND;
-
-            } else if (isSeparator(ch0) && isSeparator(ch1)) {
-                int posUnix = filename.indexOf(UNIX_SEPARATOR, 2);
-                int posWin = filename.indexOf(WINDOWS_SEPARATOR, 2);
-                if (posUnix == NOT_FOUND && posWin == NOT_FOUND || posUnix == 2 || posWin == 2) {
-                    return NOT_FOUND;
-                }
-                posUnix = posUnix == NOT_FOUND ? posWin : posUnix;
-                posWin = posWin == NOT_FOUND ? posUnix : posWin;
-                return Math.min(posUnix, posWin) + 1;
-            } else {
-                return isSeparator(ch0) ? 1 : 0;
-            }
-        }
-    }
-
-    /**
-     * Returns the index of the last directory separator character.
-     * <p>
-     * This method will handle a file in either Unix or Windows format.
-     * The position of the last forward or backslash is returned.
-     * <p>
-     * The output will be the same irrespective of the machine that the code is running on.
-     *
-     * @param filename  the filename to find the last path separator in, null returns -1
-     * @return the index of the last separator character, or -1 if there
-     * is no such character
-     */
-    public static int indexOfLastSeparator(final String filename) {
-        if (filename == null) {
-            return NOT_FOUND;
-        }
-        final int lastUnixPos = filename.lastIndexOf(UNIX_SEPARATOR);
-        final int lastWindowsPos = filename.lastIndexOf(WINDOWS_SEPARATOR);
-        return Math.max(lastUnixPos, lastWindowsPos);
-    }
-
-    /**
-     * Returns the index of the last extension separator character, which is a dot.
-     * <p>
-     * This method also checks that there is no directory separator after the last dot. To do this it uses
-     * {@link #indexOfLastSeparator(String)} which will handle a file in either Unix or Windows format.
-     * </p>
-     * <p>
-     * The output will be the same irrespective of the machine that the code is running on.
-     * </p>
-     * 
-     * @param filename
-     *            the filename to find the last extension separator in, null returns -1
-     * @return the index of the last extension separator character, or -1 if there is no such character
-     */
-    public static int indexOfExtension(final String filename) {
-        if (filename == null) {
-            return NOT_FOUND;
-        }
-        final int extensionPos = filename.lastIndexOf(EXTENSION_SEPARATOR);
-        final int lastSeparator = indexOfLastSeparator(filename);
-        return lastSeparator > extensionPos ? NOT_FOUND : extensionPos;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Gets the prefix from a full filename, such as <code>C:/</code>
-     * or <code>~/</code>.
-     * <p>
-     * This method will handle a file in either Unix or Windows format.
-     * The prefix includes the first slash in the full filename where applicable.
-     * <pre>
-     * Windows:
-     * a\b\c.txt           --&gt; ""          --&gt; relative
-     * \a\b\c.txt          --&gt; "\"         --&gt; current drive absolute
-     * C:a\b\c.txt         --&gt; "C:"        --&gt; drive relative
-     * C:\a\b\c.txt        --&gt; "C:\"       --&gt; absolute
-     * \\server\a\b\c.txt  --&gt; "\\server\" --&gt; UNC
-     *
-     * Unix:
-     * a/b/c.txt           --&gt; ""          --&gt; relative
-     * /a/b/c.txt          --&gt; "/"         --&gt; absolute
-     * ~/a/b/c.txt         --&gt; "~/"        --&gt; current user
-     * ~                   --&gt; "~/"        --&gt; current user (slash added)
-     * ~user/a/b/c.txt     --&gt; "~user/"    --&gt; named user
-     * ~user               --&gt; "~user/"    --&gt; named user (slash added)
-     * </pre>
-     * <p>
-     * The output will be the same irrespective of the machine that the code is running on.
-     * ie. both Unix and Windows prefixes are matched regardless.
-     *
-     * @param filename  the filename to query, null returns null
-     * @return the prefix of the file, null if invalid. Null bytes inside string will be removed
-     */
-    public static String getPrefix(final String filename) {
-        if (filename == null) {
-            return null;
-        }
-        final int len = getPrefixLength(filename);
-        if (len < 0) {
-            return null;
-        }
-        if (len > filename.length()) {
-            failIfNullBytePresent(filename + UNIX_SEPARATOR);
-            return filename + UNIX_SEPARATOR;
-        }
-        String path = filename.substring(0, len);
-        failIfNullBytePresent(path);
-        return path;
-    }
-
-    /**
-     * Gets the path from a full filename, which excludes the prefix.
-     * <p>
-     * This method will handle a file in either Unix or Windows format.
-     * The method is entirely text based, and returns the text before and
-     * including the last forward or backslash.
-     * <pre>
-     * C:\a\b\c.txt --&gt; a\b\
-     * ~/a/b/c.txt  --&gt; a/b/
-     * a.txt        --&gt; ""
-     * a/b/c        --&gt; a/b/
-     * a/b/c/       --&gt; a/b/c/
-     * </pre>
-     * <p>
-     * The output will be the same irrespective of the machine that the code is running on.
-     * <p>
-     * This method drops the prefix from the result.
-     * See {@link #getFullPath(String)} for the method that retains the prefix.
-     *
-     * @param filename  the filename to query, null returns null
-     * @return the path of the file, an empty string if none exists, null if invalid.
-     * Null bytes inside string will be removed
-     */
-    public static String getPath(final String filename) {
-        return doGetPath(filename, 1);
-    }
-
-    /**
-     * Gets the path from a full filename, which excludes the prefix, and
-     * also excluding the final directory separator.
-     * <p>
-     * This method will handle a file in either Unix or Windows format.
-     * The method is entirely text based, and returns the text before the
-     * last forward or backslash.
-     * <pre>
-     * C:\a\b\c.txt --&gt; a\b
-     * ~/a/b/c.txt  --&gt; a/b
-     * a.txt        --&gt; ""
-     * a/b/c        --&gt; a/b
-     * a/b/c/       --&gt; a/b/c
-     * </pre>
-     * <p>
-     * The output will be the same irrespective of the machine that the code is running on.
-     * <p>
-     * This method drops the prefix from the result.
-     * See {@link #getFullPathNoEndSeparator(String)} for the method that retains the prefix.
-     *
-     * @param filename  the filename to query, null returns null
-     * @return the path of the file, an empty string if none exists, null if invalid.
-     * Null bytes inside string will be removed
-     */
-    public static String getPathNoEndSeparator(final String filename) {
-        return doGetPath(filename, 0);
-    }
-
-    /**
-     * Does the work of getting the path.
-     *
-     * @param filename  the filename
-     * @param separatorAdd  0 to omit the end separator, 1 to return it
-     * @return the path. Null bytes inside string will be removed
-     */
-    private static String doGetPath(final String filename, final int separatorAdd) {
-        if (filename == null) {
-            return null;
-        }
-        final int prefix = getPrefixLength(filename);
-        if (prefix < 0) {
-            return null;
-        }
-        final int index = indexOfLastSeparator(filename);
-        final int endIndex = index+separatorAdd;
-        if (prefix >= filename.length() || index < 0 || prefix >= endIndex) {
-            return "";
-        }
-        String path = filename.substring(prefix, endIndex);
-        failIfNullBytePresent(path);
-        return path;
-    }
-
-    /**
-     * Gets the full path from a full filename, which is the prefix + path.
-     * <p>
-     * This method will handle a file in either Unix or Windows format.
-     * The method is entirely text based, and returns the text before and
-     * including the last forward or backslash.
-     * <pre>
-     * C:\a\b\c.txt --&gt; C:\a\b\
-     * ~/a/b/c.txt  --&gt; ~/a/b/
-     * a.txt        --&gt; ""
-     * a/b/c        --&gt; a/b/
-     * a/b/c/       --&gt; a/b/c/
-     * C:           --&gt; C:
-     * C:\          --&gt; C:\
-     * ~            --&gt; ~/
-     * ~/           --&gt; ~/
-     * ~user        --&gt; ~user/
-     * ~user/       --&gt; ~user/
-     * </pre>
-     * <p>
-     * The output will be the same irrespective of the machine that the code is running on.
-     *
-     * @param filename  the filename to query, null returns null
-     * @return the path of the file, an empty string if none exists, null if invalid
-     */
-    public static String getFullPath(final String filename) {
-        return doGetFullPath(filename, true);
-    }
-
-    /**
-     * Gets the full path from a full filename, which is the prefix + path,
-     * and also excluding the final directory separator.
-     * <p>
-     * This method will handle a file in either Unix or Windows format.
-     * The method is entirely text based, and returns the text before the
-     * last forward or backslash.
-     * <pre>
-     * C:\a\b\c.txt --&gt; C:\a\b
-     * ~/a/b/c.txt  --&gt; ~/a/b
-     * a.txt        --&gt; ""
-     * a/b/c        --&gt; a/b
-     * a/b/c/       --&gt; a/b/c
-     * C:           --&gt; C:
-     * C:\          --&gt; C:\
-     * ~            --&gt; ~
-     * ~/           --&gt; ~
-     * ~user        --&gt; ~user
-     * ~user/       --&gt; ~user
-     * </pre>
-     * <p>
-     * The output will be the same irrespective of the machine that the code is running on.
-     *
-     * @param filename  the filename to query, null returns null
-     * @return the path of the file, an empty string if none exists, null if invalid
-     */
-    public static String getFullPathNoEndSeparator(final String filename) {
-        return doGetFullPath(filename, false);
-    }
-
-    /**
-     * Does the work of getting the path.
-     *
-     * @param filename  the filename
-     * @param includeSeparator  true to include the end separator
-     * @return the path
-     */
-    private static String doGetFullPath(final String filename, final boolean includeSeparator) {
-        if (filename == null) {
-            return null;
-        }
-        final int prefix = getPrefixLength(filename);
-        if (prefix < 0) {
-            return null;
-        }
-        if (prefix >= filename.length()) {
-            if (includeSeparator) {
-                return getPrefix(filename);  // add end slash if necessary
-            } else {
-                return filename;
-            }
-        }
-        final int index = indexOfLastSeparator(filename);
-        if (index < 0) {
-            return filename.substring(0, prefix);
-        }
-        int end = index + (includeSeparator ?  1 : 0);
-        if (end == 0) {
-            end++;
-        }
-        return filename.substring(0, end);
-    }
-
-    /**
-     * Gets the name minus the path from a full filename.
-     * <p>
-     * This method will handle a file in either Unix or Windows format.
-     * The text after the last forward or backslash is returned.
-     * <pre>
-     * a/b/c.txt --&gt; c.txt
-     * a.txt     --&gt; a.txt
-     * a/b/c     --&gt; c
-     * a/b/c/    --&gt; ""
-     * </pre>
-     * <p>
-     * The output will be the same irrespective of the machine that the code is running on.
-     *
-     * @param filename  the filename to query, null returns null
-     * @return the name of the file without the path, or an empty string if none exists.
-     * Null bytes inside string will be removed
-     */
-    public static String getName(final String filename) {
-        if (filename == null) {
-            return null;
-        }
-        failIfNullBytePresent(filename);
-        final int index = indexOfLastSeparator(filename);
-        return filename.substring(index + 1);
-    }
-
-    /**
-     * Check the input for null bytes, a sign of unsanitized data being passed to to file level functions.
-     *
-     * This may be used for poison byte attacks.
-     * @param path the path to check
-     */
-    private static void failIfNullBytePresent(String path) {
-        int len = path.length();
-        for (int i = 0; i < len; i++) {
-            if (path.charAt(i) == 0) {
-                throw new IllegalArgumentException("Null byte present in file/path name. There are no " +
-                        "known legitimate use cases for such data, but several injection attacks may use it");
-            }
-        }
-    }
-
-    /**
-     * Gets the base name, minus the full path and extension, from a full filename.
-     * <p>
-     * This method will handle a file in either Unix or Windows format.
-     * The text after the last forward or backslash and before the last dot is returned.
-     * <pre>
-     * a/b/c.txt --&gt; c
-     * a.txt     --&gt; a
-     * a/b/c     --&gt; c
-     * a/b/c/    --&gt; ""
-     * </pre>
-     * <p>
-     * The output will be the same irrespective of the machine that the code is running on.
-     *
-     * @param filename  the filename to query, null returns null
-     * @return the name of the file without the path, or an empty string if none exists. Null bytes inside string
-     * will be removed
-     */
-    public static String getBaseName(final String filename) {
-        return removeExtension(getName(filename));
-    }
-
-    /**
-     * Gets the extension of a filename.
-     * <p>
-     * This method returns the textual part of the filename after the last dot.
-     * There must be no directory separator after the dot.
-     * <pre>
-     * foo.txt      --&gt; "txt"
-     * a/b/c.jpg    --&gt; "jpg"
-     * a/b.txt/c    --&gt; ""
-     * a/b/c        --&gt; ""
-     * </pre>
-     * <p>
-     * The output will be the same irrespective of the machine that the code is running on.
-     *
-     * @param filename the filename to retrieve the extension of.
-     * @return the extension of the file or an empty string if none exists or {@code null}
-     * if the filename is {@code null}.
-     */
-    public static String getExtension(final String filename) {
-        if (filename == null) {
-            return null;
-        }
-        final int index = indexOfExtension(filename);
-        if (index == NOT_FOUND) {
-            return "";
-        } else {
-            return filename.substring(index + 1);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Removes the extension from a filename.
-     * <p>
-     * This method returns the textual part of the filename before the last dot.
-     * There must be no directory separator after the dot.
-     * <pre>
-     * foo.txt    --&gt; foo
-     * a\b\c.jpg  --&gt; a\b\c
-     * a\b\c      --&gt; a\b\c
-     * a.b\c      --&gt; a.b\c
-     * </pre>
-     * <p>
-     * The output will be the same irrespective of the machine that the code is running on.
-     *
-     * @param filename  the filename to query, null returns null
-     * @return the filename minus the extension
-     */
-    public static String removeExtension(final String filename) {
-        if (filename == null) {
-            return null;
-        }
-        failIfNullBytePresent(filename);
-
-        final int index = indexOfExtension(filename);
-        if (index == NOT_FOUND) {
-            return filename;
-        } else {
-            return filename.substring(0, index);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Checks whether two filenames are equal exactly.
-     * <p>
-     * No processing is performed on the filenames other than comparison,
-     * thus this is merely a null-safe case-sensitive equals.
-     *
-     * @param filename1  the first filename to query, may be null
-     * @param filename2  the second filename to query, may be null
-     * @return true if the filenames are equal, null equals null
-     * @see IOCase#SENSITIVE
-     */
-    public static boolean equals(final String filename1, final String filename2) {
-        return equals(filename1, filename2, false, IOCase.SENSITIVE);
-    }
-
-    /**
-     * Checks whether two filenames are equal using the case rules of the system.
-     * <p>
-     * No processing is performed on the filenames other than comparison.
-     * The check is case-sensitive on Unix and case-insensitive on Windows.
-     *
-     * @param filename1  the first filename to query, may be null
-     * @param filename2  the second filename to query, may be null
-     * @return true if the filenames are equal, null equals null
-     * @see IOCase#SYSTEM
-     */
-    public static boolean equalsOnSystem(final String filename1, final String filename2) {
-        return equals(filename1, filename2, false, IOCase.SYSTEM);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Checks whether two filenames are equal after both have been normalized.
-     * <p>
-     * Both filenames are first passed to {@link #normalize(String)}.
-     * The check is then performed in a case-sensitive manner.
-     *
-     * @param filename1  the first filename to query, may be null
-     * @param filename2  the second filename to query, may be null
-     * @return true if the filenames are equal, null equals null
-     * @see IOCase#SENSITIVE
-     */
-    public static boolean equalsNormalized(final String filename1, final String filename2) {
-        return equals(filename1, filename2, true, IOCase.SENSITIVE);
-    }
-
-    /**
-     * Checks whether two filenames are equal after both have been normalized
-     * and using the case rules of the system.
-     * <p>
-     * Both filenames are first passed to {@link #normalize(String)}.
-     * The check is then performed case-sensitive on Unix and
-     * case-insensitive on Windows.
-     *
-     * @param filename1  the first filename to query, may be null
-     * @param filename2  the second filename to query, may be null
-     * @return true if the filenames are equal, null equals null
-     * @see IOCase#SYSTEM
-     */
-    public static boolean equalsNormalizedOnSystem(final String filename1, final String filename2) {
-        return equals(filename1, filename2, true, IOCase.SYSTEM);
-    }
-
-    /**
-     * Checks whether two filenames are equal, optionally normalizing and providing
-     * control over the case-sensitivity.
-     *
-     * @param filename1  the first filename to query, may be null
-     * @param filename2  the second filename to query, may be null
-     * @param normalized  whether to normalize the filenames
-     * @param caseSensitivity  what case sensitivity rule to use, null means case-sensitive
-     * @return true if the filenames are equal, null equals null
-     * @since 1.3
-     */
-    public static boolean equals(
-            String filename1, String filename2,
-            final boolean normalized, IOCase caseSensitivity) {
-
-        if (filename1 == null || filename2 == null) {
-            return filename1 == null && filename2 == null;
-        }
-        if (normalized) {
-            filename1 = normalize(filename1);
-            filename2 = normalize(filename2);
-            if (filename1 == null || filename2 == null) {
-                throw new NullPointerException(
-                    "Error normalizing one or both of the file names");
-            }
-        }
-        if (caseSensitivity == null) {
-            caseSensitivity = IOCase.SENSITIVE;
-        }
-        return caseSensitivity.checkEquals(filename1, filename2);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Checks whether the extension of the filename is that specified.
-     * <p>
-     * This method obtains the extension as the textual part of the filename
-     * after the last dot. There must be no directory separator after the dot.
-     * The extension check is case-sensitive on all platforms.
-     *
-     * @param filename  the filename to query, null returns false
-     * @param extension  the extension to check for, null or empty checks for no extension
-     * @return true if the filename has the specified extension
-     * @throws java.lang.IllegalArgumentException if the supplied filename contains null bytes
-     */
-    public static boolean isExtension(final String filename, final String extension) {
-        if (filename == null) {
-            return false;
-        }
-        failIfNullBytePresent(filename);
-
-        if (extension == null || extension.isEmpty()) {
-            return indexOfExtension(filename) == NOT_FOUND;
-        }
-        final String fileExt = getExtension(filename);
-        return fileExt.equals(extension);
-    }
-
-    /**
-     * Checks whether the extension of the filename is one of those specified.
-     * <p>
-     * This method obtains the extension as the textual part of the filename
-     * after the last dot. There must be no directory separator after the dot.
-     * The extension check is case-sensitive on all platforms.
-     *
-     * @param filename  the filename to query, null returns false
-     * @param extensions  the extensions to check for, null checks for no extension
-     * @return true if the filename is one of the extensions
-     * @throws java.lang.IllegalArgumentException if the supplied filename contains null bytes
-     */
-    public static boolean isExtension(final String filename, final String[] extensions) {
-        if (filename == null) {
-            return false;
-        }
-        failIfNullBytePresent(filename);
-
-        if (extensions == null || extensions.length == 0) {
-            return indexOfExtension(filename) == NOT_FOUND;
-        }
-        final String fileExt = getExtension(filename);
-        for (final String extension : extensions) {
-            if (fileExt.equals(extension)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Checks whether the extension of the filename is one of those specified.
-     * <p>
-     * This method obtains the extension as the textual part of the filename
-     * after the last dot. There must be no directory separator after the dot.
-     * The extension check is case-sensitive on all platforms.
-     *
-     * @param filename  the filename to query, null returns false
-     * @param extensions  the extensions to check for, null checks for no extension
-     * @return true if the filename is one of the extensions
-     * @throws java.lang.IllegalArgumentException if the supplied filename contains null bytes
-     */
-    public static boolean isExtension(final String filename, final Collection<String> extensions) {
-        if (filename == null) {
-            return false;
-        }
-        failIfNullBytePresent(filename);
-
-        if (extensions == null || extensions.isEmpty()) {
-            return indexOfExtension(filename) == NOT_FOUND;
-        }
-        final String fileExt = getExtension(filename);
-        for (final String extension : extensions) {
-            if (fileExt.equals(extension)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Checks a filename to see if it matches the specified wildcard matcher,
-     * always testing case-sensitive.
-     * <p>
-     * The wildcard matcher uses the characters '?' and '*' to represent a
-     * single or multiple (zero or more) wildcard characters.
-     * This is the same as often found on Dos/Unix command lines.
-     * The check is case-sensitive always.
-     * <pre>
-     * wildcardMatch("c.txt", "*.txt")      --&gt; true
-     * wildcardMatch("c.txt", "*.jpg")      --&gt; false
-     * wildcardMatch("a/b/c.txt", "a/b/*")  --&gt; true
-     * wildcardMatch("c.txt", "*.???")      --&gt; true
-     * wildcardMatch("c.txt", "*.????")     --&gt; false
-     * </pre>
-     * N.B. the sequence "*?" does not work properly at present in match strings.
-     *
-     * @param filename  the filename to match on
-     * @param wildcardMatcher  the wildcard string to match against
-     * @return true if the filename matches the wilcard string
-     * @see IOCase#SENSITIVE
-     */
-    public static boolean wildcardMatch(final String filename, final String wildcardMatcher) {
-        return wildcardMatch(filename, wildcardMatcher, IOCase.SENSITIVE);
-    }
-
-    /**
-     * Checks a filename to see if it matches the specified wildcard matcher
-     * using the case rules of the system.
-     * <p>
-     * The wildcard matcher uses the characters '?' and '*' to represent a
-     * single or multiple (zero or more) wildcard characters.
-     * This is the same as often found on Dos/Unix command lines.
-     * The check is case-sensitive on Unix and case-insensitive on Windows.
-     * <pre>
-     * wildcardMatch("c.txt", "*.txt")      --&gt; true
-     * wildcardMatch("c.txt", "*.jpg")      --&gt; false
-     * wildcardMatch("a/b/c.txt", "a/b/*")  --&gt; true
-     * wildcardMatch("c.txt", "*.???")      --&gt; true
-     * wildcardMatch("c.txt", "*.????")     --&gt; false
-     * </pre>
-     * N.B. the sequence "*?" does not work properly at present in match strings.
-     *
-     * @param filename  the filename to match on
-     * @param wildcardMatcher  the wildcard string to match against
-     * @return true if the filename matches the wilcard string
-     * @see IOCase#SYSTEM
-     */
-    public static boolean wildcardMatchOnSystem(final String filename, final String wildcardMatcher) {
-        return wildcardMatch(filename, wildcardMatcher, IOCase.SYSTEM);
-    }
-
-    /**
-     * Checks a filename to see if it matches the specified wildcard matcher
-     * allowing control over case-sensitivity.
-     * <p>
-     * The wildcard matcher uses the characters '?' and '*' to represent a
-     * single or multiple (zero or more) wildcard characters.
-     * N.B. the sequence "*?" does not work properly at present in match strings.
-     *
-     * @param filename  the filename to match on
-     * @param wildcardMatcher  the wildcard string to match against
-     * @param caseSensitivity  what case sensitivity rule to use, null means case-sensitive
-     * @return true if the filename matches the wilcard string
-     * @since 1.3
-     */
-    public static boolean wildcardMatch(final String filename, final String wildcardMatcher, IOCase caseSensitivity) {
-        if (filename == null && wildcardMatcher == null) {
-            return true;
-        }
-        if (filename == null || wildcardMatcher == null) {
-            return false;
-        }
-        if (caseSensitivity == null) {
-            caseSensitivity = IOCase.SENSITIVE;
-        }
-        final String[] wcs = splitOnTokens(wildcardMatcher);
-        boolean anyChars = false;
-        int textIdx = 0;
-        int wcsIdx = 0;
-        final Stack<int[]> backtrack = new Stack<int[]>();
-
-        // loop around a backtrack stack, to handle complex * matching
-        do {
-            if (backtrack.size() > 0) {
-                final int[] array = backtrack.pop();
-                wcsIdx = array[0];
-                textIdx = array[1];
-                anyChars = true;
-            }
-
-            // loop whilst tokens and text left to process
-            while (wcsIdx < wcs.length) {
-
-                if (wcs[wcsIdx].equals("?")) {
-                    // ? so move to next text char
-                    textIdx++;
-                    if (textIdx > filename.length()) {
-                        break;
-                    }
-                    anyChars = false;
-
-                } else if (wcs[wcsIdx].equals("*")) {
-                    // set any chars status
-                    anyChars = true;
-                    if (wcsIdx == wcs.length - 1) {
-                        textIdx = filename.length();
-                    }
-
-                } else {
-                    // matching text token
-                    if (anyChars) {
-                        // any chars then try to locate text token
-                        textIdx = caseSensitivity.checkIndexOf(filename, textIdx, wcs[wcsIdx]);
-                        if (textIdx == NOT_FOUND) {
-                            // token not found
-                            break;
-                        }
-                        final int repeat = caseSensitivity.checkIndexOf(filename, textIdx + 1, wcs[wcsIdx]);
-                        if (repeat >= 0) {
-                            backtrack.push(new int[] {wcsIdx, repeat});
-                        }
-                    } else {
-                        // matching from current position
-                        if (!caseSensitivity.checkRegionMatches(filename, textIdx, wcs[wcsIdx])) {
-                            // couldnt match token
-                            break;
-                        }
-                    }
-
-                    // matched text token, move text index to end of matched token
-                    textIdx += wcs[wcsIdx].length();
-                    anyChars = false;
-                }
-
-                wcsIdx++;
-            }
-
-            // full match
-            if (wcsIdx == wcs.length && textIdx == filename.length()) {
-                return true;
-            }
-
-        } while (backtrack.size() > 0);
-
-        return false;
-    }
-
-    /**
-     * Splits a string into a number of tokens.
-     * The text is split by '?' and '*'.
-     * Where multiple '*' occur consecutively they are collapsed into a single '*'.
-     *
-     * @param text  the text to split
-     * @return the array of tokens, never null
-     */
-    static String[] splitOnTokens(final String text) {
-        // used by wildcardMatch
-        // package level so a unit test may run on this
-
-        if (text.indexOf('?') == NOT_FOUND && text.indexOf('*') == NOT_FOUND) {
-            return new String[] { text };
-        }
-
-        final char[] array = text.toCharArray();
-        final ArrayList<String> list = new ArrayList<String>();
-        final StringBuilder buffer = new StringBuilder();
-        char prevChar = 0;
-        for (final char ch : array) {
-            if (ch == '?' || ch == '*') {
-                if (buffer.length() != 0) {
-                    list.add(buffer.toString());
-                    buffer.setLength(0);
-                }
-                if (ch == '?') {
-                    list.add("?");
-                } else if (prevChar != '*') {// ch == '*' here; check if previous char was '*'
-                    list.add("*");
-                }
-            } else {
-                buffer.append(ch);
-            }
-            prevChar = ch;
-        }
-        if (buffer.length() != 0) {
-            list.add(buffer.toString());
-        }
-
-        return list.toArray( new String[ list.size() ] );
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/HexDump.java b/trunk/src/main/java/org/apache/commons/io/HexDump.java
deleted file mode 100644
index 5c5f30a..0000000
--- a/trunk/src/main/java/org/apache/commons/io/HexDump.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.charset.Charset;
-
-/**
- * Dumps data in hexadecimal format.
- * <p>
- * Provides a single function to take an array of bytes and display it
- * in hexadecimal form.
- * <p>
- * Origin of code: POI.
- *
- * @version $Id$
- */
-public class HexDump {
-
-    /**
-     * Instances should NOT be constructed in standard programming.
-     */
-    public HexDump() {
-        super();
-    }
-
-    /**
-     * Dump an array of bytes to an OutputStream. The output is formatted
-     * for human inspection, with a hexadecimal offset followed by the
-     * hexadecimal values of the next 16 bytes of data and the printable ASCII
-     * characters (if any) that those bytes represent printed per each line
-     * of output.
-     * <p>
-     * The offset argument specifies the start offset of the data array
-     * within a larger entity like a file or an incoming stream. For example,
-     * if the data array contains the third kibibyte of a file, then the
-     * offset argument should be set to 2048. The offset value printed
-     * at the beginning of each line indicates where in that larger entity
-     * the first byte on that line is located.
-     * <p>
-     * All bytes between the given index (inclusive) and the end of the
-     * data array are dumped.
-     *
-     * @param data  the byte array to be dumped
-     * @param offset  offset of the byte array within a larger entity
-     * @param stream  the OutputStream to which the data is to be
-     *               written
-     * @param index initial index into the byte array
-     *
-     * @throws IOException is thrown if anything goes wrong writing
-     *         the data to stream
-     * @throws ArrayIndexOutOfBoundsException if the index is
-     *         outside the data array's bounds
-     * @throws IllegalArgumentException if the output stream is null
-     */
-
-    public static void dump(final byte[] data, final long offset,
-                            final OutputStream stream, final int index)
-            throws IOException, ArrayIndexOutOfBoundsException,
-            IllegalArgumentException {
-
-        if (index < 0 || index >= data.length) {
-            throw new ArrayIndexOutOfBoundsException(
-                    "illegal index: " + index + " into array of length "
-                    + data.length);
-        }
-        if (stream == null) {
-            throw new IllegalArgumentException("cannot write to nullstream");
-        }
-        long display_offset = offset + index;
-        final StringBuilder buffer = new StringBuilder(74);
-
-        for (int j = index; j < data.length; j += 16) {
-            int chars_read = data.length - j;
-
-            if (chars_read > 16) {
-                chars_read = 16;
-            }
-            dump(buffer, display_offset).append(' ');
-            for (int k = 0; k < 16; k++) {
-                if (k < chars_read) {
-                    dump(buffer, data[k + j]);
-                } else {
-                    buffer.append("  ");
-                }
-                buffer.append(' ');
-            }
-            for (int k = 0; k < chars_read; k++) {
-                if (data[k + j] >= ' ' && data[k + j] < 127) {
-                    buffer.append((char) data[k + j]);
-                } else {
-                    buffer.append('.');
-                }
-            }
-            buffer.append(EOL);
-            // make explicit the dependency on the default encoding
-            stream.write(buffer.toString().getBytes(Charset.defaultCharset()));
-            stream.flush();
-            buffer.setLength(0);
-            display_offset += chars_read;
-        }
-    }
-
-    /**
-     * The line-separator (initializes to "line.separator" system property.
-     */
-    public static final String EOL =
-            System.getProperty("line.separator");
-    private static final char[] _hexcodes =
-            {
-                '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
-                'A', 'B', 'C', 'D', 'E', 'F'
-            };
-    private static final int[] _shifts =
-            {
-                28, 24, 20, 16, 12, 8, 4, 0
-            };
-
-    /**
-     * Dump a long value into a StringBuilder.
-     *
-     * @param _lbuffer the StringBuilder to dump the value in
-     * @param value  the long value to be dumped
-     * @return StringBuilder containing the dumped value.
-     */
-    private static StringBuilder dump(final StringBuilder _lbuffer, final long value) {
-        for (int j = 0; j < 8; j++) {
-            _lbuffer
-                    .append(_hexcodes[(int) (value >> _shifts[j]) & 15]);
-        }
-        return _lbuffer;
-    }
-
-    /**
-     * Dump a byte value into a StringBuilder.
-     *
-     * @param _cbuffer the StringBuilder to dump the value in
-     * @param value  the byte value to be dumped
-     * @return StringBuilder containing the dumped value.
-     */
-    private static StringBuilder dump(final StringBuilder _cbuffer, final byte value) {
-        for (int j = 0; j < 2; j++) {
-            _cbuffer.append(_hexcodes[value >> _shifts[j + 6] & 15]);
-        }
-        return _cbuffer;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/IOCase.java b/trunk/src/main/java/org/apache/commons/io/IOCase.java
deleted file mode 100644
index 867bdef..0000000
--- a/trunk/src/main/java/org/apache/commons/io/IOCase.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.Serializable;
-
-/**
- * Enumeration of IO case sensitivity.
- * <p>
- * Different filing systems have different rules for case-sensitivity.
- * Windows is case-insensitive, Unix is case-sensitive.
- * <p>
- * This class captures that difference, providing an enumeration to
- * control how filename comparisons should be performed. It also provides
- * methods that use the enumeration to perform comparisons.
- * <p>
- * Wherever possible, you should use the <code>check</code> methods in this
- * class to compare filenames.
- *
- * @version $Id$
- * @since 1.3
- */
-public enum IOCase implements Serializable {
-
-    /**
-     * The constant for case sensitive regardless of operating system.
-     */
-    SENSITIVE ("Sensitive", true),
-
-    /**
-     * The constant for case insensitive regardless of operating system.
-     */
-    INSENSITIVE ("Insensitive", false),
-
-    /**
-     * The constant for case sensitivity determined by the current operating system.
-     * Windows is case-insensitive when comparing filenames, Unix is case-sensitive.
-     * <p>
-     * <strong>Note:</strong> This only caters for Windows and Unix. Other operating
-     * systems (e.g. OSX and OpenVMS) are treated as case sensitive if they use the
-     * Unix file separator and case-insensitive if they use the Windows file separator
-     * (see {@link java.io.File#separatorChar}).
-     * <p>
-     * If you derialize this constant of Windows, and deserialize on Unix, or vice
-     * versa, then the value of the case-sensitivity flag will change.
-     */
-    SYSTEM ("System", !FilenameUtils.isSystemWindows());
-
-    /** Serialization version. */
-    private static final long serialVersionUID = -6343169151696340687L;
-
-    /** The enumeration name. */
-    private final String name;
-
-    /** The sensitivity flag. */
-    private final transient boolean sensitive;
-
-    //-----------------------------------------------------------------------
-    /**
-     * Factory method to create an IOCase from a name.
-     *
-     * @param name  the name to find
-     * @return the IOCase object
-     * @throws IllegalArgumentException if the name is invalid
-     */
-    public static IOCase forName(final String name) {
-        for (IOCase ioCase : IOCase.values())
-        {
-            if (ioCase.getName().equals(name))
-            {
-                return ioCase;
-            }
-        }
-        throw new IllegalArgumentException("Invalid IOCase name: " + name);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Private constructor.
-     *
-     * @param name  the name
-     * @param sensitive  the sensitivity
-     */
-    private IOCase(final String name, final boolean sensitive) {
-        this.name = name;
-        this.sensitive = sensitive;
-    }
-
-    /**
-     * Replaces the enumeration from the stream with a real one.
-     * This ensures that the correct flag is set for SYSTEM.
-     *
-     * @return the resolved object
-     */
-    private Object readResolve() {
-        return forName(name);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Gets the name of the constant.
-     *
-     * @return the name of the constant
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Does the object represent case sensitive comparison.
-     *
-     * @return true if case sensitive
-     */
-    public boolean isCaseSensitive() {
-        return sensitive;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Compares two strings using the case-sensitivity rule.
-     * <p>
-     * This method mimics {@link String#compareTo} but takes case-sensitivity
-     * into account.
-     *
-     * @param str1  the first string to compare, not null
-     * @param str2  the second string to compare, not null
-     * @return true if equal using the case rules
-     * @throws NullPointerException if either string is null
-     */
-    public int checkCompareTo(final String str1, final String str2) {
-        if (str1 == null || str2 == null) {
-            throw new NullPointerException("The strings must not be null");
-        }
-        return sensitive ? str1.compareTo(str2) : str1.compareToIgnoreCase(str2);
-    }
-
-    /**
-     * Compares two strings using the case-sensitivity rule.
-     * <p>
-     * This method mimics {@link String#equals} but takes case-sensitivity
-     * into account.
-     *
-     * @param str1  the first string to compare, not null
-     * @param str2  the second string to compare, not null
-     * @return true if equal using the case rules
-     * @throws NullPointerException if either string is null
-     */
-    public boolean checkEquals(final String str1, final String str2) {
-        if (str1 == null || str2 == null) {
-            throw new NullPointerException("The strings must not be null");
-        }
-        return sensitive ? str1.equals(str2) : str1.equalsIgnoreCase(str2);
-    }
-
-    /**
-     * Checks if one string starts with another using the case-sensitivity rule.
-     * <p>
-     * This method mimics {@link String#startsWith(String)} but takes case-sensitivity
-     * into account.
-     *
-     * @param str  the string to check, not null
-     * @param start  the start to compare against, not null
-     * @return true if equal using the case rules
-     * @throws NullPointerException if either string is null
-     */
-    public boolean checkStartsWith(final String str, final String start) {
-        return str.regionMatches(!sensitive, 0, start, 0, start.length());
-    }
-
-    /**
-     * Checks if one string ends with another using the case-sensitivity rule.
-     * <p>
-     * This method mimics {@link String#endsWith} but takes case-sensitivity
-     * into account.
-     *
-     * @param str  the string to check, not null
-     * @param end  the end to compare against, not null
-     * @return true if equal using the case rules
-     * @throws NullPointerException if either string is null
-     */
-    public boolean checkEndsWith(final String str, final String end) {
-        final int endLen = end.length();
-        return str.regionMatches(!sensitive, str.length() - endLen, end, 0, endLen);
-    }
-
-    /**
-     * Checks if one string contains another starting at a specific index using the
-     * case-sensitivity rule.
-     * <p>
-     * This method mimics parts of {@link String#indexOf(String, int)}
-     * but takes case-sensitivity into account.
-     *
-     * @param str  the string to check, not null
-     * @param strStartIndex  the index to start at in str
-     * @param search  the start to search for, not null
-     * @return the first index of the search String,
-     *  -1 if no match or {@code null} string input
-     * @throws NullPointerException if either string is null
-     * @since 2.0
-     */
-    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)) {
-                    return i;
-                }
-            }
-        }
-        return -1;
-    }
-
-    /**
-     * Checks if one string contains another at a specific index using the case-sensitivity rule.
-     * <p>
-     * This method mimics parts of {@link String#regionMatches(boolean, int, String, int, int)}
-     * but takes case-sensitivity into account.
-     *
-     * @param str  the string to check, not null
-     * @param strStartIndex  the index to start at in str
-     * @param search  the start to search for, not null
-     * @return true if equal using the case rules
-     * @throws NullPointerException if either string is null
-     */
-    public boolean checkRegionMatches(final String str, final int strStartIndex, final String search) {
-        return str.regionMatches(!sensitive, strStartIndex, search, 0, search.length());
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Gets a string describing the sensitivity.
-     *
-     * @return a string describing the sensitivity
-     */
-    @Override
-    public String toString() {
-        return name;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/IOExceptionWithCause.java b/trunk/src/main/java/org/apache/commons/io/IOExceptionWithCause.java
deleted file mode 100644
index a469129..0000000
--- a/trunk/src/main/java/org/apache/commons/io/IOExceptionWithCause.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.io;
-
-import java.io.IOException;
-
-/**
- * Subclasses IOException with the {@link Throwable} constructors missing before Java 6.
- * 
- * @version $Id$
- * @since 1.4
- * @deprecated (since 2.5) use {@link IOException} instead
- */
-@Deprecated
-public class IOExceptionWithCause extends IOException {
-
-    /**
-     * Defines the serial version UID.
-     */
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * Constructs a new instance with the given message and cause.
-     * <p>
-     * As specified in {@link Throwable}, the message in the given <code>cause</code> is not used in this instance's
-     * message.
-     * </p>
-     * 
-     * @param message
-     *            the message (see {@link #getMessage()})
-     * @param cause
-     *            the cause (see {@link #getCause()}). A {@code null} value is allowed.
-     */
-    public IOExceptionWithCause(final String message, final Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Constructs a new instance with the given cause.
-     * <p>
-     * The message is set to <code>cause==null ? null : cause.toString()</code>, which by default contains the class
-     * and message of <code>cause</code>. This constructor is useful for call sites that just wrap another throwable.
-     * </p>
-     * 
-     * @param cause
-     *            the cause (see {@link #getCause()}). A {@code null} value is allowed.
-     */
-    public IOExceptionWithCause(final Throwable cause) {
-        super(cause);
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/IOUtils.java b/trunk/src/main/java/org/apache/commons/io/IOUtils.java
deleted file mode 100644
index c7ace28..0000000
--- a/trunk/src/main/java/org/apache/commons/io/IOUtils.java
+++ /dev/null
@@ -1,3078 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.ByteArrayInputStream;
-import java.io.CharArrayWriter;
-import java.io.Closeable;
-import java.io.EOFException;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.Reader;
-import java.io.Writer;
-import java.net.HttpURLConnection;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLConnection;
-import java.nio.ByteBuffer;
-import java.nio.channels.ReadableByteChannel;
-import java.nio.channels.Selector;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.commons.io.output.StringBuilderWriter;
-
-/**
- * General IO stream manipulation utilities.
- * <p>
- * This class provides static utility methods for input/output operations.
- * <ul>
- * <li>closeQuietly - these methods close a stream ignoring nulls and exceptions
- * <li>toXxx/read - these methods read data from a stream
- * <li>write - these methods write data to a stream
- * <li>copy - these methods copy all the data from one stream to another
- * <li>contentEquals - these methods compare the content of two streams
- * </ul>
- * <p>
- * The byte-to-char methods and char-to-byte methods involve a conversion step.
- * Two methods are provided in each case, one that uses the platform default
- * encoding and the other which allows you to specify an encoding. You are
- * encouraged to always specify an encoding because relying on the platform
- * default can lead to unexpected results, for example when moving from
- * development to production.
- * <p>
- * All the methods in this class that read a stream are buffered internally.
- * This means that there is no cause to use a <code>BufferedInputStream</code>
- * or <code>BufferedReader</code>. The default buffer size of 4K has been shown
- * to be efficient in tests.
- * <p>
- * The various copy methods all delegate the actual copying to one of the following methods:
- * <ul>
- * <li>{@link #copyLarge(InputStream, OutputStream, byte[])}</li>
- * <li>{@link #copyLarge(InputStream, OutputStream, long, long, byte[])}</li>
- * <li>{@link #copyLarge(Reader, Writer, char[])}</li>
- * <li>{@link #copyLarge(Reader, Writer, long, long, char[])}</li>
- * </ul>
- * For example, {@link #copy(InputStream, OutputStream)} calls {@link #copyLarge(InputStream, OutputStream)}
- * which calls {@link #copy(InputStream, OutputStream, int)} which creates the buffer and calls
- * {@link #copyLarge(InputStream, OutputStream, byte[])}.
- * <p>
- * Applications can re-use buffers by using the underlying methods directly.
- * This may improve performance for applications that need to do a lot of copying.
- * <p>
- * Wherever possible, the methods in this class do <em>not</em> flush or close
- * the stream. This is to avoid making non-portable assumptions about the
- * streams' origin and further use. Thus the caller is still responsible for
- * closing streams after use.
- * <p>
- * Origin of code: Excalibur.
- *
- * @version $Id$
- */
-public class IOUtils {
-    // NOTE: This class is focussed on InputStream, OutputStream, Reader and
-    // Writer. Each method should take at least one of these as a parameter,
-    // or return one of them.
-
-    /**
-     * Represents the end-of-file (or stream).
-     * @since 2.5 (made public)
-     */
-    public static final int EOF = -1;
-
-    /**
-     * The Unix directory separator character.
-     */
-    public static final char DIR_SEPARATOR_UNIX = '/';
-    /**
-     * The Windows directory separator character.
-     */
-    public static final char DIR_SEPARATOR_WINDOWS = '\\';
-    /**
-     * The system directory separator character.
-     */
-    public static final char DIR_SEPARATOR = File.separatorChar;
-    /**
-     * The Unix line separator string.
-     */
-    public static final String LINE_SEPARATOR_UNIX = "\n";
-    /**
-     * The Windows line separator string.
-     */
-    public static final String LINE_SEPARATOR_WINDOWS = "\r\n";
-    /**
-     * The system line separator string.
-     */
-    public static final String LINE_SEPARATOR;
-
-    static {
-        // avoid security issues
-        final StringBuilderWriter buf = new StringBuilderWriter(4);
-        final PrintWriter out = new PrintWriter(buf);
-        out.println();
-        LINE_SEPARATOR = buf.toString();
-        out.close();
-    }
-
-    /**
-     * The default buffer size ({@value}) to use for
-     * {@link #copyLarge(InputStream, OutputStream)}
-     * and
-     * {@link #copyLarge(Reader, Writer)}
-     */
-    private static final int DEFAULT_BUFFER_SIZE = 1024 * 4;
-
-    /**
-     * The default buffer size to use for the skip() methods.
-     */
-    private static final int SKIP_BUFFER_SIZE = 2048;
-
-    // Allocated in the relevant skip method if necessary.
-    /*
-     * These buffers are static and are shared between threads.
-     * This is possible because the buffers are write-only - the contents are never read.
-     *
-     * N.B. there is no need to synchronize when creating these because:
-     * - we don't care if the buffer is created multiple times (the data is ignored)
-     * - we always use the same size buffer, so if it it is recreated it will still be OK
-     * (if the buffer size were variable, we would need to synch. to ensure some other thread
-     * did not create a smaller one)
-     */
-    private static char[] SKIP_CHAR_BUFFER;
-    private static byte[] SKIP_BYTE_BUFFER;
-
-    /**
-     * Instances should NOT be constructed in standard programming.
-     */
-    public IOUtils() {
-        super();
-    }
-
-    //-----------------------------------------------------------------------
-
-    /**
-     * Closes a URLConnection.
-     *
-     * @param conn the connection to close.
-     * @since 2.4
-     */
-    public static void close(final URLConnection conn) {
-        if (conn instanceof HttpURLConnection) {
-            ((HttpURLConnection) conn).disconnect();
-        }
-    }
-
-    /**
-     * Closes an <code>Reader</code> unconditionally.
-     * <p>
-     * Equivalent to {@link Reader#close()}, except any exceptions will be ignored.
-     * This is typically used in finally blocks.
-     * <p>
-     * Example code:
-     * <pre>
-     *   char[] data = new char[1024];
-     *   Reader in = null;
-     *   try {
-     *       in = new FileReader("foo.txt");
-     *       in.read(data);
-     *       in.close(); //close errors are handled
-     *   } catch (Exception e) {
-     *       // error handling
-     *   } finally {
-     *       IOUtils.closeQuietly(in);
-     *   }
-     * </pre>
-     *
-     * @param input the Reader to close, may be null or already closed
-     */
-    public static void closeQuietly(final Reader input) {
-        closeQuietly((Closeable) input);
-    }
-
-    /**
-     * Closes an <code>Writer</code> unconditionally.
-     * <p>
-     * Equivalent to {@link Writer#close()}, except any exceptions will be ignored.
-     * This is typically used in finally blocks.
-     * <p>
-     * Example code:
-     * <pre>
-     *   Writer out = null;
-     *   try {
-     *       out = new StringWriter();
-     *       out.write("Hello World");
-     *       out.close(); //close errors are handled
-     *   } catch (Exception e) {
-     *       // error handling
-     *   } finally {
-     *       IOUtils.closeQuietly(out);
-     *   }
-     * </pre>
-     *
-     * @param output the Writer to close, may be null or already closed
-     */
-    public static void closeQuietly(final Writer output) {
-        closeQuietly((Closeable) output);
-    }
-
-    /**
-     * Closes an <code>InputStream</code> unconditionally.
-     * <p>
-     * Equivalent to {@link InputStream#close()}, except any exceptions will be ignored.
-     * This is typically used in finally blocks.
-     * <p>
-     * Example code:
-     * <pre>
-     *   byte[] data = new byte[1024];
-     *   InputStream in = null;
-     *   try {
-     *       in = new FileInputStream("foo.txt");
-     *       in.read(data);
-     *       in.close(); //close errors are handled
-     *   } catch (Exception e) {
-     *       // error handling
-     *   } finally {
-     *       IOUtils.closeQuietly(in);
-     *   }
-     * </pre>
-     *
-     * @param input the InputStream to close, may be null or already closed
-     */
-    public static void closeQuietly(final InputStream input) {
-        closeQuietly((Closeable) input);
-    }
-
-    /**
-     * Closes an <code>OutputStream</code> unconditionally.
-     * <p>
-     * Equivalent to {@link OutputStream#close()}, except any exceptions will be ignored.
-     * This is typically used in finally blocks.
-     * <p>
-     * Example code:
-     * <pre>
-     * byte[] data = "Hello, World".getBytes();
-     *
-     * OutputStream out = null;
-     * try {
-     *     out = new FileOutputStream("foo.txt");
-     *     out.write(data);
-     *     out.close(); //close errors are handled
-     * } catch (IOException e) {
-     *     // error handling
-     * } finally {
-     *     IOUtils.closeQuietly(out);
-     * }
-     * </pre>
-     *
-     * @param output the OutputStream to close, may be null or already closed
-     */
-    public static void closeQuietly(final OutputStream output) {
-        closeQuietly((Closeable) output);
-    }
-
-    /**
-     * Closes a <code>Closeable</code> unconditionally.
-     * <p>
-     * Equivalent to {@link Closeable#close()}, except any exceptions will be ignored. This is typically used in
-     * finally blocks.
-     * <p>
-     * Example code:
-     * </p>
-     * <pre>
-     * Closeable closeable = null;
-     * try {
-     *     closeable = new FileReader(&quot;foo.txt&quot;);
-     *     // process closeable
-     *     closeable.close();
-     * } catch (Exception e) {
-     *     // error handling
-     * } finally {
-     *     IOUtils.closeQuietly(closeable);
-     * }
-     * </pre>
-     * <p>
-     * Closing all streams:
-     * </p>
-     * <pre>
-     * try {
-     *     return IOUtils.copy(inputStream, outputStream);
-     * } finally {
-     *     IOUtils.closeQuietly(inputStream);
-     *     IOUtils.closeQuietly(outputStream);
-     * }
-     * </pre>
-     *
-     * @param closeable the objects to close, may be null or already closed
-     * @since 2.0
-     */
-    public static void closeQuietly(final Closeable closeable) {
-        try {
-            if (closeable != null) {
-                closeable.close();
-            }
-        } catch (final IOException ioe) {
-            // ignore
-        }
-    }
-
-    /**
-     * Closes a <code>Closeable</code> unconditionally.
-     * <p>
-     * Equivalent to {@link Closeable#close()}, except any exceptions will be ignored.
-     * <p>
-     * This is typically used in finally blocks to ensure that the closeable is closed
-     * even if an Exception was thrown before the normal close statement was reached.
-     * <br>
-     * <b>It should not be used to replace the close statement(s)
-     * which should be present for the non-exceptional case.</b>
-     * <br>
-     * It is only intended to simplify tidying up where normal processing has already failed
-     * and reporting close failure as well is not necessary or useful.
-     * <p>
-     * Example code:
-     * </p>
-     * <pre>
-     * Closeable closeable = null;
-     * try {
-     *     closeable = new FileReader(&quot;foo.txt&quot;);
-     *     // processing using the closeable; may throw an Exception
-     *     closeable.close(); // Normal close - exceptions not ignored
-     * } catch (Exception e) {
-     *     // error handling
-     * } finally {
-     *     <b>IOUtils.closeQuietly(closeable); // In case normal close was skipped due to Exception</b>
-     * }
-     * </pre>
-     * <p>
-     * Closing all streams:
-     * <br>
-     * <pre>
-     * try {
-     *     return IOUtils.copy(inputStream, outputStream);
-     * } finally {
-     *     IOUtils.closeQuietly(inputStream, outputStream);
-     * }
-     * </pre>
-     *
-     * @param closeables the objects to close, may be null or already closed
-     * @see #closeQuietly(Closeable)
-     * @since 2.5
-     */
-    public static void closeQuietly(final Closeable... closeables) {
-        if (closeables == null) {
-            return;
-        }
-        for (final Closeable closeable : closeables) {
-            closeQuietly(closeable);
-        }
-    }
-
-    /**
-     * Closes a <code>Socket</code> unconditionally.
-     * <p>
-     * Equivalent to {@link Socket#close()}, except any exceptions will be ignored.
-     * This is typically used in finally blocks.
-     * <p>
-     * Example code:
-     * <pre>
-     *   Socket socket = null;
-     *   try {
-     *       socket = new Socket("http://www.foo.com/", 80);
-     *       // process socket
-     *       socket.close();
-     *   } catch (Exception e) {
-     *       // error handling
-     *   } finally {
-     *       IOUtils.closeQuietly(socket);
-     *   }
-     * </pre>
-     *
-     * @param sock the Socket to close, may be null or already closed
-     * @since 2.0
-     */
-    public static void closeQuietly(final Socket sock) {
-        if (sock != null) {
-            try {
-                sock.close();
-            } catch (final IOException ioe) {
-                // ignored
-            }
-        }
-    }
-
-    /**
-     * Closes a <code>Selector</code> unconditionally.
-     * <p>
-     * Equivalent to {@link Selector#close()}, except any exceptions will be ignored.
-     * This is typically used in finally blocks.
-     * <p>
-     * Example code:
-     * <pre>
-     *   Selector selector = null;
-     *   try {
-     *       selector = Selector.open();
-     *       // process socket
-     *
-     *   } catch (Exception e) {
-     *       // error handling
-     *   } finally {
-     *       IOUtils.closeQuietly(selector);
-     *   }
-     * </pre>
-     *
-     * @param selector the Selector to close, may be null or already closed
-     * @since 2.2
-     */
-    public static void closeQuietly(final Selector selector) {
-        if (selector != null) {
-            try {
-                selector.close();
-            } catch (final IOException ioe) {
-                // ignored
-            }
-        }
-    }
-
-    /**
-     * Closes a <code>ServerSocket</code> unconditionally.
-     * <p>
-     * Equivalent to {@link ServerSocket#close()}, except any exceptions will be ignored.
-     * This is typically used in finally blocks.
-     * <p>
-     * Example code:
-     * <pre>
-     *   ServerSocket socket = null;
-     *   try {
-     *       socket = new ServerSocket();
-     *       // process socket
-     *       socket.close();
-     *   } catch (Exception e) {
-     *       // error handling
-     *   } finally {
-     *       IOUtils.closeQuietly(socket);
-     *   }
-     * </pre>
-     *
-     * @param sock the ServerSocket to close, may be null or already closed
-     * @since 2.2
-     */
-    public static void closeQuietly(final ServerSocket sock) {
-        if (sock != null) {
-            try {
-                sock.close();
-            } catch (final IOException ioe) {
-                // ignored
-            }
-        }
-    }
-
-    /**
-     * Fetches entire contents of an <code>InputStream</code> and represent
-     * same data as result InputStream.
-     * <p>
-     * This method is useful where,
-     * <ul>
-     * <li>Source InputStream is slow.</li>
-     * <li>It has network resources associated, so we cannot keep it open for
-     * long time.</li>
-     * <li>It has network timeout associated.</li>
-     * </ul>
-     * It can be used in favor of {@link #toByteArray(InputStream)}, since it
-     * avoids unnecessary allocation and copy of byte[].<br>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input Stream to be fully buffered.
-     * @return A fully buffered stream.
-     * @throws IOException if an I/O error occurs
-     * @since 2.0
-     */
-    public static InputStream toBufferedInputStream(final InputStream input) throws IOException {
-        return ByteArrayOutputStream.toBufferedInputStream(input);
-    }
-
-    /**
-     * Fetches entire contents of an <code>InputStream</code> and represent
-     * same data as result InputStream.
-     * <p>
-     * This method is useful where,
-     * <ul>
-     * <li>Source InputStream is slow.</li>
-     * <li>It has network resources associated, so we cannot keep it open for
-     * long time.</li>
-     * <li>It has network timeout associated.</li>
-     * </ul>
-     * It can be used in favor of {@link #toByteArray(InputStream)}, since it
-     * avoids unnecessary allocation and copy of byte[].<br>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input Stream to be fully buffered.
-     * @param size the initial buffer size
-     * @return A fully buffered stream.
-     * @throws IOException if an I/O error occurs
-     * @since 2.5
-     */
-    public static InputStream toBufferedInputStream(final InputStream input, int size) throws IOException {
-        return ByteArrayOutputStream.toBufferedInputStream(input, size);
-    }
-
-    /**
-     * Returns the given reader if it is a {@link BufferedReader}, otherwise creates a BufferedReader from the given
-     * reader.
-     *
-     * @param reader the reader to wrap or return (not null)
-     * @return the given reader or a new {@link BufferedReader} for the given reader
-     * @throws NullPointerException if the input parameter is null
-     * @see #buffer(Reader)
-     * @since 2.2
-     */
-    public static BufferedReader toBufferedReader(final Reader reader) {
-        return reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader);
-    }
-
-    /**
-     * Returns the given reader if it is a {@link BufferedReader}, otherwise creates a BufferedReader from the given
-     * reader.
-     *
-     * @param reader the reader to wrap or return (not null)
-     * @param size the buffer size, if a new BufferedReader is created.
-     * @return the given reader or a new {@link BufferedReader} for the given reader
-     * @throws NullPointerException if the input parameter is null
-     * @see #buffer(Reader)
-     * @since 2.5
-     */
-    public static BufferedReader toBufferedReader(final Reader reader, int size) {
-        return reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader, size);
-    }
-
-    /**
-     * Returns the given reader if it is already a {@link BufferedReader}, otherwise creates a BufferedReader from
-     * the given reader.
-     *
-     * @param reader the reader to wrap or return (not null)
-     * @return the given reader or a new {@link BufferedReader} for the given reader
-     * @throws NullPointerException if the input parameter is null
-     * @since 2.5
-     */
-    public static BufferedReader buffer(final Reader reader) {
-        return reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader);
-    }
-
-    /**
-     * Returns the given reader if it is already a {@link BufferedReader}, otherwise creates a BufferedReader from the
-     * given reader.
-     *
-     * @param reader the reader to wrap or return (not null)
-     * @param size the buffer size, if a new BufferedReader is created.
-     * @return the given reader or a new {@link BufferedReader} for the given reader
-     * @throws NullPointerException if the input parameter is null
-     * @since 2.5
-     */
-    public static BufferedReader buffer(final Reader reader, int size) {
-        return reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader, size);
-    }
-
-    /**
-     * Returns the given Writer if it is already a {@link BufferedWriter}, otherwise creates a BufferedWriter from the
-     * given Writer.
-     *
-     * @param writer the Writer to wrap or return (not null)
-     * @return the given Writer or a new {@link BufferedWriter} for the given Writer
-     * @throws NullPointerException if the input parameter is null
-     * @since 2.5
-     */
-    public static BufferedWriter buffer(final Writer writer) {
-        return writer instanceof BufferedWriter ? (BufferedWriter) writer : new BufferedWriter(writer);
-    }
-
-    /**
-     * Returns the given Writer if it is already a {@link BufferedWriter}, otherwise creates a BufferedWriter from the
-     * given Writer.
-     *
-     * @param writer the Writer to wrap or return (not null)
-     * @param size the buffer size, if a new BufferedWriter is created.
-     * @return the given Writer or a new {@link BufferedWriter} for the given Writer
-     * @throws NullPointerException if the input parameter is null
-     * @since 2.5
-     */
-    public static BufferedWriter buffer(final Writer writer, int size) {
-        return writer instanceof BufferedWriter ? (BufferedWriter) writer : new BufferedWriter(writer, size);
-    }
-
-    /**
-     * Returns the given OutputStream if it is already a {@link BufferedOutputStream}, otherwise creates a
-     * BufferedOutputStream from the given OutputStream.
-     *
-     * @param outputStream the OutputStream to wrap or return (not null)
-     * @return the given OutputStream or a new {@link BufferedOutputStream} for the given OutputStream
-     * @throws NullPointerException if the input parameter is null
-     * @since 2.5
-     */
-    public static BufferedOutputStream buffer(final OutputStream outputStream) {
-        // reject null early on rather than waiting for IO operation to fail
-        if (outputStream == null) { // not checked by BufferedOutputStream
-            throw new NullPointerException();
-        }
-        return outputStream instanceof BufferedOutputStream ?
-                (BufferedOutputStream) outputStream : new BufferedOutputStream(outputStream);
-    }
-
-    /**
-     * Returns the given OutputStream if it is already a {@link BufferedOutputStream}, otherwise creates a
-     * BufferedOutputStream from the given OutputStream.
-     *
-     * @param outputStream the OutputStream to wrap or return (not null)
-     * @param size the buffer size, if a new BufferedOutputStream is created.
-     * @return the given OutputStream or a new {@link BufferedOutputStream} for the given OutputStream
-     * @throws NullPointerException if the input parameter is null
-     * @since 2.5
-     */
-    public static BufferedOutputStream buffer(final OutputStream outputStream, int size) {
-        // reject null early on rather than waiting for IO operation to fail
-        if (outputStream == null) { // not checked by BufferedOutputStream
-            throw new NullPointerException();
-        }
-        return outputStream instanceof BufferedOutputStream ?
-                (BufferedOutputStream) outputStream : new BufferedOutputStream(outputStream, size);
-    }
-
-    /**
-     * Returns the given InputStream if it is already a {@link BufferedInputStream}, otherwise creates a
-     * BufferedInputStream from the given InputStream.
-     *
-     * @param inputStream the InputStream to wrap or return (not null)
-     * @return the given InputStream or a new {@link BufferedInputStream} for the given InputStream
-     * @throws NullPointerException if the input parameter is null
-     * @since 2.5
-     */
-    public static BufferedInputStream buffer(final InputStream inputStream) {
-        // reject null early on rather than waiting for IO operation to fail
-        if (inputStream == null) { // not checked by BufferedInputStream
-            throw new NullPointerException();
-        }
-        return inputStream instanceof BufferedInputStream ?
-                (BufferedInputStream) inputStream : new BufferedInputStream(inputStream);
-    }
-
-    /**
-     * Returns the given InputStream if it is already a {@link BufferedInputStream}, otherwise creates a
-     * BufferedInputStream from the given InputStream.
-     *
-     * @param inputStream the InputStream to wrap or return (not null)
-     * @param size the buffer size, if a new BufferedInputStream is created.
-     * @return the given InputStream or a new {@link BufferedInputStream} for the given InputStream
-     * @throws NullPointerException if the input parameter is null
-     * @since 2.5
-     */
-    public static BufferedInputStream buffer(final InputStream inputStream, int size) {
-        // reject null early on rather than waiting for IO operation to fail
-        if (inputStream == null) { // not checked by BufferedInputStream
-            throw new NullPointerException();
-        }
-        return inputStream instanceof BufferedInputStream ?
-                (BufferedInputStream) inputStream : new BufferedInputStream(inputStream, size);
-    }
-
-    // read toByteArray
-    //-----------------------------------------------------------------------
-
-    /**
-     * Gets the contents of an <code>InputStream</code> as a <code>byte[]</code>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @return the requested byte array
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     */
-    public static byte[] toByteArray(final InputStream input) throws IOException {
-        final ByteArrayOutputStream output = new ByteArrayOutputStream();
-        copy(input, output);
-        return output.toByteArray();
-    }
-
-    /**
-     * Gets contents of an <code>InputStream</code> as a <code>byte[]</code>.
-     * Use this method instead of <code>toByteArray(InputStream)</code>
-     * when <code>InputStream</code> size is known.
-     * <b>NOTE:</b> the method checks that the length can safely be cast to an int without truncation
-     * before using {@link IOUtils#toByteArray(java.io.InputStream, int)} to read into the byte array.
-     * (Arrays can have no more than Integer.MAX_VALUE entries anyway)
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param size the size of <code>InputStream</code>
-     * @return the requested byte array
-     * @throws IOException              if an I/O error occurs or <code>InputStream</code> size differ from parameter
-     * size
-     * @throws IllegalArgumentException if size is less than zero or size is greater than Integer.MAX_VALUE
-     * @see IOUtils#toByteArray(java.io.InputStream, int)
-     * @since 2.1
-     */
-    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);
-        }
-
-        return toByteArray(input, (int) size);
-    }
-
-    /**
-     * Gets the contents of an <code>InputStream</code> as a <code>byte[]</code>.
-     * Use this method instead of <code>toByteArray(InputStream)</code>
-     * when <code>InputStream</code> size is known
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param size the size of <code>InputStream</code>
-     * @return the requested byte array
-     * @throws IOException              if an I/O error occurs or <code>InputStream</code> size differ from parameter
-     * size
-     * @throws IllegalArgumentException if size is less than zero
-     * @since 2.1
-     */
-    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);
-        }
-
-        if (size == 0) {
-            return new byte[0];
-        }
-
-        final byte[] data = new byte[size];
-        int offset = 0;
-        int readed;
-
-        while (offset < size && (readed = input.read(data, offset, size - offset)) != EOF) {
-            offset += readed;
-        }
-
-        if (offset != size) {
-            throw new IOException("Unexpected readed size. current: " + offset + ", excepted: " + size);
-        }
-
-        return data;
-    }
-
-    /**
-     * Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
-     * using the default character encoding of the platform.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     *
-     * @param input the <code>Reader</code> to read from
-     * @return the requested byte array
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     * @deprecated 2.5 use {@link #toByteArray(Reader, Charset)} instead
-     */
-    @Deprecated
-    public static byte[] toByteArray(final Reader input) throws IOException {
-        return toByteArray(input, Charset.defaultCharset());
-    }
-
-    /**
-     * Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
-     * using the specified character encoding.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     *
-     * @param input the <code>Reader</code> to read from
-     * @param encoding the encoding to use, null means platform default
-     * @return the requested byte array
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.3
-     */
-    public static byte[] toByteArray(final Reader input, final Charset encoding) throws IOException {
-        final ByteArrayOutputStream output = new ByteArrayOutputStream();
-        copy(input, output, encoding);
-        return output.toByteArray();
-    }
-
-    /**
-     * Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     *
-     * @param input the <code>Reader</code> to read from
-     * @param encoding the encoding to use, null means platform default
-     * @return the requested byte array
-     * @throws NullPointerException                         if the input is null
-     * @throws IOException                                  if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     * @since 1.1
-     */
-    public static byte[] toByteArray(final Reader input, final String encoding) throws IOException {
-        return toByteArray(input, Charsets.toCharset(encoding));
-    }
-
-    /**
-     * Gets the contents of a <code>String</code> as a <code>byte[]</code>
-     * using the default character encoding of the platform.
-     * <p>
-     * This is the same as {@link String#getBytes()}.
-     *
-     * @param input the <code>String</code> to convert
-     * @return the requested byte array
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs (never occurs)
-     * @deprecated 2.5 Use {@link String#getBytes()} instead
-     */
-    @Deprecated
-    public static byte[] toByteArray(final String input) throws IOException {
-        // make explicit the use of the default charset
-        return input.getBytes(Charset.defaultCharset());
-    }
-
-    /**
-     * Gets the contents of a <code>URI</code> as a <code>byte[]</code>.
-     *
-     * @param uri the <code>URI</code> to read
-     * @return the requested byte array
-     * @throws NullPointerException if the uri is null
-     * @throws IOException          if an I/O exception occurs
-     * @since 2.4
-     */
-    public static byte[] toByteArray(final URI uri) throws IOException {
-        return IOUtils.toByteArray(uri.toURL());
-    }
-
-    /**
-     * Gets the contents of a <code>URL</code> as a <code>byte[]</code>.
-     *
-     * @param url the <code>URL</code> to read
-     * @return the requested byte array
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O exception occurs
-     * @since 2.4
-     */
-    public static byte[] toByteArray(final URL url) throws IOException {
-        final URLConnection conn = url.openConnection();
-        try {
-            return IOUtils.toByteArray(conn);
-        } finally {
-            close(conn);
-        }
-    }
-
-    /**
-     * Gets the contents of a <code>URLConnection</code> as a <code>byte[]</code>.
-     *
-     * @param urlConn the <code>URLConnection</code> to read
-     * @return the requested byte array
-     * @throws NullPointerException if the urlConn is null
-     * @throws IOException          if an I/O exception occurs
-     * @since 2.4
-     */
-    public static byte[] toByteArray(final URLConnection urlConn) throws IOException {
-        final InputStream inputStream = urlConn.getInputStream();
-        try {
-            return IOUtils.toByteArray(inputStream);
-        } finally {
-            inputStream.close();
-        }
-    }
-
-    // read char[]
-    //-----------------------------------------------------------------------
-
-    /**
-     * Gets the contents of an <code>InputStream</code> as a character array
-     * using the default character encoding of the platform.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param is the <code>InputStream</code> to read from
-     * @return the requested character array
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     * @deprecated 2.5 use {@link #toCharArray(InputStream, Charset)} instead
-     */
-    @Deprecated
-    public static char[] toCharArray(final InputStream is) throws IOException {
-        return toCharArray(is, Charset.defaultCharset());
-    }
-
-    /**
-     * Gets the contents of an <code>InputStream</code> as a character array
-     * using the specified character encoding.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param is the <code>InputStream</code> to read from
-     * @param encoding the encoding to use, null means platform default
-     * @return the requested character array
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.3
-     */
-    public static char[] toCharArray(final InputStream is, final Charset encoding)
-            throws IOException {
-        final CharArrayWriter output = new CharArrayWriter();
-        copy(is, output, encoding);
-        return output.toCharArray();
-    }
-
-    /**
-     * Gets the contents of an <code>InputStream</code> as a character array
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param is the <code>InputStream</code> to read from
-     * @param encoding the encoding to use, null means platform default
-     * @return the requested character array
-     * @throws NullPointerException                         if the input is null
-     * @throws IOException                                  if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     * @since 1.1
-     */
-    public static char[] toCharArray(final InputStream is, final String encoding) throws IOException {
-        return toCharArray(is, Charsets.toCharset(encoding));
-    }
-
-    /**
-     * Gets the contents of a <code>Reader</code> as a character array.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     *
-     * @param input the <code>Reader</code> to read from
-     * @return the requested character array
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     */
-    public static char[] toCharArray(final Reader input) throws IOException {
-        final CharArrayWriter sw = new CharArrayWriter();
-        copy(input, sw);
-        return sw.toCharArray();
-    }
-
-    // read toString
-    //-----------------------------------------------------------------------
-
-    /**
-     * Gets the contents of an <code>InputStream</code> as a String
-     * using the default character encoding of the platform.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @return the requested String
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     * @deprecated 2.5 use {@link #toString(InputStream, Charset)} instead
-     */
-    @Deprecated
-    public static String toString(final InputStream input) throws IOException {
-        return toString(input, Charset.defaultCharset());
-    }
-
-    /**
-     * Gets the contents of an <code>InputStream</code> as a String
-     * using the specified character encoding.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     * </p>
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param encoding the encoding to use, null means platform default
-     * @return the requested String
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.3
-     */
-    public static String toString(final InputStream input, final Charset encoding) throws IOException {
-        final StringBuilderWriter sw = new StringBuilderWriter();
-        copy(input, sw, encoding);
-        return sw.toString();
-    }
-
-    /**
-     * Gets the contents of an <code>InputStream</code> as a String
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param encoding the encoding to use, null means platform default
-     * @return the requested String
-     * @throws NullPointerException                         if the input is null
-     * @throws IOException                                  if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     */
-    public static String toString(final InputStream input, final String encoding)
-            throws IOException {
-        return toString(input, Charsets.toCharset(encoding));
-    }
-
-    /**
-     * Gets the contents of a <code>Reader</code> as a String.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     *
-     * @param input the <code>Reader</code> to read from
-     * @return the requested String
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     */
-    public static String toString(final Reader input) throws IOException {
-        final StringBuilderWriter sw = new StringBuilderWriter();
-        copy(input, sw);
-        return sw.toString();
-    }
-
-    /**
-     * Gets the contents at the given URI.
-     *
-     * @param uri The URI source.
-     * @return The contents of the URL as a String.
-     * @throws IOException if an I/O exception occurs.
-     * @since 2.1
-     * @deprecated 2.5 use {@link #toString(URI, Charset)} instead
-     */
-    @Deprecated
-    public static String toString(final URI uri) throws IOException {
-        return toString(uri, Charset.defaultCharset());
-    }
-
-    /**
-     * Gets the contents at the given URI.
-     *
-     * @param uri The URI source.
-     * @param encoding The encoding name for the URL contents.
-     * @return The contents of the URL as a String.
-     * @throws IOException if an I/O exception occurs.
-     * @since 2.3.
-     */
-    public static String toString(final URI uri, final Charset encoding) throws IOException {
-        return toString(uri.toURL(), Charsets.toCharset(encoding));
-    }
-
-    /**
-     * Gets the contents at the given URI.
-     *
-     * @param uri The URI source.
-     * @param encoding The encoding name for the URL contents.
-     * @return The contents of the URL as a String.
-     * @throws IOException                                  if an I/O exception occurs.
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     * @since 2.1
-     */
-    public static String toString(final URI uri, final String encoding) throws IOException {
-        return toString(uri, Charsets.toCharset(encoding));
-    }
-
-    /**
-     * Gets the contents at the given URL.
-     *
-     * @param url The URL source.
-     * @return The contents of the URL as a String.
-     * @throws IOException if an I/O exception occurs.
-     * @since 2.1
-     * @deprecated 2.5 use {@link #toString(URL, Charset)} instead
-     */
-    @Deprecated
-    public static String toString(final URL url) throws IOException {
-        return toString(url, Charset.defaultCharset());
-    }
-
-    /**
-     * Gets the contents at the given URL.
-     *
-     * @param url The URL source.
-     * @param encoding The encoding name for the URL contents.
-     * @return The contents of the URL as a String.
-     * @throws IOException if an I/O exception occurs.
-     * @since 2.3
-     */
-    public static String toString(final URL url, final Charset encoding) throws IOException {
-        final InputStream inputStream = url.openStream();
-        try {
-            return toString(inputStream, encoding);
-        } finally {
-            inputStream.close();
-        }
-    }
-
-    /**
-     * Gets the contents at the given URL.
-     *
-     * @param url The URL source.
-     * @param encoding The encoding name for the URL contents.
-     * @return The contents of the URL as a String.
-     * @throws IOException                                  if an I/O exception occurs.
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     * @since 2.1
-     */
-    public static String toString(final URL url, final String encoding) throws IOException {
-        return toString(url, Charsets.toCharset(encoding));
-    }
-
-    /**
-     * Gets the contents of a <code>byte[]</code> as a String
-     * using the default character encoding of the platform.
-     *
-     * @param input the byte array to read from
-     * @return the requested String
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs (never occurs)
-     * @deprecated 2.5 Use {@link String#String(byte[])} instead
-     */
-    @Deprecated
-    public static String toString(final byte[] input) throws IOException {
-        // make explicit the use of the default charset
-        return new String(input, Charset.defaultCharset());
-    }
-
-    /**
-     * Gets the contents of a <code>byte[]</code> as a String
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     *
-     * @param input the byte array to read from
-     * @param encoding the encoding to use, null means platform default
-     * @return the requested String
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs (never occurs)
-     */
-    public static String toString(final byte[] input, final String encoding) throws IOException {
-        return new String(input, Charsets.toCharset(encoding));
-    }
-
-    // readLines
-    //-----------------------------------------------------------------------
-
-    /**
-     * Gets the contents of an <code>InputStream</code> as a list of Strings,
-     * one entry per line, using the default character encoding of the platform.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input the <code>InputStream</code> to read from, not null
-     * @return the list of Strings, never null
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     * @deprecated 2.5 use {@link #readLines(InputStream, Charset)} instead
-     */
-    @Deprecated
-    public static List<String> readLines(final InputStream input) throws IOException {
-        return readLines(input, Charset.defaultCharset());
-    }
-
-    /**
-     * Gets the contents of an <code>InputStream</code> as a list of Strings,
-     * one entry per line, using the specified character encoding.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input the <code>InputStream</code> to read from, not null
-     * @param encoding the encoding to use, null means platform default
-     * @return the list of Strings, never null
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.3
-     */
-    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);
-    }
-
-    /**
-     * Gets the contents of an <code>InputStream</code> as a list of Strings,
-     * one entry per line, using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input the <code>InputStream</code> to read from, not null
-     * @param encoding the encoding to use, null means platform default
-     * @return the list of Strings, never null
-     * @throws NullPointerException                         if the input is null
-     * @throws IOException                                  if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     * @since 1.1
-     */
-    public static List<String> readLines(final InputStream input, final String encoding) throws IOException {
-        return readLines(input, Charsets.toCharset(encoding));
-    }
-
-    /**
-     * Gets the contents of a <code>Reader</code> as a list of Strings,
-     * one entry per line.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     *
-     * @param input the <code>Reader</code> to read from, not null
-     * @return the list of Strings, never null
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     */
-    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);
-            line = reader.readLine();
-        }
-        return list;
-    }
-
-    // lineIterator
-    //-----------------------------------------------------------------------
-
-    /**
-     * Returns an Iterator for the lines in a <code>Reader</code>.
-     * <p>
-     * <code>LineIterator</code> holds a reference to the open
-     * <code>Reader</code> specified here. When you have finished with the
-     * iterator you should close the reader to free internal resources.
-     * This can be done by closing the reader directly, or by calling
-     * {@link LineIterator#close()} or {@link LineIterator#closeQuietly(LineIterator)}.
-     * <p>
-     * The recommended usage pattern is:
-     * <pre>
-     * try {
-     *   LineIterator it = IOUtils.lineIterator(reader);
-     *   while (it.hasNext()) {
-     *     String line = it.nextLine();
-     *     /// do something with line
-     *   }
-     * } finally {
-     *   IOUtils.closeQuietly(reader);
-     * }
-     * </pre>
-     *
-     * @param reader the <code>Reader</code> to read from, not null
-     * @return an Iterator of the lines in the reader, never null
-     * @throws IllegalArgumentException if the reader is null
-     * @since 1.2
-     */
-    public static LineIterator lineIterator(final Reader reader) {
-        return new LineIterator(reader);
-    }
-
-    /**
-     * Returns an Iterator for the lines in an <code>InputStream</code>, using
-     * the character encoding specified (or default encoding if null).
-     * <p>
-     * <code>LineIterator</code> holds a reference to the open
-     * <code>InputStream</code> specified here. When you have finished with
-     * the iterator you should close the stream to free internal resources.
-     * This can be done by closing the stream directly, or by calling
-     * {@link LineIterator#close()} or {@link LineIterator#closeQuietly(LineIterator)}.
-     * <p>
-     * The recommended usage pattern is:
-     * <pre>
-     * try {
-     *   LineIterator it = IOUtils.lineIterator(stream, charset);
-     *   while (it.hasNext()) {
-     *     String line = it.nextLine();
-     *     /// do something with line
-     *   }
-     * } finally {
-     *   IOUtils.closeQuietly(stream);
-     * }
-     * </pre>
-     *
-     * @param input the <code>InputStream</code> to read from, not null
-     * @param encoding the encoding to use, null means platform default
-     * @return an Iterator of the lines in the reader, never null
-     * @throws IllegalArgumentException if the input is null
-     * @throws IOException              if an I/O error occurs, such as if the encoding is invalid
-     * @since 2.3
-     */
-    public static LineIterator lineIterator(final InputStream input, final Charset encoding) throws IOException {
-        return new LineIterator(new InputStreamReader(input, Charsets.toCharset(encoding)));
-    }
-
-    /**
-     * Returns an Iterator for the lines in an <code>InputStream</code>, using
-     * the character encoding specified (or default encoding if null).
-     * <p>
-     * <code>LineIterator</code> holds a reference to the open
-     * <code>InputStream</code> specified here. When you have finished with
-     * the iterator you should close the stream to free internal resources.
-     * This can be done by closing the stream directly, or by calling
-     * {@link LineIterator#close()} or {@link LineIterator#closeQuietly(LineIterator)}.
-     * <p>
-     * The recommended usage pattern is:
-     * <pre>
-     * try {
-     *   LineIterator it = IOUtils.lineIterator(stream, "UTF-8");
-     *   while (it.hasNext()) {
-     *     String line = it.nextLine();
-     *     /// do something with line
-     *   }
-     * } finally {
-     *   IOUtils.closeQuietly(stream);
-     * }
-     * </pre>
-     *
-     * @param input the <code>InputStream</code> to read from, not null
-     * @param encoding the encoding to use, null means platform default
-     * @return an Iterator of the lines in the reader, never null
-     * @throws IllegalArgumentException                     if the input is null
-     * @throws IOException                                  if an I/O error occurs, such as if the encoding is invalid
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     * @since 1.2
-     */
-    public static LineIterator lineIterator(final InputStream input, final String encoding) throws IOException {
-        return lineIterator(input, Charsets.toCharset(encoding));
-    }
-
-    //-----------------------------------------------------------------------
-
-    /**
-     * Converts the specified CharSequence to an input stream, encoded as bytes
-     * using the default character encoding of the platform.
-     *
-     * @param input the CharSequence to convert
-     * @return an input stream
-     * @since 2.0
-     * @deprecated 2.5 use {@link #toInputStream(CharSequence, Charset)} instead
-     */
-    @Deprecated
-    public static InputStream toInputStream(final CharSequence input) {
-        return toInputStream(input, Charset.defaultCharset());
-    }
-
-    /**
-     * Converts the specified CharSequence to an input stream, encoded as bytes
-     * using the specified character encoding.
-     *
-     * @param input the CharSequence to convert
-     * @param encoding the encoding to use, null means platform default
-     * @return an input stream
-     * @since 2.3
-     */
-    public static InputStream toInputStream(final CharSequence input, final Charset encoding) {
-        return toInputStream(input.toString(), encoding);
-    }
-
-    /**
-     * Converts the specified CharSequence to an input stream, encoded as bytes
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     *
-     * @param input the CharSequence to convert
-     * @param encoding the encoding to use, null means platform default
-     * @return an input stream
-     * @throws IOException                                  if the encoding is invalid
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     * @since 2.0
-     */
-    public static InputStream toInputStream(final CharSequence input, final String encoding) throws IOException {
-        return toInputStream(input, Charsets.toCharset(encoding));
-    }
-
-    //-----------------------------------------------------------------------
-
-    /**
-     * Converts the specified string to an input stream, encoded as bytes
-     * using the default character encoding of the platform.
-     *
-     * @param input the string to convert
-     * @return an input stream
-     * @since 1.1
-     * @deprecated 2.5 use {@link #toInputStream(String, Charset)} instead
-     */
-    @Deprecated
-    public static InputStream toInputStream(final String input) {
-        return toInputStream(input, Charset.defaultCharset());
-    }
-
-    /**
-     * Converts the specified string to an input stream, encoded as bytes
-     * using the specified character encoding.
-     *
-     * @param input the string to convert
-     * @param encoding the encoding to use, null means platform default
-     * @return an input stream
-     * @since 2.3
-     */
-    public static InputStream toInputStream(final String input, final Charset encoding) {
-        return new ByteArrayInputStream(input.getBytes(Charsets.toCharset(encoding)));
-    }
-
-    /**
-     * Converts the specified string to an input stream, encoded as bytes
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     *
-     * @param input the string to convert
-     * @param encoding the encoding to use, null means platform default
-     * @return an input stream
-     * @throws IOException                                  if the encoding is invalid
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     * @since 1.1
-     */
-    public static InputStream toInputStream(final String input, final String encoding) throws IOException {
-        final byte[] bytes = input.getBytes(Charsets.toCharset(encoding));
-        return new ByteArrayInputStream(bytes);
-    }
-
-    // write byte[]
-    //-----------------------------------------------------------------------
-
-    /**
-     * Writes bytes from a <code>byte[]</code> to an <code>OutputStream</code>.
-     *
-     * @param data the byte array to write, do not modify during output,
-     * null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     */
-    public static void write(final byte[] data, final OutputStream output)
-            throws IOException {
-        if (data != null) {
-            output.write(data);
-        }
-    }
-
-    /**
-     * Writes bytes from a <code>byte[]</code> to an <code>OutputStream</code> using chunked writes.
-     * This is intended for writing very large byte arrays which might otherwise cause excessive
-     * memory usage if the native code has to allocate a copy.
-     *
-     * @param data the byte array to write, do not modify during output,
-     * null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.5
-     */
-    public static void writeChunked(final byte[] data, final OutputStream output)
-            throws IOException {
-        if (data != null) {
-            int bytes = data.length;
-            int offset = 0;
-            while (bytes > 0) {
-                int chunk = Math.min(bytes, DEFAULT_BUFFER_SIZE);
-                output.write(data, offset, chunk);
-                bytes -= chunk;
-                offset += chunk;
-            }
-        }
-    }
-
-    /**
-     * Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
-     * using the default character encoding of the platform.
-     * <p>
-     * This method uses {@link String#String(byte[])}.
-     *
-     * @param data the byte array to write, do not modify during output,
-     * null ignored
-     * @param output the <code>Writer</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     * @deprecated 2.5 use {@link #write(byte[], Writer, Charset)} instead
-     */
-    @Deprecated
-    public static void write(final byte[] data, final Writer output) throws IOException {
-        write(data, output, Charset.defaultCharset());
-    }
-
-    /**
-     * Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
-     * using the specified character encoding.
-     * <p>
-     * This method uses {@link String#String(byte[], String)}.
-     *
-     * @param data the byte array to write, do not modify during output,
-     * null ignored
-     * @param output the <code>Writer</code> to write to
-     * @param encoding the encoding to use, null means platform default
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.3
-     */
-    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)));
-        }
-    }
-
-    /**
-     * Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method uses {@link String#String(byte[], String)}.
-     *
-     * @param data the byte array to write, do not modify during output,
-     * null ignored
-     * @param output the <code>Writer</code> to write to
-     * @param encoding the encoding to use, null means platform default
-     * @throws NullPointerException                         if output is null
-     * @throws IOException                                  if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     * @since 1.1
-     */
-    public static void write(final byte[] data, final Writer output, final String encoding) throws IOException {
-        write(data, output, Charsets.toCharset(encoding));
-    }
-
-    // write char[]
-    //-----------------------------------------------------------------------
-
-    /**
-     * Writes chars from a <code>char[]</code> to a <code>Writer</code>
-     *
-     * @param data the char array to write, do not modify during output,
-     * null ignored
-     * @param output the <code>Writer</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     */
-    public static void write(final char[] data, final Writer output) throws IOException {
-        if (data != null) {
-            output.write(data);
-        }
-    }
-
-    /**
-     * Writes chars from a <code>char[]</code> to a <code>Writer</code> using chunked writes.
-     * This is intended for writing very large byte arrays which might otherwise cause excessive
-     * memory usage if the native code has to allocate a copy.
-     *
-     * @param data the char array to write, do not modify during output,
-     * null ignored
-     * @param output the <code>Writer</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.5
-     */
-    public static void writeChunked(final char[] data, final Writer output) throws IOException {
-        if (data != null) {
-            int bytes = data.length;
-            int offset = 0;
-            while (bytes > 0) {
-                int chunk = Math.min(bytes, DEFAULT_BUFFER_SIZE);
-                output.write(data, offset, chunk);
-                bytes -= chunk;
-                offset += chunk;
-            }
-        }
-    }
-
-    /**
-     * Writes chars from a <code>char[]</code> to bytes on an
-     * <code>OutputStream</code>.
-     * <p>
-     * This method uses {@link String#String(char[])} and
-     * {@link String#getBytes()}.
-     *
-     * @param data the char array to write, do not modify during output,
-     * null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     * @deprecated 2.5 use {@link #write(char[], OutputStream, Charset)} instead
-     */
-    @Deprecated
-    public static void write(final char[] data, final OutputStream output)
-            throws IOException {
-        write(data, output, Charset.defaultCharset());
-    }
-
-    /**
-     * Writes chars from a <code>char[]</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding.
-     * <p>
-     * This method uses {@link String#String(char[])} and
-     * {@link String#getBytes(String)}.
-     *
-     * @param data the char array to write, do not modify during output,
-     * null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @param encoding the encoding to use, null means platform default
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.3
-     */
-    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)));
-        }
-    }
-
-    /**
-     * Writes chars from a <code>char[]</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method uses {@link String#String(char[])} and
-     * {@link String#getBytes(String)}.
-     *
-     * @param data the char array to write, do not modify during output,
-     * null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @param encoding the encoding to use, null means platform default
-     * @throws NullPointerException                         if output is null
-     * @throws IOException                                  if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     * .UnsupportedEncodingException} in version 2.2 if the encoding is not supported.
-     * @since 1.1
-     */
-    public static void write(final char[] data, final OutputStream output, final String encoding)
-            throws IOException {
-        write(data, output, Charsets.toCharset(encoding));
-    }
-
-    // write CharSequence
-    //-----------------------------------------------------------------------
-
-    /**
-     * Writes chars from a <code>CharSequence</code> to a <code>Writer</code>.
-     *
-     * @param data the <code>CharSequence</code> to write, null ignored
-     * @param output the <code>Writer</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.0
-     */
-    public static void write(final CharSequence data, final Writer output) throws IOException {
-        if (data != null) {
-            write(data.toString(), output);
-        }
-    }
-
-    /**
-     * Writes chars from a <code>CharSequence</code> to bytes on an
-     * <code>OutputStream</code> using the default character encoding of the
-     * platform.
-     * <p>
-     * This method uses {@link String#getBytes()}.
-     *
-     * @param data the <code>CharSequence</code> to write, null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.0
-     * @deprecated 2.5 use {@link #write(CharSequence, OutputStream, Charset)} instead
-     */
-    @Deprecated
-    public static void write(final CharSequence data, final OutputStream output)
-            throws IOException {
-        write(data, output, Charset.defaultCharset());
-    }
-
-    /**
-     * Writes chars from a <code>CharSequence</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding.
-     * <p>
-     * This method uses {@link String#getBytes(String)}.
-     *
-     * @param data the <code>CharSequence</code> to write, null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @param encoding the encoding to use, null means platform default
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.3
-     */
-    public static void write(final CharSequence data, final OutputStream output, final Charset encoding)
-            throws IOException {
-        if (data != null) {
-            write(data.toString(), output, encoding);
-        }
-    }
-
-    /**
-     * Writes chars from a <code>CharSequence</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method uses {@link String#getBytes(String)}.
-     *
-     * @param data the <code>CharSequence</code> to write, null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @param encoding the encoding to use, null means platform default
-     * @throws NullPointerException        if output is null
-     * @throws IOException                 if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     * .UnsupportedEncodingException} in version 2.2 if the encoding is not supported.
-     * @since 2.0
-     */
-    public static void write(final CharSequence data, final OutputStream output, final String encoding)
-            throws IOException {
-        write(data, output, Charsets.toCharset(encoding));
-    }
-
-    // write String
-    //-----------------------------------------------------------------------
-
-    /**
-     * Writes chars from a <code>String</code> to a <code>Writer</code>.
-     *
-     * @param data the <code>String</code> to write, null ignored
-     * @param output the <code>Writer</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     */
-    public static void write(final String data, final Writer output) throws IOException {
-        if (data != null) {
-            output.write(data);
-        }
-    }
-
-    /**
-     * Writes chars from a <code>String</code> to bytes on an
-     * <code>OutputStream</code> using the default character encoding of the
-     * platform.
-     * <p>
-     * This method uses {@link String#getBytes()}.
-     *
-     * @param data the <code>String</code> to write, null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     * @deprecated 2.5 use {@link #write(String, OutputStream, Charset)} instead
-     */
-    @Deprecated
-    public static void write(final String data, final OutputStream output)
-            throws IOException {
-        write(data, output, Charset.defaultCharset());
-    }
-
-    /**
-     * Writes chars from a <code>String</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding.
-     * <p>
-     * This method uses {@link String#getBytes(String)}.
-     *
-     * @param data the <code>String</code> to write, null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @param encoding the encoding to use, null means platform default
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.3
-     */
-    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)));
-        }
-    }
-
-    /**
-     * Writes chars from a <code>String</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method uses {@link String#getBytes(String)}.
-     *
-     * @param data the <code>String</code> to write, null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @param encoding the encoding to use, null means platform default
-     * @throws NullPointerException        if output is null
-     * @throws IOException                 if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     * .UnsupportedEncodingException} in version 2.2 if the encoding is not supported.
-     * @since 1.1
-     */
-    public static void write(final String data, final OutputStream output, final String encoding)
-            throws IOException {
-        write(data, output, Charsets.toCharset(encoding));
-    }
-
-    // write StringBuffer
-    //-----------------------------------------------------------------------
-
-    /**
-     * Writes chars from a <code>StringBuffer</code> to a <code>Writer</code>.
-     *
-     * @param data the <code>StringBuffer</code> to write, null ignored
-     * @param output the <code>Writer</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     * @deprecated replaced by write(CharSequence, Writer)
-     */
-    @Deprecated
-    public static void write(final StringBuffer data, final Writer output)
-            throws IOException {
-        if (data != null) {
-            output.write(data.toString());
-        }
-    }
-
-    /**
-     * Writes chars from a <code>StringBuffer</code> to bytes on an
-     * <code>OutputStream</code> using the default character encoding of the
-     * platform.
-     * <p>
-     * This method uses {@link String#getBytes()}.
-     *
-     * @param data the <code>StringBuffer</code> to write, null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     * @deprecated replaced by write(CharSequence, OutputStream)
-     */
-    @Deprecated
-    public static void write(final StringBuffer data, final OutputStream output)
-            throws IOException {
-        write(data, output, (String) null);
-    }
-
-    /**
-     * Writes chars from a <code>StringBuffer</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method uses {@link String#getBytes(String)}.
-     *
-     * @param data the <code>StringBuffer</code> to write, null ignored
-     * @param output the <code>OutputStream</code> to write to
-     * @param encoding the encoding to use, null means platform default
-     * @throws NullPointerException        if output is null
-     * @throws IOException                 if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     * .UnsupportedEncodingException} in version 2.2 if the encoding is not supported.
-     * @since 1.1
-     * @deprecated replaced by write(CharSequence, OutputStream, String)
-     */
-    @Deprecated
-    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)));
-        }
-    }
-
-    // writeLines
-    //-----------------------------------------------------------------------
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * an <code>OutputStream</code> line by line, using the default character
-     * encoding of the platform and the specified line ending.
-     *
-     * @param lines the lines to write, null entries produce blank lines
-     * @param lineEnding the line separator to use, null is system default
-     * @param output the <code>OutputStream</code> to write to, not null, not closed
-     * @throws NullPointerException if the output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     * @deprecated 2.5 use {@link #writeLines(Collection, String, OutputStream, Charset)} instead
-     */
-    @Deprecated
-    public static void writeLines(final Collection<?> lines, final String lineEnding,
-                                  final OutputStream output) throws IOException {
-        writeLines(lines, lineEnding, output, Charset.defaultCharset());
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * an <code>OutputStream</code> line by line, using the specified character
-     * encoding and the specified line ending.
-     *
-     * @param lines the lines to write, null entries produce blank lines
-     * @param lineEnding the line separator to use, null is system default
-     * @param output the <code>OutputStream</code> to write to, not null, not closed
-     * @param encoding the encoding to use, null means platform default
-     * @throws NullPointerException if the output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.3
-     */
-    public static void writeLines(final Collection<?> lines, String lineEnding, final OutputStream output,
-                                  final Charset encoding) throws IOException {
-        if (lines == null) {
-            return;
-        }
-        if (lineEnding == null) {
-            lineEnding = LINE_SEPARATOR;
-        }
-        final Charset cs = Charsets.toCharset(encoding);
-        for (final Object line : lines) {
-            if (line != null) {
-                output.write(line.toString().getBytes(cs));
-            }
-            output.write(lineEnding.getBytes(cs));
-        }
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * an <code>OutputStream</code> line by line, using the specified character
-     * encoding and the specified line ending.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     *
-     * @param lines the lines to write, null entries produce blank lines
-     * @param lineEnding the line separator to use, null is system default
-     * @param output the <code>OutputStream</code> to write to, not null, not closed
-     * @param encoding the encoding to use, null means platform default
-     * @throws NullPointerException                         if the output is null
-     * @throws IOException                                  if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     * @since 1.1
-     */
-    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));
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * a <code>Writer</code> line by line, using the specified line ending.
-     *
-     * @param lines the lines to write, null entries produce blank lines
-     * @param lineEnding the line separator to use, null is system default
-     * @param writer the <code>Writer</code> to write to, not null, not closed
-     * @throws NullPointerException if the input is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     */
-    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 (final Object line : lines) {
-            if (line != null) {
-                writer.write(line.toString());
-            }
-            writer.write(lineEnding);
-        }
-    }
-
-    // copy from InputStream
-    //-----------------------------------------------------------------------
-
-    /**
-     * Copies bytes from an <code>InputStream</code> to an
-     * <code>OutputStream</code>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     * <p>
-     * Large streams (over 2GB) will return a bytes copied value of
-     * <code>-1</code> after the copy has completed since the correct
-     * number of bytes cannot be returned as an int. For large streams
-     * use the <code>copyLarge(InputStream, OutputStream)</code> method.
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @return the number of bytes copied, or -1 if &gt; Integer.MAX_VALUE
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     */
-    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;
-        }
-        return (int) count;
-    }
-
-    /**
-     * Copies bytes from an <code>InputStream</code> to an <code>OutputStream</code> using an internal buffer of the
-     * given size.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
-     * <p>
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @param bufferSize the bufferSize used to copy from the input to the output
-     * @return the number of bytes copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.5
-     */
-    public static long copy(final InputStream input, final OutputStream output, final int bufferSize)
-            throws IOException {
-        return copyLarge(input, output, new byte[bufferSize]);
-    }
-
-    /**
-     * Copies bytes from a large (over 2GB) <code>InputStream</code> to an
-     * <code>OutputStream</code>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     * <p>
-     * The buffer size is given by {@link #DEFAULT_BUFFER_SIZE}.
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @return the number of bytes copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.3
-     */
-    public static long copyLarge(final InputStream input, final OutputStream output)
-            throws IOException {
-        return copy(input, output, DEFAULT_BUFFER_SIZE);
-    }
-
-    /**
-     * Copies bytes from a large (over 2GB) <code>InputStream</code> to an
-     * <code>OutputStream</code>.
-     * <p>
-     * This method uses the provided buffer, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     * <p>
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @param buffer the buffer to use for the copy
-     * @return the number of bytes copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.2
-     */
-    public static long copyLarge(final InputStream input, final OutputStream output, final byte[] buffer)
-            throws IOException {
-        long count = 0;
-        int n;
-        while (EOF != (n = input.read(buffer))) {
-            output.write(buffer, 0, n);
-            count += n;
-        }
-        return count;
-    }
-
-    /**
-     * Copies some or all bytes from a large (over 2GB) <code>InputStream</code> to an
-     * <code>OutputStream</code>, optionally skipping input bytes.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     * </p>
-     * <p>
-     * Note that the implementation uses {@link #skip(InputStream, long)}.
-     * This means that the method may be considerably less efficient than using the actual skip implementation,
-     * this is done to guarantee that the correct number of characters are skipped.
-     * </p>
-     * The buffer size is given by {@link #DEFAULT_BUFFER_SIZE}.
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @param inputOffset : number of bytes to skip from input before copying
-     * -ve values are ignored
-     * @param length : number of bytes to copy. -ve means all
-     * @return the number of bytes copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.2
-     */
-    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]);
-    }
-
-    /**
-     * Copies some or all bytes from a large (over 2GB) <code>InputStream</code> to an
-     * <code>OutputStream</code>, optionally skipping input bytes.
-     * <p>
-     * This method uses the provided buffer, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     * </p>
-     * <p>
-     * Note that the implementation uses {@link #skip(InputStream, long)}.
-     * This means that the method may be considerably less efficient than using the actual skip implementation,
-     * this is done to guarantee that the correct number of characters are skipped.
-     * </p>
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @param inputOffset : number of bytes to skip from input before copying
-     * -ve values are ignored
-     * @param length : number of bytes to copy. -ve means all
-     * @param buffer the buffer to use for the copy
-     * @return the number of bytes copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.2
-     */
-    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);
-        }
-        if (length == 0) {
-            return 0;
-        }
-        final int bufferLength = buffer.length;
-        int bytesToRead = bufferLength;
-        if (length > 0 && length < bufferLength) {
-            bytesToRead = (int) length;
-        }
-        int read;
-        long totalRead = 0;
-        while (bytesToRead > 0 && EOF != (read = input.read(buffer, 0, bytesToRead))) {
-            output.write(buffer, 0, read);
-            totalRead += read;
-            if (length > 0) { // only adjust length if not reading to the end
-                // Note the cast must work because buffer.length is an integer
-                bytesToRead = (int) Math.min(length - totalRead, bufferLength);
-            }
-        }
-        return totalRead;
-    }
-
-    /**
-     * Copies bytes from an <code>InputStream</code> to chars on a
-     * <code>Writer</code> using the default character encoding of the platform.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     * <p>
-     * This method uses {@link InputStreamReader}.
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param output the <code>Writer</code> to write to
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     * @deprecated 2.5 use {@link #copy(InputStream, Writer, Charset)} instead
-     */
-    @Deprecated
-    public static void copy(final InputStream input, final Writer output)
-            throws IOException {
-        copy(input, output, Charset.defaultCharset());
-    }
-
-    /**
-     * Copies bytes from an <code>InputStream</code> to chars on a
-     * <code>Writer</code> using the specified character encoding.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     * <p>
-     * This method uses {@link InputStreamReader}.
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param output the <code>Writer</code> to write to
-     * @param inputEncoding the encoding to use for the input stream, null means platform default
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.3
-     */
-    public static void copy(final InputStream input, final Writer output, final Charset inputEncoding)
-            throws IOException {
-        final InputStreamReader in = new InputStreamReader(input, Charsets.toCharset(inputEncoding));
-        copy(in, output);
-    }
-
-    /**
-     * Copies bytes from an <code>InputStream</code> to chars on a
-     * <code>Writer</code> using the specified character encoding.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method uses {@link InputStreamReader}.
-     *
-     * @param input the <code>InputStream</code> to read from
-     * @param output the <code>Writer</code> to write to
-     * @param inputEncoding the encoding to use for the InputStream, null means platform default
-     * @throws NullPointerException                         if the input or output is null
-     * @throws IOException                                  if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     * @since 1.1
-     */
-    public static void copy(final InputStream input, final Writer output, final String inputEncoding)
-            throws IOException {
-        copy(input, output, Charsets.toCharset(inputEncoding));
-    }
-
-    // copy from Reader
-    //-----------------------------------------------------------------------
-
-    /**
-     * Copies chars from a <code>Reader</code> to a <code>Writer</code>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     * <p>
-     * Large streams (over 2GB) will return a chars copied value of
-     * <code>-1</code> after the copy has completed since the correct
-     * number of chars cannot be returned as an int. For large streams
-     * use the <code>copyLarge(Reader, Writer)</code> method.
-     *
-     * @param input the <code>Reader</code> to read from
-     * @param output the <code>Writer</code> to write to
-     * @return the number of characters copied, or -1 if &gt; Integer.MAX_VALUE
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     */
-    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;
-        }
-        return (int) count;
-    }
-
-    /**
-     * Copies chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     * <p>
-     * The buffer size is given by {@link #DEFAULT_BUFFER_SIZE}.
-     *
-     * @param input the <code>Reader</code> to read from
-     * @param output the <code>Writer</code> to write to
-     * @return the number of characters copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.3
-     */
-    public static long copyLarge(final Reader input, final Writer output) throws IOException {
-        return copyLarge(input, output, new char[DEFAULT_BUFFER_SIZE]);
-    }
-
-    /**
-     * Copies chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.
-     * <p>
-     * This method uses the provided buffer, so there is no need to use a
-     * <code>BufferedReader</code>.
-     * <p>
-     *
-     * @param input the <code>Reader</code> to read from
-     * @param output the <code>Writer</code> to write to
-     * @param buffer the buffer to be used for the copy
-     * @return the number of characters copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.2
-     */
-    public static long copyLarge(final Reader input, final Writer output, final char[] buffer) throws IOException {
-        long count = 0;
-        int n;
-        while (EOF != (n = input.read(buffer))) {
-            output.write(buffer, 0, n);
-            count += n;
-        }
-        return count;
-    }
-
-    /**
-     * Copies some or all chars from a large (over 2GB) <code>InputStream</code> to an
-     * <code>OutputStream</code>, optionally skipping input chars.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     * <p>
-     * The buffer size is given by {@link #DEFAULT_BUFFER_SIZE}.
-     *
-     * @param input the <code>Reader</code> to read from
-     * @param output the <code>Writer</code> to write to
-     * @param inputOffset : number of chars to skip from input before copying
-     * -ve values are ignored
-     * @param length : number of chars to copy. -ve means all
-     * @return the number of chars copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.2
-     */
-    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]);
-    }
-
-    /**
-     * Copies some or all chars from a large (over 2GB) <code>InputStream</code> to an
-     * <code>OutputStream</code>, optionally skipping input chars.
-     * <p>
-     * This method uses the provided buffer, so there is no need to use a
-     * <code>BufferedReader</code>.
-     * <p>
-     *
-     * @param input the <code>Reader</code> to read from
-     * @param output the <code>Writer</code> to write to
-     * @param inputOffset : number of chars to skip from input before copying
-     * -ve values are ignored
-     * @param length : number of chars to copy. -ve means all
-     * @param buffer the buffer to be used for the copy
-     * @return the number of chars copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.2
-     */
-    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);
-        }
-        if (length == 0) {
-            return 0;
-        }
-        int bytesToRead = buffer.length;
-        if (length > 0 && length < buffer.length) {
-            bytesToRead = (int) length;
-        }
-        int read;
-        long totalRead = 0;
-        while (bytesToRead > 0 && EOF != (read = input.read(buffer, 0, bytesToRead))) {
-            output.write(buffer, 0, read);
-            totalRead += read;
-            if (length > 0) { // only adjust length if not reading to the end
-                // Note the cast must work because buffer.length is an integer
-                bytesToRead = (int) Math.min(length - totalRead, buffer.length);
-            }
-        }
-        return totalRead;
-    }
-
-    /**
-     * Copies chars from a <code>Reader</code> to bytes on an
-     * <code>OutputStream</code> using the default character encoding of the
-     * platform, and calling flush.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     * <p>
-     * Due to the implementation of OutputStreamWriter, this method performs a
-     * flush.
-     * <p>
-     * This method uses {@link OutputStreamWriter}.
-     *
-     * @param input the <code>Reader</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     * @deprecated 2.5 use {@link #copy(Reader, OutputStream, Charset)} instead
-     */
-    @Deprecated
-    public static void copy(final Reader input, final OutputStream output)
-            throws IOException {
-        copy(input, output, Charset.defaultCharset());
-    }
-
-    /**
-     * Copies chars from a <code>Reader</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding, and
-     * calling flush.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     * </p>
-     * <p>
-     * Due to the implementation of OutputStreamWriter, this method performs a
-     * flush.
-     * </p>
-     * <p>
-     * This method uses {@link OutputStreamWriter}.
-     * </p>
-     *
-     * @param input the <code>Reader</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @param outputEncoding the encoding to use for the OutputStream, null means platform default
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.3
-     */
-    public static void copy(final Reader input, final OutputStream output, final Charset outputEncoding)
-            throws IOException {
-        final OutputStreamWriter out = new OutputStreamWriter(output, Charsets.toCharset(outputEncoding));
-        copy(input, out);
-        // XXX Unless anyone is planning on rewriting OutputStreamWriter,
-        // we have to flush here.
-        out.flush();
-    }
-
-    /**
-     * Copies chars from a <code>Reader</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding, and
-     * calling flush.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * Due to the implementation of OutputStreamWriter, this method performs a
-     * flush.
-     * <p>
-     * This method uses {@link OutputStreamWriter}.
-     *
-     * @param input the <code>Reader</code> to read from
-     * @param output the <code>OutputStream</code> to write to
-     * @param outputEncoding the encoding to use for the OutputStream, null means platform default
-     * @throws NullPointerException                         if the input or output is null
-     * @throws IOException                                  if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
-     *                                                      .UnsupportedEncodingException} in version 2.2 if the
-     *                                                      encoding is not supported.
-     * @since 1.1
-     */
-    public static void copy(final Reader input, final OutputStream output, final String outputEncoding)
-            throws IOException {
-        copy(input, output, Charsets.toCharset(outputEncoding));
-    }
-
-    // content equals
-    //-----------------------------------------------------------------------
-
-    /**
-     * Compares the contents of two Streams to determine if they are equal or
-     * not.
-     * <p>
-     * This method buffers the input internally using
-     * <code>BufferedInputStream</code> if they are not already buffered.
-     *
-     * @param input1 the first stream
-     * @param input2 the second stream
-     * @return true if the content of the streams are equal or they both don't
-     * exist, false otherwise
-     * @throws NullPointerException if either input is null
-     * @throws IOException          if an I/O error occurs
-     */
-    public static boolean contentEquals(InputStream input1, InputStream input2)
-            throws IOException {
-        if (input1 == input2) {
-            return true;
-        }
-        if (!(input1 instanceof BufferedInputStream)) {
-            input1 = new BufferedInputStream(input1);
-        }
-        if (!(input2 instanceof BufferedInputStream)) {
-            input2 = new BufferedInputStream(input2);
-        }
-
-        int ch = input1.read();
-        while (EOF != ch) {
-            final int ch2 = input2.read();
-            if (ch != ch2) {
-                return false;
-            }
-            ch = input1.read();
-        }
-
-        final int ch2 = input2.read();
-        return ch2 == EOF;
-    }
-
-    /**
-     * Compares the contents of two Readers to determine if they are equal or
-     * not.
-     * <p>
-     * This method buffers the input internally using
-     * <code>BufferedReader</code> if they are not already buffered.
-     *
-     * @param input1 the first reader
-     * @param input2 the second reader
-     * @return true if the content of the readers are equal or they both don't
-     * exist, false otherwise
-     * @throws NullPointerException if either input is null
-     * @throws IOException          if an I/O error occurs
-     * @since 1.1
-     */
-    public static boolean contentEquals(Reader input1, Reader input2)
-            throws IOException {
-        if (input1 == input2) {
-            return true;
-        }
-
-        input1 = toBufferedReader(input1);
-        input2 = toBufferedReader(input2);
-
-        int ch = input1.read();
-        while (EOF != ch) {
-            final int ch2 = input2.read();
-            if (ch != ch2) {
-                return false;
-            }
-            ch = input1.read();
-        }
-
-        final int ch2 = input2.read();
-        return ch2 == EOF;
-    }
-
-    /**
-     * Compares the contents of two Readers to determine if they are equal or
-     * not, ignoring EOL characters.
-     * <p>
-     * This method buffers the input internally using
-     * <code>BufferedReader</code> if they are not already buffered.
-     *
-     * @param input1 the first reader
-     * @param input2 the second reader
-     * @return true if the content of the readers are equal (ignoring EOL differences),  false otherwise
-     * @throws NullPointerException if either input is null
-     * @throws IOException          if an I/O error occurs
-     * @since 2.2
-     */
-    public static boolean contentEqualsIgnoreEOL(final Reader input1, final Reader input2)
-            throws IOException {
-        if (input1 == input2) {
-            return true;
-        }
-        final BufferedReader br1 = toBufferedReader(input1);
-        final BufferedReader br2 = toBufferedReader(input2);
-
-        String line1 = br1.readLine();
-        String line2 = br2.readLine();
-        while (line1 != null && line2 != null && line1.equals(line2)) {
-            line1 = br1.readLine();
-            line2 = br2.readLine();
-        }
-        return line1 == null ? line2 == null ? true : false : line1.equals(line2);
-    }
-
-    /**
-     * Skips bytes from an input byte stream.
-     * This implementation guarantees that it will read as many bytes
-     * as possible before giving up; this may not always be the case for
-     * skip() implementations in subclasses of {@link InputStream}.
-     * <p>
-     * Note that the implementation uses {@link InputStream#read(byte[], int, int)} rather
-     * than delegating to {@link InputStream#skip(long)}.
-     * This means that the method may be considerably less efficient than using the actual skip implementation,
-     * this is done to guarantee that the correct number of bytes are skipped.
-     * </p>
-     *
-     * @param input byte stream to skip
-     * @param toSkip number of bytes to skip.
-     * @return number of bytes actually skipped.
-     * @throws IOException              if there is a problem reading the file
-     * @throws IllegalArgumentException if toSkip is negative
-     * @see InputStream#skip(long)
-     * @see <a href="https://issues.apache.org/jira/browse/IO-203">IO-203 - Add skipFully() method for InputStreams</a>
-     * @since 2.0
-     */
-    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);
-        }
-        /*
-         * N.B. no need to synchronize this because: - we don't care if the buffer is created multiple times (the data
-         * is ignored) - we always use the same size buffer, so if it it is recreated it will still be OK (if the buffer
-         * size were variable, we would need to synch. to ensure some other thread did not create a smaller one)
-         */
-        if (SKIP_BYTE_BUFFER == null) {
-            SKIP_BYTE_BUFFER = new byte[SKIP_BUFFER_SIZE];
-        }
-        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()
-            final long n = input.read(SKIP_BYTE_BUFFER, 0, (int) Math.min(remain, SKIP_BUFFER_SIZE));
-            if (n < 0) { // EOF
-                break;
-            }
-            remain -= n;
-        }
-        return toSkip - remain;
-    }
-
-    /**
-     * Skips bytes from a ReadableByteChannel.
-     * This implementation guarantees that it will read as many bytes
-     * as possible before giving up.
-     *
-     * @param input ReadableByteChannel to skip
-     * @param toSkip number of bytes to skip.
-     * @return number of bytes actually skipped.
-     * @throws IOException              if there is a problem reading the ReadableByteChannel
-     * @throws IllegalArgumentException if toSkip is negative
-     * @since 2.5
-     */
-    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);
-        }
-        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));
-            final int n = input.read(skipByteBuffer);
-            if (n == EOF) {
-                break;
-            }
-            remain -= n;
-        }
-        return toSkip - remain;
-    }
-
-    /**
-     * Skips characters from an input character stream.
-     * This implementation guarantees that it will read as many characters
-     * as possible before giving up; this may not always be the case for
-     * skip() implementations in subclasses of {@link Reader}.
-     * <p>
-     * Note that the implementation uses {@link Reader#read(char[], int, int)} rather
-     * than delegating to {@link Reader#skip(long)}.
-     * This means that the method may be considerably less efficient than using the actual skip implementation,
-     * this is done to guarantee that the correct number of characters are skipped.
-     * </p>
-     *
-     * @param input character stream to skip
-     * @param toSkip number of characters to skip.
-     * @return number of characters actually skipped.
-     * @throws IOException              if there is a problem reading the file
-     * @throws IllegalArgumentException if toSkip is negative
-     * @see Reader#skip(long)
-     * @see <a href="https://issues.apache.org/jira/browse/IO-203">IO-203 - Add skipFully() method for InputStreams</a>
-     * @since 2.0
-     */
-    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);
-        }
-        /*
-         * N.B. no need to synchronize this because: - we don't care if the buffer is created multiple times (the data
-         * is ignored) - we always use the same size buffer, so if it it is recreated it will still be OK (if the buffer
-         * size were variable, we would need to synch. to ensure some other thread did not create a smaller one)
-         */
-        if (SKIP_CHAR_BUFFER == null) {
-            SKIP_CHAR_BUFFER = new char[SKIP_BUFFER_SIZE];
-        }
-        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()
-            final long n = input.read(SKIP_CHAR_BUFFER, 0, (int) Math.min(remain, SKIP_BUFFER_SIZE));
-            if (n < 0) { // EOF
-                break;
-            }
-            remain -= n;
-        }
-        return toSkip - remain;
-    }
-
-    /**
-     * Skips the requested number of bytes or fail if there are not enough left.
-     * <p>
-     * This allows for the possibility that {@link InputStream#skip(long)} may
-     * not skip as many bytes as requested (most likely because of reaching EOF).
-     * <p>
-     * Note that the implementation uses {@link #skip(InputStream, long)}.
-     * This means that the method may be considerably less efficient than using the actual skip implementation,
-     * this is done to guarantee that the correct number of characters are skipped.
-     * </p>
-     *
-     * @param input stream to skip
-     * @param toSkip the number of bytes to skip
-     * @throws IOException              if there is a problem reading the file
-     * @throws IllegalArgumentException if toSkip is negative
-     * @throws EOFException             if the number of bytes skipped was incorrect
-     * @see InputStream#skip(long)
-     * @since 2.0
-     */
-    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);
-        }
-        final long skipped = skip(input, toSkip);
-        if (skipped != toSkip) {
-            throw new EOFException("Bytes to skip: " + toSkip + " actual: " + skipped);
-        }
-    }
-
-    /**
-     * Skips the requested number of bytes or fail if there are not enough left.
-     *
-     * @param input ReadableByteChannel to skip
-     * @param toSkip the number of bytes to skip
-     * @throws IOException              if there is a problem reading the ReadableByteChannel
-     * @throws IllegalArgumentException if toSkip is negative
-     * @throws EOFException             if the number of bytes skipped was incorrect
-     * @since 2.5
-     */
-    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);
-        }
-        final long skipped = skip(input, toSkip);
-        if (skipped != toSkip) {
-            throw new EOFException("Bytes to skip: " + toSkip + " actual: " + skipped);
-        }
-    }
-
-    /**
-     * Skips the requested number of characters or fail if there are not enough left.
-     * <p>
-     * This allows for the possibility that {@link Reader#skip(long)} may
-     * not skip as many characters as requested (most likely because of reaching EOF).
-     * <p>
-     * Note that the implementation uses {@link #skip(Reader, long)}.
-     * This means that the method may be considerably less efficient than using the actual skip implementation,
-     * this is done to guarantee that the correct number of characters are skipped.
-     * </p>
-     *
-     * @param input stream to skip
-     * @param toSkip the number of characters to skip
-     * @throws IOException              if there is a problem reading the file
-     * @throws IllegalArgumentException if toSkip is negative
-     * @throws EOFException             if the number of characters skipped was incorrect
-     * @see Reader#skip(long)
-     * @since 2.0
-     */
-    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);
-        }
-    }
-
-
-    /**
-     * Reads characters from an input character stream.
-     * This implementation guarantees that it will read as many characters
-     * as possible before giving up; this may not always be the case for
-     * subclasses of {@link Reader}.
-     *
-     * @param input where to read input from
-     * @param buffer destination
-     * @param offset initial offset into buffer
-     * @param length length to read, must be &gt;= 0
-     * @return actual length read; may be less than requested if EOF was reached
-     * @throws IOException if a read error occurs
-     * @since 2.2
-     */
-    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) {
-            final int location = length - remaining;
-            final int count = input.read(buffer, offset + location, remaining);
-            if (EOF == count) { // EOF
-                break;
-            }
-            remaining -= count;
-        }
-        return length - remaining;
-    }
-
-    /**
-     * Reads characters from an input character stream.
-     * This implementation guarantees that it will read as many characters
-     * as possible before giving up; this may not always be the case for
-     * subclasses of {@link Reader}.
-     *
-     * @param input where to read input from
-     * @param buffer destination
-     * @return actual length read; may be less than requested if EOF was reached
-     * @throws IOException if a read error occurs
-     * @since 2.2
-     */
-    public static int read(final Reader input, final char[] buffer) throws IOException {
-        return read(input, buffer, 0, buffer.length);
-    }
-
-    /**
-     * Reads bytes from an input stream.
-     * This implementation guarantees that it will read as many bytes
-     * as possible before giving up; this may not always be the case for
-     * subclasses of {@link InputStream}.
-     *
-     * @param input where to read input from
-     * @param buffer destination
-     * @param offset initial offset into buffer
-     * @param length length to read, must be &gt;= 0
-     * @return actual length read; may be less than requested if EOF was reached
-     * @throws IOException if a read error occurs
-     * @since 2.2
-     */
-    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) {
-            final int location = length - remaining;
-            final int count = input.read(buffer, offset + location, remaining);
-            if (EOF == count) { // EOF
-                break;
-            }
-            remaining -= count;
-        }
-        return length - remaining;
-    }
-
-    /**
-     * Reads bytes from an input stream.
-     * This implementation guarantees that it will read as many bytes
-     * as possible before giving up; this may not always be the case for
-     * subclasses of {@link InputStream}.
-     *
-     * @param input where to read input from
-     * @param buffer destination
-     * @return actual length read; may be less than requested if EOF was reached
-     * @throws IOException if a read error occurs
-     * @since 2.2
-     */
-    public static int read(final InputStream input, final byte[] buffer) throws IOException {
-        return read(input, buffer, 0, buffer.length);
-    }
-
-    /**
-     * Reads bytes from a ReadableByteChannel.
-     * <p>
-     * This implementation guarantees that it will read as many bytes
-     * as possible before giving up; this may not always be the case for
-     * subclasses of {@link ReadableByteChannel}.
-     *
-     * @param input the byte channel to read
-     * @param buffer byte buffer destination
-     * @return the actual length read; may be less than requested if EOF was reached
-     * @throws IOException if a read error occurs
-     * @since 2.5
-     */
-    public static int read(final ReadableByteChannel input, final ByteBuffer buffer) throws IOException {
-        final int length = buffer.remaining();
-        while (buffer.remaining() > 0) {
-            final int count = input.read(buffer);
-            if (EOF == count) { // EOF
-                break;
-            }
-        }
-        return length - buffer.remaining();
-    }
-
-    /**
-     * Reads the requested number of characters or fail if there are not enough left.
-     * <p>
-     * This allows for the possibility that {@link Reader#read(char[], int, int)} may
-     * not read as many characters as requested (most likely because of reaching EOF).
-     *
-     * @param input where to read input from
-     * @param buffer destination
-     * @param offset initial offset into buffer
-     * @param length length to read, must be &gt;= 0
-     * @throws IOException              if there is a problem reading the file
-     * @throws IllegalArgumentException if length is negative
-     * @throws EOFException             if the number of characters read was incorrect
-     * @since 2.2
-     */
-    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);
-        }
-    }
-
-    /**
-     * Reads the requested number of characters or fail if there are not enough left.
-     * <p>
-     * This allows for the possibility that {@link Reader#read(char[], int, int)} may
-     * not read as many characters as requested (most likely because of reaching EOF).
-     *
-     * @param input where to read input from
-     * @param buffer destination
-     * @throws IOException              if there is a problem reading the file
-     * @throws IllegalArgumentException if length is negative
-     * @throws EOFException             if the number of characters read was incorrect
-     * @since 2.2
-     */
-    public static void readFully(final Reader input, final char[] buffer) throws IOException {
-        readFully(input, buffer, 0, buffer.length);
-    }
-
-    /**
-     * Reads the requested number of bytes or fail if there are not enough left.
-     * <p>
-     * This allows for the possibility that {@link InputStream#read(byte[], int, int)} may
-     * not read as many bytes as requested (most likely because of reaching EOF).
-     *
-     * @param input where to read input from
-     * @param buffer destination
-     * @param offset initial offset into buffer
-     * @param length length to read, must be &gt;= 0
-     * @throws IOException              if there is a problem reading the file
-     * @throws IllegalArgumentException if length is negative
-     * @throws EOFException             if the number of bytes read was incorrect
-     * @since 2.2
-     */
-    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);
-        }
-    }
-
-    /**
-     * Reads the requested number of bytes or fail if there are not enough left.
-     * <p>
-     * This allows for the possibility that {@link InputStream#read(byte[], int, int)} may
-     * not read as many bytes as requested (most likely because of reaching EOF).
-     *
-     * @param input where to read input from
-     * @param buffer destination
-     * @throws IOException              if there is a problem reading the file
-     * @throws IllegalArgumentException if length is negative
-     * @throws EOFException             if the number of bytes read was incorrect
-     * @since 2.2
-     */
-    public static void readFully(final InputStream input, final byte[] buffer) throws IOException {
-        readFully(input, buffer, 0, buffer.length);
-    }
-
-    /**
-     * Reads the requested number of bytes or fail if there are not enough left.
-     * <p>
-     * This allows for the possibility that {@link InputStream#read(byte[], int, int)} may
-     * not read as many bytes as requested (most likely because of reaching EOF).
-     *
-     * @param input where to read input from
-     * @param length length to read, must be &gt;= 0
-     * @return the bytes read from input
-     * @throws IOException              if there is a problem reading the file
-     * @throws IllegalArgumentException if length is negative
-     * @throws EOFException             if the number of bytes read was incorrect
-     * @since 2.5
-     */
-    public static byte[] readFully(final InputStream input, final int length) throws IOException {
-        final byte[] buffer = new byte[length];
-        readFully(input, buffer, 0, buffer.length);
-        return buffer;
-    }
-
-    /**
-     * Reads the requested number of bytes or fail if there are not enough left.
-     * <p>
-     * This allows for the possibility that {@link ReadableByteChannel#read(ByteBuffer)} may
-     * not read as many bytes as requested (most likely because of reaching EOF).
-     *
-     * @param input the byte channel to read
-     * @param buffer byte buffer destination
-     * @throws IOException  if there is a problem reading the file
-     * @throws EOFException if the number of bytes read was incorrect
-     * @since 2.5
-     */
-    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);
-        }
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/Java7Support.java b/trunk/src/main/java/org/apache/commons/io/Java7Support.java
deleted file mode 100644
index d9033a4..0000000
--- a/trunk/src/main/java/org/apache/commons/io/Java7Support.java
+++ /dev/null
@@ -1,190 +0,0 @@
-package org.apache.commons.io;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Array;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-/**
- * Java7 feature detection and reflection based feature access.
- * <p/>
- * Taken from maven-shared-utils, only for private usage until we go full java7
- */
-class Java7Support {
-
-    private static final boolean IS_JAVA7;
-
-    private static Method isSymbolicLink;
-
-    private static Method delete;
-
-    private static Method toPath;
-
-    private static Method exists;
-
-    private static Method toFile;
-
-    private static Method readSymlink;
-
-    private static Method createSymlink;
-
-    private static Object emptyLinkOpts;
-
-    private static Object emptyFileAttributes;
-
-    static {
-        boolean isJava7x = true;
-        try {
-            ClassLoader cl = Thread.currentThread().getContextClassLoader();
-            Class<?> files = cl.loadClass("java.nio.file.Files");
-            Class<?> path = cl.loadClass("java.nio.file.Path");
-            Class<?> fa = cl.loadClass("java.nio.file.attribute.FileAttribute");
-            Class<?> linkOption = cl.loadClass("java.nio.file.LinkOption");
-            isSymbolicLink = files.getMethod("isSymbolicLink", path);
-            delete = files.getMethod("delete", path);
-            readSymlink = files.getMethod("readSymbolicLink", path);
-
-            emptyFileAttributes = Array.newInstance(fa, 0);
-            createSymlink = files.getMethod("createSymbolicLink", path, path, emptyFileAttributes.getClass());
-            emptyLinkOpts = Array.newInstance(linkOption, 0);
-            exists = files.getMethod("exists", path, emptyLinkOpts.getClass());
-            toPath = File.class.getMethod("toPath");
-            toFile = path.getMethod("toFile");
-        } catch (ClassNotFoundException e) {
-            isJava7x = false;
-        } catch (NoSuchMethodException e) {
-            isJava7x = false;
-        }
-        IS_JAVA7 = isJava7x;
-    }
-
-    /**
-     * Invokes java7 isSymbolicLink
-     * @param file The file to check
-     * @return true if the file is a symbolic link
-     */
-    public static boolean isSymLink(File file) {
-        try {
-            Object path = toPath.invoke(file);
-            Boolean result = (Boolean) isSymbolicLink.invoke(null, path);
-            return result.booleanValue();
-        } catch (IllegalAccessException e) {
-            throw new RuntimeException(e);
-        } catch (InvocationTargetException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * Reads the target of a symbolic link
-     * @param symlink The symlink to read
-     * @return The location the symlink is pointing to
-     * @throws IOException Upon failure
-     */
-
-    public static File readSymbolicLink(File symlink)
-            throws IOException {
-        try {
-            Object path = toPath.invoke(symlink);
-            Object resultPath = readSymlink.invoke(null, path);
-            return (File) toFile.invoke(resultPath);
-        } catch (IllegalAccessException e) {
-            throw new RuntimeException(e);
-        } catch (InvocationTargetException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-
-    /**
-     * Indicates if a symlunk target exists
-     * @param file The symlink file
-     * @return true if the target exists
-     * @throws IOException upon error
-     */
-    private static boolean exists(File file)
-            throws IOException {
-        try {
-            Object path = toPath.invoke(file);
-            final Boolean result = (Boolean) exists.invoke(null, path, emptyLinkOpts);
-            return result.booleanValue();
-        } catch (IllegalAccessException e) {
-            throw new RuntimeException(e);
-        } catch (InvocationTargetException e) {
-            throw (RuntimeException) e.getTargetException();
-        }
-
-    }
-
-    /**
-     * Creates a symbolic link
-     * @param symlink The symlink to create
-     * @param target Where it should point
-     * @return The newly created symlink
-     * @throws IOException upon error
-     */
-    public static File createSymbolicLink(File symlink, File target)
-            throws IOException {
-        try {
-            if (!exists(symlink)) {
-                Object link = toPath.invoke(symlink);
-                Object path = createSymlink.invoke(null, link, toPath.invoke(target), emptyFileAttributes);
-                return (File) toFile.invoke(path);
-            }
-            return symlink;
-        } catch (IllegalAccessException e) {
-            throw new RuntimeException(e);
-        } catch (InvocationTargetException e) {
-            final Throwable targetException = e.getTargetException();
-            throw (IOException) targetException;
-        }
-
-    }
-
-    /**
-     * Performs a nio delete
-     *
-     * @param file the file to delete
-     * @throws IOException Upon error
-     */
-    public static void delete(File file)
-            throws IOException {
-        try {
-            Object path = toPath.invoke(file);
-            delete.invoke(null, path);
-        } catch (IllegalAccessException e) {
-            throw new RuntimeException(e);
-        } catch (InvocationTargetException e) {
-            throw (IOException) e.getTargetException();
-        }
-    }
-
-    /**
-     * Indicates if the current vm has java7 lubrary support
-     * @return true if java7 library support
-     */
-    public static boolean isAtLeastJava7() {
-        return IS_JAVA7;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/LineIterator.java b/trunk/src/main/java/org/apache/commons/io/LineIterator.java
deleted file mode 100644
index 3cb13e7..0000000
--- a/trunk/src/main/java/org/apache/commons/io/LineIterator.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- * An Iterator over the lines in a <code>Reader</code>.
- * <p>
- * <code>LineIterator</code> holds a reference to an open <code>Reader</code>.
- * When you have finished with the iterator you should close the reader
- * to free internal resources. This can be done by closing the reader directly,
- * or by calling the {@link #close()} or {@link #closeQuietly(LineIterator)}
- * method on the iterator.
- * <p>
- * The recommended usage pattern is:
- * <pre>
- * LineIterator it = FileUtils.lineIterator(file, "UTF-8");
- * try {
- *   while (it.hasNext()) {
- *     String line = it.nextLine();
- *     // do something with line
- *   }
- * } finally {
- *   it.close();
- * }
- * </pre>
- *
- * @version $Id$
- * @since 1.2
- */
-public class LineIterator implements Iterator<String> {
-
-    // N.B. This class deliberately does not implement Iterable, see https://issues.apache.org/jira/browse/IO-181
-
-    /** The reader that is being read. */
-    private final BufferedReader bufferedReader;
-    /** The current line. */
-    private String cachedLine;
-    /** A flag indicating if the iterator has been fully read. */
-    private boolean finished = false;
-
-    /**
-     * Constructs an iterator of the lines for a <code>Reader</code>.
-     *
-     * @param reader the <code>Reader</code> to read from, not null
-     * @throws IllegalArgumentException if the reader is null
-     */
-    public LineIterator(final Reader reader) throws IllegalArgumentException {
-        if (reader == null) {
-            throw new IllegalArgumentException("Reader must not be null");
-        }
-        if (reader instanceof BufferedReader) {
-            bufferedReader = (BufferedReader) reader;
-        } else {
-            bufferedReader = new BufferedReader(reader);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Indicates whether the <code>Reader</code> has more lines.
-     * If there is an <code>IOException</code> then {@link #close()} will
-     * be called on this instance.
-     *
-     * @return {@code true} if the Reader has more lines
-     * @throws IllegalStateException if an IO exception occurs
-     */
-    public boolean hasNext() {
-        if (cachedLine != null) {
-            return true;
-        } else if (finished) {
-            return false;
-        } else {
-            try {
-                while (true) {
-                    final String line = bufferedReader.readLine();
-                    if (line == null) {
-                        finished = true;
-                        return false;
-                    } else if (isValidLine(line)) {
-                        cachedLine = line;
-                        return true;
-                    }
-                }
-            } catch(final IOException ioe) {
-                close();
-                throw new IllegalStateException(ioe);
-            }
-        }
-    }
-
-    /**
-     * Overridable method to validate each line that is returned.
-     * This implementation always returns true.
-     * @param line  the line that is to be validated
-     * @return true if valid, false to remove from the iterator
-     */
-    protected boolean isValidLine(final String line) {
-        return true;
-    }
-
-    /**
-     * Returns the next line in the wrapped <code>Reader</code>.
-     *
-     * @return the next line from the input
-     * @throws NoSuchElementException if there is no line to return
-     */
-    public String next() {
-        return nextLine();
-    }
-
-    /**
-     * Returns the next line in the wrapped <code>Reader</code>.
-     *
-     * @return the next line from the input
-     * @throws NoSuchElementException if there is no line to return
-     */
-    public String nextLine() {
-        if (!hasNext()) {
-            throw new NoSuchElementException("No more lines");
-        }
-        final String currentLine = cachedLine;
-        cachedLine = null;
-        return currentLine;
-    }
-
-    /**
-     * Closes the underlying <code>Reader</code> quietly.
-     * This method is useful if you only want to process the first few
-     * lines of a larger file. If you do not close the iterator
-     * then the <code>Reader</code> remains open.
-     * This method can safely be called multiple times.
-     */
-    public void close() {
-        finished = true;
-        IOUtils.closeQuietly(bufferedReader);
-        cachedLine = null;
-    }
-
-    /**
-     * Unsupported.
-     *
-     * @throws UnsupportedOperationException always
-     */
-    public void remove() {
-        throw new UnsupportedOperationException("Remove unsupported on LineIterator");
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Closes the iterator, handling null and ignoring exceptions.
-     *
-     * @param iterator  the iterator to close
-     */
-    public static void closeQuietly(final LineIterator iterator) {
-        if (iterator != null) {
-            iterator.close();
-        }
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/TaggedIOException.java b/trunk/src/main/java/org/apache/commons/io/TaggedIOException.java
deleted file mode 100644
index 2283847..0000000
--- a/trunk/src/main/java/org/apache/commons/io/TaggedIOException.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.IOException;
-import java.io.Serializable;
-
-/**
- * An {@link IOException} decorator that adds a serializable tag to the
- * wrapped exception. Both the tag and the original exception can be used
- * to determine further processing when this exception is caught.
- *
- * @since 2.0
- */
-@SuppressWarnings("deprecation") // needs to extend deprecated IOExceptionWithCause to preserve binary compatibility 
-public class TaggedIOException extends IOExceptionWithCause {
-
-    /**
-     * Generated serial version UID.
-     */
-    private static final long serialVersionUID = -6994123481142850163L;
-
-    /**
-     * Checks whether the given throwable is tagged with the given tag.
-     * <p>
-     * This check can only succeed if the throwable is a
-     * {@link TaggedIOException} and the tag is {@link Serializable}, but
-     * the argument types are intentionally more generic to make it easier
-     * to use this method without type casts.
-     * <p>
-     * A typical use for this method is in a <code>catch</code> block to
-     * determine how a caught exception should be handled:
-     * <pre>
-     * Serializable tag = ...;
-     * try {
-     *     ...;
-     * } catch (Throwable t) {
-     *     if (TaggedIOExcepton.isTaggedWith(t, tag)) {
-     *         // special processing for tagged exception
-     *     } else {
-     *         // handling of other kinds of exceptions
-     *     }
-     * }
-     * </pre>
-     *
-     * @param throwable The Throwable object to check
-     * @param tag tag object
-     * @return {@code true} if the throwable has the specified tag,
-     * otherwise {@code false}
-     */
-    public static boolean isTaggedWith(final Throwable throwable, final Object tag) {
-        return tag != null
-            && throwable instanceof TaggedIOException
-            && tag.equals(((TaggedIOException) throwable).tag);
-    }
-
-    /**
-     * Throws the original {@link IOException} if the given throwable is
-     * a {@link TaggedIOException} decorator the given tag. Does nothing
-     * if the given throwable is of a different type or if it is tagged
-     * with some other tag.
-     * <p>
-     * This method is typically used in a <code>catch</code> block to
-     * selectively rethrow tagged exceptions.
-     * <pre>
-     * Serializable tag = ...;
-     * try {
-     *     ...;
-     * } catch (Throwable t) {
-     *     TaggedIOExcepton.throwCauseIfTagged(t, tag);
-     *     // handle other kinds of exceptions
-     * }
-     * </pre>
-     *
-     * @param throwable an exception
-     * @param tag tag object
-     * @throws IOException original exception from the tagged decorator, if any
-     */
-    public static void throwCauseIfTaggedWith(final Throwable throwable, final Object tag)
-            throws IOException {
-        if (isTaggedWith(throwable, tag)) {
-            throw ((TaggedIOException) throwable).getCause();
-        }
-    }
-
-    /**
-     * The tag of this exception.
-     */
-    private final Serializable tag;
-
-    /**
-     * Creates a tagged wrapper for the given exception.
-     *
-     * @param original the exception to be tagged
-     * @param tag tag of this exception
-     */
-    public TaggedIOException(final IOException original, final Serializable tag) {
-        super(original.getMessage(), original);
-        this.tag = tag;
-    }
-
-    /**
-     * Returns the serializable tag object.
-     *
-     * @return tag object
-     */
-    public Serializable getTag() {
-        return tag;
-    }
-
-    /**
-     * Returns the wrapped exception. The only difference to the overridden
-     * {@link Throwable#getCause()} method is the narrower return type.
-     *
-     * @return wrapped exception
-     */
-    @Override
-    public IOException getCause() {
-        return (IOException) super.getCause();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/ThreadMonitor.java b/trunk/src/main/java/org/apache/commons/io/ThreadMonitor.java
deleted file mode 100644
index 37138eb..0000000
--- a/trunk/src/main/java/org/apache/commons/io/ThreadMonitor.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-/**
- * Monitors a thread, interrupting it if it reaches the specified timeout.
- * <p>
- * This works by sleeping until the specified timeout amount and then
- * interrupting the thread being monitored. If the thread being monitored
- * completes its work before being interrupted, it should <code>interrupt()</code>
- * the <i>monitor</i> thread.
- * </p>
- * 
- * <pre>
- *       long timeoutInMillis = 1000;
- *       try {
- *           Thread monitor = ThreadMonitor.start(timeoutInMillis);
- *           // do some work here
- *           ThreadMonitor.stop(monitor);
- *       } catch (InterruptedException e) {
- *           // timed amount was reached
- *       }
- * </pre>
- *
- * @version  $Id$
- */
-class ThreadMonitor implements Runnable {
-
-    private final Thread thread;
-    private final long timeout;
-
-    /**
-     * Start monitoring the current thread.
-     *
-     * @param timeout The timeout amount in milliseconds
-     * or no timeout if the value is zero or less
-     * @return The monitor thread or {@code null}
-     * if the timeout amount is not greater than zero
-     */
-    public static Thread start(final long timeout) {
-        return start(Thread.currentThread(), timeout);
-    }
-
-    /**
-     * Start monitoring the specified thread.
-     *
-     * @param thread The thread The thread to monitor
-     * @param timeout The timeout amount in milliseconds
-     * or no timeout if the value is zero or less
-     * @return The monitor thread or {@code null}
-     * if the timeout amount is not greater than zero
-     */
-    public static Thread start(final Thread thread, final long timeout) {
-        Thread monitor = null;
-        if (timeout > 0) {
-            final ThreadMonitor timout = new ThreadMonitor(thread, timeout);
-            monitor = new Thread(timout, ThreadMonitor.class.getSimpleName());
-            monitor.setDaemon(true);
-            monitor.start();
-        }
-        return monitor;
-    }
-
-    /**
-     * Stop monitoring the specified thread.
-     *
-     * @param thread The monitor thread, may be {@code null}
-     */
-    public static void stop(final Thread thread) {
-        if (thread != null) {
-            thread.interrupt();
-        }
-    }
-
-    /**
-     * Construct and new monitor.
-     *
-     * @param thread The thread to monitor
-     * @param timeout The timeout amount in milliseconds
-     */
-    private ThreadMonitor(final Thread thread, final long timeout) {
-        this.thread = thread;
-        this.timeout = timeout;
-    }
-
-    /**
-     * Sleep until the specified timeout amount and then
-     * interrupt the thread being monitored.
-     *
-     * @see Runnable#run()
-     */
-    public void run() {
-        try {
-            Thread.sleep(timeout);
-            thread.interrupt();
-        } catch (final InterruptedException e) {
-            // timeout not reached
-        }
-    }
-}
\ No newline at end of file
diff --git a/trunk/src/main/java/org/apache/commons/io/comparator/AbstractFileComparator.java b/trunk/src/main/java/org/apache/commons/io/comparator/AbstractFileComparator.java
deleted file mode 100644
index cb3fb5e..0000000
--- a/trunk/src/main/java/org/apache/commons/io/comparator/AbstractFileComparator.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-/**
- * Abstract file {@link Comparator} which provides sorting for file arrays and lists.
- *
- * @version $Id$
- * @since 2.0
- */
-abstract class AbstractFileComparator implements Comparator<File> {
-
-    /**
-     * Sort an array of files.
-     * <p>
-     * This method uses {@link Arrays#sort(Object[], Comparator)}
-     * and returns the original array.
-     *
-     * @param files The files to sort, may be null
-     * @return The sorted array
-     * @since 2.0
-     */
-    public File[] sort(final File... files) {
-        if (files != null) {
-            Arrays.sort(files, this);
-        }
-        return files;
-    }
-
-    /**
-     * Sort a List of files.
-     * <p>
-     * This method uses {@link Collections#sort(List, Comparator)}
-     * and returns the original list.
-     *
-     * @param files The files to sort, may be null
-     * @return The sorted list
-     * @since 2.0
-     */
-    public List<File> sort(final List<File> files) {
-        if (files != null) {
-            Collections.sort(files, this);
-        }
-        return files;
-    }
-
-    /**
-     * String representation of this file comparator.
-     *
-     * @return String representation of this file comparator
-     */
-    @Override
-    public String toString() {
-        return getClass().getSimpleName();
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/comparator/CompositeFileComparator.java b/trunk/src/main/java/org/apache/commons/io/comparator/CompositeFileComparator.java
deleted file mode 100644
index 9ba6735..0000000
--- a/trunk/src/main/java/org/apache/commons/io/comparator/CompositeFileComparator.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-
-/**
- * Compare two files using a set of delegate file {@link Comparator}.
- * <p>
- * This comparator can be used to sort lists or arrays of files
- * by combining a number other comparators.
- * <p>
- * Example of sorting a list of files by type (i.e. directory or file)
- * and then by name:
- * <pre>
- *       CompositeFileComparator comparator =
- *                       new CompositeFileComparator(
- *                                 (AbstractFileComparator) DirectoryFileComparator.DIRECTORY_COMPARATOR,
- *                                 (AbstractFileComparator) NameFileComparator.NAME_COMPARATOR);
- *       List&lt;File&gt; list = ...
- *       comparator.sort(list);
- * </pre>
- *
- * @version $Id$
- * @since 2.0
- */
-public class CompositeFileComparator extends AbstractFileComparator implements Serializable {
-
-    private static final long serialVersionUID = -2224170307287243428L;
-    private static final Comparator<?>[] NO_COMPARATORS = {};
-    private final Comparator<File>[] delegates;
-
-    /**
-     * Create a composite comparator for the set of delegate comparators.
-     *
-     * @param delegates The delegate file comparators
-     */
-    @SuppressWarnings("unchecked") // casts 1 & 2 must be OK because types are already correct
-    public CompositeFileComparator(final Comparator<File>... delegates) {
-        if (delegates == null) {
-            this.delegates = (Comparator<File>[]) NO_COMPARATORS;//1
-        } else {
-            this.delegates = (Comparator<File>[]) new Comparator<?>[delegates.length];//2
-            System.arraycopy(delegates, 0, this.delegates, 0, delegates.length);
-        }
-    }
-
-    /**
-     * Create a composite comparator for the set of delegate comparators.
-     *
-     * @param delegates The delegate file comparators
-     */
-    @SuppressWarnings("unchecked") // casts 1 & 2 must be OK because types are already correct
-    public CompositeFileComparator(final Iterable<Comparator<File>> delegates) {
-        if (delegates == null) {
-            this.delegates = (Comparator<File>[]) NO_COMPARATORS; //1
-        } else {
-            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
-        }
-    }
-
-    /**
-     * Compare the two files using delegate comparators.
-     * 
-     * @param file1 The first file to compare
-     * @param file2 The second file to compare
-     * @return the first non-zero result returned from
-     * the delegate comparators or zero.
-     */
-    public int compare(final File file1, final File file2) {
-        int result = 0;
-        for (final Comparator<File> delegate : delegates) {
-            result = delegate.compare(file1, file2);
-            if (result != 0) {
-                break;
-            }
-        }
-        return result;
-    }
-
-    /**
-     * String representation of this file comparator.
-     *
-     * @return String representation of this file comparator
-     */
-    @Override
-    public String toString() {
-        final StringBuilder builder = new StringBuilder();
-        builder.append(super.toString());
-        builder.append('{');
-        for (int i = 0; i < delegates.length; i++) {
-            if (i > 0) {
-                builder.append(',');
-            }
-            builder.append(delegates[i]);
-        }
-        builder.append('}');
-        return builder.toString();
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java b/trunk/src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java
deleted file mode 100644
index 8c92dc5..0000000
--- a/trunk/src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.Comparator;
-
-/**
- * Compare two files using the <b>default</b> {@link File#compareTo(File)} method.
- * <p>
- * This comparator can be used to sort lists or arrays of files
- * by using the default file comparison.
- * <p>
- * Example of sorting a list of files using the
- * {@link #DEFAULT_COMPARATOR} singleton instance:
- * <pre>
- *       List&lt;File&gt; list = ...
- *       ((AbstractFileComparator) DefaultFileComparator.DEFAULT_COMPARATOR).sort(list);
- * </pre>
- * <p>
- * Example of doing a <i>reverse</i> sort of an array of files using the
- * {@link #DEFAULT_REVERSE} singleton instance:
- * <pre>
- *       File[] array = ...
- *       ((AbstractFileComparator) DefaultFileComparator.DEFAULT_REVERSE).sort(array);
- * </pre>
- * <p>
- *
- * @version $Id$
- * @since 1.4
- */
-public class DefaultFileComparator extends AbstractFileComparator implements Serializable {
-
-    private static final long serialVersionUID = 3260141861365313518L;
-
-    /** Singleton default comparator instance */
-    public static final Comparator<File> DEFAULT_COMPARATOR = new DefaultFileComparator();
-
-    /** Singleton reverse default comparator instance */
-    public static final Comparator<File> DEFAULT_REVERSE = new ReverseComparator(DEFAULT_COMPARATOR);
-
-    /**
-     * Compare the two files using the {@link File#compareTo(File)} method.
-     * 
-     * @param file1 The first file to compare
-     * @param file2 The second file to compare
-     * @return the result of calling file1's
-     * {@link File#compareTo(File)} with file2 as the parameter.
-     */
-    public int compare(final File file1, final File file2) {
-        return file1.compareTo(file2);
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/comparator/DirectoryFileComparator.java b/trunk/src/main/java/org/apache/commons/io/comparator/DirectoryFileComparator.java
deleted file mode 100644
index dda19a5..0000000
--- a/trunk/src/main/java/org/apache/commons/io/comparator/DirectoryFileComparator.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.Comparator;
-
-/**
- * Compare two files using the {@link File#isDirectory()} method.
- * <p>
- * This comparator can be used to sort lists or arrays by directories and files.
- * <p>
- * Example of sorting a list of files/directories using the
- * {@link #DIRECTORY_COMPARATOR} singleton instance:
- * <pre>
- *       List&lt;File&gt; list = ...
- *       ((AbstractFileComparator) DirectoryFileComparator.DIRECTORY_COMPARATOR).sort(list);
- * </pre>
- * <p>
- * Example of doing a <i>reverse</i> sort of an array of files/directories using the
- * {@link #DIRECTORY_REVERSE} singleton instance:
- * <pre>
- *       File[] array = ...
- *       ((AbstractFileComparator) DirectoryFileComparator.DIRECTORY_REVERSE).sort(array);
- * </pre>
- * <p>
- *
- * @version $Id$
- * @since 2.0
- */
-public class DirectoryFileComparator extends AbstractFileComparator implements Serializable {
-
-    private static final long serialVersionUID = 296132640160964395L;
-
-    /** Singleton default comparator instance */
-    public static final Comparator<File> DIRECTORY_COMPARATOR = new DirectoryFileComparator();
-
-    /** Singleton reverse default comparator instance */
-    public static final Comparator<File> DIRECTORY_REVERSE = new ReverseComparator(DIRECTORY_COMPARATOR);
-
-    /**
-     * Compare the two files using the {@link File#isDirectory()} method.
-     * 
-     * @param file1 The first file to compare
-     * @param file2 The second file to compare
-     * @return the result of calling file1's
-     * {@link File#compareTo(File)} with file2 as the parameter.
-     */
-    public int compare(final File file1, final File file2) {
-        return getType(file1) - getType(file2);
-    }
-
-    /**
-     * Convert type to numeric value.
-     *
-     * @param file The file
-     * @return 1 for directories and 2 for files
-     */
-    private int getType(final File file) {
-        if (file.isDirectory()) {
-            return 1;
-        } else {
-            return 2;
-        }
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java b/trunk/src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java
deleted file mode 100644
index b722ef8..0000000
--- a/trunk/src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.Comparator;
-
-import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.io.IOCase;
-
-/**
- * Compare the file name <b>extensions</b> for order
- * (see {@link FilenameUtils#getExtension(String)}).
- * <p>
- * This comparator can be used to sort lists or arrays of files
- * by their file extension either in a case-sensitive, case-insensitive or
- * system dependent case sensitive way. A number of singleton instances
- * are provided for the various case sensitivity options (using {@link IOCase})
- * and the reverse of those options.
- * <p>
- * Example of a <i>case-sensitive</i> file extension sort using the
- * {@link #EXTENSION_COMPARATOR} singleton instance:
- * <pre>
- *       List&lt;File&gt; list = ...
- *       ((AbstractFileComparator) ExtensionFileComparator.EXTENSION_COMPARATOR).sort(list);
- * </pre>
- * <p>
- * Example of a <i>reverse case-insensitive</i> file extension sort using the
- * {@link #EXTENSION_INSENSITIVE_REVERSE} singleton instance:
- * <pre>
- *       File[] array = ...
- *       ((AbstractFileComparator) ExtensionFileComparator.EXTENSION_INSENSITIVE_REVERSE).sort(array);
- * </pre>
- * <p>
- *
- * @version $Id$
- * @since 1.4
- */
-public class ExtensionFileComparator extends AbstractFileComparator implements Serializable {
-
-    private static final long serialVersionUID = 1928235200184222815L;
-
-    /** Case-sensitive extension comparator instance (see {@link IOCase#SENSITIVE}) */
-    public static final Comparator<File> EXTENSION_COMPARATOR = new ExtensionFileComparator();
-
-    /** Reverse case-sensitive extension comparator instance (see {@link IOCase#SENSITIVE}) */
-    public static final Comparator<File> EXTENSION_REVERSE = new ReverseComparator(EXTENSION_COMPARATOR);
-
-    /** Case-insensitive extension comparator instance (see {@link IOCase#INSENSITIVE}) */
-    public static final Comparator<File> EXTENSION_INSENSITIVE_COMPARATOR
-                                                = new ExtensionFileComparator(IOCase.INSENSITIVE);
-
-    /** Reverse case-insensitive extension comparator instance (see {@link IOCase#INSENSITIVE}) */
-    public static final Comparator<File> EXTENSION_INSENSITIVE_REVERSE
-                                                = new ReverseComparator(EXTENSION_INSENSITIVE_COMPARATOR);
-
-    /** System sensitive extension comparator instance (see {@link IOCase#SYSTEM}) */
-    public static final Comparator<File> EXTENSION_SYSTEM_COMPARATOR = new ExtensionFileComparator(IOCase.SYSTEM);
-
-    /** Reverse system sensitive path comparator instance (see {@link IOCase#SYSTEM}) */
-    public static final Comparator<File> EXTENSION_SYSTEM_REVERSE = new ReverseComparator(EXTENSION_SYSTEM_COMPARATOR);
-
-    /** Whether the comparison is case sensitive. */
-    private final IOCase caseSensitivity;
-
-    /**
-     * Construct a case sensitive file extension comparator instance.
-     */
-    public ExtensionFileComparator() {
-        this.caseSensitivity = IOCase.SENSITIVE;
-    }
-
-    /**
-     * Construct a file extension comparator instance with the specified case-sensitivity.
-     *
-     * @param caseSensitivity how to handle case sensitivity, null means case-sensitive
-     */
-    public ExtensionFileComparator(final IOCase caseSensitivity) {
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Compare the extensions of two files the specified case sensitivity.
-     * 
-     * @param file1 The first file to compare
-     * @param file2 The second file to compare
-     * @return a negative value if the first file's extension
-     * is less than the second, zero if the extensions are the
-     * same and a positive value if the first files extension
-     * is greater than the second file.
-     * 
-     */
-    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);
-    }
-
-    /**
-     * String representation of this file comparator.
-     *
-     * @return String representation of this file comparator
-     */
-    @Override
-    public String toString() {
-        return super.toString() + "[caseSensitivity=" + caseSensitivity + "]";
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java b/trunk/src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java
deleted file mode 100644
index d23b1f3..0000000
--- a/trunk/src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.Comparator;
-
-/**
- * Compare the <b>last modified date/time</b> of two files for order 
- * (see {@link File#lastModified()}).
- * <p>
- * This comparator can be used to sort lists or arrays of files
- * by their last modified date/time.
- * <p>
- * Example of sorting a list of files using the
- * {@link #LASTMODIFIED_COMPARATOR} singleton instance:
- * <pre>
- *       List&lt;File&gt; list = ...
- *       ((AbstractFileComparator) LastModifiedFileComparator.LASTMODIFIED_COMPARATOR).sort(list);
- * </pre>
- * <p>
- * Example of doing a <i>reverse</i> sort of an array of files using the
- * {@link #LASTMODIFIED_REVERSE} singleton instance:
- * <pre>
- *       File[] array = ...
- *       ((AbstractFileComparator) LastModifiedFileComparator.LASTMODIFIED_REVERSE).sort(array);
- * </pre>
- * <p>
- *
- * @version $Id$
- * @since 1.4
- */
-public class LastModifiedFileComparator extends AbstractFileComparator implements Serializable {
-
-    private static final long serialVersionUID = 7372168004395734046L;
-
-    /** Last modified comparator instance */
-    public static final Comparator<File> LASTMODIFIED_COMPARATOR = new LastModifiedFileComparator();
-
-    /** Reverse last modified comparator instance */
-    public static final Comparator<File> LASTMODIFIED_REVERSE = new ReverseComparator(LASTMODIFIED_COMPARATOR);
-
-    /**
-     * Compare the last the last modified date/time of two files.
-     * 
-     * @param file1 The first file to compare
-     * @param file2 The second file to compare
-     * @return a negative value if the first file's lastmodified date/time
-     * is less than the second, zero if the lastmodified date/time are the
-     * same and a positive value if the first files lastmodified date/time
-     * is greater than the second file.
-     * 
-     */
-    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) {
-            return 1;
-        } else {
-            return 0;
-        }
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java b/trunk/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java
deleted file mode 100644
index 6c73643..0000000
--- a/trunk/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.Comparator;
-
-import org.apache.commons.io.IOCase;
-
-/**
- * Compare the <b>names</b> of two files for order (see {@link File#getName()}).
- * <p>
- * This comparator can be used to sort lists or arrays of files
- * by their name either in a case-sensitive, case-insensitive or
- * system dependent case sensitive way. A number of singleton instances
- * are provided for the various case sensitivity options (using {@link IOCase})
- * and the reverse of those options.
- * <p>
- * Example of a <i>case-sensitive</i> file name sort using the
- * {@link #NAME_COMPARATOR} singleton instance:
- * <pre>
- *       List&lt;File&gt; list = ...
- *       ((AbstractFileComparator) NameFileComparator.NAME_COMPARATOR).sort(list);
- * </pre>
- * <p>
- * Example of a <i>reverse case-insensitive</i> file name sort using the
- * {@link #NAME_INSENSITIVE_REVERSE} singleton instance:
- * <pre>
- *       File[] array = ...
- *       ((AbstractFileComparator) NameFileComparator.NAME_INSENSITIVE_REVERSE).sort(array);
- * </pre>
- * <p>
- *
- * @version $Id$
- * @since 1.4
- */
-public class NameFileComparator extends AbstractFileComparator implements Serializable {
-
-    private static final long serialVersionUID = 8397947749814525798L;
-
-    /** Case-sensitive name comparator instance (see {@link IOCase#SENSITIVE}) */
-    public static final Comparator<File> NAME_COMPARATOR = new NameFileComparator();
-
-    /** Reverse case-sensitive name comparator instance (see {@link IOCase#SENSITIVE}) */
-    public static final Comparator<File> NAME_REVERSE = new ReverseComparator(NAME_COMPARATOR);
-
-    /** Case-insensitive name comparator instance (see {@link IOCase#INSENSITIVE}) */
-    public static final Comparator<File> NAME_INSENSITIVE_COMPARATOR = new NameFileComparator(IOCase.INSENSITIVE);
-
-    /** Reverse case-insensitive name comparator instance (see {@link IOCase#INSENSITIVE}) */
-    public static final Comparator<File> NAME_INSENSITIVE_REVERSE = new ReverseComparator(NAME_INSENSITIVE_COMPARATOR);
-
-    /** System sensitive name comparator instance (see {@link IOCase#SYSTEM}) */
-    public static final Comparator<File> NAME_SYSTEM_COMPARATOR = new NameFileComparator(IOCase.SYSTEM);
-
-    /** Reverse system sensitive name comparator instance (see {@link IOCase#SYSTEM}) */
-    public static final Comparator<File> NAME_SYSTEM_REVERSE = new ReverseComparator(NAME_SYSTEM_COMPARATOR);
-
-    /** Whether the comparison is case sensitive. */
-    private final IOCase caseSensitivity;
-
-    /**
-     * Construct a case sensitive file name comparator instance.
-     */
-    public NameFileComparator() {
-        this.caseSensitivity = IOCase.SENSITIVE;
-    }
-
-    /**
-     * Construct a file name comparator instance with the specified case-sensitivity.
-     *
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     */
-    public NameFileComparator(final IOCase caseSensitivity) {
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Compare the names of two files with the specified case sensitivity.
-     * 
-     * @param file1 The first file to compare
-     * @param file2 The second file to compare
-     * @return a negative value if the first file's name
-     * is less than the second, zero if the names are the
-     * same and a positive value if the first files name
-     * is greater than the second file.
-     */
-    public int compare(final File file1, final File file2) {
-        return caseSensitivity.checkCompareTo(file1.getName(), file2.getName());
-    }
-
-    /**
-     * String representation of this file comparator.
-     *
-     * @return String representation of this file comparator
-     */
-    @Override
-    public String toString() {
-        return super.toString() + "[caseSensitivity=" + caseSensitivity + "]";
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/comparator/PathFileComparator.java b/trunk/src/main/java/org/apache/commons/io/comparator/PathFileComparator.java
deleted file mode 100644
index 59be3be..0000000
--- a/trunk/src/main/java/org/apache/commons/io/comparator/PathFileComparator.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.Comparator;
-
-import org.apache.commons.io.IOCase;
-
-/**
- * Compare the <b>path</b> of two files for order (see {@link File#getPath()}).
- * <p>
- * This comparator can be used to sort lists or arrays of files
- * by their path either in a case-sensitive, case-insensitive or
- * system dependent case sensitive way. A number of singleton instances
- * are provided for the various case sensitivity options (using {@link IOCase})
- * and the reverse of those options.
- * <p>
- * Example of a <i>case-sensitive</i> file path sort using the
- * {@link #PATH_COMPARATOR} singleton instance:
- * <pre>
- *       List&lt;File&gt; list = ...
- *       ((AbstractFileComparator) PathFileComparator.PATH_COMPARATOR).sort(list);
- * </pre>
- * <p>
- * Example of a <i>reverse case-insensitive</i> file path sort using the
- * {@link #PATH_INSENSITIVE_REVERSE} singleton instance:
- * <pre>
- *       File[] array = ...
- *       ((AbstractFileComparator) PathFileComparator.PATH_INSENSITIVE_REVERSE).sort(array);
- * </pre>
- * <p>
- *
- * @version $Id$
- * @since 1.4
- */
-public class PathFileComparator extends AbstractFileComparator implements Serializable {
-
-    private static final long serialVersionUID = 6527501707585768673L;
-
-    /** Case-sensitive path comparator instance (see {@link IOCase#SENSITIVE}) */
-    public static final Comparator<File> PATH_COMPARATOR = new PathFileComparator();
-
-    /** Reverse case-sensitive path comparator instance (see {@link IOCase#SENSITIVE}) */
-    public static final Comparator<File> PATH_REVERSE = new ReverseComparator(PATH_COMPARATOR);
-
-    /** Case-insensitive path comparator instance (see {@link IOCase#INSENSITIVE}) */
-    public static final Comparator<File> PATH_INSENSITIVE_COMPARATOR = new PathFileComparator(IOCase.INSENSITIVE);
-
-    /** Reverse case-insensitive path comparator instance (see {@link IOCase#INSENSITIVE}) */
-    public static final Comparator<File> PATH_INSENSITIVE_REVERSE = new ReverseComparator(PATH_INSENSITIVE_COMPARATOR);
-
-    /** System sensitive path comparator instance (see {@link IOCase#SYSTEM}) */
-    public static final Comparator<File> PATH_SYSTEM_COMPARATOR = new PathFileComparator(IOCase.SYSTEM);
-
-    /** Reverse system sensitive path comparator instance (see {@link IOCase#SYSTEM}) */
-    public static final Comparator<File> PATH_SYSTEM_REVERSE = new ReverseComparator(PATH_SYSTEM_COMPARATOR);
-
-    /** Whether the comparison is case sensitive. */
-    private final IOCase caseSensitivity;
-
-    /**
-     * Construct a case sensitive file path comparator instance.
-     */
-    public PathFileComparator() {
-        this.caseSensitivity = IOCase.SENSITIVE;
-    }
-
-    /**
-     * Construct a file path comparator instance with the specified case-sensitivity.
-     *
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     */
-    public PathFileComparator(final IOCase caseSensitivity) {
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Compare the paths of two files the specified case sensitivity.
-     * 
-     * @param file1 The first file to compare
-     * @param file2 The second file to compare
-     * @return a negative value if the first file's path
-     * is less than the second, zero if the paths are the
-     * same and a positive value if the first files path
-     * is greater than the second file.
-     * 
-     */
-    public int compare(final File file1, final File file2) {
-        return caseSensitivity.checkCompareTo(file1.getPath(), file2.getPath());
-    }
-
-    /**
-     * String representation of this file comparator.
-     *
-     * @return String representation of this file comparator
-     */
-    @Override
-    public String toString() {
-        return super.toString() + "[caseSensitivity=" + caseSensitivity + "]";
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/comparator/ReverseComparator.java b/trunk/src/main/java/org/apache/commons/io/comparator/ReverseComparator.java
deleted file mode 100644
index 504c1f0..0000000
--- a/trunk/src/main/java/org/apache/commons/io/comparator/ReverseComparator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.Comparator;
-
-/**
- * Reverses the result of comparing two objects using
- * the delegate {@link Comparator}.
- *
- * @version $Id$
- * @since 1.4
- */
-class ReverseComparator extends AbstractFileComparator implements Serializable {
-
-    private static final long serialVersionUID = -4808255005272229056L;
-    private final Comparator<File> delegate;
-
-    /**
-     * Construct an instance with the sepecified delegate {@link Comparator}.
-     *
-     * @param delegate The comparator to delegate to
-     */
-    public ReverseComparator(final Comparator<File> delegate) {
-        if (delegate == null) {
-            throw new IllegalArgumentException("Delegate comparator is missing");
-        }
-        this.delegate = delegate;
-    }
-
-    /**
-     * Compare using the delegate Comparator, but reversing the result.
-     * 
-     * @param file1 The first file to compare
-     * @param file2 The second file to compare
-     * @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(final File file1, final File file2) {
-        return delegate.compare(file2, file1); // parameters switched round
-    }
-
-    /**
-     * String representation of this file comparator.
-     *
-     * @return String representation of this file comparator
-     */
-    @Override
-    public String toString() {
-        return super.toString() + "[" + delegate.toString() + "]";
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/comparator/SizeFileComparator.java b/trunk/src/main/java/org/apache/commons/io/comparator/SizeFileComparator.java
deleted file mode 100644
index 859c316..0000000
--- a/trunk/src/main/java/org/apache/commons/io/comparator/SizeFileComparator.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.Comparator;
-
-import org.apache.commons.io.FileUtils;
-
-/**
- * Compare the <b>length/size</b> of two files for order (see
- * {@link File#length()} and {@link FileUtils#sizeOfDirectory(File)}).
- * <p>
- * This comparator can be used to sort lists or arrays of files
- * by their length/size.
- * <p>
- * Example of sorting a list of files using the
- * {@link #SIZE_COMPARATOR} singleton instance:
- * <pre>
- *       List&lt;File&gt; list = ...
- *       ((AbstractFileComparator) SizeFileComparator.SIZE_COMPARATOR).sort(list);
- * </pre>
- * <p>
- * Example of doing a <i>reverse</i> sort of an array of files using the
- * {@link #SIZE_REVERSE} singleton instance:
- * <pre>
- *       File[] array = ...
- *       ((AbstractFileComparator) SizeFileComparator.SIZE_REVERSE).sort(array);
- * </pre>
- * <p>
- * <strong>N.B.</strong> Directories are treated as <b>zero size</b> unless
- * <code>sumDirectoryContents</code> is {@code true}.
- *
- * @version $Id$
- * @since 1.4
- */
-public class SizeFileComparator extends AbstractFileComparator implements Serializable {
-
-    private static final long serialVersionUID = -1201561106411416190L;
-
-    /** Size comparator instance - directories are treated as zero size */
-    public static final Comparator<File> SIZE_COMPARATOR = new SizeFileComparator();
-
-    /** Reverse size comparator instance - directories are treated as zero size */
-    public static final Comparator<File> SIZE_REVERSE = new ReverseComparator(SIZE_COMPARATOR);
-
-    /**
-     * Size comparator instance which sums the size of a directory's contents
-     * using {@link FileUtils#sizeOfDirectory(File)}
-     */
-    public static final Comparator<File> SIZE_SUMDIR_COMPARATOR = new SizeFileComparator(true);
-
-    /**
-     * Reverse size comparator instance which sums the size of a directory's contents
-     * using {@link FileUtils#sizeOfDirectory(File)}
-     */
-    public static final Comparator<File> SIZE_SUMDIR_REVERSE = new ReverseComparator(SIZE_SUMDIR_COMPARATOR);
-
-    /** Whether the sum of the directory's contents should be calculated. */
-    private final boolean sumDirectoryContents;
-
-    /**
-     * Construct a file size comparator instance (directories treated as zero size).
-     */
-    public SizeFileComparator() {
-        this.sumDirectoryContents = false;
-    }
-
-    /**
-     * Construct a file size comparator instance specifying whether the size of
-     * the directory contents should be aggregated.
-     * <p>
-     * If the <code>sumDirectoryContents</code> is {@code true} The size of
-     * directories is calculated using  {@link FileUtils#sizeOfDirectory(File)}.
-     *
-     * @param sumDirectoryContents {@code true} if the sum of the directoryies contents
-     *  should be calculated, otherwise {@code false} if directories should be treated
-     *  as size zero (see {@link FileUtils#sizeOfDirectory(File)}).
-     */
-    public SizeFileComparator(final boolean sumDirectoryContents) {
-        this.sumDirectoryContents = sumDirectoryContents;
-    }
-
-    /**
-     * Compare the length of two files.
-     * 
-     * @param file1 The first file to compare
-     * @param file2 The second file to compare
-     * @return a negative value if the first file's length
-     * is less than the second, zero if the lengths are the
-     * same and a positive value if the first files length
-     * is greater than the second file.
-     * 
-     */
-    public int compare(final File file1, final File file2) {
-        long size1 = 0;
-        if (file1.isDirectory()) {
-            size1 = sumDirectoryContents && file1.exists() ? FileUtils.sizeOfDirectory(file1) : 0;
-        } else {
-            size1 = file1.length();
-        }
-        long size2 = 0;
-        if (file2.isDirectory()) {
-            size2 = sumDirectoryContents && file2.exists() ? FileUtils.sizeOfDirectory(file2) : 0;
-        } else {
-            size2 = file2.length();
-        }
-        final long result = size1 - size2;
-        if (result < 0) {
-            return -1;
-        } else if (result > 0) {
-            return 1;
-        } else {
-            return 0;
-        }
-    }
-
-    /**
-     * String representation of this file comparator.
-     *
-     * @return String representation of this file comparator
-     */
-    @Override
-    public String toString() {
-        return super.toString() + "[sumDirectoryContents=" + sumDirectoryContents + "]";
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/comparator/package.html b/trunk/src/main/java/org/apache/commons/io/comparator/package.html
deleted file mode 100644
index d007158..0000000
--- a/trunk/src/main/java/org/apache/commons/io/comparator/package.html
+++ /dev/null
@@ -1,188 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<html>
-<body>
-<p>This package provides various {@link java.util.Comparator} implementations
-for {@link java.io.File}s.
-</p>
-<h3>Sorting</h3>
-<p>
-  All the compartors include <i>convenience</i> utility <code>sort(File...)</code> and
-  <code>sort(List)</code> methods.
-</p>
-<p>
-  For example, to sort the files in a directory by name:
-</p>
-  <pre>
-        File[] files = dir.listFiles();
-        NameFileComparator.NAME_COMPARATOR.sort(files);
-  </pre>
-<p>
-  ...alternatively you can do this in one line:
-</p>
-<p>
-  <pre>
-        File[] files = NameFileComparator.NAME_COMPARATOR.sort(dir.listFiles());
-  </pre>
-</p>
-
-<h3>Composite Comparator</h3>
-<p>
-  The <a href="CompositeFileComparator.html">CompositeFileComparator</a> can be used
-  to compare (and sort lists or arrays of files) by combining a number other comparators.
-</p>
-<p>
-  For example, to sort an array of files by type (i.e. directory or file)
-  and then by name:
-</p>
-<p>
-  <pre>
-        CompositeFileComparator comparator =
-                        new CompositeFileComparator(
-                                    DirectoryFileComparator.DIRECTORY_COMPARATOR,
-                                    NameFileComparator.NAME_COMPARATOR);
-        File[] files = dir.listFiles();
-        comparator.sort(files);
-  </pre>
-</p>
-
-<h3>Singleton Instances (thread-safe)</h3>
-<p>
- The {@link java.util.Comparator} implementations have some <i>convenience</i>
- singleton(<i>thread-safe</i>) instances ready to use:
- <ul>
-    <li><a href="DefaultFileComparator.html">DefaultFileComparator</a> - default file compare:
-        <ul>
-           <li><a href="DefaultFileComparator.html#DEFAULT_COMPARATOR">DEFAULT_COMPARATOR</a>
-               - Compare using <code>File.compareTo(File)</code> method.
-           </li>
-           <li><a href="DefaultFileComparator.html#DEFAULT_REVERSE">DEFAULT_REVERSE</a>
-               - Reverse compare of <code>File.compareTo(File)</code> method.
-           </li>
-        </ul>
-    </li>
-    <li><a href="DirectoryFileComparator.html">DirectoryFileComparator</a> - compare by type (directory or file):
-        <ul>
-           <li><a href="DirectoryFileComparator.html#DIRECTORY_COMPARATOR">DIRECTORY_COMPARATOR</a>
-               - Compare using <code>File.isDirectory()</code> method (directories < files).
-           </li>
-           <li><a href="DirectoryFileComparator.html#DIRECTORY_REVERSE">DIRECTORY_REVERSE</a>
-               - Reverse compare of <code>File.isDirectory()</code> method  (directories > files).
-           </li>
-        </ul>
-    </li>
-    <li><a href="ExtensionFileComparator.html">ExtensionFileComparator</a> - compare file extenstions:
-        <ul>
-           <li><a href="ExtensionFileComparator.html#EXTENSION_COMPARATOR">EXTENSION_COMPARATOR</a>
-               - Compare using <code>FilenameUtils.getExtension(String)</code> method.
-           </li>
-           <li><a href="ExtensionFileComparator.html#EXTENSION_REVERSE">EXTENSION_REVERSE</a>
-               - Reverse compare of <code>FilenameUtils.getExtension(String)</code> method.
-           </li>
-           <li><a href="ExtensionFileComparator.html#EXTENSION_INSENSITIVE_COMPARATOR">EXTENSION_INSENSITIVE_COMPARATOR</a>
-               - Case-insensitive compare using <code>FilenameUtils.getExtension(String)</code> method.
-           </li>
-           <li><a href="ExtensionFileComparator.html#EXTENSION_INSENSITIVE_REVERSE">EXTENSION_INSENSITIVE_REVERSE</a>
-               - Reverse case-insensitive compare of <code>FilenameUtils.getExtension(String)</code> method.
-           </li>
-           <li><a href="ExtensionFileComparator.html#EXTENSION_SYSTEM_COMPARATOR">EXTENSION_SYSTEM_COMPARATOR</a>
-               -  System sensitive compare using <code>FilenameUtils.getExtension(String)</code> method.
-           </li>
-           <li><a href="ExtensionFileComparator.html#EXTENSION_SYSTEM_REVERSE">EXTENSION_SYSTEM_REVERSE</a>
-               - Reverse system sensitive compare of <code>FilenameUtils.getExtension(String)</code> method.
-           </li>
-        </ul>
-    </li>
-    <li><a href="LastModifiedFileComparator.html">LastModifiedFileComparator</a>
-        - compare the file's last modified date/time:
-        <ul>
-           <li><a href="LastModifiedFileComparator.html#LASTMODIFIED_COMPARATOR">LASTMODIFIED_COMPARATOR</a>
-               - Compare using <code>File.lastModified()</code> method.
-           </li>
-           <li><a href="LastModifiedFileComparator.html#LASTMODIFIED_REVERSE">LASTMODIFIED_REVERSE</a>
-               - Reverse compare of <code>File.lastModified()</code> method.
-           </li>
-        </ul>
-    </li>
-     <li><a href="NameFileComparator.html">NameFileComparator</a> - compare file names:
-        <ul>
-           <li><a href="NameFileComparator.html#NAME_COMPARATOR">NAME_COMPARATOR</a>
-               - Compare using <code>File.getName()</code> method.
-           </li>
-           <li><a href="NameFileComparator.html#NAME_REVERSE">NAME_REVERSE</a>
-               - Reverse compare of <code>File.getName()</code> method.
-           </li>
-           <li><a href="NameFileComparator.html#NAME_INSENSITIVE_COMPARATOR">NAME_INSENSITIVE_COMPARATOR</a>
-               - Case-insensitive compare using <code>File.getName()</code> method.
-           </li>
-           <li><a href="NameFileComparator.html#NAME_INSENSITIVE_REVERSE">NAME_INSENSITIVE_REVERSE</a>
-               - Reverse case-insensitive compare of <code>File.getName()</code> method.
-           </li>
-           <li><a href="NameFileComparator.html#NAME_SYSTEM_COMPARATOR">NAME_SYSTEM_COMPARATOR</a>
-               -  System sensitive compare using <code>File.getName()</code> method.
-           </li>
-           <li><a href="NameFileComparator.html#NAME_SYSTEM_REVERSE">NAME_SYSTEM_REVERSE</a>
-               - Reverse system sensitive compare of <code>File.getName()</code> method.
-           </li>
-        </ul>
-    </li>
-     <li><a href="PathFileComparator.html">PathFileComparator</a> - compare file paths:
-        <ul>
-           <li><a href="PathFileComparator.html#PATH_COMPARATOR">PATH_COMPARATOR</a>
-               - Compare using <code>File.getPath()</code> method.
-           </li>
-           <li><a href="PathFileComparator.html#PATH_REVERSE">PATH_REVERSE</a>
-               - Reverse compare of <code>File.getPath()</code> method.
-           </li>
-           <li><a href="PathFileComparator.html#PATH_INSENSITIVE_COMPARATOR">PATH_INSENSITIVE_COMPARATOR</a>
-               - Case-insensitive compare using <code>File.getPath()</code> method.
-           </li>
-           <li><a href="PathFileComparator.html#PATH_INSENSITIVE_REVERSE">PATH_INSENSITIVE_REVERSE</a>
-               - Reverse case-insensitive compare of <code>File.getPath()</code> method.
-           </li>
-           <li><a href="PathFileComparator.html#PATH_SYSTEM_COMPARATOR">PATH_SYSTEM_COMPARATOR</a>
-               -  System sensitive compare using <code>File.getPath()</code> method.
-           </li>
-           <li><a href="PathFileComparator.html#PATH_SYSTEM_REVERSE">PATH_SYSTEM_REVERSE</a>
-               - Reverse system sensitive compare of <code>File.getPath()</code> method.
-           </li>
-        </ul>
-    </li>
-    <li><a href="SizeFileComparator.html">SizeFileComparator</a> - compare the file's size:
-        <ul>
-           <li><a href="SizeFileComparator.html#SIZE_COMPARATOR">SIZE_COMPARATOR</a>
-               - Compare using <code>File.length()</code> method (directories treated as zero length).
-           </li>
-           <li><a href="SizeFileComparator.html#SIZE_REVERSE">LASTMODIFIED_REVERSE</a>
-               - Reverse compare of <code>File.length()</code> method (directories treated as zero length).
-           </li>
-           <li><a href="SizeFileComparator.html#SIZE_SUMDIR_COMPARATOR">SIZE_SUMDIR_COMPARATOR</a>
-               - Compare using <code>FileUtils.sizeOfDirectory(File)</code> method
-                (sums the size of a directory's contents).
-           </li>
-           <li><a href="SizeFileComparator.html#SIZE_SUMDIR_REVERSE">SIZE_SUMDIR_REVERSE</a>
-               - Reverse compare of <code>FileUtils.sizeOfDirectory(File)</code> method
-                (sums the size of a directory's contents).
-           </li>
-        </ul>
-    </li>
- </ul>
-</p>
-
-</body>
-</html>
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/AbstractFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/AbstractFileFilter.java
deleted file mode 100644
index db45e8e..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/AbstractFileFilter.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-
-/**
- * An abstract class which implements the Java FileFilter and FilenameFilter 
- * interfaces via the IOFileFilter interface.
- * <p>
- * Note that a subclass <b>must</b> override one of the accept methods,
- * otherwise your class will infinitely loop.
- *
- * @since 1.0
- * @version $Id$
- */
-public abstract class AbstractFileFilter implements IOFileFilter {
-
-    /**
-     * Checks to see if the File should be accepted by this filter.
-     * 
-     * @param file  the File to check
-     * @return true if this file matches the test
-     */
-    public boolean accept(final File file) {
-        return accept(file.getParentFile(), file.getName());
-    }
-
-    /**
-     * Checks to see if the File should be accepted by this filter.
-     * 
-     * @param dir  the directory File to check
-     * @param name  the filename within the directory to check
-     * @return true if this file matches the test
-     */
-    public boolean accept(final File dir, final String name) {
-        return accept(new File(dir, name));
-    }
-
-    /**
-     * Provide a String representaion of this file filter.
-     *
-     * @return a String representaion
-     */
-    @Override
-    public String toString() {
-        return getClass().getSimpleName();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java
deleted file mode 100644
index a7a5678..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.Date;
-
-import org.apache.commons.io.FileUtils;
-
-/**
- * Filters files based on a cutoff time, can filter either newer
- * files or files equal to or older.
- * <p>
- * For example, to print all files and directories in the
- * current directory older than one day:
- *
- * <pre>
- * File dir = new File(".");
- * // We are interested in files older than one day
- * long cutoff = System.currentTimeMillis() - (24 * 60 * 60 * 1000);
- * String[] files = dir.list( new AgeFileFilter(cutoff) );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * @version $Id$
- * @see FileFilterUtils#ageFileFilter(Date)
- * @see FileFilterUtils#ageFileFilter(File)
- * @see FileFilterUtils#ageFileFilter(long)
- * @see FileFilterUtils#ageFileFilter(Date, boolean)
- * @see FileFilterUtils#ageFileFilter(File, boolean)
- * @see FileFilterUtils#ageFileFilter(long, boolean)
- * @since 1.2
- */
-public class AgeFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = -2132740084016138541L;
-
-    /** The cutoff time threshold. */
-    private final long cutoff;
-    /** Whether the files accepted will be older or newer. */
-    private final boolean acceptOlder;
-
-    /**
-     * Constructs a new age file filter for files equal to or older than
-     * a certain cutoff
-     *
-     * @param cutoff  the threshold age of the files
-     */
-    public AgeFileFilter(final long cutoff) {
-        this(cutoff, true);
-    }
-
-    /**
-     * Constructs a new age file filter for files on any one side
-     * of a certain cutoff.
-     *
-     * @param cutoff  the threshold age of the files
-     * @param acceptOlder  if true, older files (at or before the cutoff)
-     * are accepted, else newer ones (after the cutoff).
-     */
-    public AgeFileFilter(final long cutoff, final boolean acceptOlder) {
-        this.acceptOlder = acceptOlder;
-        this.cutoff = cutoff;
-    }
-
-    /**
-     * Constructs a new age file filter for files older than (at or before)
-     * a certain cutoff date.
-     *
-     * @param cutoffDate  the threshold age of the files
-     */
-    public AgeFileFilter(final Date cutoffDate) {
-        this(cutoffDate, true);
-    }
-
-    /**
-     * Constructs a new age file filter for files on any one side
-     * of a certain cutoff date.
-     *
-     * @param cutoffDate  the threshold age of the files
-     * @param acceptOlder  if true, older files (at or before the cutoff)
-     * are accepted, else newer ones (after the cutoff).
-     */
-    public AgeFileFilter(final Date cutoffDate, final boolean acceptOlder) {
-        this(cutoffDate.getTime(), acceptOlder);
-    }
-
-    /**
-     * Constructs a new age file filter for files older than (at or before)
-     * a certain File (whose last modification time will be used as reference).
-     *
-     * @param cutoffReference  the file whose last modification
-     *        time is usesd as the threshold age of the files
-     */
-    public AgeFileFilter(final File cutoffReference) {
-        this(cutoffReference, true);
-    }
-
-    /**
-     * Constructs a new age file filter for files on any one side
-     * of a certain File (whose last modification time will be used as
-     * reference).
-     *
-     * @param cutoffReference  the file whose last modification
-     *        time is usesd as the threshold age of the files
-     * @param acceptOlder  if true, older files (at or before the cutoff)
-     * are accepted, else newer ones (after the cutoff).
-     */
-    public AgeFileFilter(final File cutoffReference, final boolean acceptOlder) {
-        this(cutoffReference.lastModified(), acceptOlder);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Checks to see if the last modification of the file matches cutoff
-     * favorably.
-     * <p>
-     * If last modification time equals cutoff and newer files are required,
-     * file <b>IS NOT</b> selected.
-     * If last modification time equals cutoff and older files are required,
-     * file <b>IS</b> selected.
-     *
-     * @param file  the File to check
-     * @return true if the filename matches
-     */
-    @Override
-    public boolean accept(final File file) {
-        final boolean newer = FileUtils.isFileNewer(file, cutoff);
-        return acceptOlder ? !newer : newer;
-    }
-
-    /**
-     * Provide a String representaion of this file filter.
-     *
-     * @return a String representaion
-     */
-    @Override
-    public String toString() {
-        final String condition = acceptOlder ? "<=" : ">";
-        return super.toString() + "(" + condition + cutoff + ")";
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java
deleted file mode 100644
index 8f141f9..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * A {@link java.io.FileFilter} providing conditional AND logic across a list of
- * file filters. This filter returns {@code true} if all filters in the
- * list return {@code true}. Otherwise, it returns {@code false}.
- * Checking of the file filter list stops when the first filter returns
- * {@code false}.
- *
- * @since 1.0
- * @version $Id$
- *
- * @see FileFilterUtils#and(IOFileFilter...)
- */
-public class AndFileFilter
-        extends AbstractFileFilter
-        implements ConditionalFileFilter, Serializable {
-
-    private static final long serialVersionUID = 7215974688563965257L;
-
-    /** The list of file filters. */
-    private final List<IOFileFilter> fileFilters;
-
-    /**
-     * Constructs a new instance of <code>AndFileFilter</code>.
-     *
-     * @since 1.1
-     */
-    public AndFileFilter() {
-        this.fileFilters = new ArrayList<IOFileFilter>();
-    }
-
-    /**
-     * Constructs a new instance of <code>AndFileFilter</code>
-     * with the specified list of filters.
-     *
-     * @param fileFilters  a List of IOFileFilter instances, copied, null ignored
-     * @since 1.1
-     */
-    public AndFileFilter(final List<IOFileFilter> fileFilters) {
-        if (fileFilters == null) {
-            this.fileFilters = new ArrayList<IOFileFilter>();
-        } else {
-            this.fileFilters = new ArrayList<IOFileFilter>(fileFilters);
-        }
-    }
-
-    /**
-     * Constructs a new file filter that ANDs the result of two other filters.
-     *
-     * @param filter1  the first filter, must not be null
-     * @param filter2  the second filter, must not be null
-     * @throws IllegalArgumentException if either filter is null
-     */
-    public AndFileFilter(final IOFileFilter filter1, final IOFileFilter filter2) {
-        if (filter1 == null || filter2 == null) {
-            throw new IllegalArgumentException("The filters must not be null");
-        }
-        this.fileFilters = new ArrayList<IOFileFilter>(2);
-        addFileFilter(filter1);
-        addFileFilter(filter2);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void addFileFilter(final IOFileFilter ioFileFilter) {
-        this.fileFilters.add(ioFileFilter);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public List<IOFileFilter> getFileFilters() {
-        return Collections.unmodifiableList(this.fileFilters);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean removeFileFilter(final IOFileFilter ioFileFilter) {
-        return this.fileFilters.remove(ioFileFilter);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setFileFilters(final List<IOFileFilter> fileFilters) {
-        this.fileFilters.clear();
-        this.fileFilters.addAll(fileFilters);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean accept(final File file) {
-        if (this.fileFilters.isEmpty()) {
-            return false;
-        }
-        for (final IOFileFilter fileFilter : fileFilters) {
-            if (!fileFilter.accept(file)) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean accept(final File file, final String name) {
-        if (this.fileFilters.isEmpty()) {
-            return false;
-        }
-        for (final IOFileFilter fileFilter : fileFilters) {
-            if (!fileFilter.accept(file, name)) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Provide a String representaion of this file filter.
-     *
-     * @return a String representaion
-     */
-    @Override
-    public String toString() {
-        final StringBuilder buffer = new StringBuilder();
-        buffer.append(super.toString());
-        buffer.append("(");
-        if (fileFilters != null) {
-            for (int i = 0; i < fileFilters.size(); i++) {
-                if (i > 0) {
-                    buffer.append(",");
-                }
-                final Object filter = fileFilters.get(i);
-                buffer.append(filter == null ? "null" : filter.toString());
-            }
-        }
-        buffer.append(")");
-        return buffer.toString();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java
deleted file mode 100644
index 6189378..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * This filter accepts <code>File</code>s that can be read.
- * <p>
- * Example, showing how to print out a list of the
- * current directory's <i>readable</i> files:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( CanReadFileFilter.CAN_READ );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * <p>
- * Example, showing how to print out a list of the
- * current directory's <i>un-readable</i> files:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( CanReadFileFilter.CANNOT_READ );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * <p>
- * Example, showing how to print out a list of the
- * current directory's <i>read-only</i> files:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( CanReadFileFilter.READ_ONLY );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * @since 1.3
- * @version $Id$
- */
-public class CanReadFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = 3179904805251622989L;
-
-    /** Singleton instance of <i>readable</i> filter */
-    public static final IOFileFilter CAN_READ = new CanReadFileFilter();
-
-    /** Singleton instance of not <i>readable</i> filter */
-    public static final IOFileFilter CANNOT_READ = new NotFileFilter(CAN_READ);
-
-    /** Singleton instance of <i>read-only</i> filter */
-    public static final IOFileFilter READ_ONLY = new AndFileFilter(CAN_READ,
-                                                CanWriteFileFilter.CANNOT_WRITE);
-
-    /**
-     * Restrictive consructor.
-     */
-    protected CanReadFileFilter() {
-    }
-
-    /**
-     * Checks to see if the file can be read.
-     *
-     * @param file  the File to check.
-     * @return {@code true} if the file can be
-     *  read, otherwise {@code false}.
-     */
-    @Override
-    public boolean accept(final File file) {
-        return file.canRead();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java
deleted file mode 100644
index c547b31..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * This filter accepts <code>File</code>s that can be written to.
- * <p>
- * Example, showing how to print out a list of the
- * current directory's <i>writable</i> files:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( CanWriteFileFilter.CAN_WRITE );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * <p>
- * Example, showing how to print out a list of the
- * current directory's <i>un-writable</i> files:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( CanWriteFileFilter.CANNOT_WRITE );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * <p>
- * <b>N.B.</b> For read-only files, use
- *    <code>CanReadFileFilter.READ_ONLY</code>.
- *
- * @since 1.3
- * @version $Id$
- */
-public class CanWriteFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = 5132005214688990379L;
-
-    /** Singleton instance of <i>writable</i> filter */
-    public static final IOFileFilter CAN_WRITE = new CanWriteFileFilter();
-
-    /** Singleton instance of not <i>writable</i> filter */
-    public static final IOFileFilter CANNOT_WRITE = new NotFileFilter(CAN_WRITE);
-
-    /**
-     * Restrictive consructor.
-     */
-    protected CanWriteFileFilter() {
-    }
-
-    /**
-     * Checks to see if the file can be written to.
-     *
-     * @param file  the File to check
-     * @return {@code true} if the file can be
-     *  written to, otherwise {@code false}.
-     */
-    @Override
-    public boolean accept(final File file) {
-        return file.canWrite();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/ConditionalFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/ConditionalFileFilter.java
deleted file mode 100644
index a93d0c7..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/ConditionalFileFilter.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.util.List;
-
-/**
- * Defines operations for conditional file filters.
- *
- * @since 1.1
- * @version $Id$
- */
-public interface ConditionalFileFilter {
-
-    /**
-     * Adds the specified file filter to the list of file filters at the end of
-     * the list.
-     *
-     * @param ioFileFilter the filter to be added
-     * @since 1.1
-     */
-    void addFileFilter(IOFileFilter ioFileFilter);
-
-    /**
-     * Returns this conditional file filter's list of file filters.
-     *
-     * @return the file filter list
-     * @since 1.1
-     */
-    List<IOFileFilter> getFileFilters();
-
-    /**
-     * Removes the specified file filter.
-     *
-     * @param ioFileFilter filter to be removed
-     * @return {@code true} if the filter was found in the list,
-     * {@code false} otherwise
-     * @since 1.1
-     */
-    boolean removeFileFilter(IOFileFilter ioFileFilter);
-
-    /**
-     * Sets the list of file filters, replacing any previously configured
-     * file filters on this filter.
-     *
-     * @param fileFilters the list of filters
-     * @since 1.1
-     */
-    void setFileFilters(List<IOFileFilter> fileFilters);
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/DelegateFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/DelegateFileFilter.java
deleted file mode 100644
index a4fdc74..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/DelegateFileFilter.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FilenameFilter;
-import java.io.Serializable;
-
-/**
- * This class turns a Java FileFilter or FilenameFilter into an IO FileFilter.
- *
- * @since 1.0
- * @version $Id$
- *
- * @see FileFilterUtils#asFileFilter(FileFilter)
- * @see FileFilterUtils#asFileFilter(FilenameFilter)
- */
-public class DelegateFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = -8723373124984771318L;
-    /** The Filename filter */
-    private final FilenameFilter filenameFilter;
-    /** The File filter */
-    private final FileFilter fileFilter;
-
-    /**
-     * Constructs a delegate file filter around an existing FilenameFilter.
-     *
-     * @param filter  the filter to decorate
-     */
-    public DelegateFileFilter(final FilenameFilter filter) {
-        if (filter == null) {
-            throw new IllegalArgumentException("The FilenameFilter must not be null");
-        }
-        this.filenameFilter = filter;
-        this.fileFilter = null;
-    }
-
-    /**
-     * Constructs a delegate file filter around an existing FileFilter.
-     *
-     * @param filter  the filter to decorate
-     */
-    public DelegateFileFilter(final FileFilter filter) {
-        if (filter == null) {
-            throw new IllegalArgumentException("The FileFilter must not be null");
-        }
-        this.fileFilter = filter;
-        this.filenameFilter = null;
-    }
-
-    /**
-     * Checks the filter.
-     *
-     * @param file  the file to check
-     * @return true if the filter matches
-     */
-    @Override
-    public boolean accept(final File file) {
-        if (fileFilter != null) {
-            return fileFilter.accept(file);
-        } else {
-            return super.accept(file);
-        }
-    }
-
-    /**
-     * Checks the filter.
-     *
-     * @param dir  the directory
-     * @param name  the filename in the directory
-     * @return true if the filter matches
-     */
-    @Override
-    public boolean accept(final File dir, final String name) {
-        if (filenameFilter != null) {
-            return filenameFilter.accept(dir, name);
-        } else {
-            return super.accept(dir, name);
-        }
-    }
-
-    /**
-     * Provide a String representaion of this file filter.
-     *
-     * @return a String representaion
-     */
-    @Override
-    public String toString() {
-        final String delegate = fileFilter != null ? fileFilter.toString() : filenameFilter.toString();
-        return super.toString() + "(" + delegate + ")";
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java
deleted file mode 100644
index 0051850..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * This filter accepts <code>File</code>s that are directories.
- * <p>
- * For example, here is how to print out a list of the 
- * current directory's subdirectories:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( DirectoryFileFilter.INSTANCE );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * @since 1.0
- * @version $Id$
- *
- * @see FileFilterUtils#directoryFileFilter()
- */
-public class DirectoryFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = -5148237843784525732L;
-    /**
-     * Singleton instance of directory filter.
-     * @since 1.3
-     */
-    public static final IOFileFilter DIRECTORY = new DirectoryFileFilter();
-    /**
-     * Singleton instance of directory filter.
-     * Please use the identical DirectoryFileFilter.DIRECTORY constant.
-     * The new name is more JDK 1.5 friendly as it doesn't clash with other
-     * values when using static imports.
-     */
-    public static final IOFileFilter INSTANCE = DIRECTORY;
-
-    /**
-     * Restrictive consructor.
-     */
-    protected DirectoryFileFilter() {
-    }
-
-    /**
-     * Checks to see if the file is a directory.
-     *
-     * @param file  the File to check
-     * @return true if the file is a directory
-     */
-    @Override
-    public boolean accept(final File file) {
-        return file.isDirectory();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java
deleted file mode 100644
index 96700e5..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * This filter accepts files or directories that are empty.
- * <p>
- * If the <code>File</code> is a directory it checks that
- * it contains no files.
- * <p>
- * Example, showing how to print out a list of the
- * current directory's empty files/directories:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( EmptyFileFilter.EMPTY );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * <p>
- * Example, showing how to print out a list of the
- * current directory's non-empty files/directories:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( EmptyFileFilter.NOT_EMPTY );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * @since 1.3
- * @version $Id$
- */
-public class EmptyFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = 3631422087512832211L;
-
-    /** Singleton instance of <i>empty</i> filter */
-    public static final IOFileFilter EMPTY = new EmptyFileFilter();
-
-    /** Singleton instance of <i>not-empty</i> filter */
-    public static final IOFileFilter NOT_EMPTY = new NotFileFilter(EMPTY);
-
-    /**
-     * Restrictive consructor.
-     */
-    protected EmptyFileFilter() {
-    }
-
-    /**
-     * Checks to see if the file is empty.
-     *
-     * @param file  the file or directory to check
-     * @return {@code true} if the file or directory
-     *  is <i>empty</i>, otherwise {@code false}.
-     */
-    @Override
-    public boolean accept(final File file) {
-        if (file.isDirectory()) {
-            final File[] files = file.listFiles();
-            return files == null || files.length == 0;
-        } else {
-            return file.length() == 0;
-        }
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/FalseFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/FalseFileFilter.java
deleted file mode 100644
index f8cb495..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/FalseFileFilter.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * A file filter that always returns false.
- *
- * @since 1.0
- * @version $Id$
- *
- * @see FileFilterUtils#falseFileFilter()
- */
-public class FalseFileFilter implements IOFileFilter, Serializable {
-
-    private static final long serialVersionUID = 6210271677940926200L;
-    /**
-     * Singleton instance of false filter.
-     * @since 1.3
-     */
-    public static final IOFileFilter FALSE = new FalseFileFilter();
-    /**
-     * Singleton instance of false filter.
-     * Please use the identical FalseFileFilter.FALSE constant.
-     * The new name is more JDK 1.5 friendly as it doesn't clash with other
-     * values when using static imports.
-     */
-    public static final IOFileFilter INSTANCE = FALSE;
-
-    /**
-     * Restrictive consructor.
-     */
-    protected FalseFileFilter() {
-    }
-
-    /**
-     * Returns false.
-     *
-     * @param file  the file to check (ignored)
-     * @return false
-     */
-    public boolean accept(final File file) {
-        return false;
-    }
-
-    /**
-     * Returns false.
-     *
-     * @param dir  the directory to check (ignored)
-     * @param name  the filename (ignored)
-     * @return false
-     */
-    public boolean accept(final File dir, final String name) {
-        return false;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java
deleted file mode 100644
index 50cc006..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * This filter accepts <code>File</code>s that are files (not directories).
- * <p>
- * For example, here is how to print out a list of the real files
- * within the current directory:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( FileFileFilter.FILE );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * @since 1.3
- * @version $Id$
- * @see FileFilterUtils#fileFileFilter()
- */
-public class FileFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = 5345244090827540862L;
-    /** Singleton instance of file filter */
-    public static final IOFileFilter FILE = new FileFileFilter();
-
-    /**
-     * Restrictive consructor.
-     */
-    protected FileFileFilter() {
-    }
-
-    /**
-     * Checks to see if the file is a file.
-     *
-     * @param file  the File to check
-     * @return true if the file is a file
-     */
-    @Override
-    public boolean accept(final File file) {
-        return file.isFile();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/FileFilterUtils.java b/trunk/src/main/java/org/apache/commons/io/filefilter/FileFilterUtils.java
deleted file mode 100644
index 5a1590c..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/FileFilterUtils.java
+++ /dev/null
@@ -1,796 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FilenameFilter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.io.IOCase;
-
-/**
- * Useful utilities for working with file filters. It provides access to all
- * file filter implementations in this package so you don't have to import
- * every class you use.
- *
- * @since 1.0
- * @version $Id$
- */
-public class FileFilterUtils {
-
-    /**
-     * FileFilterUtils is not normally instantiated.
-     */
-    public FileFilterUtils() {
-    }
-
-    //-----------------------------------------------------------------------
-
-    /**
-     * <p>
-     * Applies an {@link IOFileFilter} to the provided {@link File}
-     * objects. The resulting array is a subset of the original file list that
-     * matches the provided filter.
-     * </p>
-     *
-     * <p>
-     * The {@link Set} returned by this method is not guaranteed to be thread safe.
-     * </p>
-     *
-     * <pre>
-     * Set&lt;File&gt; allFiles = ...
-     * Set&lt;File&gt; javaFiles = FileFilterUtils.filterSet(allFiles,
-     *     FileFilterUtils.suffixFileFilter(".java"));
-     * </pre>
-     * @param filter the filter to apply to the set of files.
-     * @param files the array of files to apply the filter to.
-     *
-     * @return a subset of <code>files</code> that is accepted by the
-     *         file filter.
-     * @throws IllegalArgumentException if the filter is {@code null}
-     *         or <code>files</code> contains a {@code null} value.
-     *
-     * @since 2.0
-     */
-    public static File[] filter(final IOFileFilter filter, final File... files) {
-        if (filter == null) {
-            throw new IllegalArgumentException("file filter is null");
-        }
-        if (files == null) {
-            return new File[0];
-        }
-        final List<File> acceptedFiles = new ArrayList<File>();
-        for (final File file : files) {
-            if (file == null) {
-                throw new IllegalArgumentException("file array contains null");
-            }
-            if (filter.accept(file)) {
-                acceptedFiles.add(file);
-            }
-        }
-        return acceptedFiles.toArray(new File[acceptedFiles.size()]);
-    }
-
-    /**
-     * <p>
-     * Applies an {@link IOFileFilter} to the provided {@link File}
-     * objects. The resulting array is a subset of the original file list that
-     * matches the provided filter.
-     * </p>
-     *
-     * <p>
-     * The {@link Set} returned by this method is not guaranteed to be thread safe.
-     * </p>
-     *
-     * <pre>
-     * Set&lt;File&gt; allFiles = ...
-     * Set&lt;File&gt; javaFiles = FileFilterUtils.filterSet(allFiles,
-     *     FileFilterUtils.suffixFileFilter(".java"));
-     * </pre>
-     * @param filter the filter to apply to the set of files.
-     * @param files the array of files to apply the filter to.
-     *
-     * @return a subset of <code>files</code> that is accepted by the
-     *         file filter.
-     * @throws IllegalArgumentException if the filter is {@code null}
-     *         or <code>files</code> contains a {@code null} value.
-     *
-     * @since 2.0
-     */
-    public static File[] filter(final IOFileFilter filter, final Iterable<File> files) {
-        final List<File> acceptedFiles = filterList(filter, files);
-        return acceptedFiles.toArray(new File[acceptedFiles.size()]);
-    }
-
-    /**
-     * <p>
-     * Applies an {@link IOFileFilter} to the provided {@link File}
-     * objects. The resulting list is a subset of the original files that
-     * matches the provided filter.
-     * </p>
-     *
-     * <p>
-     * The {@link List} returned by this method is not guaranteed to be thread safe.
-     * </p>
-     *
-     * <pre>
-     * List&lt;File&gt; filesAndDirectories = ...
-     * List&lt;File&gt; directories = FileFilterUtils.filterList(filesAndDirectories,
-     *     FileFilterUtils.directoryFileFilter());
-     * </pre>
-     * @param filter the filter to apply to each files in the list.
-     * @param files the collection of files to apply the filter to.
-     *
-     * @return a subset of <code>files</code> that is accepted by the
-     *         file filter.
-     * @throws IllegalArgumentException if the filter is {@code null}
-     *         or <code>files</code> contains a {@code null} value.
-     * @since 2.0
-     */
-    public static List<File> filterList(final IOFileFilter filter, final Iterable<File> files) {
-        return filter(filter, files, new ArrayList<File>());
-    }
-
-    /**
-     * <p>
-     * Applies an {@link IOFileFilter} to the provided {@link File}
-     * objects. The resulting list is a subset of the original files that
-     * matches the provided filter.
-     * </p>
-     *
-     * <p>
-     * The {@link List} returned by this method is not guaranteed to be thread safe.
-     * </p>
-     *
-     * <pre>
-     * List&lt;File&gt; filesAndDirectories = ...
-     * List&lt;File&gt; directories = FileFilterUtils.filterList(filesAndDirectories,
-     *     FileFilterUtils.directoryFileFilter());
-     * </pre>
-     * @param filter the filter to apply to each files in the list.
-     * @param files the collection of files to apply the filter to.
-     *
-     * @return a subset of <code>files</code> that is accepted by the
-     *         file filter.
-     * @throws IllegalArgumentException if the filter is {@code null}
-     *         or <code>files</code> contains a {@code null} value.
-     * @since 2.0
-     */
-    public static List<File> filterList(final IOFileFilter filter, final File... files) {
-        final File[] acceptedFiles = filter(filter, files);
-        return Arrays.asList(acceptedFiles);
-    }
-
-    /**
-     * <p>
-     * Applies an {@link IOFileFilter} to the provided {@link File}
-     * objects. The resulting set is a subset of the original file list that
-     * matches the provided filter.
-     * </p>
-     *
-     * <p>
-     * The {@link Set} returned by this method is not guaranteed to be thread safe.
-     * </p>
-     *
-     * <pre>
-     * Set&lt;File&gt; allFiles = ...
-     * Set&lt;File&gt; javaFiles = FileFilterUtils.filterSet(allFiles,
-     *     FileFilterUtils.suffixFileFilter(".java"));
-     * </pre>
-     * @param filter the filter to apply to the set of files.
-     * @param files the collection of files to apply the filter to.
-     *
-     * @return a subset of <code>files</code> that is accepted by the
-     *         file filter.
-     * @throws IllegalArgumentException if the filter is {@code null}
-     *         or <code>files</code> contains a {@code null} value.
-     *
-     * @since 2.0
-     */
-    public static Set<File> filterSet(final IOFileFilter filter, final File... files) {
-        final File[] acceptedFiles = filter(filter, files);
-        return new HashSet<File>(Arrays.asList(acceptedFiles));
-    }
-
-    /**
-     * <p>
-     * Applies an {@link IOFileFilter} to the provided {@link File}
-     * objects. The resulting set is a subset of the original file list that
-     * matches the provided filter.
-     * </p>
-     *
-     * <p>
-     * The {@link Set} returned by this method is not guaranteed to be thread safe.
-     * </p>
-     *
-     * <pre>
-     * Set&lt;File&gt; allFiles = ...
-     * Set&lt;File&gt; javaFiles = FileFilterUtils.filterSet(allFiles,
-     *     FileFilterUtils.suffixFileFilter(".java"));
-     * </pre>
-     * @param filter the filter to apply to the set of files.
-     * @param files the collection of files to apply the filter to.
-     *
-     * @return a subset of <code>files</code> that is accepted by the
-     *         file filter.
-     * @throws IllegalArgumentException if the filter is {@code null}
-     *         or <code>files</code> contains a {@code null} value.
-     *
-     * @since 2.0
-     */
-    public static Set<File> filterSet(final IOFileFilter filter, final Iterable<File> files) {
-        return filter(filter, files, new HashSet<File>());
-    }
-
-    /**
-     * <p>
-     * Applies an {@link IOFileFilter} to the provided {@link File}
-     * objects and appends the accepted files to the other supplied collection.
-     * </p>
-     *
-     * <pre>
-     * List&lt;File&gt; files = ...
-     * List&lt;File&gt; directories = FileFilterUtils.filterList(files,
-     *     FileFilterUtils.sizeFileFilter(FileUtils.FIFTY_MB),
-     *         new ArrayList&lt;File&gt;());
-     * </pre>
-     * @param filter the filter to apply to the collection of files.
-     * @param files the collection of files to apply the filter to.
-     * @param acceptedFiles the list of files to add accepted files to.
-     *
-     * @param <T> the type of the file collection.
-     * @return a subset of <code>files</code> that is accepted by the
-     *         file filter.
-     * @throws IllegalArgumentException if the filter is {@code null}
-     *         or <code>files</code> contains a {@code null} value.
-     */
-    private static <T extends Collection<File>> T filter(final IOFileFilter filter,
-            final Iterable<File> files, final T acceptedFiles) {
-        if (filter == null) {
-            throw new IllegalArgumentException("file filter is null");
-        }
-        if (files != null) {
-            for (final File file : files) {
-                if (file == null) {
-                    throw new IllegalArgumentException("file collection contains null");
-                }
-                if (filter.accept(file)) {
-                    acceptedFiles.add(file);
-                }
-            }
-        }
-        return acceptedFiles;
-    }
-
-    /**
-     * Returns a filter that returns true if the filename starts with the specified text.
-     *
-     * @param prefix  the filename prefix
-     * @return a prefix checking filter
-     * @see PrefixFileFilter
-     */
-    public static IOFileFilter prefixFileFilter(final String prefix) {
-        return new PrefixFileFilter(prefix);
-    }
-
-    /**
-     * Returns a filter that returns true if the filename starts with the specified text.
-     *
-     * @param prefix  the filename prefix
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @return a prefix checking filter
-     * @see PrefixFileFilter
-     * @since 2.0
-     */
-    public static IOFileFilter prefixFileFilter(final String prefix, final IOCase caseSensitivity) {
-        return new PrefixFileFilter(prefix, caseSensitivity);
-    }
-
-    /**
-     * Returns a filter that returns true if the filename ends with the specified text.
-     *
-     * @param suffix  the filename suffix
-     * @return a suffix checking filter
-     * @see SuffixFileFilter
-     */
-    public static IOFileFilter suffixFileFilter(final String suffix) {
-        return new SuffixFileFilter(suffix);
-    }
-
-    /**
-     * Returns a filter that returns true if the filename ends with the specified text.
-     *
-     * @param suffix  the filename suffix
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @return a suffix checking filter
-     * @see SuffixFileFilter
-     * @since 2.0
-     */
-    public static IOFileFilter suffixFileFilter(final String suffix, final IOCase caseSensitivity) {
-        return new SuffixFileFilter(suffix, caseSensitivity);
-    }
-
-    /**
-     * Returns a filter that returns true if the filename matches the specified text.
-     *
-     * @param name  the filename
-     * @return a name checking filter
-     * @see NameFileFilter
-     */
-    public static IOFileFilter nameFileFilter(final String name) {
-        return new NameFileFilter(name);
-    }
-
-    /**
-     * Returns a filter that returns true if the filename matches the specified text.
-     *
-     * @param name  the filename
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @return a name checking filter
-     * @see NameFileFilter
-     * @since 2.0
-     */
-    public static IOFileFilter nameFileFilter(final String name, final IOCase caseSensitivity) {
-        return new NameFileFilter(name, caseSensitivity);
-    }
-
-    /**
-     * Returns a filter that checks if the file is a directory.
-     *
-     * @return file filter that accepts only directories and not files
-     * @see DirectoryFileFilter#DIRECTORY
-     */
-    public static IOFileFilter directoryFileFilter() {
-        return DirectoryFileFilter.DIRECTORY;
-    }
-
-    /**
-     * Returns a filter that checks if the file is a file (and not a directory).
-     *
-     * @return file filter that accepts only files and not directories
-     * @see FileFileFilter#FILE
-     */
-    public static IOFileFilter fileFileFilter() {
-        return FileFileFilter.FILE;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns a filter that ANDs the two specified filters.
-     *
-     * @param filter1  the first filter
-     * @param filter2  the second filter
-     * @return a filter that ANDs the two specified filters
-     * @see #and(IOFileFilter...)
-     * @see AndFileFilter
-     * @deprecated use {@link #and(IOFileFilter...)}
-     */
-    @Deprecated
-    public static IOFileFilter andFileFilter(final IOFileFilter filter1, final IOFileFilter filter2) {
-        return new AndFileFilter(filter1, filter2);
-    }
-
-    /**
-     * Returns a filter that ORs the two specified filters.
-     *
-     * @param filter1  the first filter
-     * @param filter2  the second filter
-     * @return a filter that ORs the two specified filters
-     * @see #or(IOFileFilter...)
-     * @see OrFileFilter
-     * @deprecated use {@link #or(IOFileFilter...)}
-     */
-    @Deprecated
-    public static IOFileFilter orFileFilter(final IOFileFilter filter1, final IOFileFilter filter2) {
-        return new OrFileFilter(filter1, filter2);
-    }
-
-    /**
-     * Returns a filter that ANDs the specified filters.
-     *
-     * @param filters the IOFileFilters that will be ANDed together.
-     * @return a filter that ANDs the specified filters
-     *
-     * @throws IllegalArgumentException if the filters are null or contain a
-     *         null value.
-     * @see AndFileFilter
-     * @since 2.0
-     */
-    public static IOFileFilter and(final IOFileFilter... filters) {
-        return new AndFileFilter(toList(filters));
-    }
-
-    /**
-     * Returns a filter that ORs the specified filters.
-     *
-     * @param filters the IOFileFilters that will be ORed together.
-     * @return a filter that ORs the specified filters
-     *
-     * @throws IllegalArgumentException if the filters are null or contain a
-     *         null value.
-     * @see OrFileFilter
-     * @since 2.0
-     */
-    public static IOFileFilter or(final IOFileFilter... filters) {
-        return new OrFileFilter(toList(filters));
-    }
-
-    /**
-     * Create a List of file filters.
-     *
-     * @param filters The file filters
-     * @return The list of file filters
-     * @throws IllegalArgumentException if the filters are null or contain a
-     *         null value.
-     * @since 2.0
-     */
-    public static List<IOFileFilter> toList(final IOFileFilter... filters) {
-        if (filters == null) {
-            throw new IllegalArgumentException("The filters must not be null");
-        }
-        final List<IOFileFilter> list = new ArrayList<IOFileFilter>(filters.length);
-        for (int i = 0; i < filters.length; i++) {
-            if (filters[i] == null) {
-                throw new IllegalArgumentException("The filter[" + i + "] is null");
-            }
-            list.add(filters[i]);
-        }
-        return list;
-    }
-
-    /**
-     * Returns a filter that NOTs the specified filter.
-     *
-     * @param filter  the filter to invert
-     * @return a filter that NOTs the specified filter
-     * @see NotFileFilter
-     */
-    public static IOFileFilter notFileFilter(final IOFileFilter filter) {
-        return new NotFileFilter(filter);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns a filter that always returns true.
-     *
-     * @return a true filter
-     * @see TrueFileFilter#TRUE
-     */
-    public static IOFileFilter trueFileFilter() {
-        return TrueFileFilter.TRUE;
-    }
-
-    /**
-     * Returns a filter that always returns false.
-     *
-     * @return a false filter
-     * @see FalseFileFilter#FALSE
-     */
-    public static IOFileFilter falseFileFilter() {
-        return FalseFileFilter.FALSE;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns an <code>IOFileFilter</code> that wraps the
-     * <code>FileFilter</code> instance.
-     *
-     * @param filter  the filter to be wrapped
-     * @return a new filter that implements IOFileFilter
-     * @see DelegateFileFilter
-     */
-    public static IOFileFilter asFileFilter(final FileFilter filter) {
-        return new DelegateFileFilter(filter);
-    }
-
-    /**
-     * Returns an <code>IOFileFilter</code> that wraps the
-     * <code>FilenameFilter</code> instance.
-     *
-     * @param filter  the filter to be wrapped
-     * @return a new filter that implements IOFileFilter
-     * @see DelegateFileFilter
-     */
-    public static IOFileFilter asFileFilter(final FilenameFilter filter) {
-        return new DelegateFileFilter(filter);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns a filter that returns true if the file was last modified after
-     * the specified cutoff time.
-     *
-     * @param cutoff  the time threshold
-     * @return an appropriately configured age file filter
-     * @see AgeFileFilter
-     * @since 1.2
-     */
-    public static IOFileFilter ageFileFilter(final long cutoff) {
-        return new AgeFileFilter(cutoff);
-    }
-
-    /**
-     * Returns a filter that filters files based on a cutoff time.
-     *
-     * @param cutoff  the time threshold
-     * @param acceptOlder  if true, older files get accepted, if false, newer
-     * @return an appropriately configured age file filter
-     * @see AgeFileFilter
-     * @since 1.2
-     */
-    public static IOFileFilter ageFileFilter(final long cutoff, final boolean acceptOlder) {
-        return new AgeFileFilter(cutoff, acceptOlder);
-    }
-
-    /**
-     * Returns a filter that returns true if the file was last modified after
-     * the specified cutoff date.
-     *
-     * @param cutoffDate  the time threshold
-     * @return an appropriately configured age file filter
-     * @see AgeFileFilter
-     * @since 1.2
-     */
-    public static IOFileFilter ageFileFilter(final Date cutoffDate) {
-        return new AgeFileFilter(cutoffDate);
-    }
-
-    /**
-     * Returns a filter that filters files based on a cutoff date.
-     *
-     * @param cutoffDate  the time threshold
-     * @param acceptOlder  if true, older files get accepted, if false, newer
-     * @return an appropriately configured age file filter
-     * @see AgeFileFilter
-     * @since 1.2
-     */
-    public static IOFileFilter ageFileFilter(final Date cutoffDate, final boolean acceptOlder) {
-        return new AgeFileFilter(cutoffDate, acceptOlder);
-    }
-
-    /**
-     * Returns a filter that returns true if the file was last modified after
-     * the specified reference file.
-     *
-     * @param cutoffReference  the file whose last modification
-     *        time is usesd as the threshold age of the files
-     * @return an appropriately configured age file filter
-     * @see AgeFileFilter
-     * @since 1.2
-     */
-    public static IOFileFilter ageFileFilter(final File cutoffReference) {
-        return new AgeFileFilter(cutoffReference);
-    }
-
-    /**
-     * Returns a filter that filters files based on a cutoff reference file.
-     *
-     * @param cutoffReference  the file whose last modification
-     *        time is usesd as the threshold age of the files
-     * @param acceptOlder  if true, older files get accepted, if false, newer
-     * @return an appropriately configured age file filter
-     * @see AgeFileFilter
-     * @since 1.2
-     */
-    public static IOFileFilter ageFileFilter(final File cutoffReference, final boolean acceptOlder) {
-        return new AgeFileFilter(cutoffReference, acceptOlder);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns a filter that returns true if the file is bigger than a certain size.
-     *
-     * @param threshold  the file size threshold
-     * @return an appropriately configured SizeFileFilter
-     * @see SizeFileFilter
-     * @since 1.2
-     */
-    public static IOFileFilter sizeFileFilter(final long threshold) {
-        return new SizeFileFilter(threshold);
-    }
-
-    /**
-     * Returns a filter that filters based on file size.
-     *
-     * @param threshold  the file size threshold
-     * @param acceptLarger  if true, larger files get accepted, if false, smaller
-     * @return an appropriately configured SizeFileFilter
-     * @see SizeFileFilter
-     * @since 1.2
-     */
-    public static IOFileFilter sizeFileFilter(final long threshold, final boolean acceptLarger) {
-        return new SizeFileFilter(threshold, acceptLarger);
-    }
-
-    /**
-     * Returns a filter that accepts files whose size is &gt;= minimum size
-     * and &lt;= maximum size.
-     *
-     * @param minSizeInclusive the minimum file size (inclusive)
-     * @param maxSizeInclusive the maximum file size (inclusive)
-     * @return an appropriately configured IOFileFilter
-     * @see SizeFileFilter
-     * @since 1.3
-     */
-    public static IOFileFilter sizeRangeFileFilter(final long minSizeInclusive, final long maxSizeInclusive ) {
-        final IOFileFilter minimumFilter = new SizeFileFilter(minSizeInclusive, true);
-        final IOFileFilter maximumFilter = new SizeFileFilter(maxSizeInclusive + 1L, false);
-        return new AndFileFilter(minimumFilter, maximumFilter);
-    }
-
-    /**
-     * Returns a filter that accepts files that begin with the provided magic
-     * number.
-     *
-     * @param magicNumber the magic number (byte sequence) to match at the
-     *        beginning of each file.
-     *
-     * @return an IOFileFilter that accepts files beginning with the provided
-     *         magic number.
-     *
-     * @throws IllegalArgumentException if <code>magicNumber</code> is
-     *         {@code null} or the empty String.
-     * @see MagicNumberFileFilter
-     * @since 2.0
-     */
-    public static IOFileFilter magicNumberFileFilter(final String magicNumber) {
-        return new MagicNumberFileFilter(magicNumber);
-    }
-
-    /**
-     * Returns a filter that accepts files that contains the provided magic
-     * number at a specified offset within the file.
-     *
-     * @param magicNumber the magic number (byte sequence) to match at the
-     *        provided offset in each file.
-     * @param offset the offset within the files to look for the magic number.
-     *
-     * @return an IOFileFilter that accepts files containing the magic number
-     *         at the specified offset.
-     *
-     * @throws IllegalArgumentException if <code>magicNumber</code> is
-     *         {@code null} or the empty String, or if offset is a
-     *         negative number.
-     * @see MagicNumberFileFilter
-     * @since 2.0
-     */
-    public static IOFileFilter magicNumberFileFilter(final String magicNumber, final long offset) {
-        return new MagicNumberFileFilter(magicNumber, offset);
-    }
-
-    /**
-     * Returns a filter that accepts files that begin with the provided magic
-     * number.
-     *
-     * @param magicNumber the magic number (byte sequence) to match at the
-     *        beginning of each file.
-     *
-     * @return an IOFileFilter that accepts files beginning with the provided
-     *         magic number.
-     *
-     * @throws IllegalArgumentException if <code>magicNumber</code> is
-     *         {@code null} or is of length zero.
-     * @see MagicNumberFileFilter
-     * @since 2.0
-     */
-    public static IOFileFilter magicNumberFileFilter(final byte[] magicNumber) {
-        return new MagicNumberFileFilter(magicNumber);
-    }
-
-    /**
-     * Returns a filter that accepts files that contains the provided magic
-     * number at a specified offset within the file.
-     *
-     * @param magicNumber the magic number (byte sequence) to match at the
-     *        provided offset in each file.
-     * @param offset the offset within the files to look for the magic number.
-     *
-     * @return an IOFileFilter that accepts files containing the magic number
-     *         at the specified offset.
-     *
-     * @throws IllegalArgumentException if <code>magicNumber</code> is
-     *         {@code null}, or contains no bytes, or <code>offset</code>
-     *         is a negative number.
-     * @see MagicNumberFileFilter
-     * @since 2.0
-     */
-    public static IOFileFilter magicNumberFileFilter(final byte[] magicNumber, final long offset) {
-        return new MagicNumberFileFilter(magicNumber, offset);
-    }
-
-    //-----------------------------------------------------------------------
-    /* Constructed on demand and then cached */
-    private static final IOFileFilter cvsFilter = notFileFilter(
-            and(directoryFileFilter(), nameFileFilter("CVS")));
-
-    /* Constructed on demand and then cached */
-    private static final IOFileFilter svnFilter = notFileFilter(
-            and(directoryFileFilter(), nameFileFilter(".svn")));
-
-    /**
-     * Decorates a filter to make it ignore CVS directories.
-     * Passing in {@code null} will return a filter that accepts everything
-     * except CVS directories.
-     *
-     * @param filter  the filter to decorate, null means an unrestricted filter
-     * @return the decorated filter, never null
-     * @since 1.1 (method existed but had bug in 1.0)
-     */
-    public static IOFileFilter makeCVSAware(final IOFileFilter filter) {
-        if (filter == null) {
-            return cvsFilter;
-        } else {
-            return and(filter, cvsFilter);
-        }
-    }
-
-    /**
-     * Decorates a filter to make it ignore SVN directories.
-     * Passing in {@code null} will return a filter that accepts everything
-     * except SVN directories.
-     *
-     * @param filter  the filter to decorate, null means an unrestricted filter
-     * @return the decorated filter, never null
-     * @since 1.1
-     */
-    public static IOFileFilter makeSVNAware(final IOFileFilter filter) {
-        if (filter == null) {
-            return svnFilter;
-        } else {
-            return and(filter, svnFilter);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Decorates a filter so that it only applies to directories and not to files.
-     *
-     * @param filter  the filter to decorate, null means an unrestricted filter
-     * @return the decorated filter, never null
-     * @see DirectoryFileFilter#DIRECTORY
-     * @since 1.3
-     */
-    public static IOFileFilter makeDirectoryOnly(final IOFileFilter filter) {
-        if (filter == null) {
-            return DirectoryFileFilter.DIRECTORY;
-        }
-        return new AndFileFilter(DirectoryFileFilter.DIRECTORY, filter);
-    }
-
-    /**
-     * Decorates a filter so that it only applies to files and not to directories.
-     *
-     * @param filter  the filter to decorate, null means an unrestricted filter
-     * @return the decorated filter, never null
-     * @see FileFileFilter#FILE
-     * @since 1.3
-     */
-    public static IOFileFilter makeFileOnly(final IOFileFilter filter) {
-        if (filter == null) {
-            return FileFileFilter.FILE;
-        }
-        return new AndFileFilter(FileFileFilter.FILE, filter);
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java
deleted file mode 100644
index 808831f..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * This filter accepts <code>File</code>s that are hidden.
- * <p>
- * Example, showing how to print out a list of the
- * current directory's <i>hidden</i> files:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( HiddenFileFilter.HIDDEN );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * <p>
- * Example, showing how to print out a list of the
- * current directory's <i>visible</i> (i.e. not hidden) files:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( HiddenFileFilter.VISIBLE );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * @since 1.3
- * @version $Id$
- */
-public class HiddenFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = 8930842316112759062L;
-
-    /** Singleton instance of <i>hidden</i> filter */
-    public static final IOFileFilter HIDDEN  = new HiddenFileFilter();
-
-    /** Singleton instance of <i>visible</i> filter */
-    public static final IOFileFilter VISIBLE = new NotFileFilter(HIDDEN);
-
-    /**
-     * Restrictive consructor.
-     */
-    protected HiddenFileFilter() {
-    }
-
-    /**
-     * Checks to see if the file is hidden.
-     *
-     * @param file  the File to check
-     * @return {@code true} if the file is
-     *  <i>hidden</i>, otherwise {@code false}.
-     */
-    @Override
-    public boolean accept(final File file) {
-        return file.isHidden();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/IOFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/IOFileFilter.java
deleted file mode 100644
index a384060..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/IOFileFilter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FilenameFilter;
-
-/**
- * An interface which brings the FileFilter and FilenameFilter
- * interfaces together.
- *
- * @since 1.0
- * @version $Id$
- */
-public interface IOFileFilter extends FileFilter, FilenameFilter {
-
-    /**
-     * Checks to see if the File should be accepted by this filter.
-     * <p>
-     * Defined in {@link java.io.FileFilter}.
-     *
-     * @param file  the File to check
-     * @return true if this file matches the test
-     */
-    boolean accept(File file);
-
-    /**
-     * Checks to see if the File should be accepted by this filter.
-     * <p>
-     * Defined in {@link java.io.FilenameFilter}.
-     *
-     * @param dir  the directory File to check
-     * @param name  the filename within the directory to check
-     * @return true if this file matches the test
-     */
-    boolean accept(File dir, String name);
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/MagicNumberFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/MagicNumberFileFilter.java
deleted file mode 100644
index 00aa996..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/MagicNumberFileFilter.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.io.Serializable;
-import java.nio.charset.Charset;
-import java.util.Arrays;
-
-import org.apache.commons.io.IOUtils;
-
-/**
- * <p>
- * File filter for matching files containing a "magic number". A magic number
- * is a unique series of bytes common to all files of a specific file format.
- * For instance, all Java class files begin with the bytes
- * <code>0xCAFEBABE</code>.
- * </p>
- *
- * <pre>
- * File dir = new File(".");
- * MagicNumberFileFilter javaClassFileFilter =
- *     MagicNumberFileFilter(new byte[] {(byte) 0xCA, (byte) 0xFE,
- *       (byte) 0xBA, (byte) 0xBE});
- * String[] javaClassFiles = dir.list(javaClassFileFilter);
- * for (String javaClassFile : javaClassFiles) {
- *     System.out.println(javaClassFile);
- * }
- * </pre>
- *
- * <p>
- * Sometimes, such as in the case of TAR files, the
- * magic number will be offset by a certain number of bytes in the file. In the
- * case of TAR archive files, this offset is 257 bytes.
- * </p>
- *
- * <pre>
- * File dir = new File(".");
- * MagicNumberFileFilter tarFileFilter =
- *     MagicNumberFileFilter("ustar", 257);
- * String[] tarFiles = dir.list(tarFileFilter);
- * for (String tarFile : tarFiles) {
- *     System.out.println(tarFile);
- * }
- * </pre>
- *
- * @since 2.0
- * @see FileFilterUtils#magicNumberFileFilter(byte[])
- * @see FileFilterUtils#magicNumberFileFilter(String)
- * @see FileFilterUtils#magicNumberFileFilter(byte[], long)
- * @see FileFilterUtils#magicNumberFileFilter(String, long)
- */
-public class MagicNumberFileFilter extends AbstractFileFilter implements
-        Serializable {
-
-    /**
-     * The serialization version unique identifier.
-     */
-    private static final long serialVersionUID = -547733176983104172L;
-
-    /**
-     * The magic number to compare against the file's bytes at the provided
-     * offset.
-     */
-    private final byte[] magicNumbers;
-
-    /**
-     * The offset (in bytes) within the files that the magic number's bytes
-     * should appear.
-     */
-    private final long byteOffset;
-
-    /**
-     * <p>
-     * Constructs a new MagicNumberFileFilter and associates it with the magic
-     * number to test for in files. This constructor assumes a starting offset
-     * of <code>0</code>.
-     * </p>
-     *
-     * <p>
-     * It is important to note that <em>the array is not cloned</em> and that
-     * any changes to the magic number array after construction will affect the
-     * behavior of this file filter.
-     * </p>
-     *
-     * <pre>
-     * MagicNumberFileFilter javaClassFileFilter =
-     *     MagicNumberFileFilter(new byte[] {(byte) 0xCA, (byte) 0xFE,
-     *       (byte) 0xBA, (byte) 0xBE});
-     * </pre>
-     *
-     * @param magicNumber the magic number to look for in the file.
-     *
-     * @throws IllegalArgumentException if <code>magicNumber</code> is
-     *         {@code null}, or contains no bytes.
-     */
-    public MagicNumberFileFilter(final byte[] magicNumber) {
-        this(magicNumber, 0);
-    }
-
-    /**
-     * <p>
-     * Constructs a new MagicNumberFileFilter and associates it with the magic
-     * number to test for in files. This constructor assumes a starting offset
-     * of <code>0</code>.
-     * </p>
-     *
-     * Example usage:
-     * <pre>
-     * {@code
-     * MagicNumberFileFilter xmlFileFilter =
-     *     MagicNumberFileFilter("<?xml");
-     * }
-     * </pre>
-     *
-     * @param magicNumber the magic number to look for in the file.
-     *        The string is converted to bytes using the platform default charset.
-     *
-     * @throws IllegalArgumentException if <code>magicNumber</code> is
-     *         {@code null} or the empty String.
-     */
-    public MagicNumberFileFilter(final String magicNumber) {
-        this(magicNumber, 0);
-    }
-
-    /**
-     * <p>
-     * Constructs a new MagicNumberFileFilter and associates it with the magic
-     * number to test for in files and the byte offset location in the file to
-     * to look for that magic number.
-     * </p>
-     *
-     * <pre>
-     * MagicNumberFileFilter tarFileFilter =
-     *     MagicNumberFileFilter("ustar", 257);
-     * </pre>
-     *
-     * @param magicNumber the magic number to look for in the file.
-     *        The string is converted to bytes using the platform default charset.
-     * @param offset the byte offset in the file to start comparing bytes.
-     *
-     * @throws IllegalArgumentException if <code>magicNumber</code> is
-     *         {@code null} or the empty String, or <code>offset</code> is
-     *         a negative number.
-     */
-    public MagicNumberFileFilter(final String magicNumber, final long offset) {
-        if (magicNumber == null) {
-            throw new IllegalArgumentException("The magic number cannot be null");
-        }
-        if (magicNumber.isEmpty()) {
-            throw new IllegalArgumentException("The magic number must contain at least one byte");
-        }
-        if (offset < 0) {
-            throw new IllegalArgumentException("The offset cannot be negative");
-        }
-
-        this.magicNumbers = magicNumber.getBytes(Charset.defaultCharset()); // explicitly uses the platform default
-                                                                            // charset
-        this.byteOffset = offset;
-    }
-
-    /**
-     * <p>
-     * Constructs a new MagicNumberFileFilter and associates it with the magic
-     * number to test for in files and the byte offset location in the file to
-     * to look for that magic number.
-     * </p>
-     *
-     * <pre>
-     * MagicNumberFileFilter tarFileFilter =
-     *     MagicNumberFileFilter(new byte[] {0x75, 0x73, 0x74, 0x61, 0x72}, 257);
-     * </pre>
-     *
-     * <pre>
-     * MagicNumberFileFilter javaClassFileFilter =
-     *     MagicNumberFileFilter(new byte[] {0xCA, 0xFE, 0xBA, 0xBE}, 0);
-     * </pre>
-     *
-     * @param magicNumber the magic number to look for in the file.
-     * @param offset the byte offset in the file to start comparing bytes.
-     *
-     * @throws IllegalArgumentException if <code>magicNumber</code> is
-     *         {@code null}, or contains no bytes, or <code>offset</code>
-     *         is a negative number.
-     */
-    public MagicNumberFileFilter(final byte[] magicNumber, final long offset) {
-        if (magicNumber == null) {
-            throw new IllegalArgumentException("The magic number cannot be null");
-        }
-        if (magicNumber.length == 0) {
-            throw new IllegalArgumentException("The magic number must contain at least one byte");
-        }
-        if (offset < 0) {
-            throw new IllegalArgumentException("The offset cannot be negative");
-        }
-
-        this.magicNumbers = new byte[magicNumber.length];
-        System.arraycopy(magicNumber, 0, this.magicNumbers, 0, magicNumber.length);
-        this.byteOffset = offset;
-    }
-
-    /**
-     * <p>
-     * Accepts the provided file if the file contains the file filter's magic
-     * number at the specified offset.
-     * </p>
-     *
-     * <p>
-     * If any {@link IOException}s occur while reading the file, the file will
-     * be rejected.
-     * </p>
-     *
-     * @param file the file to accept or reject.
-     *
-     * @return {@code true} if the file contains the filter's magic number
-     *         at the specified offset, {@code false} otherwise.
-     */
-    @Override
-    public boolean accept(final File file) {
-        if (file != null && file.isFile() && file.canRead()) {
-            RandomAccessFile randomAccessFile = null;
-            try {
-                final byte[] fileBytes = new byte[this.magicNumbers.length];
-                randomAccessFile = new RandomAccessFile(file, "r");
-                randomAccessFile.seek(byteOffset);
-                final int read = randomAccessFile.read(fileBytes);
-                if (read != magicNumbers.length) {
-                    return false;
-                }
-                return Arrays.equals(this.magicNumbers, fileBytes);
-            } catch (final IOException ioe) {
-                // Do nothing, fall through and do not accept file
-            } finally {
-                IOUtils.closeQuietly(randomAccessFile);
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Returns a String representation of the file filter, which includes the
-     * magic number bytes and byte offset.
-     *
-     * @return a String representation of the file filter.
-     */
-    @Override
-    public String toString() {
-        final StringBuilder builder = new StringBuilder(super.toString());
-        builder.append("(");
-        builder.append(new String(magicNumbers, Charset.defaultCharset()));// TODO perhaps use hex if value is not
-                                                                           // printable
-        builder.append(",");
-        builder.append(this.byteOffset);
-        builder.append(")");
-        return builder.toString();
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/NameFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/NameFileFilter.java
deleted file mode 100644
index a5f2b7c..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/NameFileFilter.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.List;
-
-import org.apache.commons.io.IOCase;
-
-/**
- * Filters filenames for a certain name.
- * <p>
- * For example, to print all files and directories in the
- * current directory whose name is <code>Test</code>:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( new NameFileFilter("Test") );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * @since 1.0
- * @version $Id$
- * @see FileFilterUtils#nameFileFilter(String)
- * @see FileFilterUtils#nameFileFilter(String, IOCase)
- */
-public class NameFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = 176844364689077340L;
-    /** The filenames to search for */
-    private final String[] names;
-    /** Whether the comparison is case sensitive. */
-    private final IOCase caseSensitivity;
-
-    /**
-     * Constructs a new case-sensitive name file filter for a single name.
-     *
-     * @param name  the name to allow, must not be null
-     * @throws IllegalArgumentException if the name is null
-     */
-    public NameFileFilter(final String name) {
-        this(name, null);
-    }
-
-    /**
-     * Construct a new name file filter specifying case-sensitivity.
-     *
-     * @param name  the name to allow, must not be null
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the name is null
-     */
-    public NameFileFilter(final String name, final IOCase caseSensitivity) {
-        if (name == null) {
-            throw new IllegalArgumentException("The wildcard must not be null");
-        }
-        this.names = new String[] {name};
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Constructs a new case-sensitive name file filter for an array of names.
-     * <p>
-     * The array is not cloned, so could be changed after constructing the
-     * instance. This would be inadvisable however.
-     *
-     * @param names  the names to allow, must not be null
-     * @throws IllegalArgumentException if the names array is null
-     */
-    public NameFileFilter(final String[] names) {
-        this(names, null);
-    }
-
-    /**
-     * Constructs a new name file filter for an array of names specifying case-sensitivity.
-     *
-     * @param names  the names to allow, must not be null
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the names array is null
-     */
-    public NameFileFilter(final String[] names, final IOCase caseSensitivity) {
-        if (names == null) {
-            throw new IllegalArgumentException("The array of names must not be null");
-        }
-        this.names = new String[names.length];
-        System.arraycopy(names, 0, this.names, 0, names.length);
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Constructs a new case-sensitive name file filter for a list of names.
-     *
-     * @param names  the names to allow, must not be null
-     * @throws IllegalArgumentException if the name list is null
-     * @throws ClassCastException if the list does not contain Strings
-     */
-    public NameFileFilter(final List<String> names) {
-        this(names, null);
-    }
-
-    /**
-     * Constructs a new name file filter for a list of names specifying case-sensitivity.
-     *
-     * @param names  the names to allow, must not be null
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the name list is null
-     * @throws ClassCastException if the list does not contain Strings
-     */
-    public NameFileFilter(final List<String> names, final IOCase caseSensitivity) {
-        if (names == null) {
-            throw new IllegalArgumentException("The list of names must not be null");
-        }
-        this.names = names.toArray(new String[names.size()]);
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Checks to see if the filename matches.
-     *
-     * @param file  the File to check
-     * @return true if the filename matches
-     */
-    @Override
-    public boolean accept(final File file) {
-        final String name = file.getName();
-        for (final String name2 : this.names) {
-            if (caseSensitivity.checkEquals(name, name2)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Checks to see if the filename matches.
-     *
-     * @param dir  the File directory (ignored)
-     * @param name  the filename
-     * @return true if the filename matches
-     */
-    @Override
-    public boolean accept(final File dir, final String name) {
-        for (final String name2 : names) {
-            if (caseSensitivity.checkEquals(name, name2)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Provide a String representaion of this file filter.
-     *
-     * @return a String representaion
-     */
-    @Override
-    public String toString() {
-        final StringBuilder buffer = new StringBuilder();
-        buffer.append(super.toString());
-        buffer.append("(");
-        if (names != null) {
-            for (int i = 0; i < names.length; i++) {
-                if (i > 0) {
-                    buffer.append(",");
-                }
-                buffer.append(names[i]);
-            }
-        }
-        buffer.append(")");
-        return buffer.toString();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/NotFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/NotFileFilter.java
deleted file mode 100644
index eb7bd6b..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/NotFileFilter.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * This filter produces a logical NOT of the filters specified.
- *
- * @since 1.0
- * @version $Id$
- * @see FileFilterUtils#notFileFilter(IOFileFilter)
- */
-public class NotFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = 6131563330944994230L;
-    /** The filter */
-    private final IOFileFilter filter;
-
-    /**
-     * Constructs a new file filter that NOTs the result of another filter.
-     *
-     * @param filter  the filter, must not be null
-     * @throws IllegalArgumentException if the filter is null
-     */
-    public NotFileFilter(final IOFileFilter filter) {
-        if (filter == null) {
-            throw new IllegalArgumentException("The filter must not be null");
-        }
-        this.filter = filter;
-    }
-
-    /**
-     * Returns the logical NOT of the underlying filter's return value for the same File.
-     *
-     * @param file  the File to check
-     * @return true if the filter returns false
-     */
-    @Override
-    public boolean accept(final File file) {
-        return ! filter.accept(file);
-    }
-
-    /**
-     * Returns the logical NOT of the underlying filter's return value for the same arguments.
-     *
-     * @param file  the File directory
-     * @param name  the filename
-     * @return true if the filter returns false
-     */
-    @Override
-    public boolean accept(final File file, final String name) {
-        return ! filter.accept(file, name);
-    }
-
-    /**
-     * Provide a String representaion of this file filter.
-     *
-     * @return a String representaion
-     */
-    @Override
-    public String toString() {
-        return super.toString() + "(" + filter.toString()  + ")";
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/OrFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/OrFileFilter.java
deleted file mode 100644
index 264098a..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/OrFileFilter.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * A {@link java.io.FileFilter} providing conditional OR logic across a list of
- * file filters. This filter returns {@code true} if any filters in the
- * list return {@code true}. Otherwise, it returns {@code false}.
- * Checking of the file filter list stops when the first filter returns
- * {@code true}.
- *
- * @since 1.0
- * @version $Id$
- * @see FileFilterUtils#or(IOFileFilter...)
- */
-public class OrFileFilter
-        extends AbstractFileFilter
-        implements ConditionalFileFilter, Serializable {
-
-    private static final long serialVersionUID = 5767770777065432721L;
-    /** The list of file filters. */
-    private final List<IOFileFilter> fileFilters;
-
-    /**
-     * Constructs a new instance of <code>OrFileFilter</code>.
-     *
-     * @since 1.1
-     */
-    public OrFileFilter() {
-        this.fileFilters = new ArrayList<IOFileFilter>();
-    }
-
-    /**
-     * Constructs a new instance of <code>OrFileFilter</code>
-     * with the specified filters.
-     *
-     * @param fileFilters  the file filters for this filter, copied, null ignored
-     * @since 1.1
-     */
-    public OrFileFilter(final List<IOFileFilter> fileFilters) {
-        if (fileFilters == null) {
-            this.fileFilters = new ArrayList<IOFileFilter>();
-        } else {
-            this.fileFilters = new ArrayList<IOFileFilter>(fileFilters);
-        }
-    }
-
-    /**
-     * Constructs a new file filter that ORs the result of two other filters.
-     * 
-     * @param filter1  the first filter, must not be null
-     * @param filter2  the second filter, must not be null
-     * @throws IllegalArgumentException if either filter is null
-     */
-    public OrFileFilter(final IOFileFilter filter1, final IOFileFilter filter2) {
-        if (filter1 == null || filter2 == null) {
-            throw new IllegalArgumentException("The filters must not be null");
-        }
-        this.fileFilters = new ArrayList<IOFileFilter>(2);
-        addFileFilter(filter1);
-        addFileFilter(filter2);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void addFileFilter(final IOFileFilter ioFileFilter) {
-        this.fileFilters.add(ioFileFilter);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public List<IOFileFilter> getFileFilters() {
-        return Collections.unmodifiableList(this.fileFilters);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean removeFileFilter(final IOFileFilter ioFileFilter) {
-        return this.fileFilters.remove(ioFileFilter);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setFileFilters(final List<IOFileFilter> fileFilters) {
-        this.fileFilters.clear();
-        this.fileFilters.addAll(fileFilters);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean accept(final File file) {
-        for (final IOFileFilter fileFilter : fileFilters) {
-            if (fileFilter.accept(file)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean accept(final File file, final String name) {
-        for (final IOFileFilter fileFilter : fileFilters) {
-            if (fileFilter.accept(file, name)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Provide a String representaion of this file filter.
-     *
-     * @return a String representaion
-     */
-    @Override
-    public String toString() {
-        final StringBuilder buffer = new StringBuilder();
-        buffer.append(super.toString());
-        buffer.append("(");
-        if (fileFilters != null) {
-            for (int i = 0; i < fileFilters.size(); i++) {
-                if (i > 0) {
-                    buffer.append(",");
-                }
-                final Object filter = fileFilters.get(i);
-                buffer.append(filter == null ? "null" : filter.toString());
-            }
-        }
-        buffer.append(")");
-        return buffer.toString();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java
deleted file mode 100644
index a1f914e..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.List;
-
-import org.apache.commons.io.IOCase;
-
-/**
- * Filters filenames for a certain prefix.
- * <p>
- * For example, to print all files and directories in the
- * current directory whose name starts with <code>Test</code>:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( new PrefixFileFilter("Test") );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * @since 1.0
- * @version $Id$
- * @see FileFilterUtils#prefixFileFilter(String)
- * @see FileFilterUtils#prefixFileFilter(String, IOCase)
- */
-public class PrefixFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = 8533897440809599867L;
-
-    /** The filename prefixes to search for */
-    private final String[] prefixes;
-
-    /** Whether the comparison is case sensitive. */
-    private final IOCase caseSensitivity;
-
-    /**
-     * Constructs a new Prefix file filter for a single prefix.
-     *
-     * @param prefix  the prefix to allow, must not be null
-     * @throws IllegalArgumentException if the prefix is null
-     */
-    public PrefixFileFilter(final String prefix) {
-        this(prefix, IOCase.SENSITIVE);
-    }
-
-    /**
-     * Constructs a new Prefix file filter for a single prefix
-     * specifying case-sensitivity.
-     *
-     * @param prefix  the prefix to allow, must not be null
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the prefix is null
-     * @since 1.4
-     */
-    public PrefixFileFilter(final String prefix, final IOCase caseSensitivity) {
-        if (prefix == null) {
-            throw new IllegalArgumentException("The prefix must not be null");
-        }
-        this.prefixes = new String[] {prefix};
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Constructs a new Prefix file filter for any of an array of prefixes.
-     * <p>
-     * The array is not cloned, so could be changed after constructing the
-     * instance. This would be inadvisable however.
-     *
-     * @param prefixes  the prefixes to allow, must not be null
-     * @throws IllegalArgumentException if the prefix array is null
-     */
-    public PrefixFileFilter(final String[] prefixes) {
-        this(prefixes, IOCase.SENSITIVE);
-    }
-
-    /**
-     * Constructs a new Prefix file filter for any of an array of prefixes
-     * specifying case-sensitivity.
-     *
-     * @param prefixes  the prefixes to allow, must not be null
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the prefix is null
-     * @since 1.4
-     */
-    public PrefixFileFilter(final String[] prefixes, final IOCase caseSensitivity) {
-        if (prefixes == null) {
-            throw new IllegalArgumentException("The array of prefixes must not be null");
-        }
-        this.prefixes = new String[prefixes.length];
-        System.arraycopy(prefixes, 0, this.prefixes, 0, prefixes.length);
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Constructs a new Prefix file filter for a list of prefixes.
-     *
-     * @param prefixes  the prefixes to allow, must not be null
-     * @throws IllegalArgumentException if the prefix list is null
-     * @throws ClassCastException if the list does not contain Strings
-     */
-    public PrefixFileFilter(final List<String> prefixes) {
-        this(prefixes, IOCase.SENSITIVE);
-    }
-
-    /**
-     * Constructs a new Prefix file filter for a list of prefixes
-     * specifying case-sensitivity.
-     *
-     * @param prefixes  the prefixes to allow, must not be null
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the prefix list is null
-     * @throws ClassCastException if the list does not contain Strings
-     * @since 1.4
-     */
-    public PrefixFileFilter(final List<String> prefixes, final IOCase caseSensitivity) {
-        if (prefixes == null) {
-            throw new IllegalArgumentException("The list of prefixes must not be null");
-        }
-        this.prefixes = prefixes.toArray(new String[prefixes.size()]);
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Checks to see if the filename starts with the prefix.
-     *
-     * @param file  the File to check
-     * @return true if the filename starts with one of our prefixes
-     */
-    @Override
-    public boolean accept(final File file) {
-        final String name = file.getName();
-        for (final String prefix : this.prefixes) {
-            if (caseSensitivity.checkStartsWith(name, prefix)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Checks to see if the filename starts with the prefix.
-     *
-     * @param file  the File directory
-     * @param name  the filename
-     * @return true if the filename starts with one of our prefixes
-     */
-    @Override
-    public boolean accept(final File file, final String name) {
-        for (final String prefix : prefixes) {
-            if (caseSensitivity.checkStartsWith(name, prefix)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Provide a String representaion of this file filter.
-     *
-     * @return a String representaion
-     */
-    @Override
-    public String toString() {
-        final StringBuilder buffer = new StringBuilder();
-        buffer.append(super.toString());
-        buffer.append("(");
-        if (prefixes != null) {
-            for (int i = 0; i < prefixes.length; i++) {
-                if (i > 0) {
-                    buffer.append(",");
-                }
-                buffer.append(prefixes[i]);
-            }
-        }
-        buffer.append(")");
-        return buffer.toString();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java
deleted file mode 100644
index 128efed..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.regex.Pattern;
-
-import org.apache.commons.io.IOCase;
-
-/**
- * Filters files using supplied regular expression(s).
- * <p>
- * See java.util.regex.Pattern for regex matching rules
- * </p>
- *
- * <p>
- * e.g.
- * <pre>
- * File dir = new File(".");
- * FileFilter fileFilter = new RegexFileFilter("^.*[tT]est(-\\d+)?\\.java$");
- * File[] files = dir.listFiles(fileFilter);
- * for (int i = 0; i &lt; files.length; i++) {
- *   System.out.println(files[i]);
- * }
- * </pre>
- *
- * @version $Id$
- * @since 1.4
- */
-public class RegexFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = 4269646126155225062L;
-    /** The regular expression pattern that will be used to match filenames */
-    private final Pattern pattern;
-
-    /**
-     * Construct a new regular expression filter.
-     *
-     * @param pattern regular string expression to match
-     * @throws IllegalArgumentException if the pattern is null
-     */
-    public RegexFileFilter(final String pattern) {
-        if (pattern == null) {
-            throw new IllegalArgumentException("Pattern is missing");
-        }
-
-        this.pattern = Pattern.compile(pattern);
-    }
-
-    /**
-     * Construct a new regular expression filter with the specified flags case sensitivity.
-     *
-     * @param pattern regular string expression to match
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the pattern is null
-     */
-    public RegexFileFilter(final String pattern, final IOCase caseSensitivity) {
-        if (pattern == null) {
-            throw new IllegalArgumentException("Pattern is missing");
-        }
-        int flags = 0;
-        if (caseSensitivity != null && !caseSensitivity.isCaseSensitive()) {
-            flags = Pattern.CASE_INSENSITIVE;
-        }
-        this.pattern = Pattern.compile(pattern, flags);
-    }
-
-    /**
-     * Construct a new regular expression filter with the specified flags.
-     *
-     * @param pattern regular string expression to match
-     * @param flags pattern flags - e.g. {@link Pattern#CASE_INSENSITIVE}
-     * @throws IllegalArgumentException if the pattern is null
-     */
-    public RegexFileFilter(final String pattern, final int flags) {
-        if (pattern == null) {
-            throw new IllegalArgumentException("Pattern is missing");
-        }
-        this.pattern = Pattern.compile(pattern, flags);
-    }
-
-    /**
-     * Construct a new regular expression filter for a compiled regular expression
-     *
-     * @param pattern regular expression to match
-     * @throws IllegalArgumentException if the pattern is null
-     */
-    public RegexFileFilter(final Pattern pattern) {
-        if (pattern == null) {
-            throw new IllegalArgumentException("Pattern is missing");
-        }
-
-        this.pattern = pattern;
-    }
-
-    /**
-     * Checks to see if the filename matches one of the regular expressions.
-     *
-     * @param dir   the file directory (ignored)
-     * @param name  the filename
-     * @return true if the filename matches one of the regular expressions
-     */
-    @Override
-    public boolean accept(final File dir, final String name) {
-        return pattern.matcher(name).matches();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java
deleted file mode 100644
index c0f749a..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * Filters files based on size, can filter either smaller files or
- * files equal to or larger than a given threshold.
- * <p>
- * For example, to print all files and directories in the
- * current directory whose size is greater than 1 MB:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( new SizeFileFilter(1024 * 1024) );
- * for ( int i = 0; i &lt; files.length; i++ ) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * @version $Id$
- * @since 1.2
- * @see FileFilterUtils#sizeFileFilter(long)
- * @see FileFilterUtils#sizeFileFilter(long, boolean)
- * @see FileFilterUtils#sizeRangeFileFilter(long, long)
- */
-public class SizeFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = 7388077430788600069L;
-    /** The size threshold. */
-    private final long size;
-    /** Whether the files accepted will be larger or smaller. */
-    private final boolean acceptLarger;
-
-    /**
-     * Constructs a new size file filter for files equal to or 
-     * larger than a certain size.
-     *
-     * @param size  the threshold size of the files
-     * @throws IllegalArgumentException if the size is negative
-     */
-    public SizeFileFilter(final long size) {
-        this(size, true);
-    }
-
-    /**
-     * Constructs a new size file filter for files based on a certain size
-     * threshold.
-     *
-     * @param size  the threshold size of the files
-     * @param acceptLarger  if true, files equal to or larger are accepted,
-     * otherwise smaller ones (but not equal to)
-     * @throws IllegalArgumentException if the size is negative
-     */
-    public SizeFileFilter(final long size, final boolean acceptLarger) {
-        if (size < 0) {
-            throw new IllegalArgumentException("The size must be non-negative");
-        }
-        this.size = size;
-        this.acceptLarger = acceptLarger;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Checks to see if the size of the file is favorable.
-     * <p>
-     * If size equals threshold and smaller files are required,
-     * file <b>IS NOT</b> selected.
-     * If size equals threshold and larger files are required,
-     * file <b>IS</b> selected.
-     *
-     * @param file  the File to check
-     * @return true if the filename matches
-     */
-    @Override
-    public boolean accept(final File file) {
-        final boolean smaller = file.length() < size;
-        return acceptLarger ? !smaller : smaller;
-    }
-
-    /**
-     * Provide a String representaion of this file filter.
-     *
-     * @return a String representaion
-     */
-    @Override
-    public String toString() {
-        final String condition = acceptLarger ? ">=" : "<";
-        return super.toString() + "(" + condition + size + ")";
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java
deleted file mode 100644
index af45658..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.List;
-
-import org.apache.commons.io.IOCase;
-
-/**
- * Filters files based on the suffix (what the filename ends with).
- * This is used in retrieving all the files of a particular type.
- * <p>
- * For example, to retrieve and print all <code>*.java</code> files
- * in the current directory:
- *
- * <pre>
- * File dir = new File(".");
- * String[] files = dir.list( new SuffixFileFilter(".java") );
- * for (int i = 0; i &lt; files.length; i++) {
- *     System.out.println(files[i]);
- * }
- * </pre>
- *
- * @since 1.0
- * @version $Id$
- * @see FileFilterUtils#suffixFileFilter(String)
- * @see FileFilterUtils#suffixFileFilter(String, IOCase)
- */
-public class SuffixFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = -3389157631240246157L;
-
-    /** The filename suffixes to search for */
-    private final String[] suffixes;
-
-    /** Whether the comparison is case sensitive. */
-    private final IOCase caseSensitivity;
-
-    /**
-     * Constructs a new Suffix file filter for a single extension.
-     *
-     * @param suffix  the suffix to allow, must not be null
-     * @throws IllegalArgumentException if the suffix is null
-     */
-    public SuffixFileFilter(final String suffix) {
-        this(suffix, IOCase.SENSITIVE);
-    }
-
-    /**
-     * Constructs a new Suffix file filter for a single extension
-     * specifying case-sensitivity.
-     *
-     * @param suffix  the suffix to allow, must not be null
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the suffix is null
-     * @since 1.4
-     */
-    public SuffixFileFilter(final String suffix, final IOCase caseSensitivity) {
-        if (suffix == null) {
-            throw new IllegalArgumentException("The suffix must not be null");
-        }
-        this.suffixes = new String[] {suffix};
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Constructs a new Suffix file filter for an array of suffixs.
-     * <p>
-     * The array is not cloned, so could be changed after constructing the
-     * instance. This would be inadvisable however.
-     *
-     * @param suffixes  the suffixes to allow, must not be null
-     * @throws IllegalArgumentException if the suffix array is null
-     */
-    public SuffixFileFilter(final String[] suffixes) {
-        this(suffixes, IOCase.SENSITIVE);
-    }
-
-    /**
-     * Constructs a new Suffix file filter for an array of suffixs
-     * specifying case-sensitivity.
-     *
-     * @param suffixes  the suffixes to allow, must not be null
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the suffix array is null
-     * @since 1.4
-     */
-    public SuffixFileFilter(final String[] suffixes, final IOCase caseSensitivity) {
-        if (suffixes == null) {
-            throw new IllegalArgumentException("The array of suffixes must not be null");
-        }
-        this.suffixes = new String[suffixes.length];
-        System.arraycopy(suffixes, 0, this.suffixes, 0, suffixes.length);
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Constructs a new Suffix file filter for a list of suffixes.
-     *
-     * @param suffixes  the suffixes to allow, must not be null
-     * @throws IllegalArgumentException if the suffix list is null
-     * @throws ClassCastException if the list does not contain Strings
-     */
-    public SuffixFileFilter(final List<String> suffixes) {
-        this(suffixes, IOCase.SENSITIVE);
-    }
-
-    /**
-     * Constructs a new Suffix file filter for a list of suffixes
-     * specifying case-sensitivity.
-     *
-     * @param suffixes  the suffixes to allow, must not be null
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the suffix list is null
-     * @throws ClassCastException if the list does not contain Strings
-     * @since 1.4
-     */
-    public SuffixFileFilter(final List<String> suffixes, final IOCase caseSensitivity) {
-        if (suffixes == null) {
-            throw new IllegalArgumentException("The list of suffixes must not be null");
-        }
-        this.suffixes = suffixes.toArray(new String[suffixes.size()]);
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Checks to see if the filename ends with the suffix.
-     *
-     * @param file  the File to check
-     * @return true if the filename ends with one of our suffixes
-     */
-    @Override
-    public boolean accept(final File file) {
-        final String name = file.getName();
-        for (final String suffix : this.suffixes) {
-            if (caseSensitivity.checkEndsWith(name, suffix)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Checks to see if the filename ends with the suffix.
-     *
-     * @param file  the File directory
-     * @param name  the filename
-     * @return true if the filename ends with one of our suffixes
-     */
-    @Override
-    public boolean accept(final File file, final String name) {
-        for (final String suffix : this.suffixes) {
-            if (caseSensitivity.checkEndsWith(name, suffix)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Provide a String representaion of this file filter.
-     *
-     * @return a String representaion
-     */
-    @Override
-    public String toString() {
-        final StringBuilder buffer = new StringBuilder();
-        buffer.append(super.toString());
-        buffer.append("(");
-        if (suffixes != null) {
-            for (int i = 0; i < suffixes.length; i++) {
-                if (i > 0) {
-                    buffer.append(",");
-                }
-                buffer.append(suffixes[i]);
-            }
-        }
-        buffer.append(")");
-        return buffer.toString();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/TrueFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/TrueFileFilter.java
deleted file mode 100644
index a53bc60..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/TrueFileFilter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * A file filter that always returns true.
- *
- * @since 1.0
- * @version $Id$
- * @see FileFilterUtils#trueFileFilter()
- */
-public class TrueFileFilter implements IOFileFilter, Serializable {
-
-    private static final long serialVersionUID = 8782512160909720199L;
-    /**
-     * Singleton instance of true filter.
-     * @since 1.3
-     */
-    public static final IOFileFilter TRUE = new TrueFileFilter();
-    /**
-     * Singleton instance of true filter.
-     * Please use the identical TrueFileFilter.TRUE constant.
-     * The new name is more JDK 1.5 friendly as it doesn't clash with other
-     * values when using static imports.
-     */
-    public static final IOFileFilter INSTANCE = TRUE;
-
-    /**
-     * Restrictive constructor.
-     */
-    protected TrueFileFilter() {
-    }
-
-    /**
-     * Returns true.
-     *
-     * @param file  the file to check (ignored)
-     * @return true
-     */
-    public boolean accept(final File file) {
-        return true;
-    }
-
-    /**
-     * Returns true.
-     *
-     * @param dir  the directory to check (ignored)
-     * @param name  the filename (ignored)
-     * @return true
-     */
-    public boolean accept(final File dir, final String name) {
-        return true;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java
deleted file mode 100644
index 4e4c302..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.List;
-
-import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.io.IOCase;
-
-/**
- * Filters files using the supplied wildcards.
- * <p>
- * This filter selects files and directories based on one or more wildcards.
- * Testing is case-sensitive by default, but this can be configured.
- * <p>
- * The wildcard matcher uses the characters '?' and '*' to represent a
- * single or multiple wildcard characters.
- * This is the same as often found on Dos/Unix command lines.
- * The check is case-sensitive by default.
- * See {@link FilenameUtils#wildcardMatchOnSystem} for more information.
- * <p>
- * For example:
- * <pre>
- * File dir = new File(".");
- * FileFilter fileFilter = new WildcardFileFilter("*test*.java~*~");
- * File[] files = dir.listFiles(fileFilter);
- * for (int i = 0; i &lt; files.length; i++) {
- *   System.out.println(files[i]);
- * }
- * </pre>
- *
- * @version $Id$
- * @since 1.3
- */
-public class WildcardFileFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = -7426486598995782105L;
-    /** The wildcards that will be used to match filenames. */
-    private final String[] wildcards;
-    /** Whether the comparison is case sensitive. */
-    private final IOCase caseSensitivity;
-
-    /**
-     * Construct a new case-sensitive wildcard filter for a single wildcard.
-     *
-     * @param wildcard  the wildcard to match
-     * @throws IllegalArgumentException if the pattern is null
-     */
-    public WildcardFileFilter(final String wildcard) {
-        this(wildcard, IOCase.SENSITIVE);
-    }
-
-    /**
-     * Construct a new wildcard filter for a single wildcard specifying case-sensitivity.
-     *
-     * @param wildcard  the wildcard to match, not null
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the pattern is null
-     */
-    public WildcardFileFilter(final String wildcard, final IOCase caseSensitivity) {
-        if (wildcard == null) {
-            throw new IllegalArgumentException("The wildcard must not be null");
-        }
-        this.wildcards = new String[] { wildcard };
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Construct a new case-sensitive wildcard filter for an array of wildcards.
-     * <p>
-     *
-     * @param wildcards  the array of wildcards to match
-     * @throws IllegalArgumentException if the pattern array is null
-     */
-    public WildcardFileFilter(final String[] wildcards) {
-        this(wildcards, IOCase.SENSITIVE);
-    }
-
-    /**
-     * Construct a new wildcard filter for an array of wildcards specifying case-sensitivity.
-     * <p>
-     *
-     * @param wildcards  the array of wildcards to match, not null
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the pattern array is null
-     */
-    public WildcardFileFilter(final String[] wildcards, final IOCase caseSensitivity) {
-        if (wildcards == null) {
-            throw new IllegalArgumentException("The wildcard array must not be null");
-        }
-        this.wildcards = new String[wildcards.length];
-        System.arraycopy(wildcards, 0, this.wildcards, 0, wildcards.length);
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    /**
-     * Construct a new case-sensitive wildcard filter for a list of wildcards.
-     *
-     * @param wildcards  the list of wildcards to match, not null
-     * @throws IllegalArgumentException if the pattern list is null
-     * @throws ClassCastException if the list does not contain Strings
-     */
-    public WildcardFileFilter(final List<String> wildcards) {
-        this(wildcards, IOCase.SENSITIVE);
-    }
-
-    /**
-     * Construct a new wildcard filter for a list of wildcards specifying case-sensitivity.
-     *
-     * @param wildcards  the list of wildcards to match, not null
-     * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
-     * @throws IllegalArgumentException if the pattern list is null
-     * @throws ClassCastException if the list does not contain Strings
-     */
-    public WildcardFileFilter(final List<String> wildcards, final IOCase caseSensitivity) {
-        if (wildcards == null) {
-            throw new IllegalArgumentException("The wildcard list must not be null");
-        }
-        this.wildcards = wildcards.toArray(new String[wildcards.size()]);
-        this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Checks to see if the filename matches one of the wildcards.
-     *
-     * @param dir  the file directory (ignored)
-     * @param name  the filename
-     * @return true if the filename matches one of the wildcards
-     */
-    @Override
-    public boolean accept(final File dir, final String name) {
-        for (final String wildcard : wildcards) {
-            if (FilenameUtils.wildcardMatch(name, wildcard, caseSensitivity)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Checks to see if the filename matches one of the wildcards.
-     *
-     * @param file  the file to check
-     * @return true if the filename matches one of the wildcards
-     */
-    @Override
-    public boolean accept(final File file) {
-        final String name = file.getName();
-        for (final String wildcard : wildcards) {
-            if (FilenameUtils.wildcardMatch(name, wildcard, caseSensitivity)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Provide a String representation of this file filter.
-     *
-     * @return a String representation
-     */
-    @Override
-    public String toString() {
-        final StringBuilder buffer = new StringBuilder();
-        buffer.append(super.toString());
-        buffer.append("(");
-        if (wildcards != null) {
-            for (int i = 0; i < wildcards.length; i++) {
-                if (i > 0) {
-                    buffer.append(",");
-                }
-                buffer.append(wildcards[i]);
-            }
-        }
-        buffer.append(")");
-        return buffer.toString();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java b/trunk/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java
deleted file mode 100644
index 82e3b2a..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.List;
-
-import org.apache.commons.io.FilenameUtils;
-
-/**
- * Filters files using the supplied wildcards.
- * <p>
- * This filter selects files, but not directories, based on one or more wildcards
- * and using case-sensitive comparison.
- * <p>
- * The wildcard matcher uses the characters '?' and '*' to represent a
- * single or multiple wildcard characters.
- * This is the same as often found on Dos/Unix command lines.
- * The extension check is case-sensitive.
- * See {@link FilenameUtils#wildcardMatch(String, String)} for more information.
- * <p>
- * For example:
- * <pre>
- * File dir = new File(".");
- * FileFilter fileFilter = new WildcardFilter("*test*.java~*~");
- * File[] files = dir.listFiles(fileFilter);
- * for (int i = 0; i &lt; files.length; i++) {
- *   System.out.println(files[i]);
- * }
- * </pre>
- *
- * @version $Id$
- * @since 1.1
- * @deprecated Use WilcardFileFilter. Deprecated as this class performs directory
- * filtering which it shouldn't do, but that can't be removed due to compatability.
- */
-@Deprecated
-public class WildcardFilter extends AbstractFileFilter implements Serializable {
-
-    private static final long serialVersionUID = -5037645902506953517L;
-    /** The wildcards that will be used to match filenames. */
-    private final String[] wildcards;
-
-    /**
-     * Construct a new case-sensitive wildcard filter for a single wildcard.
-     *
-     * @param wildcard  the wildcard to match
-     * @throws IllegalArgumentException if the pattern is null
-     */
-    public WildcardFilter(final String wildcard) {
-        if (wildcard == null) {
-            throw new IllegalArgumentException("The wildcard must not be null");
-        }
-        this.wildcards = new String[] { wildcard };
-    }
-
-    /**
-     * Construct a new case-sensitive wildcard filter for an array of wildcards.
-     *
-     * @param wildcards  the array of wildcards to match
-     * @throws IllegalArgumentException if the pattern array is null
-     */
-    public WildcardFilter(final String[] wildcards) {
-        if (wildcards == null) {
-            throw new IllegalArgumentException("The wildcard array must not be null");
-        }
-        this.wildcards = new String[wildcards.length];
-        System.arraycopy(wildcards, 0, this.wildcards, 0, wildcards.length);
-    }
-
-    /**
-     * Construct a new case-sensitive wildcard filter for a list of wildcards.
-     *
-     * @param wildcards  the list of wildcards to match
-     * @throws IllegalArgumentException if the pattern list is null
-     * @throws ClassCastException if the list does not contain Strings
-     */
-    public WildcardFilter(final List<String> wildcards) {
-        if (wildcards == null) {
-            throw new IllegalArgumentException("The wildcard list must not be null");
-        }
-        this.wildcards = wildcards.toArray(new String[wildcards.size()]);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Checks to see if the filename matches one of the wildcards.
-     *
-     * @param dir  the file directory
-     * @param name  the filename
-     * @return true if the filename matches one of the wildcards
-     */
-    @Override
-    public boolean accept(final File dir, final String name) {
-        if (dir != null && new File(dir, name).isDirectory()) {
-            return false;
-        }
-
-        for (final String wildcard : wildcards) {
-            if (FilenameUtils.wildcardMatch(name, wildcard)) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Checks to see if the filename matches one of the wildcards.
-     *
-     * @param file the file to check
-     * @return true if the filename matches one of the wildcards
-     */
-    @Override
-    public boolean accept(final File file) {
-        if (file.isDirectory()) {
-            return false;
-        }
-
-        for (final String wildcard : wildcards) {
-            if (FilenameUtils.wildcardMatch(file.getName(), wildcard)) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/filefilter/package.html b/trunk/src/main/java/org/apache/commons/io/filefilter/package.html
deleted file mode 100644
index e495e95..0000000
--- a/trunk/src/main/java/org/apache/commons/io/filefilter/package.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<html>
-<body>
-<p>This package defines an interface (IOFileFilter) that combines both 
-{@link java.io.FileFilter} and {@link java.io.FilenameFilter}. Besides
-that the package offers a series of ready-to-use implementations of the
-IOFileFilter interface including implementation that allow you to combine
-other such filters.</p>
-<p>These filter can be used to list files or in {@link java.awt.FileDialog}, 
-for example.</p>
-     
-<p>There are a number of 'primitive' filters:</p>
-     
-<table>
-       <tbody>
-    <tr>
-      <td><a href="DirectoryFileFilter.html">DirectoryFilter</a></td>
-      <td>Only accept directories</td>
-    </tr>
-       <tr>
-      <td><a href="PrefixFileFilter.html">PrefixFileFilter</a></td>
-      <td>Filter based on a prefix</td>
-    </tr>
-       <tr>
-      <td><a href="SuffixFileFilter.html">SuffixFileFilter</a></td>
-      <td>Filter based on a suffix</td>
-    </tr>
-    <tr>
-      <td><a href="NameFileFilter.html">NameFileFilter</a></td>
-      <td>Filter based on a filename</td>
-    </tr>
-    <tr>
-      <td><a href="WildcardFileFilter.html">WildcardFileFilter</a></td>
-      <td>Filter based on wildcards</td>
-    </tr>
-    <tr>
-      <td><a href="AgeFileFilter.html">AgeFileFilter</a></td>
-      <td>Filter based on last modified time of file</td>
-    </tr>
-    <tr>
-      <td><a href="SizeFileFilter.html">SizeFileFilter</a></td>
-      <td>Filter based on file size</td>
-    </tr>
-  </tbody>
-</table>
-     
-<p>And there are five 'boolean' filters:</p>
-     
-<table>
-       <tbody>
-       <tr>
-      <td><a href="TrueFileFilter.html">TrueFileFilter</a></td>
-      <td>Accept all files</td>
-    </tr>
-       <tr>
-      <td><a href="FalseFileFilter.html">FalseFileFilter</a></td>
-      <td>Accept no files</td>
-    </tr>
-       <tr>
-      <td><a href="NotFileFilter.html">NotFileFilter</a></td>
-      <td>Applies a logical NOT to an existing filter</td>
-    </tr>
-    <tr>
-      <td><a href="AndFileFilter.html">AndFileFilter</a></td>
-      <td>Combines two filters using a logical AND</td>
-    </tr>
-       <tr>
-      <td><a href="OrFileFilter.html">OrFileFilter</a></td>
-      <td>Combines two filter using a logical OR</td>
-    </tr>
-     
-  </tbody>
-</table>
-      
-<p>These boolean FilenameFilters can be nested, to allow arbitrary expressions.
-For example, here is how one could print all non-directory files in the
-current directory, starting with "A", and ending in ".java" or ".class":</p>
-     
-<pre>
-  File dir = new File(".");
-  String[] files = dir.list( 
-    new AndFileFilter(
-      new AndFileFilter(
-        new PrefixFileFilter("A"),
-        new OrFileFilter(
-          new SuffixFileFilter(".class"),
-          new SuffixFileFilter(".java")
-        )
-      ),
-      new NotFileFilter(
-        new DirectoryFileFilter()
-      )
-    )
-  );
-  for ( int i=0; i&lt;files.length; i++ ) {
-    System.out.println(files[i]);
-  }
-</pre>
-
-<p>This package also contains a utility class: 
-<a href="FileFilterUtils.html">FileFilterUtils</a>. It allows you to use all 
-file filters without having to put them in the import section. Here's how the 
-above example will look using FileFilterUtils:</p>
-<pre>
-  File dir = new File(".");
-  String[] files = dir.list( 
-    FileFilterUtils.andFileFilter(
-      FileFilterUtils.andFileFilter(
-        FileFilterUtils.prefixFileFilter("A"),
-        FileFilterUtils.orFileFilter(
-          FileFilterUtils.suffixFileFilter(".class"),
-          FileFilterUtils.suffixFileFilter(".java")
-        )
-      ),
-      FileFilterUtils.notFileFilter(
-        FileFilterUtils.directoryFileFilter()
-      )
-    )
-  );
-  for ( int i=0; i&lt;files.length; i++ ) {
-    System.out.println(files[i]);
-  }
-</pre>
-<p>There are a few other goodies in that class so please have a look at the 
-documentation in detail.</p>
-    </body>
-</html>
diff --git a/trunk/src/main/java/org/apache/commons/io/input/AutoCloseInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/AutoCloseInputStream.java
deleted file mode 100644
index 80c4cd6..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/AutoCloseInputStream.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Proxy stream that closes and discards the underlying stream as soon as the
- * end of input has been reached or when the stream is explicitly closed.
- * Not even a reference to the underlying stream is kept after it has been
- * closed, so any allocated in-memory buffers can be freed even if the
- * client application still keeps a reference to the proxy stream.
- * <p>
- * This class is typically used to release any resources related to an open
- * stream as soon as possible even if the client application (by not explicitly
- * closing the stream when no longer needed) or the underlying stream (by not
- * releasing resources once the last byte has been read) do not do that.
- *
- * @version $Id$
- * @since 1.4
- */
-public class AutoCloseInputStream extends ProxyInputStream {
-
-    /**
-     * Creates an automatically closing proxy for the given input stream.
-     *
-     * @param in underlying input stream
-     */
-    public AutoCloseInputStream(final InputStream in) {
-        super(in);
-    }
-
-    /**
-     * Closes the underlying input stream and replaces the reference to it
-     * with a {@link ClosedInputStream} instance.
-     * <p>
-     * This method is automatically called by the read methods when the end
-     * of input has been reached.
-     * <p>
-     * Note that it is safe to call this method any number of times. The original
-     * underlying input stream is closed and discarded only once when this
-     * method is first called.
-     *
-     * @throws IOException if the underlying input stream can not be closed
-     */
-    @Override
-    public void close() throws IOException {
-        in.close();
-        in = new ClosedInputStream();
-    }
-
-    /**
-     * Automatically closes the stream if the end of stream was reached.
-     *
-     * @param n number of bytes read, or -1 if no more bytes are available
-     * @throws IOException if the stream could not be closed
-     * @since 2.0
-     */
-    @Override
-    protected void afterRead(final int n) throws IOException {
-        if (n == EOF) {
-            close();
-        }
-    }
-
-    /**
-     * Ensures that the stream is closed before it gets garbage-collected.
-     * As mentioned in {@link #close()}, this is a no-op if the stream has
-     * already been closed.
-     * @throws Throwable if an error occurs
-     */
-    @Override
-    protected void finalize() throws Throwable {
-        close();
-        super.finalize();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/BOMInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/BOMInputStream.java
deleted file mode 100644
index 9430847..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/BOMInputStream.java
+++ /dev/null
@@ -1,408 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.List;
-
-import org.apache.commons.io.ByteOrderMark;
-
-/**
- * This class is used to wrap a stream that includes an encoded {@link ByteOrderMark} as its first bytes.
- * 
- * This class detects these bytes and, if required, can automatically skip them and return the subsequent byte as the
- * first byte in the stream.
- * 
- * The {@link ByteOrderMark} implementation has the following pre-defined BOMs:
- * <ul>
- * <li>UTF-8 - {@link ByteOrderMark#UTF_8}</li>
- * <li>UTF-16BE - {@link ByteOrderMark#UTF_16LE}</li>
- * <li>UTF-16LE - {@link ByteOrderMark#UTF_16BE}</li>
- * <li>UTF-32BE - {@link ByteOrderMark#UTF_32LE}</li>
- * <li>UTF-32LE - {@link ByteOrderMark#UTF_32BE}</li>
- * </ul>
- * 
- * 
- * <h3>Example 1 - Detect and exclude a UTF-8 BOM</h3>
- * 
- * <pre>
- * BOMInputStream bomIn = new BOMInputStream(in);
- * if (bomIn.hasBOM()) {
- *     // has a UTF-8 BOM
- * }
- * </pre>
- * 
- * <h3>Example 2 - Detect a UTF-8 BOM (but don't exclude it)</h3>
- * 
- * <pre>
- * boolean include = true;
- * BOMInputStream bomIn = new BOMInputStream(in, include);
- * if (bomIn.hasBOM()) {
- *     // has a UTF-8 BOM
- * }
- * </pre>
- * 
- * <h3>Example 3 - Detect Multiple BOMs</h3>
- * 
- * <pre>
- * BOMInputStream bomIn = new BOMInputStream(in, 
- *   ByteOrderMark.UTF_16LE, ByteOrderMark.UTF_16BE,
- *   ByteOrderMark.UTF_32LE, ByteOrderMark.UTF_32BE
- *   );
- * if (bomIn.hasBOM() == false) {
- *     // No BOM found
- * } else if (bomIn.hasBOM(ByteOrderMark.UTF_16LE)) {
- *     // has a UTF-16LE BOM
- * } else if (bomIn.hasBOM(ByteOrderMark.UTF_16BE)) {
- *     // has a UTF-16BE BOM
- * } else if (bomIn.hasBOM(ByteOrderMark.UTF_32LE)) {
- *     // has a UTF-32LE BOM
- * } else if (bomIn.hasBOM(ByteOrderMark.UTF_32BE)) {
- *     // has a UTF-32BE BOM
- * }
- * </pre>
- * 
- * @see org.apache.commons.io.ByteOrderMark
- * @see <a href="http://en.wikipedia.org/wiki/Byte_order_mark">Wikipedia - Byte Order Mark</a>
- * @version $Id$
- * @since 2.0
- */
-public class BOMInputStream extends ProxyInputStream {
-    private final boolean include;
-    /**
-     * BOMs are sorted from longest to shortest.
-     */
-    private final List<ByteOrderMark> boms;
-    private ByteOrderMark byteOrderMark;
-    private int[] firstBytes;
-    private int fbLength;
-    private int fbIndex;
-    private int markFbIndex;
-    private boolean markedAtStart;
-
-    /**
-     * Constructs a new BOM InputStream that excludes a {@link ByteOrderMark#UTF_8} BOM.
-     * 
-     * @param delegate
-     *            the InputStream to delegate to
-     */
-    public BOMInputStream(final InputStream delegate) {
-        this(delegate, false, ByteOrderMark.UTF_8);
-    }
-
-    /**
-     * Constructs a new BOM InputStream that detects a a {@link ByteOrderMark#UTF_8} and optionally includes it.
-     * 
-     * @param delegate
-     *            the InputStream to delegate to
-     * @param include
-     *            true to include the UTF-8 BOM or false to exclude it
-     */
-    public BOMInputStream(final InputStream delegate, final boolean include) {
-        this(delegate, include, ByteOrderMark.UTF_8);
-    }
-
-    /**
-     * Constructs a new BOM InputStream that excludes the specified BOMs.
-     * 
-     * @param delegate
-     *            the InputStream to delegate to
-     * @param boms
-     *            The BOMs to detect and exclude
-     */
-    public BOMInputStream(final InputStream delegate, final ByteOrderMark... boms) {
-        this(delegate, false, boms);
-    }
-
-    /**
-     * Compares ByteOrderMark objects in descending length order.
-     */
-    private static final Comparator<ByteOrderMark> ByteOrderMarkLengthComparator = new Comparator<ByteOrderMark>() {
-
-        public int compare(final ByteOrderMark bom1, final ByteOrderMark bom2) {
-            final int len1 = bom1.length();
-            final int len2 = bom2.length();
-            if (len1 > len2) {
-                return EOF;
-            }
-            if (len2 > len1) {
-                return 1;
-            }
-            return 0;
-        }
-    };
-
-    /**
-     * Constructs a new BOM InputStream that detects the specified BOMs and optionally includes them.
-     * 
-     * @param delegate
-     *            the InputStream to delegate to
-     * @param include
-     *            true to include the specified BOMs or false to exclude them
-     * @param boms
-     *            The BOMs to detect and optionally exclude
-     */
-    public BOMInputStream(final InputStream delegate, final boolean include, final ByteOrderMark... boms) {
-        super(delegate);
-        if (boms == null || boms.length == 0) {
-            throw new IllegalArgumentException("No BOMs specified");
-        }
-        this.include = include;
-        // Sort the BOMs to match the longest BOM first because some BOMs have the same starting two bytes.
-        Arrays.sort(boms, ByteOrderMarkLengthComparator);
-        this.boms = Arrays.asList(boms);
-
-    }
-
-    /**
-     * Indicates whether the stream contains one of the specified BOMs.
-     * 
-     * @return true if the stream has one of the specified BOMs, otherwise false if it does not
-     * @throws IOException
-     *             if an error reading the first bytes of the stream occurs
-     */
-    public boolean hasBOM() throws IOException {
-        return getBOM() != null;
-    }
-
-    /**
-     * Indicates whether the stream contains the specified BOM.
-     * 
-     * @param bom
-     *            The BOM to check for
-     * @return true if the stream has the specified BOM, otherwise false if it does not
-     * @throws IllegalArgumentException
-     *             if the BOM is not one the stream is configured to detect
-     * @throws IOException
-     *             if an error reading the first bytes of the stream occurs
-     */
-    public boolean hasBOM(final ByteOrderMark bom) throws IOException {
-        if (!boms.contains(bom)) {
-            throw new IllegalArgumentException("Stream not configure to detect " + bom);
-        }
-        return byteOrderMark != null && getBOM().equals(bom);
-    }
-
-    /**
-     * Return the BOM (Byte Order Mark).
-     * 
-     * @return The BOM or null if none
-     * @throws IOException
-     *             if an error reading the first bytes of the stream occurs
-     */
-    public ByteOrderMark getBOM() throws IOException {
-        if (firstBytes == null) {
-            fbLength = 0;
-            // BOMs are sorted from longest to shortest
-            final int maxBomSize = boms.get(0).length();
-            firstBytes = new int[maxBomSize];
-            // Read first maxBomSize bytes
-            for (int i = 0; i < firstBytes.length; i++) {
-                firstBytes[i] = in.read();
-                fbLength++;
-                if (firstBytes[i] < 0) {
-                    break;
-                }
-            }
-            // match BOM in firstBytes
-            byteOrderMark = find();
-            if (byteOrderMark != null) {
-                if (!include) {
-                    if (byteOrderMark.length() < firstBytes.length) {
-                        fbIndex = byteOrderMark.length();
-                    } else {
-                        fbLength = 0;
-                    }
-                }
-            }
-        }
-        return byteOrderMark;
-    }
-
-    /**
-     * Return the BOM charset Name - {@link ByteOrderMark#getCharsetName()}.
-     * 
-     * @return The BOM charset Name or null if no BOM found
-     * @throws IOException
-     *             if an error reading the first bytes of the stream occurs
-     * 
-     */
-    public String getBOMCharsetName() throws IOException {
-        getBOM();
-        return byteOrderMark == null ? null : byteOrderMark.getCharsetName();
-    }
-
-    /**
-     * This method reads and either preserves or skips the first bytes in the stream. It behaves like the single-byte
-     * <code>read()</code> method, either returning a valid byte or -1 to indicate that the initial bytes have been
-     * processed already.
-     * 
-     * @return the byte read (excluding BOM) or -1 if the end of stream
-     * @throws IOException
-     *             if an I/O error occurs
-     */
-    private int readFirstBytes() throws IOException {
-        getBOM();
-        return fbIndex < fbLength ? firstBytes[fbIndex++] : EOF;
-    }
-
-    /**
-     * Find a BOM with the specified bytes.
-     * 
-     * @return The matched BOM or null if none matched
-     */
-    private ByteOrderMark find() {
-        for (final ByteOrderMark bom : boms) {
-            if (matches(bom)) {
-                return bom;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Check if the bytes match a BOM.
-     * 
-     * @param bom
-     *            The BOM
-     * @return true if the bytes match the bom, otherwise false
-     */
-    private boolean matches(final ByteOrderMark bom) {
-        // if (bom.length() != fbLength) {
-        // return false;
-        // }
-        // firstBytes may be bigger than the BOM bytes
-        for (int i = 0; i < bom.length(); i++) {
-            if (bom.get(i) != firstBytes[i]) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    // ----------------------------------------------------------------------------
-    // Implementation of InputStream
-    // ----------------------------------------------------------------------------
-
-    /**
-     * Invokes the delegate's <code>read()</code> method, detecting and optionally skipping BOM.
-     * 
-     * @return the byte read (excluding BOM) or -1 if the end of stream
-     * @throws IOException
-     *             if an I/O error occurs
-     */
-    @Override
-    public int read() throws IOException {
-        final int b = readFirstBytes();
-        return b >= 0 ? b : in.read();
-    }
-
-    /**
-     * Invokes the delegate's <code>read(byte[], int, int)</code> method, detecting and optionally skipping BOM.
-     * 
-     * @param buf
-     *            the buffer to read the bytes into
-     * @param off
-     *            The start offset
-     * @param len
-     *            The number of bytes to read (excluding BOM)
-     * @return the number of bytes read or -1 if the end of stream
-     * @throws IOException
-     *             if an I/O error occurs
-     */
-    @Override
-    public int read(final byte[] buf, int off, int len) throws IOException {
-        int firstCount = 0;
-        int b = 0;
-        while (len > 0 && b >= 0) {
-            b = readFirstBytes();
-            if (b >= 0) {
-                buf[off++] = (byte) (b & 0xFF);
-                len--;
-                firstCount++;
-            }
-        }
-        final int secondCount = in.read(buf, off, len);
-        return secondCount < 0 ? firstCount > 0 ? firstCount : EOF : firstCount + secondCount;
-    }
-
-    /**
-     * Invokes the delegate's <code>read(byte[])</code> method, detecting and optionally skipping BOM.
-     * 
-     * @param buf
-     *            the buffer to read the bytes into
-     * @return the number of bytes read (excluding BOM) or -1 if the end of stream
-     * @throws IOException
-     *             if an I/O error occurs
-     */
-    @Override
-    public int read(final byte[] buf) throws IOException {
-        return read(buf, 0, buf.length);
-    }
-
-    /**
-     * Invokes the delegate's <code>mark(int)</code> method.
-     * 
-     * @param readlimit
-     *            read ahead limit
-     */
-    @Override
-    public synchronized void mark(final int readlimit) {
-        markFbIndex = fbIndex;
-        markedAtStart = firstBytes == null;
-        in.mark(readlimit);
-    }
-
-    /**
-     * Invokes the delegate's <code>reset()</code> method.
-     * 
-     * @throws IOException
-     *             if an I/O error occurs
-     */
-    @Override
-    public synchronized void reset() throws IOException {
-        fbIndex = markFbIndex;
-        if (markedAtStart) {
-            firstBytes = null;
-        }
-
-        in.reset();
-    }
-
-    /**
-     * Invokes the delegate's <code>skip(long)</code> method, detecting and optionallyskipping BOM.
-     * 
-     * @param n
-     *            the number of bytes to skip
-     * @return the number of bytes to skipped or -1 if the end of stream
-     * @throws IOException
-     *             if an I/O error occurs
-     */
-    @Override
-    public long skip(long n) throws IOException {
-        int skipped = 0;
-        while ((n > skipped) && (readFirstBytes() >= 0)) {
-            skipped++;
-        }
-        return in.skip(n - skipped) + skipped;
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/BoundedInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/BoundedInputStream.java
deleted file mode 100644
index 55aa326..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/BoundedInputStream.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * This is a stream that will only supply bytes up to a certain length - if its
- * position goes above that, it will stop.
- * <p>
- * This is useful to wrap ServletInputStreams. The ServletInputStream will block
- * if you try to read content from it that isn't there, because it doesn't know
- * whether the content hasn't arrived yet or whether the content has finished.
- * So, one of these, initialized with the Content-length sent in the
- * ServletInputStream's header, will stop it blocking, providing it's been sent
- * with a correct content length.
- *
- * @version $Id$
- * @since 2.0
- */
-public class BoundedInputStream extends InputStream {
-
-    /** the wrapped input stream */
-    private final InputStream in;
-
-    /** the max length to provide */
-    private final long max;
-
-    /** the number of bytes already returned */
-    private long pos = 0;
-
-    /** the marked position */
-    private long mark = EOF;
-
-    /** flag if close shoud be propagated */
-    private boolean propagateClose = true;
-
-    /**
-     * Creates a new <code>BoundedInputStream</code> that wraps the given input
-     * stream and limits it to a certain size.
-     *
-     * @param in The wrapped input stream
-     * @param size The maximum number of bytes to return
-     */
-    public BoundedInputStream(final InputStream in, final long size) {
-        // Some badly designed methods - eg the servlet API - overload length
-        // such that "-1" means stream finished
-        this.max = size;
-        this.in = in;
-    }
-
-    /**
-     * Creates a new <code>BoundedInputStream</code> that wraps the given input
-     * stream and is unlimited.
-     *
-     * @param in The wrapped input stream
-     */
-    public BoundedInputStream(final InputStream in) {
-        this(in, EOF);
-    }
-
-    /**
-     * Invokes the delegate's <code>read()</code> method if
-     * the current position is less than the limit.
-     * @return the byte read or -1 if the end of stream or
-     * the limit has been reached.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read() throws IOException {
-        if (max >= 0 && pos >= max) {
-            return EOF;
-        }
-        final int result = in.read();
-        pos++;
-        return result;
-    }
-
-    /**
-     * Invokes the delegate's <code>read(byte[])</code> method.
-     * @param b the buffer to read the bytes into
-     * @return the number of bytes read or -1 if the end of stream or
-     * the limit has been reached.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read(final byte[] b) throws IOException {
-        return this.read(b, 0, b.length);
-    }
-
-    /**
-     * Invokes the delegate's <code>read(byte[], int, int)</code> method.
-     * @param b the buffer to read the bytes into
-     * @param off The start offset
-     * @param len The number of bytes to read
-     * @return the number of bytes read or -1 if the end of stream or
-     * the limit has been reached.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read(final byte[] b, final int off, final int len) throws IOException {
-        if (max>=0 && pos>=max) {
-            return EOF;
-        }
-        final long maxRead = max>=0 ? Math.min(len, max-pos) : len;
-        final int bytesRead = in.read(b, off, (int)maxRead);
-
-        if (bytesRead==EOF) {
-            return EOF;
-        }
-
-        pos+=bytesRead;
-        return bytesRead;
-    }
-
-    /**
-     * Invokes the delegate's <code>skip(long)</code> method.
-     * @param n the number of bytes to skip
-     * @return the actual number of bytes skipped
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public long skip(final long n) throws IOException {
-        final long toSkip = max>=0 ? Math.min(n, max-pos) : n;
-        final long skippedBytes = in.skip(toSkip);
-        pos+=skippedBytes;
-        return skippedBytes;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int available() throws IOException {
-        if (max>=0 && pos>=max) {
-            return 0;
-        }
-        return in.available();
-    }
-
-    /**
-     * Invokes the delegate's <code>toString()</code> method.
-     * @return the delegate's <code>toString()</code>
-     */
-    @Override
-    public String toString() {
-        return in.toString();
-    }
-
-    /**
-     * Invokes the delegate's <code>close()</code> method
-     * if {@link #isPropagateClose()} is {@code true}.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void close() throws IOException {
-        if (propagateClose) {
-            in.close();
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>reset()</code> method.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public synchronized void reset() throws IOException {
-        in.reset();
-        pos = mark;
-    }
-
-    /**
-     * Invokes the delegate's <code>mark(int)</code> method.
-     * @param readlimit read ahead limit
-     */
-    @Override
-    public synchronized void mark(final int readlimit) {
-        in.mark(readlimit);
-        mark = pos;
-    }
-
-    /**
-     * Invokes the delegate's <code>markSupported()</code> method.
-     * @return true if mark is supported, otherwise false
-     */
-    @Override
-    public boolean markSupported() {
-        return in.markSupported();
-    }
-
-    /**
-     * Indicates whether the {@link #close()} method
-     * should propagate to the underling {@link InputStream}.
-     *
-     * @return {@code true} if calling {@link #close()}
-     * propagates to the <code>close()</code> method of the
-     * underlying stream or {@code false} if it does not.
-     */
-    public boolean isPropagateClose() {
-        return propagateClose;
-    }
-
-    /**
-     * Set whether the {@link #close()} method
-     * should propagate to the underling {@link InputStream}.
-     *
-     * @param propagateClose {@code true} if calling
-     * {@link #close()} propagates to the <code>close()</code>
-     * method of the underlying stream or
-     * {@code false} if it does not.
-     */
-    public void setPropagateClose(final boolean propagateClose) {
-        this.propagateClose = propagateClose;
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/BoundedReader.java b/trunk/src/main/java/org/apache/commons/io/input/BoundedReader.java
deleted file mode 100644
index a20b51c..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/BoundedReader.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.IOException;
-import java.io.Reader;
-
-/**
- * A reader that imposes a limit to the number of characters that can be read from
- * an underlying reader, returning eof when this limit is reached -regardless of state of
- * underlying reader.
- *
- * <p>
- * One use case is to avoid overrunning the readAheadLimit supplied to
- * java.io.Reader#mark(int), since reading too many characters removes the
- * ability to do a successful reset.
- * </p>
- *
- * @since 2.5
- */
-public class BoundedReader
-    extends Reader
-{
-
-    private static final int INVALID = -1;
-
-    private final Reader target;
-
-    private int charsRead = 0;
-
-    private int markedAt = INVALID;
-
-    private int readAheadLimit; // Internally, this value will never exceed the allowed size
-
-    private final int maxCharsFromTargetReader;
-
-    /**
-     * Constructs a bounded reader
-     *
-     * @param target                   The target stream that will be used
-     * @param maxCharsFromTargetReader The maximum number of characters that can be read from target
-     * @throws IOException if mark fails
-     */
-    public BoundedReader( Reader target, int maxCharsFromTargetReader ) throws IOException {
-        this.target = target;
-        this.maxCharsFromTargetReader = maxCharsFromTargetReader;
-    }
-
-    /**
-     * Closes the target
-     *
-     * @throws IOException If an I/O error occurs while calling the underlying reader's close method
-     */
-    @Override
-    public void close() throws IOException {
-        target.close();
-    }
-
-    /**
-     * Resets the target to the latest mark, @see java.io.Reader#reset()
-     *
-     * @throws IOException If an I/O error occurs while calling the underlying reader's reset method
-     */
-    @Override
-    public void reset() throws IOException {
-        charsRead = markedAt;
-        target.reset();
-    }
-
-    /**
-     * marks the target stream, @see java.io.Reader#mark(int).
-     *
-     * @param readAheadLimit The number of characters that can be read while
-     *                       still retaining the ability to do #reset().
-     *                       Note that this parameter is not validated with respect to
-     *                       maxCharsFromTargetReader. There is no way to pass
-     *                       past maxCharsFromTargetReader, even if this value is
-     *                       greater.
-     *
-     * @throws IOException If an I/O error occurs while calling the underlying reader's mark method
-     */
-    @Override
-    public void mark( int readAheadLimit ) throws IOException {
-        this.readAheadLimit = readAheadLimit - charsRead;
-
-        markedAt = charsRead;
-
-        target.mark( readAheadLimit );
-    }
-
-    /**
-     * Reads a single character, @see java.io.Reader#read()
-     *
-     * @return -1 on eof or the character read
-     * @throws IOException If an I/O error occurs while calling the underlying reader's read method
-     */
-    @Override
-    public int read() throws IOException {
-
-        if ( charsRead >= maxCharsFromTargetReader ) {
-            return -1;
-        }
-
-        if ( markedAt >= 0 && ( charsRead - markedAt ) >= readAheadLimit ) {
-            return -1;
-        }
-        charsRead++;
-        return target.read();
-    }
-
-    /**
-     * Reads into an array, @see java.io.Reader#read(char[], int, int)
-     *
-     * @param cbuf The buffer to fill
-     * @param off  The offset
-     * @param len  The number of chars to read
-     * @return the number of chars read
-     * @throws IOException If an I/O error occurs while calling the underlying reader's read method
-     */
-    @Override
-    public int read( char[] cbuf, int off, int len ) throws IOException {
-        int c;
-        for ( int i = 0; i < len; i++ ) {
-            c = read();
-            if ( c == -1 ) {
-                return i;
-            }
-            cbuf[off + i] = (char) c;
-        }
-        return len;
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/BrokenInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/BrokenInputStream.java
deleted file mode 100644
index a8b0fe9..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/BrokenInputStream.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Broken input stream. This stream always throws an {@link IOException} from
- * all the {@link InputStream} methods where the exception is declared.
- * <p>
- * This class is mostly useful for testing error handling in code that uses an
- * input stream.
- *
- * @since 2.0
- */
-public class BrokenInputStream extends InputStream {
-
-    /**
-     * The exception that is thrown by all methods of this class.
-     */
-    private final IOException exception;
-
-    /**
-     * Creates a new stream that always throws the given exception.
-     *
-     * @param exception the exception to be thrown
-     */
-    public BrokenInputStream(final IOException exception) {
-        this.exception = exception;
-    }
-
-    /**
-     * Creates a new stream that always throws an {@link IOException}
-     */
-    public BrokenInputStream() {
-        this(new IOException("Broken input stream"));
-    }
-
-    /**
-     * Throws the configured exception.
-     *
-     * @return nothing
-     * @throws IOException always thrown
-     */
-    @Override
-    public int read() throws IOException {
-        throw exception;
-    }
-
-    /**
-     * Throws the configured exception.
-     *
-     * @return nothing
-     * @throws IOException always thrown
-     */
-    @Override
-    public int available() throws IOException {
-        throw exception;
-    }
-
-    /**
-     * Throws the configured exception.
-     *
-     * @param n ignored
-     * @return nothing
-     * @throws IOException always thrown
-     */
-    @Override
-    public long skip(final long n) throws IOException {
-        throw exception;
-    }
-
-    /**
-     * Throws the configured exception.
-     *
-     * @throws IOException always thrown
-     */
-    @Override
-    public synchronized void reset() throws IOException {
-        throw exception;
-    }
-
-    /**
-     * Throws the configured exception.
-     *
-     * @throws IOException always thrown
-     */
-    @Override
-    public void close() throws IOException {
-        throw exception;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java
deleted file mode 100644
index ab75471..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.CharacterCodingException;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
-import java.nio.charset.CoderResult;
-import java.nio.charset.CodingErrorAction;
-
-/**
- * {@link InputStream} implementation that can read from String, StringBuffer,
- * StringBuilder or CharBuffer.
- * <p>
- * <strong>Note:</strong> Supports {@link #mark(int)} and {@link #reset()}.
- *
- * @since 2.2
- */
-public class CharSequenceInputStream extends InputStream {
-
-    private static final int BUFFER_SIZE = 2048;
-
-    private static final int NO_MARK = -1;
-
-    private final CharsetEncoder encoder;
-    private final CharBuffer cbuf;
-    private final ByteBuffer bbuf;
-
-    private int mark_cbuf; // position in cbuf
-    private int mark_bbuf; // position in bbuf
-
-    /**
-     * Constructor.
-     *
-     * @param cs the input character sequence
-     * @param charset the character set name to use
-     * @param bufferSize the buffer size to use.
-     * @throws IllegalArgumentException if the buffer is not large enough to hold a complete character
-     */
-    public CharSequenceInputStream(final CharSequence cs, final Charset charset, final int bufferSize) {
-        super();
-        this.encoder = charset.newEncoder()
-            .onMalformedInput(CodingErrorAction.REPLACE)
-            .onUnmappableCharacter(CodingErrorAction.REPLACE);
-        // Ensure that buffer is long enough to hold a complete character
-        final float maxBytesPerChar = encoder.maxBytesPerChar();
-        if (bufferSize < maxBytesPerChar) {
-            throw new IllegalArgumentException("Buffer size " + bufferSize + " is less than maxBytesPerChar " +
-                    maxBytesPerChar);
-        }
-        this.bbuf = ByteBuffer.allocate(bufferSize);
-        this.bbuf.flip();
-        this.cbuf = CharBuffer.wrap(cs);
-        this.mark_cbuf = NO_MARK;
-        this.mark_bbuf = NO_MARK;
-    }
-
-    /**
-     * Constructor, calls {@link #CharSequenceInputStream(CharSequence, Charset, int)}.
-     *
-     * @param cs the input character sequence
-     * @param charset the character set name to use
-     * @param bufferSize the buffer size to use.
-     * @throws IllegalArgumentException if the buffer is not large enough to hold a complete character
-     */
-    public CharSequenceInputStream(final CharSequence cs, final String charset, final int bufferSize) {
-        this(cs, Charset.forName(charset), bufferSize);
-    }
-
-    /**
-     * Constructor, calls {@link #CharSequenceInputStream(CharSequence, Charset, int)}
-     * with a buffer size of 2048.
-     *
-     * @param cs the input character sequence
-     * @param charset the character set name to use
-     * @throws IllegalArgumentException if the buffer is not large enough to hold a complete character
-     */
-    public CharSequenceInputStream(final CharSequence cs, final Charset charset) {
-        this(cs, charset, BUFFER_SIZE);
-    }
-
-    /**
-     * Constructor, calls {@link #CharSequenceInputStream(CharSequence, String, int)}
-     * with a buffer size of 2048.
-     *
-     * @param cs the input character sequence
-     * @param charset the character set name to use
-     * @throws IllegalArgumentException if the buffer is not large enough to hold a complete character
-     */
-    public CharSequenceInputStream(final CharSequence cs, final String charset) {
-        this(cs, charset, BUFFER_SIZE);
-    }
-
-    /**
-     * Fills the byte output buffer from the input char buffer.
-     *
-     * @throws CharacterCodingException
-     *             an error encoding data
-     */
-    private void fillBuffer() throws CharacterCodingException {
-        this.bbuf.compact();
-        final CoderResult result = this.encoder.encode(this.cbuf, this.bbuf, true);
-        if (result.isError()) {
-            result.throwException();
-        }
-        this.bbuf.flip();
-    }
-
-    @Override
-    public int read(final byte[] b, int off, int len) throws IOException {
-        if (b == null) {
-            throw new NullPointerException("Byte array is null");
-        }
-        if (len < 0 || (off + len) > b.length) {
-            throw new IndexOutOfBoundsException("Array Size=" + b.length +
-                    ", offset=" + off + ", length=" + len);
-        }
-        if (len == 0) {
-            return 0; // must return 0 for zero length read
-        }
-        if (!this.bbuf.hasRemaining() && !this.cbuf.hasRemaining()) {
-            return EOF;
-        }
-        int bytesRead = 0;
-        while (len > 0) {
-            if (this.bbuf.hasRemaining()) {
-                final int chunk = Math.min(this.bbuf.remaining(), len);
-                this.bbuf.get(b, off, chunk);
-                off += chunk;
-                len -= chunk;
-                bytesRead += chunk;
-            } else {
-                fillBuffer();
-                if (!this.bbuf.hasRemaining() && !this.cbuf.hasRemaining()) {
-                    break;
-                }
-            }
-        }
-        return bytesRead == 0 && !this.cbuf.hasRemaining() ? EOF : bytesRead;
-    }
-
-    @Override
-    public int read() throws IOException {
-        for (;;) {
-            if (this.bbuf.hasRemaining()) {
-                return this.bbuf.get() & 0xFF;
-            } else {
-                fillBuffer();
-                if (!this.bbuf.hasRemaining() && !this.cbuf.hasRemaining()) {
-                    return EOF;
-                }
-            }
-        }
-    }
-
-    @Override
-    public int read(final byte[] b) throws IOException {
-        return read(b, 0, b.length);
-    }
-
-    @Override
-    public long skip(long n) throws IOException {
-        /*
-         * This could be made more efficient by using position to skip within the current buffer.
-         */
-        long skipped = 0;
-        while (n > 0 && available() > 0) {
-            this.read();
-            n--;
-            skipped++;
-        }
-        return skipped;
-    }
-
-    /**
-     * Return an estimate of the number of bytes remaining in the byte stream.
-     * @return the count of bytes that can be read without blocking (or returning EOF).
-     *
-     * @throws IOException if an error occurs (probably not possible)
-     */
-    @Override
-    public int available() throws IOException {
-        // The cached entries are in bbuf; since encoding always creates at least one byte
-        // per character, we can add the two to get a better estimate (e.g. if bbuf is empty)
-        // Note that the previous implementation (2.4) could return zero even though there were
-        // encoded bytes still available.
-        return this.bbuf.remaining() + this.cbuf.remaining();
-    }
-
-    @Override
-    public void close() throws IOException {
-    }
-
-    /**
-     * {@inheritDoc}
-     * @param readlimit max read limit (ignored)
-     */
-    @Override
-    public synchronized void mark(final int readlimit) {
-        this.mark_cbuf = this.cbuf.position();
-        this.mark_bbuf = this.bbuf.position();
-        this.cbuf.mark();
-        this.bbuf.mark();
-        // It would be nice to be able to use mark & reset on the cbuf and bbuf;
-        // however the bbuf is re-used so that won't work
-    }
-
-    @Override
-    public synchronized void reset() throws IOException {
-        /*
-         * This is not the most efficient implementation, as it re-encodes from the beginning.
-         *
-         * Since the bbuf is re-used, in general it's necessary to re-encode the data.
-         *
-         * It should be possible to apply some optimisations however:
-         * + use mark/reset on the cbuf and bbuf. This would only work if the buffer had not been (re)filled since
-         * the mark. The code would have to catch InvalidMarkException - does not seem possible to check if mark is
-         * valid otherwise. + Try saving the state of the cbuf before each fillBuffer; it might be possible to
-         * restart from there.
-         */
-        if (this.mark_cbuf != NO_MARK) {
-            // if cbuf is at 0, we have not started reading anything, so skip re-encoding
-            if (this.cbuf.position() != 0) {
-                this.encoder.reset();
-                this.cbuf.rewind();
-                this.bbuf.rewind();
-                this.bbuf.limit(0); // rewind does not clear the buffer
-                while(this.cbuf.position() < this.mark_cbuf) {
-                    this.bbuf.rewind(); // empty the buffer (we only refill when empty during normal processing)
-                    this.bbuf.limit(0);
-                    fillBuffer();
-                }
-            }
-            if (this.cbuf.position() != this.mark_cbuf) {
-                throw new IllegalStateException("Unexpected CharBuffer postion: actual=" + cbuf.position() + " " +
-                        "expected=" + this.mark_cbuf);
-            }
-            this.bbuf.position(this.mark_bbuf);
-            this.mark_cbuf = NO_MARK;
-            this.mark_bbuf = NO_MARK;
-        }
-    }
-
-    @Override
-    public boolean markSupported() {
-        return true;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/CharSequenceReader.java b/trunk/src/main/java/org/apache/commons/io/input/CharSequenceReader.java
deleted file mode 100644
index 2ccc991..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/CharSequenceReader.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.Reader;
-import java.io.Serializable;
-
-/**
- * {@link Reader} implementation that can read from String, StringBuffer,
- * StringBuilder or CharBuffer.
- * <p>
- * <strong>Note:</strong> Supports {@link #mark(int)} and {@link #reset()}.
- *
- * @version $Id$
- * @since 1.4
- */
-public class CharSequenceReader extends Reader implements Serializable {
-
-    private static final long serialVersionUID = 3724187752191401220L;
-    private final CharSequence charSequence;
-    private int idx;
-    private int mark;
-
-    /**
-     * Construct a new instance with the specified character sequence.
-     *
-     * @param charSequence The character sequence, may be {@code null}
-     */
-    public CharSequenceReader(final CharSequence charSequence) {
-        this.charSequence = charSequence != null ? charSequence : "";
-    }
-
-    /**
-     * Close resets the file back to the start and removes any marked position.
-     */
-    @Override
-    public void close() {
-        idx = 0;
-        mark = 0;
-    }
-
-    /**
-     * Mark the current position.
-     *
-     * @param readAheadLimit ignored
-     */
-    @Override
-    public void mark(final int readAheadLimit) {
-        mark = idx;
-    }
-
-    /**
-     * Mark is supported (returns true).
-     *
-     * @return {@code true}
-     */
-    @Override
-    public boolean markSupported() {
-        return true;
-    }
-
-    /**
-     * Read a single character.
-     *
-     * @return the next character from the character sequence
-     * or -1 if the end has been reached.
-     */
-    @Override
-    public int read() {
-        if (idx >= charSequence.length()) {
-            return EOF;
-        } else {
-            return charSequence.charAt(idx++);
-        }
-    }
-
-    /**
-     * Read the sepcified number of characters into the array.
-     *
-     * @param array The array to store the characters in
-     * @param offset The starting position in the array to store
-     * @param length The maximum number of characters to read
-     * @return The number of characters read or -1 if there are
-     * no more
-     */
-    @Override
-    public int read(final char[] array, final int offset, final int length) {
-        if (idx >= charSequence.length()) {
-            return EOF;
-        }
-        if (array == null) {
-            throw new NullPointerException("Character array is missing");
-        }
-        if (length < 0 || offset < 0 || offset + length > array.length) {
-            throw new IndexOutOfBoundsException("Array Size=" + array.length +
-                    ", offset=" + offset + ", length=" + length);
-        }
-        int count = 0;
-        for (int i = 0; i < length; i++) {
-            final int c = read();
-            if (c == EOF) {
-                return count;
-            }
-            array[offset + i] = (char)c;
-            count++;
-        }
-        return count;
-    }
-
-    /**
-     * Reset the reader to the last marked position (or the beginning if
-     * mark has not been called).
-     */
-    @Override
-    public void reset() {
-        idx = mark;
-    }
-
-    /**
-     * Skip the specified number of characters.
-     *
-     * @param n The number of characters to skip
-     * @return The actual number of characters skipped
-     */
-    @Override
-    public long skip(final long n) {
-        if (n < 0) {
-            throw new IllegalArgumentException(
-                    "Number of characters to skip is less than zero: " + n);
-        }
-        if (idx >= charSequence.length()) {
-            return EOF;
-        }
-        final int dest = (int)Math.min(charSequence.length(), idx + n);
-        final int count = dest - idx;
-        idx = dest;
-        return count;
-    }
-
-    /**
-     * Return a String representation of the underlying
-     * character sequence.
-     *
-     * @return The contents of the character sequence
-     */
-    @Override
-    public String toString() {
-        return charSequence.toString();
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java
deleted file mode 100644
index b714d9f..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectStreamClass;
-import java.io.StreamCorruptedException;
-import java.lang.reflect.Proxy;
-
-/**
- * A special ObjectInputStream that loads a class based on a specified
- * <code>ClassLoader</code> rather than the system default.
- * <p>
- * This is useful in dynamic container environments.
- *
- * @version $Id$
- * @since 1.1
- */
-public class ClassLoaderObjectInputStream extends ObjectInputStream {
-
-    /** The class loader to use. */
-    private final ClassLoader classLoader;
-
-    /**
-     * Constructs a new ClassLoaderObjectInputStream.
-     *
-     * @param classLoader  the ClassLoader from which classes should be loaded
-     * @param inputStream  the InputStream to work on
-     * @throws IOException in case of an I/O error
-     * @throws StreamCorruptedException if the stream is corrupted
-     */
-    public ClassLoaderObjectInputStream(
-            final ClassLoader classLoader, final InputStream inputStream)
-            throws IOException, StreamCorruptedException {
-        super(inputStream);
-        this.classLoader = classLoader;
-    }
-
-    /**
-     * Resolve a class specified by the descriptor using the
-     * specified ClassLoader or the super ClassLoader.
-     *
-     * @param objectStreamClass  descriptor of the class
-     * @return the Class object described by the ObjectStreamClass
-     * @throws IOException in case of an I/O error
-     * @throws ClassNotFoundException if the Class cannot be found
-     */
-    @Override
-    protected Class<?> resolveClass(final ObjectStreamClass objectStreamClass)
-            throws IOException, ClassNotFoundException {
-
-        try {
-            return Class.forName(objectStreamClass.getName(), false, classLoader);
-        } catch (ClassNotFoundException cnfe) {
-            // delegate to super class loader which can resolve primitives
-            return super.resolveClass(objectStreamClass);
-        }
-    }
-
-    /**
-     * Create a proxy class that implements the specified interfaces using
-     * the specified ClassLoader or the super ClassLoader.
-     *
-     * @param interfaces the interfaces to implement
-     * @return a proxy class implementing the interfaces
-     * @throws IOException in case of an I/O error
-     * @throws ClassNotFoundException if the Class cannot be found
-     * @see java.io.ObjectInputStream#resolveProxyClass(java.lang.String[])
-     * @since 2.1
-     */
-    @Override
-    protected Class<?> resolveProxyClass(final String[] interfaces) throws IOException,
-            ClassNotFoundException {
-        final Class<?>[] interfaceClasses = new Class[interfaces.length];
-        for (int i = 0; i < interfaces.length; i++) {
-            interfaceClasses[i] = Class.forName(interfaces[i], false, classLoader);
-        }
-        try {
-            return Proxy.getProxyClass(classLoader, interfaceClasses);
-        } catch (final IllegalArgumentException e) {
-            return super.resolveProxyClass(interfaces);
-        }
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/CloseShieldInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/CloseShieldInputStream.java
deleted file mode 100644
index 89b36ac..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/CloseShieldInputStream.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.InputStream;
-
-/**
- * Proxy stream that prevents the underlying input stream from being closed.
- * <p>
- * This class is typically used in cases where an input stream needs to be
- * passed to a component that wants to explicitly close the stream even if
- * more input would still be available to other components.
- *
- * @version $Id$
- * @since 1.4
- */
-public class CloseShieldInputStream extends ProxyInputStream {
-
-    /**
-     * Creates a proxy that shields the given input stream from being
-     * closed.
-     *
-     * @param in underlying input stream
-     */
-    public CloseShieldInputStream(final InputStream in) {
-        super(in);
-    }
-
-    /**
-     * Replaces the underlying input stream with a {@link ClosedInputStream}
-     * sentinel. The original input stream will remain open, but this proxy
-     * will appear closed.
-     */
-    @Override
-    public void close() {
-        in = new ClosedInputStream();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/ClosedInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/ClosedInputStream.java
deleted file mode 100644
index ae9e22a..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/ClosedInputStream.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.InputStream;
-
-/**
- * Closed input stream. This stream returns EOF to all attempts to read
- * something from the stream.
- * <p>
- * Typically uses of this class include testing for corner cases in methods
- * that accept input streams and acting as a sentinel value instead of a
- * {@code null} input stream.
- *
- * @version $Id$
- * @since 1.4
- */
-public class ClosedInputStream extends InputStream {
-
-    /**
-     * A singleton.
-     */
-    public static final ClosedInputStream CLOSED_INPUT_STREAM = new ClosedInputStream();
-
-    /**
-     * Returns -1 to indicate that the stream is closed.
-     *
-     * @return always -1
-     */
-    @Override
-    public int read() {
-        return EOF;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/CountingInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/CountingInputStream.java
deleted file mode 100644
index aa564f3..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/CountingInputStream.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * A decorating input stream that counts the number of bytes that have passed
- * through the stream so far.
- * <p>
- * A typical use case would be during debugging, to ensure that data is being
- * read as expected.
- *
- * @version $Id$
- */
-public class CountingInputStream extends ProxyInputStream {
-
-    /** The count of bytes that have passed. */
-    private long count;
-
-    /**
-     * Constructs a new CountingInputStream.
-     *
-     * @param in  the InputStream to delegate to
-     */
-    public CountingInputStream(final InputStream in) {
-        super(in);
-    }
-
-    //-----------------------------------------------------------------------
-
-    /**
-     * Skips the stream over the specified number of bytes, adding the skipped
-     * amount to the count.
-     *
-     * @param length  the number of bytes to skip
-     * @return the actual number of bytes skipped
-     * @throws IOException if an I/O error occurs
-     * @see java.io.InputStream#skip(long)
-     */
-    @Override
-    public synchronized long skip(final long length) throws IOException {
-        final long skip = super.skip(length);
-        this.count += skip;
-        return skip;
-    }
-
-    /**
-     * Adds the number of read bytes to the count.
-     *
-     * @param n number of bytes read, or -1 if no more bytes are available
-     * @since 2.0
-     */
-    @Override
-    protected synchronized void afterRead(final int n) {
-        if (n != EOF) {
-            this.count += n;
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * The number of bytes that have passed through this stream.
-     * <p>
-     * NOTE: From v1.3 this method throws an ArithmeticException if the
-     * count is greater than can be expressed by an <code>int</code>.
-     * See {@link #getByteCount()} for a method using a <code>long</code>.
-     *
-     * @return the number of bytes accumulated
-     * @throws ArithmeticException if the byte count is too large
-     */
-    public int getCount() {
-        final long result = getByteCount();
-        if (result > Integer.MAX_VALUE) {
-            throw new ArithmeticException("The byte count " + result + " is too large to be converted to an int");
-        }
-        return (int) result;
-    }
-
-    /** 
-     * Set the byte count back to 0. 
-     * <p>
-     * NOTE: From v1.3 this method throws an ArithmeticException if the
-     * count is greater than can be expressed by an <code>int</code>.
-     * See {@link #resetByteCount()} for a method using a <code>long</code>.
-     *
-     * @return the count previous to resetting
-     * @throws ArithmeticException if the byte count is too large
-     */
-    public int resetCount() {
-        final long result = resetByteCount();
-        if (result > Integer.MAX_VALUE) {
-            throw new ArithmeticException("The byte count " + result + " is too large to be converted to an int");
-        }
-        return (int) result;
-    }
-
-    /**
-     * The number of bytes that have passed through this stream.
-     * <p>
-     * NOTE: This method is an alternative for <code>getCount()</code>
-     * and was added because that method returns an integer which will
-     * result in incorrect count for files over 2GB.
-     *
-     * @return the number of bytes accumulated
-     * @since 1.3
-     */
-    public synchronized long getByteCount() {
-        return this.count;
-    }
-
-    /** 
-     * Set the byte count back to 0. 
-     * <p>
-     * NOTE: This method is an alternative for <code>resetCount()</code>
-     * and was added because that method returns an integer which will
-     * result in incorrect count for files over 2GB.
-     *
-     * @return the count previous to resetting
-     * @since 1.3
-     */
-    public synchronized long resetByteCount() {
-        final long tmp = this.count;
-        this.count = 0;
-        return tmp;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/DemuxInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/DemuxInputStream.java
deleted file mode 100644
index fa9cbce..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/DemuxInputStream.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Data written to this stream is forwarded to a stream that has been associated
- * with this thread.
- *
- * @version $Id$
- */
-public class DemuxInputStream
-    extends InputStream
-{
-    private final InheritableThreadLocal<InputStream> m_streams = new InheritableThreadLocal<InputStream>();
-
-    /**
-     * Bind the specified stream to the current thread.
-     *
-     * @param input the stream to bind
-     * @return the InputStream that was previously active
-     */
-    public InputStream bindStream( final InputStream input )
-    {
-        final InputStream oldValue = m_streams.get();
-        m_streams.set( input );
-        return oldValue;
-    }
-
-    /**
-     * Closes stream associated with current thread.
-     *
-     * @throws IOException if an error occurs
-     */
-    @Override
-    public void close()
-        throws IOException
-    {
-        final InputStream input = m_streams.get();
-        if( null != input )
-        {
-            input.close();
-        }
-    }
-
-    /**
-     * Read byte from stream associated with current thread.
-     *
-     * @return the byte read from stream
-     * @throws IOException if an error occurs
-     */
-    @Override
-    public int read()
-        throws IOException
-    {
-        final InputStream input = m_streams.get();
-        if( null != input )
-        {
-            return input.read();
-        }
-        else
-        {
-            return EOF;
-        }
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/NullInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/NullInputStream.java
deleted file mode 100644
index e383fbf..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/NullInputStream.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * A functional, light weight {@link InputStream} that emulates
- * a stream of a specified size.
- * <p>
- * This implementation provides a light weight
- * object for testing with an {@link InputStream}
- * where the contents don't matter.
- * <p>
- * One use case would be for testing the handling of
- * large {@link InputStream} as it can emulate that
- * scenario without the overhead of actually processing
- * large numbers of bytes - significantly speeding up
- * test execution times.
- * <p>
- * This implementation returns zero from the method that
- * reads a byte and leaves the array unchanged in the read
- * methods that are passed a byte array.
- * If alternative data is required the <code>processByte()</code> and
- * <code>processBytes()</code> methods can be implemented to generate
- * data, for example:
- *
- * <pre>
- *  public class TestInputStream extends NullInputStream {
- *      public TestInputStream(int size) {
- *          super(size);
- *      }
- *      protected int processByte() {
- *          return ... // return required value here
- *      }
- *      protected void processBytes(byte[] bytes, int offset, int length) {
- *          for (int i = offset; i &lt; length; i++) {
- *              bytes[i] = ... // set array value here
- *          }
- *      }
- *  }
- * </pre>
- *
- * @since 1.3
- * @version $Id$
- */
-public class NullInputStream extends InputStream {
-
-    private final long size;
-    private long position;
-    private long mark = -1;
-    private long readlimit;
-    private boolean eof;
-    private final boolean throwEofException;
-    private final boolean markSupported;
-
-    /**
-     * Create an {@link InputStream} that emulates a specified size
-     * which supports marking and does not throw EOFException.
-     *
-     * @param size The size of the input stream to emulate.
-     */
-    public NullInputStream(final long size) {
-       this(size, true, false);
-    }
-
-    /**
-     * Create an {@link InputStream} that emulates a specified
-     * size with option settings.
-     *
-     * @param size The size of the input stream to emulate.
-     * @param markSupported Whether this instance will support
-     * the <code>mark()</code> functionality.
-     * @param throwEofException Whether this implementation
-     * will throw an {@link EOFException} or return -1 when the
-     * end of file is reached.
-     */
-    public NullInputStream(final long size, final boolean markSupported, final boolean throwEofException) {
-       this.size = size;
-       this.markSupported = markSupported;
-       this.throwEofException = throwEofException;
-    }
-
-    /**
-     * Return the current position.
-     *
-     * @return the current position.
-     */
-    public long getPosition() {
-        return position;
-    }
-
-    /**
-     * Return the size this {@link InputStream} emulates.
-     *
-     * @return The size of the input stream to emulate.
-     */
-    public long getSize() {
-        return size;
-    }
-
-    /**
-     * Return the number of bytes that can be read.
-     *
-     * @return The number of bytes that can be read.
-     */
-    @Override
-    public int available() {
-        final long avail = size - position;
-        if (avail <= 0) {
-            return 0;
-        } else if (avail > Integer.MAX_VALUE) {
-            return Integer.MAX_VALUE;
-        } else {
-            return (int)avail;
-        }
-    }
-
-    /**
-     * Close this input stream - resets the internal state to
-     * the initial values.
-     *
-     * @throws IOException If an error occurs.
-     */
-    @Override
-    public void close() throws IOException {
-        eof = false;
-        position = 0;
-        mark = -1;
-    }
-
-    /**
-     * Mark the current position.
-     *
-     * @param readlimit The number of bytes before this marked position
-     * is invalid.
-     * @throws UnsupportedOperationException if mark is not supported.
-     */
-    @Override
-    public synchronized void mark(final int readlimit) {
-        if (!markSupported) {
-            throw new UnsupportedOperationException("Mark not supported");
-        }
-        mark = position;
-        this.readlimit = readlimit;
-    }
-
-    /**
-     * Indicates whether <i>mark</i> is supported.
-     *
-     * @return Whether <i>mark</i> is supported or not.
-     */
-    @Override
-    public boolean markSupported() {
-        return markSupported;
-    }
-
-    /**
-     * Read a byte.
-     *
-     * @return Either The byte value returned by <code>processByte()</code>
-     * or <code>-1</code> if the end of file has been reached and
-     * <code>throwEofException</code> is set to {@code false}.
-     * @throws EOFException if the end of file is reached and
-     * <code>throwEofException</code> is set to {@code true}.
-     * @throws IOException if trying to read past the end of file.
-     */
-    @Override
-    public int read() throws IOException {
-        if (eof) {
-            throw new IOException("Read after end of file");
-        }
-        if (position == size) {
-            return doEndOfFile();
-        }
-        position++;
-        return processByte();
-    }
-
-    /**
-     * Read some bytes into the specified array.
-     *
-     * @param bytes The byte array to read into
-     * @return The number of bytes read or <code>-1</code>
-     * if the end of file has been reached and
-     * <code>throwEofException</code> is set to {@code false}.
-     * @throws EOFException if the end of file is reached and
-     * <code>throwEofException</code> is set to {@code true}.
-     * @throws IOException if trying to read past the end of file.
-     */
-    @Override
-    public int read(final byte[] bytes) throws IOException {
-        return read(bytes, 0, bytes.length);
-    }
-
-    /**
-     * Read the specified number bytes into an array.
-     *
-     * @param bytes The byte array to read into.
-     * @param offset The offset to start reading bytes into.
-     * @param length The number of bytes to read.
-     * @return The number of bytes read or <code>-1</code>
-     * if the end of file has been reached and
-     * <code>throwEofException</code> is set to {@code false}.
-     * @throws EOFException if the end of file is reached and
-     * <code>throwEofException</code> is set to {@code true}.
-     * @throws IOException if trying to read past the end of file.
-     */
-    @Override
-    public int read(final byte[] bytes, final int offset, final int length) throws IOException {
-        if (eof) {
-            throw new IOException("Read after end of file");
-        }
-        if (position == size) {
-            return doEndOfFile();
-        }
-        position += length;
-        int returnLength = length;
-        if (position > size) {
-            returnLength = length - (int)(position - size);
-            position = size;
-        }
-        processBytes(bytes, offset, returnLength);
-        return returnLength;
-    }
-
-    /**
-     * Reset the stream to the point when mark was last called.
-     *
-     * @throws UnsupportedOperationException if mark is not supported.
-     * @throws IOException If no position has been marked
-     * or the read limit has been exceed since the last position was
-     * marked.
-     */
-    @Override
-    public synchronized void reset() throws IOException {
-        if (!markSupported) {
-            throw new UnsupportedOperationException("Mark not supported");
-        }
-        if (mark < 0) {
-            throw new IOException("No position has been marked");
-        }
-        if (position > mark + readlimit) {
-            throw new IOException("Marked position [" + mark +
-                    "] is no longer valid - passed the read limit [" +
-                    readlimit + "]");
-        }
-        position = mark;
-        eof = false;
-    }
-
-    /**
-     * Skip a specified number of bytes.
-     *
-     * @param numberOfBytes The number of bytes to skip.
-     * @return The number of bytes skipped or <code>-1</code>
-     * if the end of file has been reached and
-     * <code>throwEofException</code> is set to {@code false}.
-     * @throws EOFException if the end of file is reached and
-     * <code>throwEofException</code> is set to {@code true}.
-     * @throws IOException if trying to read past the end of file.
-     */
-    @Override
-    public long skip(final long numberOfBytes) throws IOException {
-        if (eof) {
-            throw new IOException("Skip after end of file");
-        }
-        if (position == size) {
-            return doEndOfFile();
-        }
-        position += numberOfBytes;
-        long returnLength = numberOfBytes;
-        if (position > size) {
-            returnLength = numberOfBytes - (position - size);
-            position = size;
-        }
-        return returnLength;
-    }
-
-    /**
-     * Return a byte value for the  <code>read()</code> method.
-     * <p>
-     * This implementation returns zero.
-     *
-     * @return This implementation always returns zero.
-     */
-    protected int processByte() {
-        // do nothing - overridable by subclass
-        return 0;
-    }
-
-    /**
-     * Process the bytes for the <code>read(byte[], offset, length)</code>
-     * method.
-     * <p>
-     * This implementation leaves the byte array unchanged.
-     *
-     * @param bytes The byte array
-     * @param offset The offset to start at.
-     * @param length The number of bytes.
-     */
-    protected void processBytes(final byte[] bytes, final int offset, final int length) {
-        // do nothing - overridable by subclass
-    }
-
-    /**
-     * Handle End of File.
-     *
-     * @return <code>-1</code> if <code>throwEofException</code> is
-     * set to {@code false}
-     * @throws EOFException if <code>throwEofException</code> is set
-     * to {@code true}.
-     */
-    private int doEndOfFile() throws EOFException {
-        eof = true;
-        if (throwEofException) {
-            throw new EOFException();
-        }
-        return EOF;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/NullReader.java b/trunk/src/main/java/org/apache/commons/io/input/NullReader.java
deleted file mode 100644
index e86da34..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/NullReader.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.Reader;
-
-/**
- * A functional, light weight {@link Reader} that emulates
- * a reader of a specified size.
- * <p>
- * This implementation provides a light weight
- * object for testing with an {@link Reader}
- * where the contents don't matter.
- * <p>
- * One use case would be for testing the handling of
- * large {@link Reader} as it can emulate that
- * scenario without the overhead of actually processing
- * large numbers of characters - significantly speeding up
- * test execution times.
- * <p>
- * This implementation returns a space from the method that
- * reads a character and leaves the array unchanged in the read
- * methods that are passed a character array.
- * If alternative data is required the <code>processChar()</code> and
- * <code>processChars()</code> methods can be implemented to generate
- * data, for example:
- *
- * <pre>
- *  public class TestReader extends NullReader {
- *      public TestReader(int size) {
- *          super(size);
- *      }
- *      protected char processChar() {
- *          return ... // return required value here
- *      }
- *      protected void processChars(char[] chars, int offset, int length) {
- *          for (int i = offset; i &lt; length; i++) {
- *              chars[i] = ... // set array value here
- *          }
- *      }
- *  }
- * </pre>
- *
- * @since 1.3
- * @version $Id$
- */
-public class NullReader extends Reader {
-
-    private final long size;
-    private long position;
-    private long mark = -1;
-    private long readlimit;
-    private boolean eof;
-    private final boolean throwEofException;
-    private final boolean markSupported;
-
-    /**
-     * Create a {@link Reader} that emulates a specified size
-     * which supports marking and does not throw EOFException.
-     *
-     * @param size The size of the reader to emulate.
-     */
-    public NullReader(final long size) {
-       this(size, true, false);
-    }
-
-    /**
-     * Create a {@link Reader} that emulates a specified
-     * size with option settings.
-     *
-     * @param size The size of the reader to emulate.
-     * @param markSupported Whether this instance will support
-     * the <code>mark()</code> functionality.
-     * @param throwEofException Whether this implementation
-     * will throw an {@link EOFException} or return -1 when the
-     * end of file is reached.
-     */
-    public NullReader(final long size, final boolean markSupported, final boolean throwEofException) {
-       this.size = size;
-       this.markSupported = markSupported;
-       this.throwEofException = throwEofException;
-    }
-
-    /**
-     * Return the current position.
-     *
-     * @return the current position.
-     */
-    public long getPosition() {
-        return position;
-    }
-
-    /**
-     * Return the size this {@link Reader} emulates.
-     *
-     * @return The size of the reader to emulate.
-     */
-    public long getSize() {
-        return size;
-    }
-
-    /**
-     * Close this Reader - resets the internal state to
-     * the initial values.
-     *
-     * @throws IOException If an error occurs.
-     */
-    @Override
-    public void close() throws IOException {
-        eof = false;
-        position = 0;
-        mark = -1;
-    }
-
-    /**
-     * Mark the current position.
-     *
-     * @param readlimit The number of characters before this marked position
-     * is invalid.
-     * @throws UnsupportedOperationException if mark is not supported.
-     */
-    @Override
-    public synchronized void mark(final int readlimit) {
-        if (!markSupported) {
-            throw new UnsupportedOperationException("Mark not supported");
-        }
-        mark = position;
-        this.readlimit = readlimit;
-    }
-
-    /**
-     * Indicates whether <i>mark</i> is supported.
-     *
-     * @return Whether <i>mark</i> is supported or not.
-     */
-    @Override
-    public boolean markSupported() {
-        return markSupported;
-    }
-
-    /**
-     * Read a character.
-     *
-     * @return Either The character value returned by <code>processChar()</code>
-     * or <code>-1</code> if the end of file has been reached and
-     * <code>throwEofException</code> is set to {@code false}.
-     * @throws EOFException if the end of file is reached and
-     * <code>throwEofException</code> is set to {@code true}.
-     * @throws IOException if trying to read past the end of file.
-     */
-    @Override
-    public int read() throws IOException {
-        if (eof) {
-            throw new IOException("Read after end of file");
-        }
-        if (position == size) {
-            return doEndOfFile();
-        }
-        position++;
-        return processChar();
-    }
-
-    /**
-     * Read some characters into the specified array.
-     *
-     * @param chars The character array to read into
-     * @return The number of characters read or <code>-1</code>
-     * if the end of file has been reached and
-     * <code>throwEofException</code> is set to {@code false}.
-     * @throws EOFException if the end of file is reached and
-     * <code>throwEofException</code> is set to {@code true}.
-     * @throws IOException if trying to read past the end of file.
-     */
-    @Override
-    public int read(final char[] chars) throws IOException {
-        return read(chars, 0, chars.length);
-    }
-
-    /**
-     * Read the specified number characters into an array.
-     *
-     * @param chars The character array to read into.
-     * @param offset The offset to start reading characters into.
-     * @param length The number of characters to read.
-     * @return The number of characters read or <code>-1</code>
-     * if the end of file has been reached and
-     * <code>throwEofException</code> is set to {@code false}.
-     * @throws EOFException if the end of file is reached and
-     * <code>throwEofException</code> is set to {@code true}.
-     * @throws IOException if trying to read past the end of file.
-     */
-    @Override
-    public int read(final char[] chars, final int offset, final int length) throws IOException {
-        if (eof) {
-            throw new IOException("Read after end of file");
-        }
-        if (position == size) {
-            return doEndOfFile();
-        }
-        position += length;
-        int returnLength = length;
-        if (position > size) {
-            returnLength = length - (int)(position - size);
-            position = size;
-        }
-        processChars(chars, offset, returnLength);
-        return returnLength;
-    }
-
-    /**
-     * Reset the stream to the point when mark was last called.
-     *
-     * @throws UnsupportedOperationException if mark is not supported.
-     * @throws IOException If no position has been marked
-     * or the read limit has been exceed since the last position was
-     * marked.
-     */
-    @Override
-    public synchronized void reset() throws IOException {
-        if (!markSupported) {
-            throw new UnsupportedOperationException("Mark not supported");
-        }
-        if (mark < 0) {
-            throw new IOException("No position has been marked");
-        }
-        if (position > mark + readlimit) {
-            throw new IOException("Marked position [" + mark +
-                    "] is no longer valid - passed the read limit [" +
-                    readlimit + "]");
-        }
-        position = mark;
-        eof = false;
-    }
-
-    /**
-     * Skip a specified number of characters.
-     *
-     * @param numberOfChars The number of characters to skip.
-     * @return The number of characters skipped or <code>-1</code>
-     * if the end of file has been reached and
-     * <code>throwEofException</code> is set to {@code false}.
-     * @throws EOFException if the end of file is reached and
-     * <code>throwEofException</code> is set to {@code true}.
-     * @throws IOException if trying to read past the end of file.
-     */
-    @Override
-    public long skip(final long numberOfChars) throws IOException {
-        if (eof) {
-            throw new IOException("Skip after end of file");
-        }
-        if (position == size) {
-            return doEndOfFile();
-        }
-        position += numberOfChars;
-        long returnLength = numberOfChars;
-        if (position > size) {
-            returnLength = numberOfChars - (position - size);
-            position = size;
-        }
-        return returnLength;
-    }
-
-    /**
-     * Return a character value for the  <code>read()</code> method.
-     * <p>
-     * This implementation returns zero.
-     *
-     * @return This implementation always returns zero.
-     */
-    protected int processChar() {
-        // do nothing - overridable by subclass
-        return 0;
-    }
-
-    /**
-     * Process the characters for the <code>read(char[], offset, length)</code>
-     * method.
-     * <p>
-     * This implementation leaves the character array unchanged.
-     *
-     * @param chars The character array
-     * @param offset The offset to start at.
-     * @param length The number of characters.
-     */
-    protected void processChars(final char[] chars, final int offset, final int length) {
-        // do nothing - overridable by subclass
-    }
-
-    /**
-     * Handle End of File.
-     *
-     * @return <code>-1</code> if <code>throwEofException</code> is
-     * set to {@code false}
-     * @throws EOFException if <code>throwEofException</code> is set
-     * to {@code true}.
-     */
-    private int doEndOfFile() throws EOFException {
-        eof = true;
-        if (throwEofException) {
-            throw new EOFException();
-        }
-        return EOF;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/ProxyInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
deleted file mode 100644
index a5e7459..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * A Proxy stream which acts as expected, that is it passes the method
- * calls on to the proxied stream and doesn't change which methods are
- * being called.
- * <p>
- * It is an alternative base class to FilterInputStream
- * to increase reusability, because FilterInputStream changes the
- * methods being called, such as read(byte[]) to read(byte[], int, int).
- * <p>
- * See the protected methods for ways in which a subclass can easily decorate
- * a stream with custom pre-, post- or error processing functionality.
- *
- * @version $Id$
- */
-public abstract class ProxyInputStream extends FilterInputStream {
-
-    /**
-     * Constructs a new ProxyInputStream.
-     *
-     * @param proxy  the InputStream to delegate to
-     */
-    public ProxyInputStream(final InputStream proxy) {
-        super(proxy);
-        // the proxy is stored in a protected superclass variable named 'in'
-    }
-
-    /**
-     * Invokes the delegate's <code>read()</code> method.
-     * @return the byte read or -1 if the end of stream
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read() throws IOException {
-        try {
-            beforeRead(1);
-            final int b = in.read();
-            afterRead(b != EOF ? 1 : EOF);
-            return b;
-        } catch (final IOException e) {
-            handleIOException(e);
-            return EOF;
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>read(byte[])</code> method.
-     * @param bts the buffer to read the bytes into
-     * @return the number of bytes read or EOF if the end of stream
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read(final byte[] bts) throws IOException {
-        try {
-            beforeRead(bts != null ? bts.length : 0);
-            final int n = in.read(bts);
-            afterRead(n);
-            return n;
-        } catch (final IOException e) {
-            handleIOException(e);
-            return EOF;
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>read(byte[], int, int)</code> method.
-     * @param bts the buffer to read the bytes into
-     * @param off The start offset
-     * @param len The number of bytes to read
-     * @return the number of bytes read or -1 if the end of stream
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read(final byte[] bts, final int off, final int len) throws IOException {
-        try {
-            beforeRead(len);
-            final int n = in.read(bts, off, len);
-            afterRead(n);
-            return n;
-        } catch (final IOException e) {
-            handleIOException(e);
-            return EOF;
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>skip(long)</code> method.
-     * @param ln the number of bytes to skip
-     * @return the actual number of bytes skipped
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public long skip(final long ln) throws IOException {
-        try {
-            return in.skip(ln);
-        } catch (final IOException e) {
-            handleIOException(e);
-            return 0;
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>available()</code> method.
-     * @return the number of available bytes
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int available() throws IOException {
-        try {
-            return super.available();
-        } catch (final IOException e) {
-            handleIOException(e);
-            return 0;
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>close()</code> method.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void close() throws IOException {
-        try {
-            in.close();
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>mark(int)</code> method.
-     * @param readlimit read ahead limit
-     */
-    @Override
-    public synchronized void mark(final int readlimit) {
-        in.mark(readlimit);
-    }
-
-    /**
-     * Invokes the delegate's <code>reset()</code> method.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public synchronized void reset() throws IOException {
-        try {
-            in.reset();
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>markSupported()</code> method.
-     * @return true if mark is supported, otherwise false
-     */
-    @Override
-    public boolean markSupported() {
-        return in.markSupported();
-    }
-
-    /**
-     * Invoked by the read methods before the call is proxied. The number
-     * of bytes that the caller wanted to read (1 for the {@link #read()}
-     * method, buffer length for {@link #read(byte[])}, etc.) is given as
-     * an argument.
-     * <p>
-     * Subclasses can override this method to add common pre-processing
-     * functionality without having to override all the read methods.
-     * The default implementation does nothing.
-     * <p>
-     * Note this method is <em>not</em> called from {@link #skip(long)} or
-     * {@link #reset()}. You need to explicitly override those methods if
-     * you want to add pre-processing steps also to them.
-     *
-     * @since 2.0
-     * @param n number of bytes that the caller asked to be read
-     * @throws IOException if the pre-processing fails
-     */
-    protected void beforeRead(final int n) throws IOException {
-        // no-op
-    }
-
-    /**
-     * Invoked by the read methods after the proxied call has returned
-     * successfully. The number of bytes returned to the caller (or -1 if
-     * the end of stream was reached) is given as an argument.
-     * <p>
-     * Subclasses can override this method to add common post-processing
-     * functionality without having to override all the read methods.
-     * The default implementation does nothing.
-     * <p>
-     * Note this method is <em>not</em> called from {@link #skip(long)} or
-     * {@link #reset()}. You need to explicitly override those methods if
-     * you want to add post-processing steps also to them.
-     *
-     * @since 2.0
-     * @param n number of bytes read, or -1 if the end of stream was reached
-     * @throws IOException if the post-processing fails
-     */
-    protected void afterRead(final int n) throws IOException {
-        // no-op
-    }
-
-    /**
-     * Handle any IOExceptions thrown.
-     * <p>
-     * This method provides a point to implement custom exception
-     * handling. The default behaviour is to re-throw the exception.
-     * @param e The IOException thrown
-     * @throws IOException if an I/O error occurs
-     * @since 2.0
-     */
-    protected void handleIOException(final IOException e) throws IOException {
-        throw e;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/ProxyReader.java b/trunk/src/main/java/org/apache/commons/io/input/ProxyReader.java
deleted file mode 100644
index 0a221b0..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/ProxyReader.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.FilterReader;
-import java.io.IOException;
-import java.io.Reader;
-import java.nio.CharBuffer;
-
-/**
- * A Proxy stream which acts as expected, that is it passes the method 
- * calls on to the proxied stream and doesn't change which methods are 
- * being called. 
- * <p>
- * It is an alternative base class to FilterReader
- * to increase reusability, because FilterReader changes the 
- * methods being called, such as read(char[]) to read(char[], int, int).
- * 
- * @version $Id$
- */
-public abstract class ProxyReader extends FilterReader {
-
-    /**
-     * Constructs a new ProxyReader.
-     * 
-     * @param proxy  the Reader to delegate to
-     */
-    public ProxyReader(final Reader proxy) {
-        super(proxy);
-        // the proxy is stored in a protected superclass variable named 'in'
-    }
-
-    /**
-     * Invokes the delegate's <code>read()</code> method.
-     * @return the character read or -1 if the end of stream
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read() throws IOException {
-        try {
-            beforeRead(1);
-            final int c = in.read();
-            afterRead(c != EOF ? 1 : EOF);
-            return c;
-        } catch (final IOException e) {
-            handleIOException(e);
-            return EOF;
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>read(char[])</code> method.
-     * @param chr the buffer to read the characters into
-     * @return the number of characters read or -1 if the end of stream
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read(final char[] chr) throws IOException {
-        try {
-            beforeRead(chr != null ? chr.length : 0);
-            final int n = in.read(chr);
-            afterRead(n);
-            return n;
-        } catch (final IOException e) {
-            handleIOException(e);
-            return EOF;
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>read(char[], int, int)</code> method.
-     * @param chr the buffer to read the characters into
-     * @param st The start offset
-     * @param len The number of bytes to read
-     * @return the number of characters read or -1 if the end of stream
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read(final char[] chr, final int st, final int len) throws IOException {
-        try {
-            beforeRead(len);
-            final int n = in.read(chr, st, len);
-            afterRead(n);
-            return n;
-        } catch (final IOException e) {
-            handleIOException(e);
-            return EOF;
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>read(CharBuffer)</code> method.
-     * @param target the char buffer to read the characters into
-     * @return the number of characters read or -1 if the end of stream
-     * @throws IOException if an I/O error occurs
-     * @since 2.0
-     */
-    @Override
-    public int read(final CharBuffer target) throws IOException {
-        try {
-            beforeRead(target != null ? target.length() : 0);
-            final int n = in.read(target);
-            afterRead(n);
-            return n;
-        } catch (final IOException e) {
-            handleIOException(e);
-            return EOF;
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>skip(long)</code> method.
-     * @param ln the number of bytes to skip
-     * @return the number of bytes to skipped or EOF if the end of stream
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public long skip(final long ln) throws IOException {
-        try {
-            return in.skip(ln);
-        } catch (final IOException e) {
-            handleIOException(e);
-            return 0;
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>ready()</code> method.
-     * @return true if the stream is ready to be read
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public boolean ready() throws IOException {
-        try {
-            return in.ready();
-        } catch (final IOException e) {
-            handleIOException(e);
-            return false;
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>close()</code> method.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void close() throws IOException {
-        try {
-            in.close();
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>mark(int)</code> method.
-     * @param idx read ahead limit
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public synchronized void mark(final int idx) throws IOException {
-        try {
-            in.mark(idx);
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>reset()</code> method.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public synchronized void reset() throws IOException {
-        try {
-            in.reset();
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>markSupported()</code> method.
-     * @return true if mark is supported, otherwise false
-     */
-    @Override
-    public boolean markSupported() {
-        return in.markSupported();
-    }
-
-    /**
-     * Invoked by the read methods before the call is proxied. The number
-     * of chars that the caller wanted to read (1 for the {@link #read()}
-     * method, buffer length for {@link #read(char[])}, etc.) is given as
-     * an argument.
-     * <p>
-     * Subclasses can override this method to add common pre-processing
-     * functionality without having to override all the read methods.
-     * The default implementation does nothing.
-     * <p>
-     * Note this method is <em>not</em> called from {@link #skip(long)} or
-     * {@link #reset()}. You need to explicitly override those methods if
-     * you want to add pre-processing steps also to them.
-     *
-     * @since 2.0
-     * @param n number of chars that the caller asked to be read
-     * @throws IOException if the pre-processing fails
-     */
-    protected void beforeRead(final int n) throws IOException {
-    }
-
-    /**
-     * Invoked by the read methods after the proxied call has returned
-     * successfully. The number of chars returned to the caller (or -1 if
-     * the end of stream was reached) is given as an argument.
-     * <p>
-     * Subclasses can override this method to add common post-processing
-     * functionality without having to override all the read methods.
-     * The default implementation does nothing.
-     * <p>
-     * Note this method is <em>not</em> called from {@link #skip(long)} or
-     * {@link #reset()}. You need to explicitly override those methods if
-     * you want to add post-processing steps also to them.
-     *
-     * @since 2.0
-     * @param n number of chars read, or -1 if the end of stream was reached
-     * @throws IOException if the post-processing fails
-     */
-    protected void afterRead(final int n) throws IOException {
-    }
-
-    /**
-     * Handle any IOExceptions thrown.
-     * <p>
-     * This method provides a point to implement custom exception
-     * handling. The default behaviour is to re-throw the exception.
-     * @param e The IOException thrown
-     * @throws IOException if an I/O error occurs
-     * @since 2.0
-     */
-    protected void handleIOException(final IOException e) throws IOException {
-        throw e;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/ReaderInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/ReaderInputStream.java
deleted file mode 100644
index b8e151f..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/ReaderInputStream.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
-import java.nio.charset.CoderResult;
-import java.nio.charset.CodingErrorAction;
-
-/**
- * {@link InputStream} implementation that reads a character stream from a {@link Reader}
- * and transforms it to a byte stream using a specified charset encoding. The stream
- * is transformed using a {@link CharsetEncoder} object, guaranteeing that all charset
- * encodings supported by the JRE are handled correctly. In particular for charsets such as
- * UTF-16, the implementation ensures that one and only one byte order marker
- * is produced.
- * <p>
- * Since in general it is not possible to predict the number of characters to be read from the
- * {@link Reader} to satisfy a read request on the {@link ReaderInputStream}, all reads from
- * the {@link Reader} are buffered. There is therefore no well defined correlation
- * between the current position of the {@link Reader} and that of the {@link ReaderInputStream}.
- * This also implies that in general there is no need to wrap the underlying {@link Reader}
- * in a {@link java.io.BufferedReader}.
- * <p>
- * {@link ReaderInputStream} implements the inverse transformation of {@link java.io.InputStreamReader};
- * in the following example, reading from {@code in2} would return the same byte
- * sequence as reading from {@code in} (provided that the initial byte sequence is legal
- * with respect to the charset encoding):
- * <pre>
- * InputStream in = ...
- * Charset cs = ...
- * InputStreamReader reader = new InputStreamReader(in, cs);
- * ReaderInputStream in2 = new ReaderInputStream(reader, cs);</pre>
- * {@link ReaderInputStream} implements the same transformation as {@link java.io.OutputStreamWriter},
- * except that the control flow is reversed: both classes transform a character stream
- * into a byte stream, but {@link java.io.OutputStreamWriter} pushes data to the underlying stream,
- * while {@link ReaderInputStream} pulls it from the underlying stream.
- * <p>
- * Note that while there are use cases where there is no alternative to using
- * this class, very often the need to use this class is an indication of a flaw
- * in the design of the code. This class is typically used in situations where an existing
- * API only accepts an {@link InputStream}, but where the most natural way to produce the data
- * is as a character stream, i.e. by providing a {@link Reader} instance. An example of a situation
- * where this problem may appear is when implementing the {@link javax.activation.DataSource}
- * interface from the Java Activation Framework.
- * <p>
- * Given the fact that the {@link Reader} class doesn't provide any way to predict whether the next
- * read operation will block or not, it is not possible to provide a meaningful
- * implementation of the {@link InputStream#available()} method. A call to this method
- * will always return 0. Also, this class doesn't support {@link InputStream#mark(int)}.
- * <p>
- * Instances of {@link ReaderInputStream} are not thread safe.
- *
- * @see org.apache.commons.io.output.WriterOutputStream
- *
- * @since 2.0
- */
-public class ReaderInputStream extends InputStream {
-    private static final int DEFAULT_BUFFER_SIZE = 1024;
-
-    private final Reader reader;
-    private final CharsetEncoder encoder;
-
-    /**
-     * CharBuffer used as input for the decoder. It should be reasonably
-     * large as we read data from the underlying Reader into this buffer.
-     */
-    private final CharBuffer encoderIn;
-
-    /**
-     * ByteBuffer used as output for the decoder. This buffer can be small
-     * as it is only used to transfer data from the decoder to the
-     * buffer provided by the caller.
-     */
-    private final ByteBuffer encoderOut;
-
-    private CoderResult lastCoderResult;
-    private boolean endOfInput;
-
-    /**
-     * Construct a new {@link ReaderInputStream}.
-     *
-     * @param reader the target {@link Reader}
-     * @param encoder the charset encoder
-     * @since 2.1
-     */
-    public ReaderInputStream(final Reader reader, final CharsetEncoder encoder) {
-        this(reader, encoder, DEFAULT_BUFFER_SIZE);
-    }
-
-    /**
-     * Construct a new {@link ReaderInputStream}.
-     *
-     * @param reader the target {@link Reader}
-     * @param encoder the charset encoder
-     * @param bufferSize the size of the input buffer in number of characters
-     * @since 2.1
-     */
-    public ReaderInputStream(final Reader reader, final CharsetEncoder encoder, final int bufferSize) {
-        this.reader = reader;
-        this.encoder = encoder;
-        this.encoderIn = CharBuffer.allocate(bufferSize);
-        this.encoderIn.flip();
-        this.encoderOut = ByteBuffer.allocate(128);
-        this.encoderOut.flip();
-    }
-
-    /**
-     * Construct a new {@link ReaderInputStream}.
-     *
-     * @param reader the target {@link Reader}
-     * @param charset the charset encoding
-     * @param bufferSize the size of the input buffer in number of characters
-     */
-    public ReaderInputStream(final Reader reader, final Charset charset, final int bufferSize) {
-        this(reader,
-             charset.newEncoder()
-                    .onMalformedInput(CodingErrorAction.REPLACE)
-                    .onUnmappableCharacter(CodingErrorAction.REPLACE),
-             bufferSize);
-    }
-
-    /**
-     * Construct a new {@link ReaderInputStream} with a default input buffer size of
-     * 1024 characters.
-     *
-     * @param reader the target {@link Reader}
-     * @param charset the charset encoding
-     */
-    public ReaderInputStream(final Reader reader, final Charset charset) {
-        this(reader, charset, DEFAULT_BUFFER_SIZE);
-    }
-
-    /**
-     * Construct a new {@link ReaderInputStream}.
-     *
-     * @param reader the target {@link Reader}
-     * @param charsetName the name of the charset encoding
-     * @param bufferSize the size of the input buffer in number of characters
-     */
-    public ReaderInputStream(final Reader reader, final String charsetName, final int bufferSize) {
-        this(reader, Charset.forName(charsetName), bufferSize);
-    }
-
-    /**
-     * Construct a new {@link ReaderInputStream} with a default input buffer size of
-     * 1024 characters.
-     *
-     * @param reader the target {@link Reader}
-     * @param charsetName the name of the charset encoding
-     */
-    public ReaderInputStream(final Reader reader, final String charsetName) {
-        this(reader, charsetName, DEFAULT_BUFFER_SIZE);
-    }
-
-    /**
-     * Construct a new {@link ReaderInputStream} that uses the default character encoding
-     * with a default input buffer size of 1024 characters.
-     *
-     * @param reader the target {@link Reader}
-     * @deprecated 2.5 use {@link #ReaderInputStream(Reader, Charset)} instead
-     */
-    @Deprecated
-    public ReaderInputStream(final Reader reader) {
-        this(reader, Charset.defaultCharset());
-    }
-
-    /**
-     * Fills the internal char buffer from the reader.
-     *
-     * @throws IOException
-     *             If an I/O error occurs
-     */
-    private void fillBuffer() throws IOException {
-        if (!endOfInput && (lastCoderResult == null || lastCoderResult.isUnderflow())) {
-            encoderIn.compact();
-            final int position = encoderIn.position();
-            // We don't use Reader#read(CharBuffer) here because it is more efficient
-            // to write directly to the underlying char array (the default implementation
-            // copies data to a temporary char array).
-            final int c = reader.read(encoderIn.array(), position, encoderIn.remaining());
-            if (c == EOF) {
-                endOfInput = true;
-            } else {
-                encoderIn.position(position+c);
-            }
-            encoderIn.flip();
-        }
-        encoderOut.compact();
-        lastCoderResult = encoder.encode(encoderIn, encoderOut, endOfInput);
-        encoderOut.flip();
-    }
-
-    /**
-     * Read the specified number of bytes into an array.
-     *
-     * @param b the byte array to read into
-     * @param off the offset to start reading bytes into
-     * @param len the number of bytes to read
-     * @return the number of bytes read or <code>-1</code>
-     *         if the end of the stream has been reached
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read(final byte[] b, int off, int len) throws IOException {
-        if (b == null) {
-            throw new NullPointerException("Byte array must not be null");
-        }
-        if (len < 0 || off < 0 || (off + len) > b.length) {
-            throw new IndexOutOfBoundsException("Array Size=" + b.length +
-                    ", offset=" + off + ", length=" + len);
-        }
-        int read = 0;
-        if (len == 0) {
-            return 0; // Always return 0 if len == 0
-        }
-        while (len > 0) {
-            if (encoderOut.hasRemaining()) {
-                final int c = Math.min(encoderOut.remaining(), len);
-                encoderOut.get(b, off, c);
-                off += c;
-                len -= c;
-                read += c;
-            } else {
-                fillBuffer();
-                if (endOfInput && !encoderOut.hasRemaining()) {
-                    break;
-                }
-            }
-        }
-        return read == 0 && endOfInput ? EOF : read;
-    }
-
-    /**
-     * Read the specified number of bytes into an array.
-     *
-     * @param b the byte array to read into
-     * @return the number of bytes read or <code>-1</code>
-     *         if the end of the stream has been reached
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read(final byte[] b) throws IOException {
-        return read(b, 0, b.length);
-    }
-
-    /**
-     * Read a single byte.
-     *
-     * @return either the byte read or <code>-1</code> if the end of the stream
-     *         has been reached
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read() throws IOException {
-        for (;;) {
-            if (encoderOut.hasRemaining()) {
-                return encoderOut.get() & 0xFF;
-            }
-            fillBuffer();
-            if (endOfInput && !encoderOut.hasRemaining()) {
-                return EOF;
-            }
-        }
-    }
-
-    /**
-     * Close the stream. This method will cause the underlying {@link Reader}
-     * to be closed.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void close() throws IOException {
-        reader.close();
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java b/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java
deleted file mode 100644
index e12a47d..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.Closeable;
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.io.UnsupportedEncodingException;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
-
-import org.apache.commons.io.Charsets;
-
-/**
- * Reads lines in a file reversely (similar to a BufferedReader, but starting at
- * the last line). Useful for e.g. searching in log files.
- *
- * @since 2.2
- */
-public class ReversedLinesFileReader implements Closeable {
-
-    private final int blockSize;
-    private final Charset encoding;
-
-    private final RandomAccessFile randomAccessFile;
-
-    private final long totalByteLength;
-    private final long totalBlockCount;
-
-    private final byte[][] newLineSequences;
-    private final int avoidNewlineSplitBufferSize;
-    private final int byteDecrement;
-
-    private FilePart currentFilePart;
-
-    private boolean trailingNewlineOfFileSkipped = false;
-
-    /**
-     * Creates a ReversedLinesFileReader with default block size of 4KB and the
-     * platform's default encoding.
-     *
-     * @param file
-     *            the file to be read
-     * @throws IOException  if an I/O error occurs
-     * @deprecated 2.5 use {@link #ReversedLinesFileReader(File, Charset)} instead
-     */
-    @Deprecated
-    public ReversedLinesFileReader(final File file) throws IOException {
-        this(file, 4096, Charset.defaultCharset());
-    }
-
-    /**
-     * Creates a ReversedLinesFileReader with default block size of 4KB and the
-     * specified encoding.
-     *
-     * @param file
-     *            the file to be read
-     * @param charset the encoding to use
-     * @throws IOException  if an I/O error occurs
-     * @since 2.5
-     */
-    public ReversedLinesFileReader(final File file, final Charset charset) throws IOException {
-        this(file, 4096, charset);
-    }
-
-    /**
-     * Creates a ReversedLinesFileReader with the given block size and encoding.
-     *
-     * @param file
-     *            the file to be read
-     * @param blockSize
-     *            size of the internal buffer (for ideal performance this should
-     *            match with the block size of the underlying file system).
-     * @param encoding
-     *            the encoding of the file
-     * @throws IOException  if an I/O error occurs
-     * @since 2.3
-     */
-    @SuppressWarnings("deprecation") // unavoidable until Java 7
-    public ReversedLinesFileReader(final File file, final int blockSize, final Charset encoding) throws IOException {
-        this.blockSize = blockSize;
-        this.encoding = encoding;
-
-        randomAccessFile = new RandomAccessFile(file, "r");
-        totalByteLength = randomAccessFile.length();
-        int lastBlockLength = (int) (totalByteLength % blockSize);
-        if (lastBlockLength > 0) {
-            totalBlockCount = totalByteLength / blockSize + 1;
-        } else {
-            totalBlockCount = totalByteLength / blockSize;
-            if (totalByteLength > 0) {
-                lastBlockLength = blockSize;
-            }
-        }
-        currentFilePart = new FilePart(totalBlockCount, lastBlockLength, null);
-
-        // --- check & prepare encoding ---
-        final Charset charset = Charsets.toCharset(encoding);
-        final CharsetEncoder charsetEncoder = charset.newEncoder();
-        final float maxBytesPerChar = charsetEncoder.maxBytesPerChar();
-        if (maxBytesPerChar == 1f) {
-            // all one byte encodings are no problem
-            byteDecrement = 1;
-        } else if (charset == Charsets.UTF_8) {
-            // UTF-8 works fine out of the box, for multibyte sequences a second UTF-8 byte can never be a newline byte
-            // http://en.wikipedia.org/wiki/UTF-8
-            byteDecrement = 1;
-        } else if(charset == Charset.forName("Shift_JIS") || // Same as for UTF-8
-                                      // http://www.herongyang.com/Unicode/JIS-Shift-JIS-Encoding.html
-                charset == Charset.forName("windows-31j") || // Windows code page 932 (Japanese)
-                charset == Charset.forName("x-windows-949") || // Windows code page 949 (Korean)
-                charset == Charset.forName("gbk") || // Windows code page 936 (Simplified Chinese)
-                charset == Charset.forName("x-windows-950")) { // Windows code page 950 (Traditional Chinese)
-            byteDecrement = 1;
-        } else if (charset == Charsets.UTF_16BE || charset == Charsets.UTF_16LE) {
-            // UTF-16 new line sequences are not allowed as second tuple of four byte sequences,
-            // however byte order has to be specified
-            byteDecrement = 2;
-        } else if (charset == Charsets.UTF_16) {
-            throw new UnsupportedEncodingException("For UTF-16, you need to specify the byte order (use UTF-16BE or " +
-                    "UTF-16LE)");
-        } else {
-            throw new UnsupportedEncodingException("Encoding " + encoding + " is not supported yet (feel free to " +
-                    "submit a patch)");
-        }
-        // NOTE: The new line sequences are matched in the order given, so it is important that \r\n is BEFORE \n
-        newLineSequences = new byte[][] { "\r\n".getBytes(encoding), "\n".getBytes(encoding), "\r".getBytes(encoding) };
-
-        avoidNewlineSplitBufferSize = newLineSequences[0].length;
-    }
-
-    /**
-     * Creates a ReversedLinesFileReader with the given block size and encoding.
-     *
-     * @param file
-     *            the file to be read
-     * @param blockSize
-     *            size of the internal buffer (for ideal performance this should
-     *            match with the block size of the underlying file system).
-     * @param encoding
-     *            the encoding of the file
-     * @throws IOException  if an I/O error occurs
-     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link UnsupportedEncodingException} in
-     * version 2.2 if the encoding is not supported.
-     */
-    public ReversedLinesFileReader(final File file, final int blockSize, final String encoding) throws IOException {
-        this(file, blockSize, Charsets.toCharset(encoding));
-    }
-
-    /**
-     * Returns the lines of the file from bottom to top.
-     *
-     * @return the next line or null if the start of the file is reached
-     * @throws IOException  if an I/O error occurs
-     */
-    public String readLine() throws IOException {
-
-        String line = currentFilePart.readLine();
-        while (line == null) {
-            currentFilePart = currentFilePart.rollOver();
-            if (currentFilePart != null) {
-                line = currentFilePart.readLine();
-            } else {
-                // no more fileparts: we're done, leave line set to null
-                break;
-            }
-        }
-
-        // aligned behaviour with BufferedReader that doesn't return a last, empty line
-        if("".equals(line) && !trailingNewlineOfFileSkipped) {
-            trailingNewlineOfFileSkipped = true;
-            line = readLine();
-        }
-
-        return line;
-    }
-
-    /**
-     * Closes underlying resources.
-     *
-     * @throws IOException  if an I/O error occurs
-     */
-    public void close() throws IOException {
-        randomAccessFile.close();
-    }
-
-    private class FilePart {
-        private final long no;
-
-        private final byte[] data;
-
-        private byte[] leftOver;
-
-        private int currentLastBytePos;
-
-        /**
-         * ctor
-         * @param no the part number
-         * @param length its length
-         * @param leftOverOfLastFilePart remainder
-         * @throws IOException if there is a problem reading the file
-         */
-        private FilePart(final long no, final int length, final byte[] leftOverOfLastFilePart) throws IOException {
-            this.no = no;
-            final int dataLength = length + (leftOverOfLastFilePart != null ? leftOverOfLastFilePart.length : 0);
-            this.data = new byte[dataLength];
-            final long off = (no - 1) * blockSize;
-
-            // read data
-            if (no > 0 /* file not empty */) {
-                randomAccessFile.seek(off);
-                final int countRead = randomAccessFile.read(data, 0, length);
-                if (countRead != length) {
-                    throw new IllegalStateException("Count of requested bytes and actually read bytes don't match");
-                }
-            }
-            // copy left over part into data arr
-            if (leftOverOfLastFilePart != null) {
-                System.arraycopy(leftOverOfLastFilePart, 0, data, length, leftOverOfLastFilePart.length);
-            }
-            this.currentLastBytePos = data.length - 1;
-            this.leftOver = null;
-        }
-
-        /**
-         * Handles block rollover
-         * 
-         * @return the new FilePart or null
-         * @throws IOException if there was a problem reading the file
-         */
-        private FilePart rollOver() throws IOException {
-
-            if (currentLastBytePos > -1) {
-                throw new IllegalStateException("Current currentLastCharPos unexpectedly positive... "
-                        + "last readLine() should have returned something! currentLastCharPos=" + currentLastBytePos);
-            }
-
-            if (no > 1) {
-                return new FilePart(no - 1, blockSize, leftOver);
-            } else {
-                // NO 1 was the last FilePart, we're finished
-                if (leftOver != null) {
-                    throw new IllegalStateException("Unexpected leftover of the last block: leftOverOfThisFilePart="
-                            + new String(leftOver, encoding));
-                }
-                return null;
-            }
-        }
-
-        /**
-         * Reads a line.
-         * 
-         * @return the line or null
-         * @throws IOException if there is an error reading from the file
-         */
-        private String readLine() throws IOException {
-
-            String line = null;
-            int newLineMatchByteCount;
-
-            final boolean isLastFilePart = no == 1;
-
-            int i = currentLastBytePos;
-            while (i > -1) {
-
-                if (!isLastFilePart && i < avoidNewlineSplitBufferSize) {
-                    // avoidNewlineSplitBuffer: for all except the last file part we
-                    // take a few bytes to the next file part to avoid splitting of newlines
-                    createLeftOver();
-                    break; // skip last few bytes and leave it to the next file part
-                }
-
-                // --- check for newline ---
-                if ((newLineMatchByteCount = getNewLineMatchByteCount(data, i)) > 0 /* found newline */) {
-                    final int lineStart = i + 1;
-                    final int lineLengthBytes = currentLastBytePos - lineStart + 1;
-
-                    if (lineLengthBytes < 0) {
-                        throw new IllegalStateException("Unexpected negative line length="+lineLengthBytes);
-                    }
-                    final byte[] lineData = new byte[lineLengthBytes];
-                    System.arraycopy(data, lineStart, lineData, 0, lineLengthBytes);
-
-                    line = new String(lineData, encoding);
-
-                    currentLastBytePos = i - newLineMatchByteCount;
-                    break; // found line
-                }
-
-                // --- move cursor ---
-                i -= byteDecrement;
-
-                // --- end of file part handling ---
-                if (i < 0) {
-                    createLeftOver();
-                    break; // end of file part
-                }
-            }
-
-            // --- last file part handling ---
-            if (isLastFilePart && leftOver != null) {
-                // there will be no line break anymore, this is the first line of the file
-                line = new String(leftOver, encoding);
-                leftOver = null;
-            }
-
-            return line;
-        }
-
-        /**
-         * Creates the buffer containing any left over bytes.
-         */
-        private void createLeftOver() {
-            final int lineLengthBytes = currentLastBytePos + 1;
-            if (lineLengthBytes > 0) {
-                // create left over for next block
-                leftOver = new byte[lineLengthBytes];
-                System.arraycopy(data, 0, leftOver, 0, lineLengthBytes);
-            } else {
-                leftOver = null;
-            }
-            currentLastBytePos = -1;
-        }
-
-        /**
-         * Finds the new-line sequence and return its length.
-         * 
-         * @param data buffer to scan
-         * @param i start offset in buffer
-         * @return length of newline sequence or 0 if none found
-         */
-        private int getNewLineMatchByteCount(final byte[] data, final int i) {
-            for (final byte[] newLineSequence : newLineSequences) {
-                boolean match = true;
-                for (int j = newLineSequence.length - 1; j >= 0; j--) {
-                    final int k = i + j - (newLineSequence.length - 1);
-                    match &= k >= 0 && data[k] == newLineSequence[j];
-                }
-                if (match) {
-                    return newLineSequence.length;
-                }
-            }
-            return 0;
-        }
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/SwappedDataInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/SwappedDataInputStream.java
deleted file mode 100644
index bde5beb..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/SwappedDataInputStream.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.DataInput;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.commons.io.EndianUtils;
-
-/**
- * DataInput for systems relying on little endian data formats.
- * When read, values will be changed from little endian to big 
- * endian formats for internal usage. 
- * <p>
- * <b>Origin of code: </b>Avalon Excalibur (IO)
- *
- * @version CVS $Revision: 1302050 $
- */
-public class SwappedDataInputStream extends ProxyInputStream
-    implements DataInput
-{
-
-    /**
-     * Constructs a SwappedDataInputStream.
-     *
-     * @param input InputStream to read from
-     */
-    public SwappedDataInputStream( final InputStream input )
-    {
-        super( input );
-    }
-
-    /**
-     * Return <code>{@link #readByte()} != 0</code>
-     * @return false if the byte read is zero, otherwise true
-     * @throws IOException if an I/O error occurs
-     * @throws EOFException if an end of file is reached unexpectedly
-     */
-    public boolean readBoolean()
-        throws IOException, EOFException
-    {
-        return 0 != readByte();
-    }
-
-    /**
-     * Invokes the delegate's <code>read()</code> method.
-     * @return the byte read or -1 if the end of stream
-     * @throws IOException if an I/O error occurs
-     * @throws EOFException if an end of file is reached unexpectedly
-     */
-    public byte readByte()
-        throws IOException, EOFException
-    {
-        return (byte)in.read();
-    }
-
-    /**
-     * Reads a character delegating to {@link #readShort()}.
-     * @return the byte read or -1 if the end of stream
-     * @throws IOException if an I/O error occurs
-     * @throws EOFException if an end of file is reached unexpectedly
-     */
-    public char readChar()
-        throws IOException, EOFException
-    {
-        return (char)readShort();
-    }
-
-    /**
-     * Delegates to {@link EndianUtils#readSwappedDouble(InputStream)}. 
-     * @return the read long
-     * @throws IOException if an I/O error occurs
-     * @throws EOFException if an end of file is reached unexpectedly
-     */
-    public double readDouble()
-        throws IOException, EOFException
-    {
-        return EndianUtils.readSwappedDouble( in );
-    }
-
-    /**
-     * Delegates to {@link EndianUtils#readSwappedFloat(InputStream)}. 
-     * @return the read long
-     * @throws IOException if an I/O error occurs
-     * @throws EOFException if an end of file is reached unexpectedly
-     */
-    public float readFloat()
-        throws IOException, EOFException
-    {
-        return EndianUtils.readSwappedFloat( in );
-    }
-
-    /**
-     * Invokes the delegate's <code>read(byte[] data, int, int)</code> method.
-     * 
-     * @param data the buffer to read the bytes into
-     * @throws EOFException if an end of file is reached unexpectedly
-     * @throws IOException if an I/O error occurs
-     */
-    public void readFully( final byte[] data )
-        throws IOException, EOFException
-    {
-        readFully( data, 0, data.length );
-    }
-
-
-    /**
-     * Invokes the delegate's <code>read(byte[] data, int, int)</code> method.
-     * 
-     * @param data the buffer to read the bytes into
-     * @param offset The start offset
-     * @param length The number of bytes to read
-     * @throws EOFException if an end of file is reached unexpectedly
-     * @throws IOException if an I/O error occurs
-     */
-    public void readFully( final byte[] data, final int offset, final int length )
-        throws IOException, EOFException
-    {
-        int remaining = length;
-
-        while( remaining > 0 )
-        {
-            final int location = offset + length - remaining;
-            final int count = read( data, location, remaining );
-
-            if (EOF == count)
-            {
-                throw new EOFException();
-            }
-
-            remaining -= count;
-        }
-    }
-
-    /**
-     * Delegates to {@link EndianUtils#readSwappedInteger(InputStream)}. 
-     * @return the read long
-     * @throws EOFException if an end of file is reached unexpectedly
-     * @throws IOException if an I/O error occurs
-     */
-    public int readInt()
-        throws IOException, EOFException
-    {
-        return EndianUtils.readSwappedInteger( in );
-    }
-
-    /**
-     * Not currently supported - throws {@link UnsupportedOperationException}.
-     * @return the line read
-     * @throws EOFException if an end of file is reached unexpectedly
-     * @throws IOException if an I/O error occurs
-     */
-    public String readLine()
-        throws IOException, EOFException
-    {
-        throw new UnsupportedOperationException( 
-                "Operation not supported: readLine()" );
-    }
-
-    /**
-     * Delegates to {@link EndianUtils#readSwappedLong(InputStream)}. 
-     * @return the read long
-     * @throws EOFException if an end of file is reached unexpectedly
-     * @throws IOException if an I/O error occurs
-     */
-    public long readLong()
-        throws IOException, EOFException
-    {
-        return EndianUtils.readSwappedLong( in );
-    }
-
-    /**
-     * Delegates to {@link EndianUtils#readSwappedShort(InputStream)}. 
-     * @return the read long
-     * @throws EOFException if an end of file is reached unexpectedly
-     * @throws IOException if an I/O error occurs
-     */
-    public short readShort()
-        throws IOException, EOFException
-    {
-        return EndianUtils.readSwappedShort( in );
-    }
-
-    /**
-     * Invokes the delegate's <code>read()</code> method.
-     * @return the byte read or -1 if the end of stream
-     * @throws EOFException if an end of file is reached unexpectedly
-     * @throws IOException if an I/O error occurs
-     */
-    public int readUnsignedByte()
-        throws IOException, EOFException
-    {
-        return in.read();
-    }
-
-    /**
-     * Delegates to {@link EndianUtils#readSwappedUnsignedShort(InputStream)}. 
-     * @return the read long
-     * @throws EOFException if an end of file is reached unexpectedly
-     * @throws IOException if an I/O error occurs
-     */
-    public int readUnsignedShort()
-        throws IOException, EOFException
-    {
-        return EndianUtils.readSwappedUnsignedShort( in );
-    }
-
-    /**
-     * Not currently supported - throws {@link UnsupportedOperationException}.
-     * @return UTF String read
-     * @throws EOFException if an end of file is reached unexpectedly
-     * @throws IOException if an I/O error occurs
-     */
-    public String readUTF()
-        throws IOException, EOFException
-    {
-        throw new UnsupportedOperationException( 
-                "Operation not supported: readUTF()" );
-    }
-
-    /**
-     * Invokes the delegate's <code>skip(int)</code> method.
-     * @param count the number of bytes to skip
-     * @return the number of bytes to skipped or -1 if the end of stream
-     * @throws EOFException if an end of file is reached unexpectedly
-     * @throws IOException if an I/O error occurs
-     */
-    public int skipBytes( final int count )
-        throws IOException, EOFException
-    {
-        return (int)in.skip( count );
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/TaggedInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/TaggedInputStream.java
deleted file mode 100644
index 451e2bd..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/TaggedInputStream.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Serializable;
-import java.util.UUID;
-
-import org.apache.commons.io.TaggedIOException;
-
-/**
- * An input stream decorator that tags potential exceptions so that the
- * stream that caused the exception can easily be identified. This is
- * done by using the {@link TaggedIOException} class to wrap all thrown
- * {@link IOException}s. See below for an example of using this class.
- * <pre>
- * TaggedInputStream stream = new TaggedInputStream(...);
- * try {
- *     // Processing that may throw an IOException either from this stream
- *     // or from some other IO activity like temporary files, etc.
- *     processStream(stream);
- * } catch (IOException e) {
- *     if (stream.isCauseOf(e)) {
- *         // The exception was caused by this stream.
- *         // Use e.getCause() to get the original exception.
- *     } else {
- *         // The exception was caused by something else.
- *     }
- * }
- * </pre>
- * <p>
- * Alternatively, the {@link #throwIfCauseOf(Throwable)} method can be
- * used to let higher levels of code handle the exception caused by this
- * stream while other processing errors are being taken care of at this
- * lower level.
- * <pre>
- * TaggedInputStream stream = new TaggedInputStream(...);
- * try {
- *     processStream(stream);
- * } catch (IOException e) {
- *     stream.throwIfCauseOf(e);
- *     // ... or process the exception that was caused by something else
- * }
- * </pre>
- *
- * @see TaggedIOException
- * @since 2.0
- */
-public class TaggedInputStream extends ProxyInputStream {
-
-    /**
-     * The unique tag associated with exceptions from stream.
-     */
-    private final Serializable tag = UUID.randomUUID();
-
-    /**
-     * Creates a tagging decorator for the given input stream.
-     *
-     * @param proxy input stream to be decorated
-     */
-    public TaggedInputStream(final InputStream proxy) {
-        super(proxy);
-    }
-
-    /**
-     * Tests if the given exception was caused by this stream.
-     *
-     * @param exception an exception
-     * @return {@code true} if the exception was thrown by this stream,
-     *         {@code false} otherwise
-     */
-    public boolean isCauseOf(final Throwable exception) {
-        return TaggedIOException.isTaggedWith(exception, tag);
-    }
-
-    /**
-     * Re-throws the original exception thrown by this stream. This method
-     * first checks whether the given exception is a {@link TaggedIOException}
-     * wrapper created by this decorator, and then unwraps and throws the
-     * original wrapped exception. Returns normally if the exception was
-     * not thrown by this stream.
-     *
-     * @param throwable an exception
-     * @throws IOException original exception, if any, thrown by this stream
-     */
-    public void throwIfCauseOf(final Throwable throwable) throws IOException {
-        TaggedIOException.throwCauseIfTaggedWith(throwable, tag);
-    }
-
-    /**
-     * Tags any IOExceptions thrown, wrapping and re-throwing.
-     * 
-     * @param e The IOException thrown
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    protected void handleIOException(final IOException e) throws IOException {
-        throw new TaggedIOException(e, tag);
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/Tailer.java b/trunk/src/main/java/org/apache/commons/io/input/Tailer.java
deleted file mode 100644
index 36f4567..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/Tailer.java
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.nio.charset.Charset;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-
-/**
- * Simple implementation of the unix "tail -f" functionality.
- * 
- * <h2>1. Create a TailerListener implementation</h2>
- * <p>
- * First you need to create a {@link TailerListener} implementation
- * ({@link TailerListenerAdapter} is provided for convenience so that you don't have to
- * implement every method).
- * </p>
- *
- * <p>For example:</p>
- * <pre>
- *  public class MyTailerListener extends TailerListenerAdapter {
- *      public void handle(String line) {
- *          System.out.println(line);
- *      }
- *  }</pre>
- *
- * <h2>2. Using a Tailer</h2>
- *
- * <p>
- * You can create and use a Tailer in one of three ways:
- * </p>
- * <ul>
- *   <li>Using one of the static helper methods:
- *     <ul>
- *       <li>{@link Tailer#create(File, TailerListener)}</li>
- *       <li>{@link Tailer#create(File, TailerListener, long)}</li>
- *       <li>{@link Tailer#create(File, TailerListener, long, boolean)}</li>
- *     </ul>
- *   </li>
- *   <li>Using an {@link java.util.concurrent.Executor}</li>
- *   <li>Using an {@link Thread}</li>
- * </ul>
- *
- * <p>
- * An example of each of these is shown below.
- * </p>
- *
- * <h3>2.1 Using the static helper method</h3>
- *
- * <pre>
- *      TailerListener listener = new MyTailerListener();
- *      Tailer tailer = Tailer.create(file, listener, delay);</pre>
- *
- * <h3>2.2 Using an Executor</h3>
- *
- * <pre>
- *      TailerListener listener = new MyTailerListener();
- *      Tailer tailer = new Tailer(file, listener, delay);
- *
- *      // stupid executor impl. for demo purposes
- *      Executor executor = new Executor() {
- *          public void execute(Runnable command) {
- *              command.run();
- *           }
- *      };
- *
- *      executor.execute(tailer);
- * </pre>
- *
- *
- * <h3>2.3 Using a Thread</h3>
- * <pre>
- *      TailerListener listener = new MyTailerListener();
- *      Tailer tailer = new Tailer(file, listener, delay);
- *      Thread thread = new Thread(tailer);
- *      thread.setDaemon(true); // optional
- *      thread.start();</pre>
- *
- * <h2>3. Stopping a Tailer</h2>
- * <p>Remember to stop the tailer when you have done with it:</p>
- * <pre>
- *      tailer.stop();
- * </pre>
- *
- * <h2>4. Interrupting a Tailer</h2>
- * <p>You can interrupt the thread a tailer is running on by calling {@link Thread#interrupt()}.</p>
- * <pre>
- *      thread.interrupt();
- * </pre>
- * <p>If you interrupt a tailer, the tailer listener is called with the {@link InterruptedException}.</p>
- *
- * <p>The file is read using the default charset; this can be overriden if necessary</p>
- * @see TailerListener
- * @see TailerListenerAdapter
- * @version $Id$
- * @since 2.0
- * @since 2.5 Updated behavior and documentation for {@link Thread#interrupt()}
- */
-public class Tailer implements Runnable {
-
-    private static final int DEFAULT_DELAY_MILLIS = 1000;
-
-    private static final String RAF_MODE = "r";
-
-    private static final int DEFAULT_BUFSIZE = 4096;
-
-    // The default charset used for reading files
-    private static final Charset DEFAULT_CHARSET = Charset.defaultCharset();
-
-    /**
-     * Buffer on top of RandomAccessFile.
-     */
-    private final byte inbuf[];
-
-    /**
-     * The file which will be tailed.
-     */
-    private final File file;
-
-    /**
-     * The character set that will be used to read the file.
-     */
-    private final Charset cset;
-
-    /**
-     * The amount of time to wait for the file to be updated.
-     */
-    private final long delayMillis;
-
-    /**
-     * Whether to tail from the end or start of file
-     */
-    private final boolean end;
-
-    /**
-     * The listener to notify of events when tailing.
-     */
-    private final TailerListener listener;
-
-    /**
-     * Whether to close and reopen the file whilst waiting for more input.
-     */
-    private final boolean reOpen;
-
-    /**
-     * The tailer will run as long as this value is true.
-     */
-    private volatile boolean run = true;
-
-    /**
-     * Creates a Tailer for the given file, starting from the beginning, with the default delay of 1.0s.
-     * @param file The file to follow.
-     * @param listener the TailerListener to use.
-     */
-    public Tailer(final File file, final TailerListener listener) {
-        this(file, listener, DEFAULT_DELAY_MILLIS);
-    }
-
-    /**
-     * Creates a Tailer for the given file, starting from the beginning.
-     * @param file the file to follow.
-     * @param listener the TailerListener to use.
-     * @param delayMillis the delay between checks of the file for new content in milliseconds.
-     */
-    public Tailer(final File file, final TailerListener listener, final long delayMillis) {
-        this(file, listener, delayMillis, false);
-    }
-
-    /**
-     * Creates a Tailer for the given file, with a delay other than the default 1.0s.
-     * @param file the file to follow.
-     * @param listener the TailerListener to use.
-     * @param delayMillis the delay between checks of the file for new content in milliseconds.
-     * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file.
-     */
-    public Tailer(final File file, final TailerListener listener, final long delayMillis, final boolean end) {
-        this(file, listener, delayMillis, end, DEFAULT_BUFSIZE);
-    }
-
-    /**
-     * Creates a Tailer for the given file, with a delay other than the default 1.0s.
-     * @param file the file to follow.
-     * @param listener the TailerListener to use.
-     * @param delayMillis the delay between checks of the file for new content in milliseconds.
-     * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file.
-     * @param reOpen if true, close and reopen the file between reading chunks
-     */
-    public Tailer(final File file, final TailerListener listener, final long delayMillis, final boolean end,
-                  final boolean reOpen) {
-        this(file, listener, delayMillis, end, reOpen, DEFAULT_BUFSIZE);
-    }
-
-    /**
-     * Creates a Tailer for the given file, with a specified buffer size.
-     * @param file the file to follow.
-     * @param listener the TailerListener to use.
-     * @param delayMillis the delay between checks of the file for new content in milliseconds.
-     * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file.
-     * @param bufSize Buffer size
-     */
-    public Tailer(final File file, final TailerListener listener, final long delayMillis, final boolean end,
-                  final int bufSize) {
-        this(file, listener, delayMillis, end, false, bufSize);
-    }
-
-    /**
-     * Creates a Tailer for the given file, with a specified buffer size.
-     * @param file the file to follow.
-     * @param listener the TailerListener to use.
-     * @param delayMillis the delay between checks of the file for new content in milliseconds.
-     * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file.
-     * @param reOpen if true, close and reopen the file between reading chunks
-     * @param bufSize Buffer size
-     */
-    public Tailer(final File file, final TailerListener listener, final long delayMillis, final boolean end,
-                  final boolean reOpen, final int bufSize) {
-        this(file, DEFAULT_CHARSET, listener, delayMillis, end, reOpen, bufSize);
-    }
-
-    /**
-     * Creates a Tailer for the given file, with a specified buffer size.
-     * @param file the file to follow.
-     * @param cset the Charset to be used for reading the file
-     * @param listener the TailerListener to use.
-     * @param delayMillis the delay between checks of the file for new content in milliseconds.
-     * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file.
-     * @param reOpen if true, close and reopen the file between reading chunks
-     * @param bufSize Buffer size
-     */
-    public Tailer(final File file, final Charset cset, final TailerListener listener, final long delayMillis,
-                  final boolean end, final boolean reOpen
-            , final int bufSize) {
-        this.file = file;
-        this.delayMillis = delayMillis;
-        this.end = end;
-
-        this.inbuf = new byte[bufSize];
-
-        // Save and prepare the listener
-        this.listener = listener;
-        listener.init(this);
-        this.reOpen = reOpen;
-        this.cset = cset; 
-    }
-
-    /**
-     * Creates and starts a Tailer for the given file.
-     *
-     * @param file the file to follow.
-     * @param listener the TailerListener to use.
-     * @param delayMillis the delay between checks of the file for new content in milliseconds.
-     * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file.
-     * @param bufSize buffer size.
-     * @return The new tailer
-     */
-    public static Tailer create(final File file, final TailerListener listener, final long delayMillis,
-                                final boolean end, final int bufSize) {
-        return create(file, listener, delayMillis, end, false, bufSize);
-    }
-
-    /**
-     * Creates and starts a Tailer for the given file.
-     *
-     * @param file the file to follow.
-     * @param listener the TailerListener to use.
-     * @param delayMillis the delay between checks of the file for new content in milliseconds.
-     * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file.
-     * @param reOpen whether to close/reopen the file between chunks
-     * @param bufSize buffer size.
-     * @return The new tailer
-     */
-    public static Tailer create(final File file, final TailerListener listener, final long delayMillis,
-                                final boolean end, final boolean reOpen,
-            final int bufSize) {
-        return create(file, DEFAULT_CHARSET, listener, delayMillis, end, reOpen, bufSize);
-    }
-
-    /**
-     * Creates and starts a Tailer for the given file.
-     *
-     * @param file the file to follow.
-     * @param charset the character set to use for reading the file
-     * @param listener the TailerListener to use.
-     * @param delayMillis the delay between checks of the file for new content in milliseconds.
-     * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file.
-     * @param reOpen whether to close/reopen the file between chunks
-     * @param bufSize buffer size.
-     * @return The new tailer
-     */
-    public static Tailer create(final File file, final Charset charset, final TailerListener listener,
-                                final long delayMillis, final boolean end, final boolean reOpen
-            ,final int bufSize) {
-        final Tailer tailer = new Tailer(file, charset, listener, delayMillis, end, reOpen, bufSize);
-        final Thread thread = new Thread(tailer);
-        thread.setDaemon(true);
-        thread.start();
-        return tailer;
-    }
-
-    /**
-     * Creates and starts a Tailer for the given file with default buffer size.
-     *
-     * @param file the file to follow.
-     * @param listener the TailerListener to use.
-     * @param delayMillis the delay between checks of the file for new content in milliseconds.
-     * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file.
-     * @return The new tailer
-     */
-    public static Tailer create(final File file, final TailerListener listener, final long delayMillis,
-                                final boolean end) {
-        return create(file, listener, delayMillis, end, DEFAULT_BUFSIZE);
-    }
-
-    /**
-     * Creates and starts a Tailer for the given file with default buffer size.
-     *
-     * @param file the file to follow.
-     * @param listener the TailerListener to use.
-     * @param delayMillis the delay between checks of the file for new content in milliseconds.
-     * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file.
-     * @param reOpen whether to close/reopen the file between chunks
-     * @return The new tailer
-     */
-    public static Tailer create(final File file, final TailerListener listener, final long delayMillis,
-                                final boolean end, final boolean reOpen) {
-        return create(file, listener, delayMillis, end, reOpen, DEFAULT_BUFSIZE);
-    }
-
-    /**
-     * Creates and starts a Tailer for the given file, starting at the beginning of the file
-     *
-     * @param file the file to follow.
-     * @param listener the TailerListener to use.
-     * @param delayMillis the delay between checks of the file for new content in milliseconds.
-     * @return The new tailer
-     */
-    public static Tailer create(final File file, final TailerListener listener, final long delayMillis) {
-        return create(file, listener, delayMillis, false);
-    }
-
-    /**
-     * Creates and starts a Tailer for the given file, starting at the beginning of the file
-     * with the default delay of 1.0s
-     *
-     * @param file the file to follow.
-     * @param listener the TailerListener to use.
-     * @return The new tailer
-     */
-    public static Tailer create(final File file, final TailerListener listener) {
-        return create(file, listener, DEFAULT_DELAY_MILLIS, false);
-    }
-
-    /**
-     * Return the file.
-     *
-     * @return the file
-     */
-    public File getFile() {
-        return file;
-    }
-
-    /**
-     * Gets whether to keep on running.
-     *
-     * @return whether to keep on running.
-     * @since 2.5
-     */
-    protected boolean getRun() {
-        return run;
-    }
-
-    /**
-     * Return the delay in milliseconds.
-     *
-     * @return the delay in milliseconds.
-     */
-    public long getDelay() {
-        return delayMillis;
-    }
-
-    /**
-     * Follows changes in the file, calling the TailerListener's handle method for each new line.
-     */
-    public void run() {
-        RandomAccessFile reader = null;
-        try {
-            long last = 0; // The last time the file was checked for changes
-            long position = 0; // position within the file
-            // Open the file
-            while (getRun() && reader == null) {
-                try {
-                    reader = new RandomAccessFile(file, RAF_MODE);
-                } catch (final FileNotFoundException e) {
-                    listener.fileNotFound();
-                }
-                if (reader == null) {
-                    Thread.sleep(delayMillis);
-                } else {
-                    // The current position in the file
-                    position = end ? file.length() : 0;
-                    last = file.lastModified();
-                    reader.seek(position);
-                }
-            }
-            while (getRun()) {
-                final boolean newer = FileUtils.isFileNewer(file, last); // IO-279, must be done first
-                // Check the file length to see if it was rotated
-                final long length = file.length();
-                if (length < position) {
-                    // File was rotated
-                    listener.fileRotated();
-                    // Reopen the reader after rotation
-                    try {
-                        // Ensure that the old file is closed iff we re-open it successfully
-                        final RandomAccessFile save = reader;
-                        reader = new RandomAccessFile(file, RAF_MODE);
-                        // At this point, we're sure that the old file is rotated
-                        // Finish scanning the old file and then we'll start with the new one
-                        try {
-                            readLines(save);
-                        }  catch (IOException ioe) {
-                            listener.handle(ioe);
-                        }
-                        position = 0;
-                        // close old file explicitly rather than relying on GC picking up previous RAF
-                        IOUtils.closeQuietly(save);
-                    } catch (final FileNotFoundException e) {
-                        // in this case we continue to use the previous reader and position values
-                        listener.fileNotFound();
-                    }
-                    continue;
-                } else {
-                    // File was not rotated
-                    // See if the file needs to be read again
-                    if (length > position) {
-                        // The file has more content than it did last time
-                        position = readLines(reader);
-                        last = file.lastModified();
-                    } else if (newer) {
-                        /*
-                         * This can happen if the file is truncated or overwritten with the exact same length of
-                         * information. In cases like this, the file position needs to be reset
-                         */
-                        position = 0;
-                        reader.seek(position); // cannot be null here
-
-                        // Now we can read new lines
-                        position = readLines(reader);
-                        last = file.lastModified();
-                    }
-                }
-                if (reOpen) {
-                    IOUtils.closeQuietly(reader);
-                }
-                Thread.sleep(delayMillis);
-                if (getRun() && reOpen) {
-                    reader = new RandomAccessFile(file, RAF_MODE);
-                    reader.seek(position);
-                }
-            }
-        } catch (final InterruptedException e) {
-            Thread.currentThread().interrupt();
-            stop(e);
-        } catch (final Exception e) {
-            stop(e);
-        } finally {
-            IOUtils.closeQuietly(reader);
-        }
-    }
-
-    /**
-     * Stops the tailer with an exception
-     * @param e The exception to send to listener
-     */
-    private void stop(final Exception e) {
-        listener.handle(e);
-        stop();
-    }
-
-    /**
-     * Allows the tailer to complete its current loop and return.
-     */
-    public void stop() {
-        this.run = false;
-    }
-
-    /**
-     * Read new lines.
-     *
-     * @param reader The file to read
-     * @return The new position after the lines have been read
-     * @throws java.io.IOException if an I/O error occurs.
-     */
-    private long readLines(final RandomAccessFile reader) throws IOException {
-        ByteArrayOutputStream lineBuf = new ByteArrayOutputStream(64);
-        long pos = reader.getFilePointer();
-        long rePos = pos; // position to re-read
-        int num;
-        boolean seenCR = false;
-        while (getRun() && ((num = reader.read(inbuf)) != EOF)) {
-            for (int i = 0; i < num; i++) {
-                final byte ch = inbuf[i];
-                switch (ch) {
-                case '\n':
-                    seenCR = false; // swallow CR before LF
-                    listener.handle(new String(lineBuf.toByteArray(), cset));
-                    lineBuf.reset();
-                    rePos = pos + i + 1;
-                    break;
-                case '\r':
-                    if (seenCR) {
-                        lineBuf.write('\r');
-                    }
-                    seenCR = true;
-                    break;
-                default:
-                    if (seenCR) {
-                        seenCR = false; // swallow final CR
-                        listener.handle(new String(lineBuf.toByteArray(), cset));
-                        lineBuf.reset();
-                        rePos = pos + i + 1;
-                    }
-                    lineBuf.write(ch);
-                }
-            }
-            pos = reader.getFilePointer();
-        }
-        IOUtils.closeQuietly(lineBuf); // not strictly necessary
-        reader.seek(rePos); // Ensure we can re-read if necessary
-
-        if (listener instanceof TailerListenerAdapter) {
-            ((TailerListenerAdapter) listener).endOfFileReached();
-        }
-
-        return rePos;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/TailerListener.java b/trunk/src/main/java/org/apache/commons/io/input/TailerListener.java
deleted file mode 100644
index c58eb64..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/TailerListener.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-/**
- * Listener for events from a {@link Tailer}.
- *
- * @version $Id$
- * @since 2.0
- */
-public interface TailerListener {
-
-    /**
-     * The tailer will call this method during construction,
-     * giving the listener a method of stopping the tailer.
-     * @param tailer the tailer.
-     */
-    void init(Tailer tailer);
-
-    /**
-     * This method is called if the tailed file is not found.
-     * <p>
-     * <b>Note:</b> this is called from the tailer thread.
-     */
-    void fileNotFound();
-
-    /**
-     * Called if a file rotation is detected.
-     *
-     * This method is called before the file is reopened, and fileNotFound may
-     * be called if the new file has not yet been created.
-     * <p>
-     * <b>Note:</b> this is called from the tailer thread.
-     */
-    void fileRotated();
-
-    /**
-     * Handles a line from a Tailer.
-     * <p>
-     * <b>Note:</b> this is called from the tailer thread.
-     * @param line the line.
-     */
-    void handle(String line);
-
-    /**
-     * Handles an Exception .
-     * <p>
-     * <b>Note:</b> this is called from the tailer thread.
-     * @param ex the exception.
-     */
-    void handle(Exception ex);
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java b/trunk/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java
deleted file mode 100644
index 1ae624b..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-/**
- * {@link TailerListener} Adapter.
- *
- * @version $Id$
- * @since 2.0
- */
-public class TailerListenerAdapter implements TailerListener {
-
-    /**
-     * The tailer will call this method during construction,
-     * giving the listener a method of stopping the tailer.
-     * @param tailer the tailer.
-     */
-    public void init(final Tailer tailer) {
-    }
-
-    /**
-     * This method is called if the tailed file is not found.
-     */
-    public void fileNotFound() {
-    }
-
-    /**
-     * Called if a file rotation is detected.
-     *
-     * This method is called before the file is reopened, and fileNotFound may
-     * be called if the new file has not yet been created.
-     */
-    public void fileRotated() {
-    }
-
-    /**
-     * Handles a line from a Tailer.
-     * @param line the line.
-     */
-    public void handle(final String line) {
-    }
-
-    /**
-     * Handles an Exception .
-     * @param ex the exception.
-     */
-    public void handle(final Exception ex) {
-    }
-
-    /**
-     * Called each time the Tailer reaches the end of the file.
-     *
-     * <b>Note:</b> this is called from the tailer thread.
-     *
-     * Note: a future version of commons-io will pull this method up to the TailerListener interface,
-     * for now clients must subclass this class to use this feature.
-     *
-     * @since 2.5
-     */
-    public void endOfFileReached() {
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/TeeInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/TeeInputStream.java
deleted file mode 100644
index 3f2941d..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/TeeInputStream.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * InputStream proxy that transparently writes a copy of all bytes read
- * from the proxied stream to a given OutputStream. Using {@link #skip(long)}
- * or {@link #mark(int)}/{@link #reset()} on the stream will result on some
- * bytes from the input stream being skipped or duplicated in the output
- * stream.
- * <p>
- * The proxied input stream is closed when the {@link #close()} method is
- * called on this proxy. It is configurable whether the associated output
- * stream will also closed.
- *
- * @version $Id$
- * @since 1.4
- */
-public class TeeInputStream extends ProxyInputStream {
-
-    /**
-     * The output stream that will receive a copy of all bytes read from the
-     * proxied input stream.
-     */
-    private final OutputStream branch;
-
-    /**
-     * Flag for closing also the associated output stream when this
-     * stream is closed.
-     */
-    private final boolean closeBranch;
-
-    /**
-     * Creates a TeeInputStream that proxies the given {@link InputStream}
-     * and copies all read bytes to the given {@link OutputStream}. The given
-     * output stream will not be closed when this stream gets closed.
-     *
-     * @param input input stream to be proxied
-     * @param branch output stream that will receive a copy of all bytes read
-     */
-    public TeeInputStream(final InputStream input, final OutputStream branch) {
-        this(input, branch, false);
-    }
-
-    /**
-     * Creates a TeeInputStream that proxies the given {@link InputStream}
-     * and copies all read bytes to the given {@link OutputStream}. The given
-     * output stream will be closed when this stream gets closed if the
-     * closeBranch parameter is {@code true}.
-     *
-     * @param input input stream to be proxied
-     * @param branch output stream that will receive a copy of all bytes read
-     * @param closeBranch flag for closing also the output stream when this
-     *                    stream is closed
-     */
-    public TeeInputStream(
-            final InputStream input, final OutputStream branch, final boolean closeBranch) {
-        super(input);
-        this.branch = branch;
-        this.closeBranch = closeBranch;
-    }
-
-    /**
-     * Closes the proxied input stream and, if so configured, the associated
-     * output stream. An exception thrown from one stream will not prevent
-     * closing of the other stream.
-     *
-     * @throws IOException if either of the streams could not be closed
-     */
-    @Override
-    public void close() throws IOException {
-        try {
-            super.close();
-        } finally {
-            if (closeBranch) {
-                branch.close();
-            }
-        }
-    }
-
-    /**
-     * Reads a single byte from the proxied input stream and writes it to
-     * the associated output stream.
-     *
-     * @return next byte from the stream, or -1 if the stream has ended
-     * @throws IOException if the stream could not be read (or written) 
-     */
-    @Override
-    public int read() throws IOException {
-        final int ch = super.read();
-        if (ch != EOF) {
-            branch.write(ch);
-        }
-        return ch;
-    }
-
-    /**
-     * Reads bytes from the proxied input stream and writes the read bytes
-     * to the associated output stream.
-     *
-     * @param bts byte buffer
-     * @param st start offset within the buffer
-     * @param end maximum number of bytes to read
-     * @return number of bytes read, or -1 if the stream has ended
-     * @throws IOException if the stream could not be read (or written) 
-     */
-    @Override
-    public int read(final byte[] bts, final int st, final int end) throws IOException {
-        final int n = super.read(bts, st, end);
-        if (n != -1) {
-            branch.write(bts, st, n);
-        }
-        return n;
-    }
-
-    /**
-     * Reads bytes from the proxied input stream and writes the read bytes
-     * to the associated output stream.
-     *
-     * @param bts byte buffer
-     * @return number of bytes read, or -1 if the stream has ended
-     * @throws IOException if the stream could not be read (or written) 
-     */
-    @Override
-    public int read(final byte[] bts) throws IOException {
-        final int n = super.read(bts);
-        if (n != EOF) {
-            branch.write(bts, 0, n);
-        }
-        return n;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/UnixLineEndingInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/UnixLineEndingInputStream.java
deleted file mode 100644
index 7464c35..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/UnixLineEndingInputStream.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * A filtering input stream that ensures the content will have unix-style line endings, LF.
- *
- * @since 2.5
- */
-public class UnixLineEndingInputStream extends InputStream {
-
-    private boolean slashNSeen = false;
-
-    private boolean slashRSeen = false;
-
-    private boolean eofSeen = false;
-
-    private final InputStream target;
-
-    private final boolean ensureLineFeedAtEndOfFile;
-
-    /**
-     * Create an input stream that filters another stream
-     *
-     * @param in                        The input stream to wrap
-     * @param ensureLineFeedAtEndOfFile true to ensure that the file ends with LF
-     */
-    public UnixLineEndingInputStream( InputStream in, boolean ensureLineFeedAtEndOfFile ) {
-        this.target = in;
-        this.ensureLineFeedAtEndOfFile = ensureLineFeedAtEndOfFile;
-    }
-
-    /**
-     * Reads the next item from the target, updating internal flags in the process
-     * @return the next int read from the target stream
-     * @throws IOException upon error
-     */
-    private int readWithUpdate() throws IOException {
-        final int target = this.target.read();
-        eofSeen = target == -1;
-        if ( eofSeen ) {
-            return target;
-        }
-        slashNSeen = target == '\n';
-        slashRSeen = target == '\r';
-        return target;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int read() throws IOException {
-        boolean previousWasSlashR = slashRSeen;
-        if ( eofSeen ) {
-            return eofGame(previousWasSlashR);
-        }
-        else {
-            int target = readWithUpdate();
-            if ( eofSeen ) {
-                return eofGame(previousWasSlashR);
-            }
-            if (slashRSeen)
-            {
-                return '\n';
-            }
-
-            if ( previousWasSlashR && slashNSeen){
-                return read();
-            }
-
-            return target;
-        }
-    }
-
-    /**
-     * Handles the eof-handling at the end of the stream
-     * @param previousWasSlashR Indicates if the last seen was a \r
-     * @return The next char to output to the stream
-     */
-    private int eofGame(boolean previousWasSlashR) {
-        if ( previousWasSlashR || !ensureLineFeedAtEndOfFile ) {
-            return -1;
-        }
-        if ( !slashNSeen ) {
-            slashNSeen = true;
-            return '\n';
-        } else {
-            return -1;
-        }
-    }
-
-    /**
-     * Closes the stream. Also closes the underlying stream.
-     * @throws IOException upon error
-     */
-    @Override
-    public void close() throws IOException {
-        super.close();
-        target.close();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void mark( int readlimit ) {
-        throw new UnsupportedOperationException( "Mark notsupported" );
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/WindowsLineEndingInputStream.java b/trunk/src/main/java/org/apache/commons/io/input/WindowsLineEndingInputStream.java
deleted file mode 100644
index e166518..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/WindowsLineEndingInputStream.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * A filtering input stream that ensures the content will have windows line endings, CRLF.
- *
- * @since 2.5
- */
-public class WindowsLineEndingInputStream  extends InputStream {
-
-    private boolean slashRSeen = false;
-
-    private boolean slashNSeen = false;
-
-    private boolean injectSlashN = false;
-
-    private boolean eofSeen = false;
-
-    private final InputStream target;
-
-    private final boolean ensureLineFeedAtEndOfFile;
-
-    /**
-     * Create an input stream that filters another stream
-     *
-     * @param in                        The input stream to wrap
-     * @param ensureLineFeedAtEndOfFile true to ensure that the file ends with CRLF
-     */
-    public WindowsLineEndingInputStream( InputStream in, boolean ensureLineFeedAtEndOfFile ) {
-        this.target = in;
-        this.ensureLineFeedAtEndOfFile = ensureLineFeedAtEndOfFile;
-    }
-
-    /**
-     * Reads the next item from the target, updating internal flags in the process
-     * @return the next int read from the target stream
-     * @throws IOException upon error
-     */
-    private int readWithUpdate() throws IOException {
-        final int target = this.target.read();
-        eofSeen = target == -1;
-        if ( eofSeen ) {
-            return target;
-        }
-        slashRSeen = target == '\r';
-        slashNSeen = target == '\n';
-        return target;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int read() throws IOException {
-        if ( eofSeen ) {
-            return eofGame();
-        } else if ( injectSlashN ) {
-            injectSlashN = false;
-            return '\n';
-        } else {
-            boolean prevWasSlashR = slashRSeen;
-            int target = readWithUpdate();
-            if ( eofSeen ) {
-                return eofGame();
-            }
-            if ( target == '\n' ) {
-                if ( !prevWasSlashR )
-                {
-                    injectSlashN = true;
-                    return '\r';
-                }
-            }
-            return target;
-        }
-    }
-
-    /**
-     * Handles the eof-handling at the end of the stream
-     * @return The next char to output to the stream
-     */
-
-    private int eofGame() {
-        if ( !ensureLineFeedAtEndOfFile ) {
-            return -1;
-        }
-        if ( !slashNSeen && !slashRSeen ) {
-            slashRSeen = true;
-            return '\r';
-        }
-        if ( !slashNSeen ) {
-            slashRSeen = false;
-            slashNSeen = true;
-            return '\n';
-        } else {
-            return -1;
-        }
-    }
-
-    /**
-     * Closes the stream. Also closes the underlying stream.
-     * @throws IOException upon error
-     */
-    @Override
-    public void close() throws IOException {
-        super.close();
-        target.close();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void mark( int readlimit ) {
-        throw new UnsupportedOperationException( "Mark not supported" );
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java b/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
deleted file mode 100644
index 4415791..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
+++ /dev/null
@@ -1,797 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.StringReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLConnection;
-import java.text.MessageFormat;
-import java.util.Locale;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.io.ByteOrderMark;
-
-/**
- * Character stream that handles all the necessary Voodo to figure out the
- * charset encoding of the XML document within the stream.
- * <p>
- * IMPORTANT: This class is not related in any way to the org.xml.sax.XMLReader.
- * This one IS a character stream.
- * <p>
- * All this has to be done without consuming characters from the stream, if not
- * the XML parser will not recognized the document as a valid XML. This is not
- * 100% true, but it's close enough (UTF-8 BOM is not handled by all parsers
- * right now, XmlStreamReader handles it and things work in all parsers).
- * <p>
- * The XmlStreamReader class handles the charset encoding of XML documents in
- * Files, raw streams and HTTP streams by offering a wide set of constructors.
- * <p>
- * By default the charset encoding detection is lenient, the constructor with
- * the lenient flag can be used for an script (following HTTP MIME and XML
- * specifications). All this is nicely explained by Mark Pilgrim in his blog, <a
- * href="http://diveintomark.org/archives/2004/02/13/xml-media-types">
- * Determining the character encoding of a feed</a>.
- * <p>
- * Originally developed for <a href="http://rome.dev.java.net">ROME</a> under
- * Apache License 2.0.
- *
- * @version $Id$
- * @see org.apache.commons.io.output.XmlStreamWriter
- * @since 2.0
- */
-public class XmlStreamReader extends Reader {
-    private static final int BUFFER_SIZE = 4096;
-
-    private static final String UTF_8 = "UTF-8";
-
-    private static final String US_ASCII = "US-ASCII";
-
-    private static final String UTF_16BE = "UTF-16BE";
-
-    private static final String UTF_16LE = "UTF-16LE";
-
-    private static final String UTF_32BE = "UTF-32BE";
-
-    private static final String UTF_32LE = "UTF-32LE";
-
-    private static final String UTF_16 = "UTF-16";
-
-    private static final String UTF_32 = "UTF-32";
-
-    private static final String EBCDIC = "CP1047";
-
-    private static final ByteOrderMark[] BOMS = new ByteOrderMark[] {
-        ByteOrderMark.UTF_8,
-        ByteOrderMark.UTF_16BE,
-        ByteOrderMark.UTF_16LE,
-        ByteOrderMark.UTF_32BE,
-        ByteOrderMark.UTF_32LE
-    };
-
-    // UTF_16LE and UTF_32LE have the same two starting BOM bytes.
-    private static final ByteOrderMark[] XML_GUESS_BYTES = new ByteOrderMark[] {
-        new ByteOrderMark(UTF_8,    0x3C, 0x3F, 0x78, 0x6D),
-        new ByteOrderMark(UTF_16BE, 0x00, 0x3C, 0x00, 0x3F),
-        new ByteOrderMark(UTF_16LE, 0x3C, 0x00, 0x3F, 0x00),
-        new ByteOrderMark(UTF_32BE, 0x00, 0x00, 0x00, 0x3C,
-                0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x6D),
-        new ByteOrderMark(UTF_32LE, 0x3C, 0x00, 0x00, 0x00,
-                0x3F, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x6D, 0x00, 0x00, 0x00),
-        new ByteOrderMark(EBCDIC,   0x4C, 0x6F, 0xA7, 0x94)
-    };
-
-    private final Reader reader;
-
-    private final String encoding;
-
-    private final String defaultEncoding;
-
-    /**
-     * Returns the default encoding to use if none is set in HTTP content-type,
-     * XML prolog and the rules based on content-type are not adequate.
-     * <p>
-     * If it is NULL the content-type based rules are used.
-     *
-     * @return the default encoding to use.
-     */
-    public String getDefaultEncoding() {
-        return defaultEncoding;
-    }
-
-    /**
-     * Creates a Reader for a File.
-     * <p>
-     * It looks for the UTF-8 BOM first, if none sniffs the XML prolog charset,
-     * if this is also missing defaults to UTF-8.
-     * <p>
-     * It does a lenient charset encoding detection, check the constructor with
-     * the lenient parameter for details.
-     *
-     * @param file File to create a Reader from.
-     * @throws IOException thrown if there is a problem reading the file.
-     */
-    public XmlStreamReader(final File file) throws IOException {
-        this(new FileInputStream(file));
-    }
-
-    /**
-     * Creates a Reader for a raw InputStream.
-     * <p>
-     * It follows the same logic used for files.
-     * <p>
-     * It does a lenient charset encoding detection, check the constructor with
-     * the lenient parameter for details.
-     *
-     * @param is InputStream to create a Reader from.
-     * @throws IOException thrown if there is a problem reading the stream.
-     */
-    public XmlStreamReader(final InputStream is) throws IOException {
-        this(is, true);
-    }
-
-    /**
-     * Creates a Reader for a raw InputStream.
-     * <p>
-     * It follows the same logic used for files.
-     * <p>
-     * If lenient detection is indicated and the detection above fails as per
-     * specifications it then attempts the following:
-     * <p>
-     * If the content type was 'text/html' it replaces it with 'text/xml' and
-     * tries the detection again.
-     * <p>
-     * Else if the XML prolog had a charset encoding that encoding is used.
-     * <p>
-     * Else if the content type had a charset encoding that encoding is used.
-     * <p>
-     * Else 'UTF-8' is used.
-     * <p>
-     * If lenient detection is indicated an XmlStreamReaderException is never
-     * thrown.
-     *
-     * @param is InputStream to create a Reader from.
-     * @param lenient indicates if the charset encoding detection should be
-     *        relaxed.
-     * @throws IOException thrown if there is a problem reading the stream.
-     * @throws XmlStreamReaderException thrown if the charset encoding could not
-     *         be determined according to the specs.
-     */
-    public XmlStreamReader(final InputStream is, final boolean lenient) throws IOException {
-        this(is, lenient, null);
-    }
-
-    /**
-     * Creates a Reader for a raw InputStream.
-     * <p>
-     * It follows the same logic used for files.
-     * <p>
-     * If lenient detection is indicated and the detection above fails as per
-     * specifications it then attempts the following:
-     * <p>
-     * If the content type was 'text/html' it replaces it with 'text/xml' and
-     * tries the detection again.
-     * <p>
-     * Else if the XML prolog had a charset encoding that encoding is used.
-     * <p>
-     * Else if the content type had a charset encoding that encoding is used.
-     * <p>
-     * Else 'UTF-8' is used.
-     * <p>
-     * If lenient detection is indicated an XmlStreamReaderException is never
-     * thrown.
-     *
-     * @param is InputStream to create a Reader from.
-     * @param lenient indicates if the charset encoding detection should be
-     *        relaxed.
-     * @param defaultEncoding The default encoding
-     * @throws IOException thrown if there is a problem reading the stream.
-     * @throws XmlStreamReaderException thrown if the charset encoding could not
-     *         be determined according to the specs.
-     */
-    public XmlStreamReader(final InputStream is, final boolean lenient, final String defaultEncoding)
-            throws IOException {
-        this.defaultEncoding = defaultEncoding;
-        final BOMInputStream bom = new BOMInputStream(new BufferedInputStream(is, BUFFER_SIZE), false, BOMS);
-        final BOMInputStream pis = new BOMInputStream(bom, true, XML_GUESS_BYTES);
-        this.encoding = doRawStream(bom, pis, lenient);
-        this.reader = new InputStreamReader(pis, encoding);
-    }
-
-    /**
-     * Creates a Reader using the InputStream of a URL.
-     * <p>
-     * If the URL is not of type HTTP and there is not 'content-type' header in
-     * the fetched data it uses the same logic used for Files.
-     * <p>
-     * If the URL is a HTTP Url or there is a 'content-type' header in the
-     * fetched data it uses the same logic used for an InputStream with
-     * content-type.
-     * <p>
-     * It does a lenient charset encoding detection, check the constructor with
-     * the lenient parameter for details.
-     *
-     * @param url URL to create a Reader from.
-     * @throws IOException thrown if there is a problem reading the stream of
-     *         the URL.
-     */
-    public XmlStreamReader(final URL url) throws IOException {
-        this(url.openConnection(), null);
-    }
-
-    /**
-     * Creates a Reader using the InputStream of a URLConnection.
-     * <p>
-     * If the URLConnection is not of type HttpURLConnection and there is not
-     * 'content-type' header in the fetched data it uses the same logic used for
-     * files.
-     * <p>
-     * If the URLConnection is a HTTP Url or there is a 'content-type' header in
-     * the fetched data it uses the same logic used for an InputStream with
-     * content-type.
-     * <p>
-     * It does a lenient charset encoding detection, check the constructor with
-     * the lenient parameter for details.
-     *
-     * @param conn URLConnection to create a Reader from.
-     * @param defaultEncoding The default encoding
-     * @throws IOException thrown if there is a problem reading the stream of
-     *         the URLConnection.
-     */
-    public XmlStreamReader(final URLConnection conn, final String defaultEncoding) throws IOException {
-        this.defaultEncoding = defaultEncoding;
-        final boolean lenient = true;
-        final String contentType = conn.getContentType();
-        final InputStream is = conn.getInputStream();
-        final BOMInputStream bom = new BOMInputStream(new BufferedInputStream(is, BUFFER_SIZE), false, BOMS);
-        final BOMInputStream pis = new BOMInputStream(bom, true, XML_GUESS_BYTES);
-        if (conn instanceof HttpURLConnection || contentType != null) {
-            this.encoding = doHttpStream(bom, pis, contentType, lenient);
-        } else {
-            this.encoding = doRawStream(bom, pis, lenient);
-        }
-        this.reader = new InputStreamReader(pis, encoding);
-    }
-
-    /**
-     * Creates a Reader using an InputStream an the associated content-type
-     * header.
-     * <p>
-     * First it checks if the stream has BOM. If there is not BOM checks the
-     * content-type encoding. If there is not content-type encoding checks the
-     * XML prolog encoding. If there is not XML prolog encoding uses the default
-     * encoding mandated by the content-type MIME type.
-     * <p>
-     * It does a lenient charset encoding detection, check the constructor with
-     * the lenient parameter for details.
-     *
-     * @param is InputStream to create the reader from.
-     * @param httpContentType content-type header to use for the resolution of
-     *        the charset encoding.
-     * @throws IOException thrown if there is a problem reading the file.
-     */
-    public XmlStreamReader(final InputStream is, final String httpContentType)
-            throws IOException {
-        this(is, httpContentType, true);
-    }
-
-    /**
-     * Creates a Reader using an InputStream an the associated content-type
-     * header. This constructor is lenient regarding the encoding detection.
-     * <p>
-     * First it checks if the stream has BOM. If there is not BOM checks the
-     * content-type encoding. If there is not content-type encoding checks the
-     * XML prolog encoding. If there is not XML prolog encoding uses the default
-     * encoding mandated by the content-type MIME type.
-     * <p>
-     * If lenient detection is indicated and the detection above fails as per
-     * specifications it then attempts the following:
-     * <p>
-     * If the content type was 'text/html' it replaces it with 'text/xml' and
-     * tries the detection again.
-     * <p>
-     * Else if the XML prolog had a charset encoding that encoding is used.
-     * <p>
-     * Else if the content type had a charset encoding that encoding is used.
-     * <p>
-     * Else 'UTF-8' is used.
-     * <p>
-     * If lenient detection is indicated an XmlStreamReaderException is never
-     * thrown.
-     *
-     * @param is InputStream to create the reader from.
-     * @param httpContentType content-type header to use for the resolution of
-     *        the charset encoding.
-     * @param lenient indicates if the charset encoding detection should be
-     *        relaxed.
-     * @param defaultEncoding The default encoding
-     * @throws IOException thrown if there is a problem reading the file.
-     * @throws XmlStreamReaderException thrown if the charset encoding could not
-     *         be determined according to the specs.
-     */
-    public XmlStreamReader(final InputStream is, final String httpContentType,
-            final boolean lenient, final String defaultEncoding) throws IOException {
-        this.defaultEncoding = defaultEncoding;
-        final BOMInputStream bom = new BOMInputStream(new BufferedInputStream(is, BUFFER_SIZE), false, BOMS);
-        final BOMInputStream pis = new BOMInputStream(bom, true, XML_GUESS_BYTES);
-        this.encoding = doHttpStream(bom, pis, httpContentType, lenient);
-        this.reader = new InputStreamReader(pis, encoding);
-    }
-
-    /**
-     * Creates a Reader using an InputStream an the associated content-type
-     * header. This constructor is lenient regarding the encoding detection.
-     * <p>
-     * First it checks if the stream has BOM. If there is not BOM checks the
-     * content-type encoding. If there is not content-type encoding checks the
-     * XML prolog encoding. If there is not XML prolog encoding uses the default
-     * encoding mandated by the content-type MIME type.
-     * <p>
-     * If lenient detection is indicated and the detection above fails as per
-     * specifications it then attempts the following:
-     * <p>
-     * If the content type was 'text/html' it replaces it with 'text/xml' and
-     * tries the detection again.
-     * <p>
-     * Else if the XML prolog had a charset encoding that encoding is used.
-     * <p>
-     * Else if the content type had a charset encoding that encoding is used.
-     * <p>
-     * Else 'UTF-8' is used.
-     * <p>
-     * If lenient detection is indicated an XmlStreamReaderException is never
-     * thrown.
-     *
-     * @param is InputStream to create the reader from.
-     * @param httpContentType content-type header to use for the resolution of
-     *        the charset encoding.
-     * @param lenient indicates if the charset encoding detection should be
-     *        relaxed.
-     * @throws IOException thrown if there is a problem reading the file.
-     * @throws XmlStreamReaderException thrown if the charset encoding could not
-     *         be determined according to the specs.
-     */
-    public XmlStreamReader(final InputStream is, final String httpContentType,
-            final boolean lenient) throws IOException {
-        this(is, httpContentType, lenient, null);
-    }
-
-    /**
-     * Returns the charset encoding of the XmlStreamReader.
-     *
-     * @return charset encoding.
-     */
-    public String getEncoding() {
-        return encoding;
-    }
-
-    /**
-     * Invokes the underlying reader's <code>read(char[], int, int)</code> method.
-     * @param buf the buffer to read the characters into
-     * @param offset The start offset
-     * @param len The number of bytes to read
-     * @return the number of characters read or -1 if the end of stream
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public int read(final char[] buf, final int offset, final int len) throws IOException {
-        return reader.read(buf, offset, len);
-    }
-
-    /**
-     * Closes the XmlStreamReader stream.
-     *
-     * @throws IOException thrown if there was a problem closing the stream.
-     */
-    @Override
-    public void close() throws IOException {
-        reader.close();
-    }
-
-    /**
-     * Process the raw stream.
-     *
-     * @param bom BOMInputStream to detect byte order marks
-     * @param pis BOMInputStream to guess XML encoding
-     * @param lenient indicates if the charset encoding detection should be
-     *        relaxed.
-     * @return the encoding to be used
-     * @throws IOException thrown if there is a problem reading the stream.
-     */
-    private String doRawStream(final BOMInputStream bom, final BOMInputStream pis, final boolean lenient)
-            throws IOException {
-        final String bomEnc      = bom.getBOMCharsetName();
-        final String xmlGuessEnc = pis.getBOMCharsetName();
-        final String xmlEnc = getXmlProlog(pis, xmlGuessEnc);
-        try {
-            return calculateRawEncoding(bomEnc, xmlGuessEnc, xmlEnc);
-        } catch (final XmlStreamReaderException ex) {
-            if (lenient) {
-                return doLenientDetection(null, ex);
-            } else {
-                throw ex;
-            }
-        }
-    }
-
-    /**
-     * Process a HTTP stream.
-     *
-     * @param bom BOMInputStream to detect byte order marks
-     * @param pis BOMInputStream to guess XML encoding
-     * @param httpContentType The HTTP content type
-     * @param lenient indicates if the charset encoding detection should be
-     *        relaxed.
-     * @return the encoding to be used
-     * @throws IOException thrown if there is a problem reading the stream.
-     */
-    private String doHttpStream(final BOMInputStream bom, final BOMInputStream pis, final String httpContentType,
-            final boolean lenient) throws IOException {
-        final String bomEnc      = bom.getBOMCharsetName();
-        final String xmlGuessEnc = pis.getBOMCharsetName();
-        final String xmlEnc = getXmlProlog(pis, xmlGuessEnc);
-        try {
-            return calculateHttpEncoding(httpContentType, bomEnc,
-                    xmlGuessEnc, xmlEnc, lenient);
-        } catch (final XmlStreamReaderException ex) {
-            if (lenient) {
-                return doLenientDetection(httpContentType, ex);
-            } else {
-                throw ex;
-            }
-        }
-    }
-
-    /**
-     * Do lenient detection.
-     *
-     * @param httpContentType content-type header to use for the resolution of
-     *        the charset encoding.
-     * @param ex The thrown exception
-     * @return the encoding
-     * @throws IOException thrown if there is a problem reading the stream.
-     */
-    private String doLenientDetection(String httpContentType,
-            XmlStreamReaderException ex) throws IOException {
-        if (httpContentType != null && httpContentType.startsWith("text/html")) {
-            httpContentType = httpContentType.substring("text/html".length());
-            httpContentType = "text/xml" + httpContentType;
-            try {
-                return calculateHttpEncoding(httpContentType, ex.getBomEncoding(),
-                        ex.getXmlGuessEncoding(), ex.getXmlEncoding(), true);
-            } catch (final XmlStreamReaderException ex2) {
-                ex = ex2;
-            }
-        }
-        String encoding = ex.getXmlEncoding();
-        if (encoding == null) {
-            encoding = ex.getContentTypeEncoding();
-        }
-        if (encoding == null) {
-            encoding = defaultEncoding == null ? UTF_8 : defaultEncoding;
-        }
-        return encoding;
-    }
-
-    /**
-     * Calculate the raw encoding.
-     *
-     * @param bomEnc BOM encoding
-     * @param xmlGuessEnc XML Guess encoding
-     * @param xmlEnc XML encoding
-     * @return the raw encoding
-     * @throws IOException thrown if there is a problem reading the stream.
-     */
-    String calculateRawEncoding(final String bomEnc, final String xmlGuessEnc,
-            final String xmlEnc) throws IOException {
-
-        // BOM is Null
-        if (bomEnc == null) {
-            if (xmlGuessEnc == null || xmlEnc == null) {
-                return defaultEncoding == null ? UTF_8 : defaultEncoding;
-            }
-            if (xmlEnc.equals(UTF_16) &&
-               (xmlGuessEnc.equals(UTF_16BE) || xmlGuessEnc.equals(UTF_16LE))) {
-                return xmlGuessEnc;
-            }
-            return xmlEnc;
-        }
-
-        // BOM is UTF-8
-        if (bomEnc.equals(UTF_8)) {
-            if (xmlGuessEnc != null && !xmlGuessEnc.equals(UTF_8)) {
-                final String msg = MessageFormat.format(RAW_EX_1, bomEnc, xmlGuessEnc, xmlEnc);
-                throw new XmlStreamReaderException(msg, bomEnc, xmlGuessEnc, xmlEnc);
-            }
-            if (xmlEnc != null && !xmlEnc.equals(UTF_8)) {
-                final String msg = MessageFormat.format(RAW_EX_1, bomEnc, xmlGuessEnc, xmlEnc);
-                throw new XmlStreamReaderException(msg, bomEnc, xmlGuessEnc, xmlEnc);
-            }
-            return bomEnc;
-        }
-
-        // BOM is UTF-16BE or UTF-16LE
-        if (bomEnc.equals(UTF_16BE) || bomEnc.equals(UTF_16LE)) {
-            if (xmlGuessEnc != null && !xmlGuessEnc.equals(bomEnc)) {
-                final String msg = MessageFormat.format(RAW_EX_1, bomEnc, xmlGuessEnc, xmlEnc);
-                throw new XmlStreamReaderException(msg, bomEnc, xmlGuessEnc, xmlEnc);
-            }
-            if (xmlEnc != null && !xmlEnc.equals(UTF_16) && !xmlEnc.equals(bomEnc)) {
-                final String msg = MessageFormat.format(RAW_EX_1, bomEnc, xmlGuessEnc, xmlEnc);
-                throw new XmlStreamReaderException(msg, bomEnc, xmlGuessEnc, xmlEnc);
-            }
-            return bomEnc;
-        }
-
-        // BOM is UTF-32BE or UTF-32LE
-        if (bomEnc.equals(UTF_32BE) || bomEnc.equals(UTF_32LE)) {
-            if (xmlGuessEnc != null && !xmlGuessEnc.equals(bomEnc)) {
-                final String msg = MessageFormat.format(RAW_EX_1, bomEnc, xmlGuessEnc, xmlEnc);
-                throw new XmlStreamReaderException(msg, bomEnc, xmlGuessEnc, xmlEnc);
-            }
-            if (xmlEnc != null && !xmlEnc.equals(UTF_32) && !xmlEnc.equals(bomEnc)) {
-                final String msg = MessageFormat.format(RAW_EX_1, bomEnc, xmlGuessEnc, xmlEnc);
-                throw new XmlStreamReaderException(msg, bomEnc, xmlGuessEnc, xmlEnc);
-            }
-            return bomEnc;
-        }
-
-        // BOM is something else
-        final String msg = MessageFormat.format(RAW_EX_2, bomEnc, xmlGuessEnc, xmlEnc);
-        throw new XmlStreamReaderException(msg, bomEnc, xmlGuessEnc, xmlEnc);
-    }
-
-
-    /**
-     * Calculate the HTTP encoding.
-     *
-     * @param httpContentType The HTTP content type
-     * @param bomEnc BOM encoding
-     * @param xmlGuessEnc XML Guess encoding
-     * @param xmlEnc XML encoding
-     * @param lenient indicates if the charset encoding detection should be
-     *        relaxed.
-     * @return the HTTP encoding
-     * @throws IOException thrown if there is a problem reading the stream.
-     */
-    String calculateHttpEncoding(final String httpContentType,
-            final String bomEnc, final String xmlGuessEnc, final String xmlEnc,
-            final boolean lenient) throws IOException {
-
-        // Lenient and has XML encoding
-        if (lenient && xmlEnc != null) {
-            return xmlEnc;
-        }
-
-        // Determine mime/encoding content types from HTTP Content Type
-        final String cTMime = getContentTypeMime(httpContentType);
-        final String cTEnc  = getContentTypeEncoding(httpContentType);
-        final boolean appXml  = isAppXml(cTMime);
-        final boolean textXml = isTextXml(cTMime);
-
-        // Mime type NOT "application/xml" or "text/xml"
-        if (!appXml && !textXml) {
-            final String msg = MessageFormat.format(HTTP_EX_3, cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc);
-            throw new XmlStreamReaderException(msg, cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc);
-        }
-
-        // No content type encoding
-        if (cTEnc == null) {
-            if (appXml) {
-                return calculateRawEncoding(bomEnc, xmlGuessEnc, xmlEnc);
-            } else {
-                return defaultEncoding == null ? US_ASCII : defaultEncoding;
-            }
-        }
-
-        // UTF-16BE or UTF-16LE content type encoding
-        if (cTEnc.equals(UTF_16BE) || cTEnc.equals(UTF_16LE)) {
-            if (bomEnc != null) {
-                final String msg = MessageFormat.format(HTTP_EX_1, cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc);
-                throw new XmlStreamReaderException(msg, cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc);
-            }
-            return cTEnc;
-        }
-
-        // UTF-16 content type encoding
-        if (cTEnc.equals(UTF_16)) {
-            if (bomEnc != null && bomEnc.startsWith(UTF_16)) {
-                return bomEnc;
-            }
-            final String msg = MessageFormat.format(HTTP_EX_2, cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc);
-            throw new XmlStreamReaderException(msg, cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc);
-        }
-
-        // UTF-32BE or UTF-132E content type encoding
-        if (cTEnc.equals(UTF_32BE) || cTEnc.equals(UTF_32LE)) {
-            if (bomEnc != null) {
-                final String msg = MessageFormat.format(HTTP_EX_1, cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc);
-                throw new XmlStreamReaderException(msg, cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc);
-            }
-            return cTEnc;
-        }
-
-        // UTF-32 content type encoding
-        if (cTEnc.equals(UTF_32)) {
-            if (bomEnc != null && bomEnc.startsWith(UTF_32)) {
-                return bomEnc;
-            }
-            final String msg = MessageFormat.format(HTTP_EX_2, cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc);
-            throw new XmlStreamReaderException(msg, cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc);
-        }
-
-        return cTEnc;
-    }
-
-    /**
-     * Returns MIME type or NULL if httpContentType is NULL.
-     *
-     * @param httpContentType the HTTP content type
-     * @return The mime content type
-     */
-    static String getContentTypeMime(final String httpContentType) {
-        String mime = null;
-        if (httpContentType != null) {
-            final int i = httpContentType.indexOf(";");
-            if (i >= 0) {
-                mime = httpContentType.substring(0, i);
-            } else {
-                mime = httpContentType;
-            }
-            mime = mime.trim();
-        }
-        return mime;
-    }
-
-    private static final Pattern CHARSET_PATTERN = Pattern
-            .compile("charset=[\"']?([.[^; \"']]*)[\"']?");
-
-    /**
-     * Returns charset parameter value, NULL if not present, NULL if
-     * httpContentType is NULL.
-     *
-     * @param httpContentType the HTTP content type
-     * @return The content type encoding (upcased)
-     */
-    static String getContentTypeEncoding(final String httpContentType) {
-        String encoding = null;
-        if (httpContentType != null) {
-            final int i = httpContentType.indexOf(";");
-            if (i > -1) {
-                final String postMime = httpContentType.substring(i + 1);
-                final Matcher m = CHARSET_PATTERN.matcher(postMime);
-                encoding = m.find() ? m.group(1) : null;
-                encoding = encoding != null ? encoding.toUpperCase(Locale.US) : null;
-            }
-        }
-        return encoding;
-    }
-
-    public static final Pattern ENCODING_PATTERN = Pattern.compile(
-            "<\\?xml.*encoding[\\s]*=[\\s]*((?:\".[^\"]*\")|(?:'.[^']*'))",
-            Pattern.MULTILINE);
-
-    /**
-     * Returns the encoding declared in the <?xml encoding=...?>, NULL if none.
-     *
-     * @param is InputStream to create the reader from.
-     * @param guessedEnc guessed encoding
-     * @return the encoding declared in the <?xml encoding=...?>
-     * @throws IOException thrown if there is a problem reading the stream.
-     */
-    private static String getXmlProlog(final InputStream is, final String guessedEnc)
-            throws IOException {
-        String encoding = null;
-        if (guessedEnc != null) {
-            final byte[] bytes = new byte[BUFFER_SIZE];
-            is.mark(BUFFER_SIZE);
-            int offset = 0;
-            int max = BUFFER_SIZE;
-            int c = is.read(bytes, offset, max);
-            int firstGT = -1;
-            String xmlProlog = ""; // avoid possible NPE warning (cannot happen; this just silences the warning)
-            while (c != -1 && firstGT == -1 && offset < BUFFER_SIZE) {
-                offset += c;
-                max -= c;
-                c = is.read(bytes, offset, max);
-                xmlProlog = new String(bytes, 0, offset, guessedEnc);
-                firstGT = xmlProlog.indexOf('>');
-            }
-            if (firstGT == -1) {
-                if (c == -1) {
-                    throw new IOException("Unexpected end of XML stream");
-                } else {
-                    throw new IOException(
-                            "XML prolog or ROOT element not found on first "
-                                    + offset + " bytes");
-                }
-            }
-            final int bytesRead = offset;
-            if (bytesRead > 0) {
-                is.reset();
-                final BufferedReader bReader = new BufferedReader(new StringReader(
-                        xmlProlog.substring(0, firstGT + 1)));
-                final StringBuffer prolog = new StringBuffer();
-                String line = bReader.readLine();
-                while (line != null) {
-                    prolog.append(line);
-                    line = bReader.readLine();
-                }
-                final Matcher m = ENCODING_PATTERN.matcher(prolog);
-                if (m.find()) {
-                    encoding = m.group(1).toUpperCase();
-                    encoding = encoding.substring(1, encoding.length() - 1);
-                }
-            }
-        }
-        return encoding;
-    }
-
-    /**
-     * Indicates if the MIME type belongs to the APPLICATION XML family.
-     *
-     * @param mime The mime type
-     * @return true if the mime type belongs to the APPLICATION XML family,
-     * otherwise false
-     */
-    static boolean isAppXml(final String mime) {
-        return mime != null &&
-               (mime.equals("application/xml") ||
-                mime.equals("application/xml-dtd") ||
-                mime.equals("application/xml-external-parsed-entity") ||
-               mime.startsWith("application/") && mime.endsWith("+xml"));
-    }
-
-    /**
-     * Indicates if the MIME type belongs to the TEXT XML family.
-     *
-     * @param mime The mime type
-     * @return true if the mime type belongs to the TEXT XML family,
-     * otherwise false
-     */
-    static boolean isTextXml(final String mime) {
-        return mime != null &&
-              (mime.equals("text/xml") ||
-               mime.equals("text/xml-external-parsed-entity") ||
-              mime.startsWith("text/") && mime.endsWith("+xml"));
-    }
-
-    private static final String RAW_EX_1 =
-        "Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] encoding mismatch";
-
-    private static final String RAW_EX_2 =
-        "Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] unknown BOM";
-
-    private static final String HTTP_EX_1 =
-        "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], BOM must be NULL";
-
-    private static final String HTTP_EX_2 =
-        "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], encoding mismatch";
-
-    private static final String HTTP_EX_3 =
-        "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], Invalid MIME";
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReaderException.java b/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReaderException.java
deleted file mode 100644
index 4f6e652..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReaderException.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.IOException;
-
-/**
- * The XmlStreamReaderException is thrown by the XmlStreamReader constructors if
- * the charset encoding can not be determined according to the XML 1.0
- * specification and RFC 3023.
- * <p>
- * The exception returns the unconsumed InputStream to allow the application to
- * do an alternate processing with the stream. Note that the original
- * InputStream given to the XmlStreamReader cannot be used as that one has been
- * already read.
- *
- * @version $Id$
- * @since 2.0
- */
-public class XmlStreamReaderException extends IOException {
-
-    private static final long serialVersionUID = 1L;
-
-    private final String bomEncoding;
-
-    private final String xmlGuessEncoding;
-
-    private final String xmlEncoding;
-
-    private final String contentTypeMime;
-
-    private final String contentTypeEncoding;
-
-    /**
-     * Creates an exception instance if the charset encoding could not be
-     * determined.
-     * <p>
-     * Instances of this exception are thrown by the XmlStreamReader.
-     *
-     * @param msg message describing the reason for the exception.
-     * @param bomEnc BOM encoding.
-     * @param xmlGuessEnc XML guess encoding.
-     * @param xmlEnc XML prolog encoding.
-     */
-    public XmlStreamReaderException(final String msg, final String bomEnc,
-            final String xmlGuessEnc, final String xmlEnc) {
-        this(msg, null, null, bomEnc, xmlGuessEnc, xmlEnc);
-    }
-
-    /**
-     * Creates an exception instance if the charset encoding could not be
-     * determined.
-     * <p>
-     * Instances of this exception are thrown by the XmlStreamReader.
-     *
-     * @param msg message describing the reason for the exception.
-     * @param ctMime MIME type in the content-type.
-     * @param ctEnc encoding in the content-type.
-     * @param bomEnc BOM encoding.
-     * @param xmlGuessEnc XML guess encoding.
-     * @param xmlEnc XML prolog encoding.
-     */
-    public XmlStreamReaderException(final String msg, final String ctMime, final String ctEnc,
-            final String bomEnc, final String xmlGuessEnc, final String xmlEnc) {
-        super(msg);
-        contentTypeMime = ctMime;
-        contentTypeEncoding = ctEnc;
-        bomEncoding = bomEnc;
-        xmlGuessEncoding = xmlGuessEnc;
-        xmlEncoding = xmlEnc;
-    }
-
-    /**
-     * Returns the BOM encoding found in the InputStream.
-     *
-     * @return the BOM encoding, null if none.
-     */
-    public String getBomEncoding() {
-        return bomEncoding;
-    }
-
-    /**
-     * Returns the encoding guess based on the first bytes of the InputStream.
-     *
-     * @return the encoding guess, null if it couldn't be guessed.
-     */
-    public String getXmlGuessEncoding() {
-        return xmlGuessEncoding;
-    }
-
-    /**
-     * Returns the encoding found in the XML prolog of the InputStream.
-     *
-     * @return the encoding of the XML prolog, null if none.
-     */
-    public String getXmlEncoding() {
-        return xmlEncoding;
-    }
-
-    /**
-     * Returns the MIME type in the content-type used to attempt determining the
-     * encoding.
-     *
-     * @return the MIME type in the content-type, null if there was not
-     *         content-type or the encoding detection did not involve HTTP.
-     */
-    public String getContentTypeMime() {
-        return contentTypeMime;
-    }
-
-    /**
-     * Returns the encoding in the content-type used to attempt determining the
-     * encoding.
-     *
-     * @return the encoding in the content-type, null if there was not
-     *         content-type, no encoding in it or the encoding detection did not
-     *         involve HTTP.
-     */
-    public String getContentTypeEncoding() {
-        return contentTypeEncoding;
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/input/package.html b/trunk/src/main/java/org/apache/commons/io/input/package.html
deleted file mode 100644
index 440fa0f..0000000
--- a/trunk/src/main/java/org/apache/commons/io/input/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<html>
-<body>
-<p>
-This package provides implementations of input classes, such as
-<code>InputStream</code> and <code>Reader</code>.
-</p>
-</body>
-</html>
diff --git a/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationListener.java b/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationListener.java
deleted file mode 100644
index cddac61..0000000
--- a/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationListener.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.monitor;
-import java.io.File;
-
-/**
- * A listener that receives events of file system modifications.
- * <p>
- * Register {@link FileAlterationListener}s with a {@link FileAlterationObserver}.
- * 
- * @see FileAlterationObserver
- * @version $Id$
- * @since 2.0
- */
-public interface FileAlterationListener {
-
-    /**
-     * File system observer started checking event.
-     *
-     * @param observer The file system observer
-     */
-    void onStart(final FileAlterationObserver observer);
-
-    /**
-     * Directory created Event.
-     * 
-     * @param directory The directory created
-     */
-    void onDirectoryCreate(final File directory);
-
-    /**
-     * Directory changed Event.
-     * 
-     * @param directory The directory changed
-     */
-    void onDirectoryChange(final File directory);
-
-    /**
-     * Directory deleted Event.
-     * 
-     * @param directory The directory deleted
-     */
-    void onDirectoryDelete(final File directory);
-
-    /**
-     * File created Event.
-     * 
-     * @param file The file created
-     */
-    void onFileCreate(final File file);
-
-    /**
-     * File changed Event.
-     * 
-     * @param file The file changed
-     */
-    void onFileChange(final File file);
-
-    /**
-     * File deleted Event.
-     * 
-     * @param file The file deleted
-     */
-    void onFileDelete(final File file);
-
-    /**
-     * File system observer finished checking event.
-     *
-     * @param observer The file system observer
-     */
-    void onStop(final FileAlterationObserver observer);
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationListenerAdaptor.java b/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationListenerAdaptor.java
deleted file mode 100644
index 32a9f82..0000000
--- a/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationListenerAdaptor.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.monitor;
-
-import java.io.File;
-
-/**
- * Convenience {@link FileAlterationListener} implementation that does nothing.
- * 
- * @see FileAlterationObserver
- * @version $Id$
- * @since 2.0
- */
-public class FileAlterationListenerAdaptor implements FileAlterationListener {
-
-    /**
-     * File system observer started checking event.
-     *
-     * @param observer The file system observer (ignored)
-     */
-    public void onStart(final FileAlterationObserver observer) {
-    }
-
-    /**
-     * Directory created Event.
-     * 
-     * @param directory The directory created (ignored)
-     */
-    public void onDirectoryCreate(final File directory) {
-    }
-
-    /**
-     * Directory changed Event.
-     * 
-     * @param directory The directory changed (ignored)
-     */
-    public void onDirectoryChange(final File directory) {
-    }
-
-    /**
-     * Directory deleted Event.
-     * 
-     * @param directory The directory deleted (ignored)
-     */
-    public void onDirectoryDelete(final File directory) {
-    }
-
-    /**
-     * File created Event.
-     * 
-     * @param file The file created (ignored)
-     */
-    public void onFileCreate(final File file) {
-    }
-
-    /**
-     * File changed Event.
-     * 
-     * @param file The file changed (ignored)
-     */
-    public void onFileChange(final File file) {
-    }
-
-    /**
-     * File deleted Event.
-     * 
-     * @param file The file deleted (ignored)
-     */
-    public void onFileDelete(final File file) {
-    }
-
-    /**
-     * File system observer finished checking event.
-     *
-     * @param observer The file system observer (ignored)
-     */
-    public void onStop(final FileAlterationObserver observer) {
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationMonitor.java b/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationMonitor.java
deleted file mode 100644
index 86eb655..0000000
--- a/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationMonitor.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.monitor;
-
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.ThreadFactory;
-
-/**
- * A runnable that spawns a monitoring thread triggering any
- * registered {@link FileAlterationObserver} at a specified interval.
- * 
- * @see FileAlterationObserver
- * @version $Id$
- * @since 2.0
- */
-public final class FileAlterationMonitor implements Runnable {
-
-    private final long interval;
-    private final List<FileAlterationObserver> observers = new CopyOnWriteArrayList<FileAlterationObserver>();
-    private Thread thread = null;
-    private ThreadFactory threadFactory;
-    private volatile boolean running = false;
-
-    /**
-     * Construct a monitor with a default interval of 10 seconds.
-     */
-    public FileAlterationMonitor() {
-        this(10000);
-    }
-
-    /**
-     * Construct a monitor with the specified interval.
-     *
-     * @param interval The amount of time in miliseconds to wait between
-     * checks of the file system
-     */
-    public FileAlterationMonitor(final long interval) {
-        this.interval = interval;
-    }
-
-    /**
-     * Construct a monitor with the specified interval and set of observers.
-     *
-     * @param interval The amount of time in miliseconds to wait between
-     * checks of the file system
-     * @param observers The set of observers to add to the monitor.
-     */
-    public FileAlterationMonitor(final long interval, final FileAlterationObserver... observers) {
-        this(interval);
-        if (observers != null) {
-            for (final FileAlterationObserver observer : observers) {
-                addObserver(observer);
-            }
-        }
-    }
-
-    /**
-     * Return the interval.
-     *
-     * @return the interval
-     */
-    public long getInterval() {
-        return interval;
-    }
-
-    /**
-     * Set the thread factory.
-     *
-     * @param threadFactory the thread factory
-     */
-    public synchronized void setThreadFactory(final ThreadFactory threadFactory) {
-        this.threadFactory = threadFactory;
-    }
-
-    /**
-     * Add a file system observer to this monitor.
-     *
-     * @param observer The file system observer to add
-     */
-    public void addObserver(final FileAlterationObserver observer) {
-        if (observer != null) {
-            observers.add(observer);
-        }
-    }
-
-    /**
-     * Remove a file system observer from this monitor.
-     *
-     * @param observer The file system observer to remove
-     */
-    public void removeObserver(final FileAlterationObserver observer) {
-        if (observer != null) {
-            while (observers.remove(observer)) {
-            }
-        }
-    }
-
-    /**
-     * Returns the set of {@link FileAlterationObserver} registered with
-     * this monitor. 
-     *
-     * @return The set of {@link FileAlterationObserver}
-     */
-    public Iterable<FileAlterationObserver> getObservers() {
-        return observers;
-    }
-
-    /**
-     * Start monitoring.
-     *
-     * @throws Exception if an error occurs initializing the observer
-     */
-    public synchronized void start() throws Exception {
-        if (running) {
-            throw new IllegalStateException("Monitor is already running");
-        }
-        for (final FileAlterationObserver observer : observers) {
-            observer.initialize();
-        }
-        running = true;
-        if (threadFactory != null) {
-            thread = threadFactory.newThread(this);
-        } else {
-            thread = new Thread(this);
-        }
-        thread.start();
-    }
-
-    /**
-     * Stop monitoring.
-     *
-     * @throws Exception if an error occurs initializing the observer
-     */
-    public synchronized void stop() throws Exception {
-        stop(interval);
-    }
-
-    /**
-     * Stop monitoring.
-     *
-     * @param stopInterval the amount of time in milliseconds to wait for the thread to finish.
-     * A value of zero will wait until the thread is finished (see {@link Thread#join(long)}).
-     * @throws Exception if an error occurs initializing the observer
-     * @since 2.1
-     */
-    public synchronized void stop(final long stopInterval) throws Exception {
-        if (running == false) {
-            throw new IllegalStateException("Monitor is not running");
-        }
-        running = false;
-        try {
-            thread.join(stopInterval);
-        } catch (final InterruptedException e) {
-            Thread.currentThread().interrupt();
-        }
-        for (final FileAlterationObserver observer : observers) {
-            observer.destroy();
-        }
-    }
-
-    /**
-     * Run.
-     */
-    public void run() {
-        while (running) {
-            for (final FileAlterationObserver observer : observers) {
-                observer.checkAndNotify();
-            }
-            if (!running) {
-                break;
-            }
-            try {
-                Thread.sleep(interval);
-            } catch (final InterruptedException ignored) {
-            }
-        }
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java b/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java
deleted file mode 100644
index 2115c22..0000000
--- a/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.monitor;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.Serializable;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOCase;
-import org.apache.commons.io.comparator.NameFileComparator;
-
-/**
- * FileAlterationObserver represents the state of files below a root directory,
- * checking the filesystem and notifying listeners of create, change or
- * delete events.
- * <p>
- * To use this implementation:
- * <ul>
- *   <li>Create {@link FileAlterationListener} implementation(s) that process
- *      the file/directory create, change and delete events</li>
- *   <li>Register the listener(s) with a {@link FileAlterationObserver} for
- *       the appropriate directory.</li>
- *   <li>Either register the observer(s) with a {@link FileAlterationMonitor} or
- *       run manually.</li>
- * </ul>
- *
- * <h2>Basic Usage</h2>
- * Create a {@link FileAlterationObserver} for the directory and register the listeners:
- * <pre>
- *      File directory = new File(new File("."), "src");
- *      FileAlterationObserver observer = new FileAlterationObserver(directory);
- *      observer.addListener(...);
- *      observer.addListener(...);
- * </pre>
- * To manually observe a directory, initialize the observer and invoked the
- * {@link #checkAndNotify()} method as required:
- * <pre>
- *      // intialize
- *      observer.init();
- *      ...
- *      // invoke as required
- *      observer.checkAndNotify();
- *      ...
- *      observer.checkAndNotify();
- *      ...
- *      // finished
- *      observer.finish();
- * </pre>
- * Alternatively, register the oberver(s) with a {@link FileAlterationMonitor},
- * which creates a new thread, invoking the observer at the specified interval:
- * <pre>
- *      long interval = ...
- *      FileAlterationMonitor monitor = new FileAlterationMonitor(interval);
- *      monitor.addObserver(observer);
- *      monitor.start();
- *      ...
- *      monitor.stop();
- * </pre>
- *
- * <h2>File Filters</h2>
- * This implementation can monitor portions of the file system
- * by using {@link FileFilter}s to observe only the files and/or directories
- * that are of interest. This makes it more efficient and reduces the
- * noise from <i>unwanted</i> file system events.
- * <p>
- * <a href="http://commons.apache.org/io/">Commons IO</a> has a good range of
- * useful, ready made 
- * <a href="../filefilter/package-summary.html">File Filter</a>
- * implementations for this purpose.
- * <p>
- * For example, to only observe 1) visible directories and 2) files with a ".java" suffix
- * in a root directory called "src" you could set up a {@link FileAlterationObserver} in the following
- * way:
- * <pre>
- *      // Create a FileFilter
- *      IOFileFilter directories = FileFilterUtils.and(
- *                                      FileFilterUtils.directoryFileFilter(),
- *                                      HiddenFileFilter.VISIBLE);
- *      IOFileFilter files       = FileFilterUtils.and(
- *                                      FileFilterUtils.fileFileFilter(),
- *                                      FileFilterUtils.suffixFileFilter(".java"));
- *      IOFileFilter filter = FileFilterUtils.or(directories, files);
- *
- *      // Create the File system observer and register File Listeners
- *      FileAlterationObserver observer = new FileAlterationObserver(new File("src"), filter);
- *      observer.addListener(...);
- *      observer.addListener(...);
- * </pre>
- *
- * <h2>FileEntry</h2>
- * {@link FileEntry} represents the state of a file or directory, capturing
- * {@link File} attributes at a point in time. Custom implementations of
- * {@link FileEntry} can be used to capture additional properties that the
- * basic implementation does not support. The {@link FileEntry#refresh(File)}
- * method is used to determine if a file or directory has changed since the last
- * check and stores the current state of the {@link File}'s properties.
- *
- * @see FileAlterationListener
- * @see FileAlterationMonitor
- * @version $Id$
- * @since 2.0
- */
-public class FileAlterationObserver implements Serializable {
-
-    private static final long serialVersionUID = 1185122225658782848L;
-    private final List<FileAlterationListener> listeners = new CopyOnWriteArrayList<FileAlterationListener>();
-    private final FileEntry rootEntry;
-    private final FileFilter fileFilter;
-    private final Comparator<File> comparator;
-
-    /**
-     * Construct an observer for the specified directory.
-     *
-     * @param directoryName the name of the directory to observe
-     */
-    public FileAlterationObserver(final String directoryName) {
-        this(new File(directoryName));
-    }
-
-    /**
-     * Construct an observer for the specified directory and file filter.
-     *
-     * @param directoryName the name of the directory to observe
-     * @param fileFilter The file filter or null if none
-     */
-    public FileAlterationObserver(final String directoryName, final FileFilter fileFilter) {
-        this(new File(directoryName), fileFilter);
-    }
-
-    /**
-     * Construct an observer for the specified directory, file filter and
-     * file comparator.
-     *
-     * @param directoryName the name of the directory to observe
-     * @param fileFilter The file filter or null if none
-     * @param caseSensitivity  what case sensitivity to use comparing file names, null means system sensitive
-     */
-    public FileAlterationObserver(final String directoryName, final FileFilter fileFilter,
-                                  final IOCase caseSensitivity) {
-        this(new File(directoryName), fileFilter, caseSensitivity);
-    }
-
-    /**
-     * Construct an observer for the specified directory.
-     *
-     * @param directory the directory to observe
-     */
-    public FileAlterationObserver(final File directory) {
-        this(directory, null);
-    }
-
-    /**
-     * Construct an observer for the specified directory and file filter.
-     *
-     * @param directory the directory to observe
-     * @param fileFilter The file filter or null if none
-     */
-    public FileAlterationObserver(final File directory, final FileFilter fileFilter) {
-        this(directory, fileFilter, null);
-    }
-
-    /**
-     * Construct an observer for the specified directory, file filter and
-     * file comparator.
-     *
-     * @param directory the directory to observe
-     * @param fileFilter The file filter or null if none
-     * @param caseSensitivity  what case sensitivity to use comparing file names, null means system sensitive
-     */
-    public FileAlterationObserver(final File directory, final FileFilter fileFilter, final IOCase caseSensitivity) {
-        this(new FileEntry(directory), fileFilter, caseSensitivity);
-    }
-
-    /**
-     * Construct an observer for the specified directory, file filter and
-     * file comparator.
-     *
-     * @param rootEntry the root directory to observe
-     * @param fileFilter The file filter or null if none
-     * @param caseSensitivity  what case sensitivity to use comparing file names, null means system sensitive
-     */
-    protected FileAlterationObserver(final FileEntry rootEntry, final FileFilter fileFilter,
-                                     final IOCase caseSensitivity) {
-        if (rootEntry == null) {
-            throw new IllegalArgumentException("Root entry is missing");
-        }
-        if (rootEntry.getFile() == null) {
-            throw new IllegalArgumentException("Root directory is missing");
-        }
-        this.rootEntry = rootEntry;
-        this.fileFilter = fileFilter;
-        if (caseSensitivity == null || caseSensitivity.equals(IOCase.SYSTEM)) {
-            this.comparator = NameFileComparator.NAME_SYSTEM_COMPARATOR;
-        } else if (caseSensitivity.equals(IOCase.INSENSITIVE)) {
-            this.comparator = NameFileComparator.NAME_INSENSITIVE_COMPARATOR;
-        } else {
-            this.comparator = NameFileComparator.NAME_COMPARATOR;
-        }
-    }
-
-    /**
-     * Return the directory being observed.
-     *
-     * @return the directory being observed
-     */
-    public File getDirectory() {
-        return rootEntry.getFile();
-    }
-
-    /**
-     * Return the fileFilter.
-     *
-     * @return the fileFilter
-     * @since 2.1
-     */
-    public FileFilter getFileFilter() {
-        return fileFilter;
-    }
-
-    /**
-     * Add a file system listener.
-     *
-     * @param listener The file system listener
-     */
-    public void addListener(final FileAlterationListener listener) {
-        if (listener != null) {
-            listeners.add(listener);
-        }
-    }
-
-    /**
-     * Remove a file system listener.
-     *
-     * @param listener The file system listener
-     */
-    public void removeListener(final FileAlterationListener listener) {
-        if (listener != null) {
-            while (listeners.remove(listener)) {
-            }
-        }
-    }
-
-    /**
-     * Returns the set of registered file system listeners.
-     *
-     * @return The file system listeners
-     */
-    public Iterable<FileAlterationListener> getListeners() {
-        return listeners;
-    }
-
-    /**
-     * Initialize the observer.
-     *
-     * @throws Exception if an error occurs
-     */
-    public void initialize() throws Exception {
-        rootEntry.refresh(rootEntry.getFile());
-        final FileEntry[] children = doListFiles(rootEntry.getFile(), rootEntry);
-        rootEntry.setChildren(children);
-    }
-
-    /**
-     * Final processing.
-     *
-     * @throws Exception if an error occurs
-     */
-    public void destroy() throws Exception {
-    }
-
-    /**
-     * Check whether the file and its chlidren have been created, modified or deleted.
-     */
-    public void checkAndNotify() {
-
-        /* fire onStart() */
-        for (final FileAlterationListener listener : listeners) {
-            listener.onStart(this);
-        }
-
-        /* fire directory/file events */
-        final File rootFile = rootEntry.getFile();
-        if (rootFile.exists()) {
-            checkAndNotify(rootEntry, rootEntry.getChildren(), listFiles(rootFile));
-        } else if (rootEntry.isExists()) {
-            checkAndNotify(rootEntry, rootEntry.getChildren(), FileUtils.EMPTY_FILE_ARRAY);
-        } else {
-            // Didn't exist and still doesn't
-        }
-
-        /* fire onStop() */
-        for (final FileAlterationListener listener : listeners) {
-            listener.onStop(this);
-        }
-    }
-
-    /**
-     * Compare two file lists for files which have been created, modified or deleted.
-     *
-     * @param parent The parent entry
-     * @param previous The original list of files
-     * @param files  The current list of files
-     */
-    private void checkAndNotify(final FileEntry parent, final FileEntry[] previous, final File[] files) {
-        int c = 0;
-        final FileEntry[] current = files.length > 0 ? new FileEntry[files.length] : FileEntry.EMPTY_ENTRIES;
-        for (final FileEntry entry : previous) {
-            while (c < files.length && comparator.compare(entry.getFile(), files[c]) > 0) {
-                current[c] = createFileEntry(parent, files[c]);
-                doCreate(current[c]);
-                c++;
-            }
-            if (c < files.length && comparator.compare(entry.getFile(), files[c]) == 0) {
-                doMatch(entry, files[c]);
-                checkAndNotify(entry, entry.getChildren(), listFiles(files[c]));
-                current[c] = entry;
-                c++;
-            } else {
-                checkAndNotify(entry, entry.getChildren(), FileUtils.EMPTY_FILE_ARRAY);
-                doDelete(entry);
-            }
-        }
-        for (; c < files.length; c++) {
-            current[c] = createFileEntry(parent, files[c]);
-            doCreate(current[c]);
-        }
-        parent.setChildren(current);
-    }
-
-    /**
-     * Create a new file entry for the specified file.
-     *
-     * @param parent The parent file entry
-     * @param file The file to create an entry for
-     * @return A new file entry
-     */
-    private FileEntry createFileEntry(final FileEntry parent, final File file) {
-        final FileEntry entry = parent.newChildInstance(file);
-        entry.refresh(file);
-        final FileEntry[] children = doListFiles(file, entry);
-        entry.setChildren(children);
-        return entry;
-    }
-
-    /**
-     * List the files
-     * @param file The file to list files for
-     * @param entry the parent entry
-     * @return The child files
-     */
-    private FileEntry[] doListFiles(File file, FileEntry entry) {
-        final File[] files = listFiles(file);
-        final FileEntry[] children = files.length > 0 ? new FileEntry[files.length] : FileEntry.EMPTY_ENTRIES;
-        for (int i = 0; i < files.length; i++) {
-            children[i] = createFileEntry(entry, files[i]);
-        }
-        return children;
-    }
-
-    /**
-     * Fire directory/file created events to the registered listeners.
-     *
-     * @param entry The file entry
-     */
-    private void doCreate(final FileEntry entry) {
-        for (final FileAlterationListener listener : listeners) {
-            if (entry.isDirectory()) {
-                listener.onDirectoryCreate(entry.getFile());
-            } else {
-                listener.onFileCreate(entry.getFile());
-            }
-        }
-        final FileEntry[] children = entry.getChildren();
-        for (final FileEntry aChildren : children) {
-            doCreate(aChildren);
-        }
-    }
-
-    /**
-     * Fire directory/file change events to the registered listeners.
-     *
-     * @param entry The previous file system entry
-     * @param file The current file
-     */
-    private void doMatch(final FileEntry entry, final File file) {
-        if (entry.refresh(file)) {
-            for (final FileAlterationListener listener : listeners) {
-                if (entry.isDirectory()) {
-                    listener.onDirectoryChange(file);
-                } else {
-                    listener.onFileChange(file);
-                }
-            }
-        }
-    }
-
-    /**
-     * Fire directory/file delete events to the registered listeners.
-     *
-     * @param entry The file entry
-     */
-    private void doDelete(final FileEntry entry) {
-        for (final FileAlterationListener listener : listeners) {
-            if (entry.isDirectory()) {
-                listener.onDirectoryDelete(entry.getFile());
-            } else {
-                listener.onFileDelete(entry.getFile());
-            }
-        }
-    }
-
-    /**
-     * List the contents of a directory
-     *
-     * @param file The file to list the contents of
-     * @return the directory contents or a zero length array if
-     * the empty or the file is not a directory
-     */
-    private File[] listFiles(final File file) {
-        File[] children = null;
-        if (file.isDirectory()) {
-            children = fileFilter == null ? file.listFiles() : file.listFiles(fileFilter);
-        }
-        if (children == null) {
-            children = FileUtils.EMPTY_FILE_ARRAY;
-        }
-        if (comparator != null && children.length > 1) {
-            Arrays.sort(children, comparator);
-        }
-        return children;
-    }
-
-    /**
-     * Provide a String representation of this observer.
-     *
-     * @return a String representation of this observer
-     */
-    @Override
-    public String toString() {
-        final StringBuilder builder = new StringBuilder();
-        builder.append(getClass().getSimpleName());
-        builder.append("[file='");
-        builder.append(getDirectory().getPath());
-        builder.append('\'');
-        if (fileFilter != null) {
-            builder.append(", ");
-            builder.append(fileFilter.toString());
-        }
-        builder.append(", listeners=");
-        builder.append(listeners.size());
-        builder.append("]");
-        return builder.toString();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/monitor/FileEntry.java b/trunk/src/main/java/org/apache/commons/io/monitor/FileEntry.java
deleted file mode 100644
index bbd942b..0000000
--- a/trunk/src/main/java/org/apache/commons/io/monitor/FileEntry.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.monitor;
-
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * The state of a file or directory, capturing the following {@link File} attributes at a point in time.
- * <ul>
- *   <li>File Name (see {@link File#getName()})</li>
- *   <li>Exists - whether the file exists or not (see {@link File#exists()})</li>
- *   <li>Directory - whether the file is a directory or not (see {@link File#isDirectory()})</li>
- *   <li>Last Modified Date/Time (see {@link File#lastModified()})</li>
- *   <li>Length (see {@link File#length()}) - directories treated as zero</li>
- *   <li>Children - contents of a directory (see {@link File#listFiles(java.io.FileFilter)})</li>
- * </ul>
- * 
- * <h3>Custom Implementations</h3>
- * <p>
- * If the state of additional {@link File} attributes is required then create a custom
- * {@link FileEntry} with properties for those attributes. Override the
- * {@link #newChildInstance(File)} to return a new instance of the appropriate type.
- * You may also want to override the {@link #refresh(File)} method.
- * </p>
- * @see FileAlterationObserver
- * @since 2.0
- */
-public class FileEntry implements Serializable {
-
-    private static final long serialVersionUID = -2505664948818681153L;
-
-    static final FileEntry[] EMPTY_ENTRIES = new FileEntry[0];
-
-    private final FileEntry parent;
-    private FileEntry[] children;
-    private final File file;
-    private String name;
-    private boolean exists;
-    private boolean directory;
-    private long lastModified;
-    private long length;
-
-    /**
-     * Construct a new monitor for a specified {@link File}.
-     *
-     * @param file The file being monitored
-     */
-    public FileEntry(final File file) {
-        this(null, file);
-    }
-
-    /**
-     * Construct a new monitor for a specified {@link File}.
-     *
-     * @param parent The parent
-     * @param file The file being monitored
-     */
-    public FileEntry(final FileEntry parent, final File file) {
-        if (file == null) {
-            throw new IllegalArgumentException("File is missing");
-        }
-        this.file = file;
-        this.parent = parent;
-        this.name = file.getName();
-    }
-
-    /**
-     * Refresh the attributes from the {@link File}, indicating
-     * whether the file has changed.
-     * <p>
-     * This implementation refreshes the <code>name</code>, <code>exists</code>,
-     * <code>directory</code>, <code>lastModified</code> and <code>length</code>
-     * properties.
-     * <p>
-     * The <code>exists</code>, <code>directory</code>, <code>lastModified</code>
-     * and <code>length</code> properties are compared for changes
-     *
-     * @param file the file instance to compare to
-     * @return {@code true} if the file has changed, otherwise {@code false}
-     */
-    public boolean refresh(final File file) {
-
-        // cache original values
-        final boolean origExists       = exists;
-        final long    origLastModified = lastModified;
-        final boolean origDirectory    = directory;
-        final long    origLength       = length;
-
-        // refresh the values
-        name         = file.getName();
-        exists       = file.exists();
-        directory    = exists && file.isDirectory();
-        lastModified = exists ? file.lastModified() : 0;
-        length       = exists && !directory ? file.length() : 0;
-
-        // Return if there are changes
-        return exists != origExists ||
-                lastModified != origLastModified ||
-                directory != origDirectory ||
-                length != origLength;
-    }
-
-    /**
-     * Create a new child instance.
-     * <p>
-     * Custom implementations should override this method to return
-     * a new instance of the appropriate type.
-     *
-     * @param file The child file
-     * @return a new child instance
-     */
-    public FileEntry newChildInstance(final File file) {
-        return new FileEntry(this, file);
-    }
-
-    /**
-     * Return the parent entry.
-     *
-     * @return the parent entry
-     */
-    public FileEntry getParent() {
-        return parent;
-    }
-
-    /**
-     * Return the level
-     *
-     * @return the level
-     */
-    public int getLevel() {
-        return parent == null ? 0 : parent.getLevel() + 1;
-    }
-
-    /**
-     * Return the directory's files.
-     *
-     * @return This directory's files or an empty
-     * array if the file is not a directory or the
-     * directory is empty
-     */
-    public FileEntry[] getChildren() {
-        return children != null ? children : EMPTY_ENTRIES;
-    }
-
-    /**
-     * Set the directory's files.
-     *
-     * @param children This directory's files, may be null
-     */
-    public void setChildren(final FileEntry[] children) {
-        this.children = children;
-    }
-
-    /**
-     * Return the file being monitored.
-     *
-     * @return the file being monitored
-     */
-    public File getFile() {
-        return file;
-    }
-
-    /**
-     * Return the file name.
-     *
-     * @return the file name
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Set the file name.
-     *
-     * @param name the file name
-     */
-    public void setName(final String name) {
-        this.name = name;
-    }
-
-    /**
-     * Return the last modified time from the last time it
-     * was checked.
-     *
-     * @return the last modified time
-     */
-    public long getLastModified() {
-        return lastModified;
-    }
-
-    /**
-     * Return the last modified time from the last time it
-     * was checked.
-     *
-     * @param lastModified The last modified time
-     */
-    public void setLastModified(final long lastModified) {
-        this.lastModified = lastModified;
-    }
-
-    /**
-     * Return the length.
-     *
-     * @return the length
-     */
-    public long getLength() {
-        return length;
-    }
-
-    /**
-     * Set the length.
-     *
-     * @param length the length
-     */
-    public void setLength(final long length) {
-        this.length = length;
-    }
-
-    /**
-     * Indicate whether the file existed the last time it
-     * was checked.
-     *
-     * @return whether the file existed
-     */
-    public boolean isExists() {
-        return exists;
-    }
-
-    /**
-     * Set whether the file existed the last time it
-     * was checked.
-     *
-     * @param exists whether the file exists or not
-     */
-    public void setExists(final boolean exists) {
-        this.exists = exists;
-    }
-
-    /**
-     * Indicate whether the file is a directory or not.
-     *
-     * @return whether the file is a directory or not
-     */
-    public boolean isDirectory() {
-        return directory;
-    }
-
-    /**
-     * Set whether the file is a directory or not.
-     *
-     * @param directory whether the file is a directory or not
-     */
-    public void setDirectory(final boolean directory) {
-        this.directory = directory;
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/monitor/package.html b/trunk/src/main/java/org/apache/commons/io/monitor/package.html
deleted file mode 100644
index 82c1eae..0000000
--- a/trunk/src/main/java/org/apache/commons/io/monitor/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<html>
-<body>
-<p>
-This package provides a component for monitoring file system events
-(directory and file create, update and delete events).
-</p>
-</body>
-</html>
diff --git a/trunk/src/main/java/org/apache/commons/io/output/AppendableOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/AppendableOutputStream.java
deleted file mode 100644
index 53b2a73..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/AppendableOutputStream.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * OutputStream implementation that writes the data to an {@link Appendable}
- * Object.
- * <p>
- * For example, can be used with any {@link java.io.Writer} or a {@link java.lang.StringBuilder}
- * or {@link java.lang.StringBuffer}.
- *
- * @since 2.5
- * @see java.lang.Appendable
- * @version $Id$
- */
-public class AppendableOutputStream <T extends Appendable> extends OutputStream {
-
-    private final T appendable;
-
-    /**
-     * Construct a new instance with the specified appendable.
-     *
-     * @param appendable the appendable to write to
-     */
-    public AppendableOutputStream(T appendable) {
-        this.appendable = appendable;
-    }
-
-    /**
-     * Write a character to the underlying appendable.
-     *
-     * @param b the character to write
-     * @throws IOException upon error
-     */
-    @Override
-    public void write(int b) throws IOException {
-        appendable.append((char)b);
-    }
-
-    /**
-     * Return the target appendable.
-     *
-     * @return the target appendable
-     */
-    public T getAppendable() {
-        return appendable;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/BrokenOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/BrokenOutputStream.java
deleted file mode 100644
index 1f149ff..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/BrokenOutputStream.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Broken output stream. This stream always throws an {@link IOException} from
- * all {@link OutputStream} methods.
- * <p>
- * This class is mostly useful for testing error handling in code that uses an
- * output stream.
- *
- * @since 2.0
- */
-public class BrokenOutputStream extends OutputStream {
-
-    /**
-     * The exception that is thrown by all methods of this class.
-     */
-    private final IOException exception;
-
-    /**
-     * Creates a new stream that always throws the given exception.
-     *
-     * @param exception the exception to be thrown
-     */
-    public BrokenOutputStream(final IOException exception) {
-        this.exception = exception;
-    }
-
-    /**
-     * Creates a new stream that always throws an {@link IOException}
-     */
-    public BrokenOutputStream() {
-        this(new IOException("Broken output stream"));
-    }
-
-    /**
-     * Throws the configured exception.
-     *
-     * @param b ignored
-     * @throws IOException always thrown
-     */
-    @Override
-    public void write(final int b) throws IOException {
-        throw exception;
-    }
-
-    /**
-     * Throws the configured exception.
-     *
-     * @throws IOException always thrown
-     */
-    @Override
-    public void flush() throws IOException {
-        throw exception;
-    }
-
-    /**
-     * Throws the configured exception.
-     *
-     * @throws IOException always thrown
-     */
-    @Override
-    public void close() throws IOException {
-        throw exception;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
deleted file mode 100644
index 07fc6c7..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import static org.apache.commons.io.IOUtils.EOF;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.SequenceInputStream;
-import java.io.UnsupportedEncodingException;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.commons.io.input.ClosedInputStream;
-
-/**
- * This class implements an output stream in which the data is
- * written into a byte array. The buffer automatically grows as data
- * is written to it.
- * <p>
- * The data can be retrieved using <code>toByteArray()</code> and
- * <code>toString()</code>.
- * <p>
- * Closing a {@code ByteArrayOutputStream} has no effect. The methods in
- * this class can be called after the stream has been closed without
- * generating an {@code IOException}.
- * <p>
- * This is an alternative implementation of the {@link java.io.ByteArrayOutputStream}
- * class. The original implementation only allocates 32 bytes at the beginning.
- * As this class is designed for heavy duty it starts at 1024 bytes. In contrast
- * to the original it doesn't reallocate the whole memory block but allocates
- * additional buffers. This way no buffers need to be garbage collected and
- * the contents don't have to be copied to the new buffer. This class is
- * designed to behave exactly like the original. The only exception is the
- * deprecated toString(int) method that has been ignored.
- *
- * @version $Id$
- */
-public class ByteArrayOutputStream extends OutputStream {
-
-    /** A singleton empty byte array. */
-    private static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
-
-    /** The list of buffers, which grows and never reduces. */
-    private final List<byte[]> buffers = new ArrayList<byte[]>();
-    /** The index of the current buffer. */
-    private int currentBufferIndex;
-    /** The total count of bytes in all the filled buffers. */
-    private int filledBufferSum;
-    /** The current buffer. */
-    private byte[] currentBuffer;
-    /** The total count of bytes written. */
-    private int count;
-    /** Flag to indicate if the buffers can be reused after reset */
-    private boolean reuseBuffers = true;
-
-    /**
-     * Creates a new byte array output stream. The buffer capacity is
-     * initially 1024 bytes, though its size increases if necessary.
-     */
-    public ByteArrayOutputStream() {
-        this(1024);
-    }
-
-    /**
-     * Creates a new byte array output stream, with a buffer capacity of
-     * the specified size, in bytes.
-     *
-     * @param size  the initial size
-     * @throws IllegalArgumentException if size is negative
-     */
-    public ByteArrayOutputStream(final int size) {
-        if (size < 0) {
-            throw new IllegalArgumentException(
-                "Negative initial size: " + size);
-        }
-        synchronized (this) {
-            needNewBuffer(size);
-        }
-    }
-
-    /**
-     * Makes a new buffer available either by allocating
-     * a new one or re-cycling an existing one.
-     *
-     * @param newcount  the size of the buffer if one is created
-     */
-    private void needNewBuffer(final int newcount) {
-        if (currentBufferIndex < buffers.size() - 1) {
-            //Recycling old buffer
-            filledBufferSum += currentBuffer.length;
-
-            currentBufferIndex++;
-            currentBuffer = buffers.get(currentBufferIndex);
-        } else {
-            //Creating new buffer
-            int newBufferSize;
-            if (currentBuffer == null) {
-                newBufferSize = newcount;
-                filledBufferSum = 0;
-            } else {
-                newBufferSize = Math.max(
-                    currentBuffer.length << 1,
-                    newcount - filledBufferSum);
-                filledBufferSum += currentBuffer.length;
-            }
-
-            currentBufferIndex++;
-            currentBuffer = new byte[newBufferSize];
-            buffers.add(currentBuffer);
-        }
-    }
-
-    /**
-     * Write the bytes to byte array.
-     * @param b the bytes to write
-     * @param off The start offset
-     * @param len The number of bytes to write
-     */
-    @Override
-    public void write(final byte[] b, final int off, final int len) {
-        if ((off < 0)
-                || (off > b.length)
-                || (len < 0)
-                || ((off + len) > b.length)
-                || ((off + len) < 0)) {
-            throw new IndexOutOfBoundsException();
-        } else if (len == 0) {
-            return;
-        }
-        synchronized (this) {
-            final int newcount = count + len;
-            int remaining = len;
-            int inBufferPos = count - filledBufferSum;
-            while (remaining > 0) {
-                final int part = Math.min(remaining, currentBuffer.length - inBufferPos);
-                System.arraycopy(b, off + len - remaining, currentBuffer, inBufferPos, part);
-                remaining -= part;
-                if (remaining > 0) {
-                    needNewBuffer(newcount);
-                    inBufferPos = 0;
-                }
-            }
-            count = newcount;
-        }
-    }
-
-    /**
-     * Write a byte to byte array.
-     * @param b the byte to write
-     */
-    @Override
-    public synchronized void write(final int b) {
-        int inBufferPos = count - filledBufferSum;
-        if (inBufferPos == currentBuffer.length) {
-            needNewBuffer(count + 1);
-            inBufferPos = 0;
-        }
-        currentBuffer[inBufferPos] = (byte) b;
-        count++;
-    }
-
-    /**
-     * Writes the entire contents of the specified input stream to this
-     * byte stream. Bytes from the input stream are read directly into the
-     * internal buffers of this streams.
-     *
-     * @param in the input stream to read from
-     * @return total number of bytes read from the input stream
-     *         (and written to this stream)
-     * @throws IOException if an I/O error occurs while reading the input stream
-     * @since 1.4
-     */
-    public synchronized int write(final InputStream in) throws IOException {
-        int readCount = 0;
-        int inBufferPos = count - filledBufferSum;
-        int n = in.read(currentBuffer, inBufferPos, currentBuffer.length - inBufferPos);
-        while (n != EOF) {
-            readCount += n;
-            inBufferPos += n;
-            count += n;
-            if (inBufferPos == currentBuffer.length) {
-                needNewBuffer(currentBuffer.length);
-                inBufferPos = 0;
-            }
-            n = in.read(currentBuffer, inBufferPos, currentBuffer.length - inBufferPos);
-        }
-        return readCount;
-    }
-
-    /**
-     * Return the current size of the byte array.
-     * @return the current size of the byte array
-     */
-    public synchronized int size() {
-        return count;
-    }
-
-    /**
-     * Closing a {@code ByteArrayOutputStream} has no effect. The methods in
-     * this class can be called after the stream has been closed without
-     * generating an {@code IOException}.
-     *
-     * @throws IOException never (this method should not declare this exception
-     * but it has to now due to backwards compatibility)
-     */
-    @Override
-    public void close() throws IOException {
-        //nop
-    }
-
-    /**
-     * @see java.io.ByteArrayOutputStream#reset()
-     */
-    public synchronized void reset() {
-        count = 0;
-        filledBufferSum = 0;
-        currentBufferIndex = 0;
-        if (reuseBuffers) {
-            currentBuffer = buffers.get(currentBufferIndex);
-        } else {
-            //Throw away old buffers
-            currentBuffer = null;
-            int size = buffers.get(0).length;
-            buffers.clear();
-            needNewBuffer(size);
-            reuseBuffers = true;
-        }
-    }
-
-    /**
-     * Writes the entire contents of this byte stream to the
-     * specified output stream.
-     *
-     * @param out  the output stream to write to
-     * @throws IOException if an I/O error occurs, such as if the stream is closed
-     * @see java.io.ByteArrayOutputStream#writeTo(OutputStream)
-     */
-    public synchronized void writeTo(final OutputStream out) throws IOException {
-        int remaining = count;
-        for (final byte[] buf : buffers) {
-            final int c = Math.min(buf.length, remaining);
-            out.write(buf, 0, c);
-            remaining -= c;
-            if (remaining == 0) {
-                break;
-            }
-        }
-    }
-
-    /**
-     * Fetches entire contents of an <code>InputStream</code> and represent
-     * same data as result InputStream.
-     * <p>
-     * This method is useful where,
-     * <ul>
-     * <li>Source InputStream is slow.</li>
-     * <li>It has network resources associated, so we cannot keep it open for
-     * long time.</li>
-     * <li>It has network timeout associated.</li>
-     * </ul>
-     * It can be used in favor of {@link #toByteArray()}, since it
-     * avoids unnecessary allocation and copy of byte[].<br>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input Stream to be fully buffered.
-     * @return A fully buffered stream.
-     * @throws IOException if an I/O error occurs
-     * @since 2.0
-     */
-    public static InputStream toBufferedInputStream(final InputStream input)
-            throws IOException {
-        return toBufferedInputStream(input, 1024);
-    }
-
-    /**
-     * Fetches entire contents of an <code>InputStream</code> and represent
-     * same data as result InputStream.
-     * <p>
-     * This method is useful where,
-     * <ul>
-     * <li>Source InputStream is slow.</li>
-     * <li>It has network resources associated, so we cannot keep it open for
-     * long time.</li>
-     * <li>It has network timeout associated.</li>
-     * </ul>
-     * It can be used in favor of {@link #toByteArray()}, since it
-     * avoids unnecessary allocation and copy of byte[].<br>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input Stream to be fully buffered.
-     * @param size the initial buffer size
-     * @return A fully buffered stream.
-     * @throws IOException if an I/O error occurs
-     * @since 2.5
-     */
-    public static InputStream toBufferedInputStream(final InputStream input, int size)
-            throws IOException {
-        // It does not matter if a ByteArrayOutputStream is not closed as close() is a no-op
-        @SuppressWarnings("resource")
-        final ByteArrayOutputStream output = new ByteArrayOutputStream(size);
-        output.write(input);
-        return output.toInputStream();
-    }
-
-    /**
-     * Gets the current contents of this byte stream as a Input Stream. The
-     * returned stream is backed by buffers of <code>this</code> stream,
-     * avoiding memory allocation and copy, thus saving space and time.<br>
-     *
-     * @return the current contents of this output stream.
-     * @see java.io.ByteArrayOutputStream#toByteArray()
-     * @see #reset()
-     * @since 2.5
-     */
-    public synchronized InputStream toInputStream() {
-        int remaining = count;
-        if (remaining == 0) {
-            return new ClosedInputStream();
-        }
-        final List<ByteArrayInputStream> list = new ArrayList<ByteArrayInputStream>(buffers.size());
-        for (final byte[] buf : buffers) {
-            final int c = Math.min(buf.length, remaining);
-            list.add(new ByteArrayInputStream(buf, 0, c));
-            remaining -= c;
-            if (remaining == 0) {
-                break;
-            }
-        }
-        reuseBuffers = false;
-        return new SequenceInputStream(Collections.enumeration(list));
-    }
-
-    /**
-     * Gets the curent contents of this byte stream as a byte array.
-     * The result is independent of this stream.
-     *
-     * @return the current contents of this output stream, as a byte array
-     * @see java.io.ByteArrayOutputStream#toByteArray()
-     */
-    public synchronized byte[] toByteArray() {
-        int remaining = count;
-        if (remaining == 0) {
-            return EMPTY_BYTE_ARRAY;
-        }
-        final byte newbuf[] = new byte[remaining];
-        int pos = 0;
-        for (final byte[] buf : buffers) {
-            final int c = Math.min(buf.length, remaining);
-            System.arraycopy(buf, 0, newbuf, pos, c);
-            pos += c;
-            remaining -= c;
-            if (remaining == 0) {
-                break;
-            }
-        }
-        return newbuf;
-    }
-
-    /**
-     * Gets the curent contents of this byte stream as a string
-     * using the platform default charset.
-     * @return the contents of the byte array as a String
-     * @see java.io.ByteArrayOutputStream#toString()
-     * @deprecated 2.5 use {@link #toString(String)} instead
-     */
-    @Override
-    @Deprecated
-    public String toString() {
-        // make explicit the use of the default charset
-        return new String(toByteArray(), Charset.defaultCharset());
-    }
-
-    /**
-     * Gets the curent contents of this byte stream as a string
-     * using the specified encoding.
-     *
-     * @param enc  the name of the character encoding
-     * @return the string converted from the byte array
-     * @throws UnsupportedEncodingException if the encoding is not supported
-     * @see java.io.ByteArrayOutputStream#toString(String)
-     */
-    public String toString(final String enc) throws UnsupportedEncodingException {
-        return new String(toByteArray(), enc);
-    }
-
-    /**
-     * Gets the curent contents of this byte stream as a string
-     * using the specified encoding.
-     *
-     * @param charset  the character encoding
-     * @return the string converted from the byte array
-     * @see java.io.ByteArrayOutputStream#toString(String)
-     * @since 2.5
-     */
-    public String toString(final Charset charset) {
-        return new String(toByteArray(), charset);
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/ChunkedOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/ChunkedOutputStream.java
deleted file mode 100644
index 995ca0d..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/ChunkedOutputStream.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * OutputStream which breaks larger output blocks into chunks.
- * Native code may need to copy the input array; if the write buffer
- * is very large this can cause OOME.
- *
- * @since 2.5
- */
-public class ChunkedOutputStream extends FilterOutputStream {
-
-    /**
-     * The default chunk size to use, i.e. {@value} bytes.
-     */
-    private static final int DEFAULT_CHUNK_SIZE = 1024 * 4;
-
-    /**
-     * The maximum chunk size to us when writing data arrays
-     */
-    private final int chunkSize;
-
-    /**
-     * Creates a new stream that uses the specified chunk size.
-     *
-     * @param stream the stream to wrap
-     * @param chunkSize the chunk size to use; must be a positive number.
-     * @throws IllegalArgumentException if the chunk size is &lt;= 0
-     */
-    public ChunkedOutputStream(final OutputStream stream, int chunkSize) {
-       super(stream);
-       if (chunkSize <= 0) {
-           throw new IllegalArgumentException();
-       }
-       this.chunkSize = chunkSize;
-    }
-
-    /**
-     * Creates a new stream that uses a chunk size of {@link #DEFAULT_CHUNK_SIZE}.
-     * 
-     * @param stream the stream to wrap
-     */
-    public ChunkedOutputStream(final OutputStream stream) {
-        this(stream, DEFAULT_CHUNK_SIZE);
-    }
-
-    /**
-     * Writes the data buffer in chunks to the underlying stream
-     *
-     * @param data the data to write
-     * @param srcOffset the offset
-     * @param length the length of data to write
-     *
-     * @throws IOException if an I/O error occurs.
-     */
-    @Override
-    public void write(byte[] data, int srcOffset, int length) throws IOException {
-        int bytes = length;
-        int dstOffset = srcOffset;
-        while(bytes > 0) {
-            int chunk = Math.min(bytes, chunkSize);
-            out.write(data, dstOffset, chunk);
-            bytes -= chunk;
-            dstOffset += chunk;
-        }
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/ChunkedWriter.java b/trunk/src/main/java/org/apache/commons/io/output/ChunkedWriter.java
deleted file mode 100644
index 13826de..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/ChunkedWriter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.FilterWriter;
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * Writer which breaks larger output blocks into chunks.
- * Native code may need to copy the input array; if the write buffer
- * is very large this can cause OOME.
- *
- * @since 2.5
- */
-public class ChunkedWriter extends FilterWriter {
-
-    /**
-     * The default chunk size to use, i.e. {@value} bytes.
-     */
-    private static final int DEFAULT_CHUNK_SIZE = 1024 * 4;
-
-    /**
-     * The maximum chunk size to us when writing data arrays
-     */
-    private final int chunkSize;
-
-    /**
-     * Creates a new writer that uses the specified chunk size.
-     *
-     * @param writer the writer to wrap
-     * @param chunkSize the chunk size to use; must be a positive number.
-     * @throws IllegalArgumentException if the chunk size is &lt;= 0
-     */
-    public ChunkedWriter(final Writer writer, int chunkSize) {
-       super(writer);
-       if (chunkSize <= 0) {
-           throw new IllegalArgumentException();
-       }
-       this.chunkSize = chunkSize;
-    }
-
-    /**
-     * Creates a new writer that uses a chunk size of {@link #DEFAULT_CHUNK_SIZE}
-     * @param writer the writer to wrap
-     */
-    public ChunkedWriter(final Writer writer) {
-        this(writer, DEFAULT_CHUNK_SIZE);
-    }
-
-    /**
-     * writes the data buffer in chunks to the underlying writer
-     * @param data The data
-     * @param srcOffset the offset
-     * @param length the number of bytes to write
-     *
-     * @throws IOException upon error
-     */
-    @Override
-    public void write(char[] data, int srcOffset, int length) throws IOException {
-        int bytes = length;
-        int dstOffset = srcOffset;
-        while(bytes > 0) {
-            int chunk = Math.min(bytes, chunkSize);
-            out.write(data, dstOffset, chunk);
-            bytes -= chunk;
-            dstOffset += chunk;
-        }
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/CloseShieldOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/CloseShieldOutputStream.java
deleted file mode 100644
index f198e8f..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/CloseShieldOutputStream.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.OutputStream;
-
-/**
- * Proxy stream that prevents the underlying output stream from being closed.
- * <p>
- * This class is typically used in cases where an output stream needs to be
- * passed to a component that wants to explicitly close the stream even if
- * other components would still use the stream for output.
- * </p>
- * @version $Id$
- * @since 1.4
- */
-public class CloseShieldOutputStream extends ProxyOutputStream {
-
-    /**
-     * Creates a proxy that shields the given output stream from being
-     * closed.
-     *
-     * @param out underlying output stream
-     */
-    public CloseShieldOutputStream(final OutputStream out) {
-        super(out);
-    }
-
-    /**
-     * Replaces the underlying output stream with a {@link ClosedOutputStream}
-     * sentinel. The original output stream will remain open, but this proxy
-     * will appear closed.
-     */
-    @Override
-    public void close() {
-        out = new ClosedOutputStream();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/ClosedOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/ClosedOutputStream.java
deleted file mode 100644
index 6c7a017..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/ClosedOutputStream.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Closed output stream. This stream throws an exception on all attempts to
- * write something to the stream.
- * <p>
- * Typically uses of this class include testing for corner cases in methods
- * that accept an output stream and acting as a sentinel value instead of
- * a {@code null} output stream.
- *
- * @version $Id$
- * @since 1.4
- */
-public class ClosedOutputStream extends OutputStream {
-
-    /**
-     * A singleton.
-     */
-    public static final ClosedOutputStream CLOSED_OUTPUT_STREAM = new ClosedOutputStream();
-
-    /**
-     * Throws an {@link IOException} to indicate that the stream is closed.
-     *
-     * @param b ignored
-     * @throws IOException always thrown
-     */
-    @Override
-    public void write(final int b) throws IOException {
-        throw new IOException("write(" + b + ") failed: stream is closed");
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/CountingOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/CountingOutputStream.java
deleted file mode 100644
index 1547efe..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/CountingOutputStream.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.OutputStream;
-
-/**
- * A decorating output stream that counts the number of bytes that have passed
- * through the stream so far.
- * <p>
- * A typical use case would be during debugging, to ensure that data is being
- * written as expected.
- *
- * @version $Id$
- */
-public class CountingOutputStream extends ProxyOutputStream {
-
-    /** The count of bytes that have passed. */
-    private long count = 0;
-
-    /**
-     * Constructs a new CountingOutputStream.
-     * 
-     * @param out  the OutputStream to write to
-     */
-    public CountingOutputStream( final OutputStream out ) {
-        super(out);
-    }
-
-    //-----------------------------------------------------------------------
-
-    /**
-     * Updates the count with the number of bytes that are being written.
-     *
-     * @param n number of bytes to be written to the stream
-     * @since 2.0
-     */
-    @Override
-    protected synchronized void beforeWrite(final int n) {
-        count += n;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * The number of bytes that have passed through this stream.
-     * <p>
-     * NOTE: From v1.3 this method throws an ArithmeticException if the
-     * count is greater than can be expressed by an <code>int</code>.
-     * See {@link #getByteCount()} for a method using a <code>long</code>.
-     *
-     * @return the number of bytes accumulated
-     * @throws ArithmeticException if the byte count is too large
-     */
-    public int getCount() {
-        final long result = getByteCount();
-        if (result > Integer.MAX_VALUE) {
-            throw new ArithmeticException("The byte count " + result + " is too large to be converted to an int");
-        }
-        return (int) result;
-    }
-
-    /** 
-     * Set the byte count back to 0. 
-     * <p>
-     * NOTE: From v1.3 this method throws an ArithmeticException if the
-     * count is greater than can be expressed by an <code>int</code>.
-     * See {@link #resetByteCount()} for a method using a <code>long</code>.
-     *
-     * @return the count previous to resetting
-     * @throws ArithmeticException if the byte count is too large
-     */
-    public int resetCount() {
-        final long result = resetByteCount();
-        if (result > Integer.MAX_VALUE) {
-            throw new ArithmeticException("The byte count " + result + " is too large to be converted to an int");
-        }
-        return (int) result;
-    }
-
-    /**
-     * The number of bytes that have passed through this stream.
-     * <p>
-     * NOTE: This method is an alternative for <code>getCount()</code>.
-     * It was added because that method returns an integer which will
-     * result in incorrect count for files over 2GB.
-     *
-     * @return the number of bytes accumulated
-     * @since 1.3
-     */
-    public synchronized long getByteCount() {
-        return this.count;
-    }
-
-    /** 
-     * Set the byte count back to 0. 
-     * <p>
-     * NOTE: This method is an alternative for <code>resetCount()</code>.
-     * It was added because that method returns an integer which will
-     * result in incorrect count for files over 2GB.
-     *
-     * @return the count previous to resetting
-     * @since 1.3
-     */
-    public synchronized long resetByteCount() {
-        final long tmp = this.count;
-        this.count = 0;
-        return tmp;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java
deleted file mode 100644
index 5f689bd..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.apache.commons.io.IOUtils;
-
-
-/**
- * An output stream which will retain data in memory until a specified
- * threshold is reached, and only then commit it to disk. If the stream is
- * closed before the threshold is reached, the data will not be written to
- * disk at all.
- * <p>
- * This class originated in FileUpload processing. In this use case, you do
- * not know in advance the size of the file being uploaded. If the file is small
- * you want to store it in memory (for speed), but if the file is large you want
- * to store it to file (to avoid memory issues).
- *
- * @version $Id$
- */
-public class DeferredFileOutputStream
-    extends ThresholdingOutputStream
-{
-
-    // ----------------------------------------------------------- Data members
-
-
-    /**
-     * The output stream to which data will be written prior to the theshold
-     * being reached.
-     */
-    private ByteArrayOutputStream memoryOutputStream;
-
-
-    /**
-     * The output stream to which data will be written at any given time. This
-     * will always be one of <code>memoryOutputStream</code> or
-     * <code>diskOutputStream</code>.
-     */
-    private OutputStream currentOutputStream;
-
-
-    /**
-     * The file to which output will be directed if the threshold is exceeded.
-     */
-    private File outputFile;
-
-    /**
-     * The temporary file prefix.
-     */
-    private final String prefix;
-
-    /**
-     * The temporary file suffix.
-     */
-    private final String suffix;
-
-    /**
-     * The directory to use for temporary files.
-     */
-    private final File directory;
-
-
-    /**
-     * True when close() has been called successfully.
-     */
-    private boolean closed = false;
-
-    // ----------------------------------------------------------- Constructors
-
-
-    /**
-     * Constructs an instance of this class which will trigger an event at the
-     * specified threshold, and save data to a file beyond that point.
-     *
-     * @param threshold  The number of bytes at which to trigger an event.
-     * @param outputFile The file to which data is saved beyond the threshold.
-     */
-    public DeferredFileOutputStream(final int threshold, final File outputFile)
-    {
-        this(threshold,  outputFile, null, null, null);
-    }
-
-
-    /**
-     * Constructs an instance of this class which will trigger an event at the
-     * specified threshold, and save data to a temporary file beyond that point.
-     *
-     * @param threshold  The number of bytes at which to trigger an event.
-     * @param prefix Prefix to use for the temporary file.
-     * @param suffix Suffix to use for the temporary file.
-     * @param directory Temporary file directory.
-     *
-     * @since 1.4
-     */
-    public DeferredFileOutputStream(final int threshold, final String prefix, final String suffix, final File directory)
-    {
-        this(threshold, null, prefix, suffix, directory);
-        if (prefix == null) {
-            throw new IllegalArgumentException("Temporary file prefix is missing");
-        }
-    }
-
-    /**
-     * Constructs an instance of this class which will trigger an event at the
-     * specified threshold, and save data either to a file beyond that point.
-     *
-     * @param threshold  The number of bytes at which to trigger an event.
-     * @param outputFile The file to which data is saved beyond the threshold.
-     * @param prefix Prefix to use for the temporary file.
-     * @param suffix Suffix to use for the temporary file.
-     * @param directory Temporary file directory.
-     */
-    private DeferredFileOutputStream(final int threshold, final File outputFile, final String prefix,
-                                     final String suffix, final File directory) {
-        super(threshold);
-        this.outputFile = outputFile;
-
-        memoryOutputStream = new ByteArrayOutputStream();
-        currentOutputStream = memoryOutputStream;
-        this.prefix = prefix;
-        this.suffix = suffix;
-        this.directory = directory;
-    }
-
-
-    // --------------------------------------- ThresholdingOutputStream methods
-
-
-    /**
-     * Returns the current output stream. This may be memory based or disk
-     * based, depending on the current state with respect to the threshold.
-     *
-     * @return The underlying output stream.
-     *
-     * @exception IOException if an error occurs.
-     */
-    @Override
-    protected OutputStream getStream() throws IOException
-    {
-        return currentOutputStream;
-    }
-
-
-    /**
-     * Switches the underlying output stream from a memory based stream to one
-     * that is backed by disk. This is the point at which we realise that too
-     * much data is being written to keep in memory, so we elect to switch to
-     * disk-based storage.
-     *
-     * @exception IOException if an error occurs.
-     */
-    @Override
-    protected void thresholdReached() throws IOException
-    {
-        if (prefix != null) {
-            outputFile = File.createTempFile(prefix, suffix, directory);
-        }
-        final FileOutputStream fos = new FileOutputStream(outputFile);
-        try {
-            memoryOutputStream.writeTo(fos);
-        } catch (IOException e){
-            fos.close();
-            throw e;
-        }
-        currentOutputStream = fos;
-        memoryOutputStream = null;
-    }
-
-
-    // --------------------------------------------------------- Public methods
-
-
-    /**
-     * Determines whether or not the data for this output stream has been
-     * retained in memory.
-     *
-     * @return {@code true} if the data is available in memory;
-     *         {@code false} otherwise.
-     */
-    public boolean isInMemory()
-    {
-        return !isThresholdExceeded();
-    }
-
-
-    /**
-     * Returns the data for this output stream as an array of bytes, assuming
-     * that the data has been retained in memory. If the data was written to
-     * disk, this method returns {@code null}.
-     *
-     * @return The data for this output stream, or {@code null} if no such
-     *         data is available.
-     */
-    public byte[] getData()
-    {
-        if (memoryOutputStream != null)
-        {
-            return memoryOutputStream.toByteArray();
-        }
-        return null;
-    }
-
-
-    /**
-     * Returns either the output file specified in the constructor or
-     * the temporary file created or null.
-     * <p>
-     * If the constructor specifying the file is used then it returns that
-     * same output file, even when threshold has not been reached.
-     * <p>
-     * If constructor specifying a temporary file prefix/suffix is used
-     * then the temporary file created once the threshold is reached is returned
-     * If the threshold was not reached then {@code null} is returned.
-     *
-     * @return The file for this output stream, or {@code null} if no such
-     *         file exists.
-     */
-    public File getFile()
-    {
-        return outputFile;
-    }
-
-
-    /**
-     * Closes underlying output stream, and mark this as closed
-     *
-     * @exception IOException if an error occurs.
-     */
-    @Override
-    public void close() throws IOException
-    {
-        super.close();
-        closed = true;
-    }
-
-
-    /**
-     * Writes the data from this output stream to the specified output stream,
-     * after it has been closed.
-     *
-     * @param out output stream to write to.
-     * @exception IOException if this stream is not yet closed or an error occurs.
-     */
-    public void writeTo(final OutputStream out) throws IOException
-    {
-        // we may only need to check if this is closed if we are working with a file
-        // but we should force the habit of closing wether we are working with
-        // a file or memory.
-        if (!closed)
-        {
-            throw new IOException("Stream not closed");
-        }
-
-        if(isInMemory())
-        {
-            memoryOutputStream.writeTo(out);
-        }
-        else
-        {
-            final FileInputStream fis = new FileInputStream(outputFile);
-            try {
-                IOUtils.copy(fis, out);
-            } finally {
-                IOUtils.closeQuietly(fis);
-            }
-        }
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/DemuxOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/DemuxOutputStream.java
deleted file mode 100644
index e781d36..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/DemuxOutputStream.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Data written to this stream is forwarded to a stream that has been associated
- * with this thread.
- *
- * @version $Id$
- */
-public class DemuxOutputStream
-    extends OutputStream
-{
-    private final InheritableThreadLocal<OutputStream> m_streams = new InheritableThreadLocal<OutputStream>();
-
-    /**
-     * Bind the specified stream to the current thread.
-     *
-     * @param output the stream to bind
-     * @return the OutputStream that was previously active
-     */
-    public OutputStream bindStream( final OutputStream output )
-    {
-        final OutputStream stream = m_streams.get();
-        m_streams.set( output );
-        return stream;
-    }
-
-    /**
-     * Closes stream associated with current thread.
-     *
-     * @throws IOException if an error occurs
-     */
-    @Override
-    public void close()
-        throws IOException
-    {
-        final OutputStream output = m_streams.get();
-        if( null != output )
-        {
-            output.close();
-        }
-    }
-
-    /**
-     * Flushes stream associated with current thread.
-     *
-     * @throws IOException if an error occurs
-     */
-    @Override
-    public void flush()
-        throws IOException
-    {
-        final OutputStream output = m_streams.get();
-        if( null != output )
-        {
-            output.flush();
-        }
-    }
-
-    /**
-     * Writes byte to stream associated with current thread.
-     *
-     * @param ch the byte to write to stream
-     * @throws IOException if an error occurs
-     */
-    @Override
-    public void write( final int ch )
-        throws IOException
-    {
-        final OutputStream output = m_streams.get();
-        if( null != output )
-        {
-            output.write( ch );
-        }
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java b/trunk/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java
deleted file mode 100644
index c054cb5..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-
-/**
- * Writer of files that allows the encoding to be set.
- * <p>
- * This class provides a simple alternative to <code>FileWriter</code>
- * that allows an encoding to be set. Unfortunately, it cannot subclass
- * <code>FileWriter</code>.
- * <p>
- * By default, the file will be overwritten, but this may be changed to append.
- * <p>
- * The encoding must be specified using either the name of the {@link Charset},
- * the {@link Charset}, or a {@link CharsetEncoder}. If the default encoding
- * is required then use the {@link java.io.FileWriter} directly, rather than
- * this implementation.
- * <p>
- * 
- *
- * @since 1.4
- * @version $Id$
- */
-public class FileWriterWithEncoding extends Writer {
-    // Cannot extend ProxyWriter, as requires writer to be
-    // known when super() is called
-
-    /** The writer to decorate. */
-    private final Writer out;
-
-    /**
-     * Constructs a FileWriterWithEncoding with a file encoding.
-     *
-     * @param filename  the name of the file to write to, not null
-     * @param encoding  the encoding to use, not null
-     * @throws NullPointerException if the file name or encoding is null
-     * @throws IOException in case of an I/O error
-     */
-    public FileWriterWithEncoding(final String filename, final String encoding) throws IOException {
-        this(new File(filename), encoding, false);
-    }
-
-    /**
-     * Constructs a FileWriterWithEncoding with a file encoding.
-     *
-     * @param filename  the name of the file to write to, not null
-     * @param encoding  the encoding to use, not null
-     * @param append  true if content should be appended, false to overwrite
-     * @throws NullPointerException if the file name or encoding is null
-     * @throws IOException in case of an I/O error
-     */
-    public FileWriterWithEncoding(final String filename, final String encoding, final boolean append)
-            throws IOException {
-        this(new File(filename), encoding, append);
-    }
-
-    /**
-     * Constructs a FileWriterWithEncoding with a file encoding.
-     *
-     * @param filename  the name of the file to write to, not null
-     * @param encoding  the encoding to use, not null
-     * @throws NullPointerException if the file name or encoding is null
-     * @throws IOException in case of an I/O error
-     */
-    public FileWriterWithEncoding(final String filename, final Charset encoding) throws IOException {
-        this(new File(filename), encoding, false);
-    }
-
-    /**
-     * Constructs a FileWriterWithEncoding with a file encoding.
-     *
-     * @param filename  the name of the file to write to, not null
-     * @param encoding  the encoding to use, not null
-     * @param append  true if content should be appended, false to overwrite
-     * @throws NullPointerException if the file name or encoding is null
-     * @throws IOException in case of an I/O error
-     */
-    public FileWriterWithEncoding(final String filename, final Charset encoding, final boolean append)
-            throws IOException {
-        this(new File(filename), encoding, append);
-    }
-
-    /**
-     * Constructs a FileWriterWithEncoding with a file encoding.
-     *
-     * @param filename  the name of the file to write to, not null
-     * @param encoding  the encoding to use, not null
-     * @throws NullPointerException if the file name or encoding is null
-     * @throws IOException in case of an I/O error
-     */
-    public FileWriterWithEncoding(final String filename, final CharsetEncoder encoding) throws IOException {
-        this(new File(filename), encoding, false);
-    }
-
-    /**
-     * Constructs a FileWriterWithEncoding with a file encoding.
-     *
-     * @param filename  the name of the file to write to, not null
-     * @param encoding  the encoding to use, not null
-     * @param append  true if content should be appended, false to overwrite
-     * @throws NullPointerException if the file name or encoding is null
-     * @throws IOException in case of an I/O error
-     */
-    public FileWriterWithEncoding(final String filename, final CharsetEncoder encoding, final boolean append)
-            throws IOException {
-        this(new File(filename), encoding, append);
-    }
-
-    /**
-     * Constructs a FileWriterWithEncoding with a file encoding.
-     *
-     * @param file  the file to write to, not null
-     * @param encoding  the encoding to use, not null
-     * @throws NullPointerException if the file or encoding is null
-     * @throws IOException in case of an I/O error
-     */
-    public FileWriterWithEncoding(final File file, final String encoding) throws IOException {
-        this(file, encoding, false);
-    }
-
-    /**
-     * Constructs a FileWriterWithEncoding with a file encoding.
-     *
-     * @param file  the file to write to, not null
-     * @param encoding  the encoding to use, not null
-     * @param append  true if content should be appended, false to overwrite
-     * @throws NullPointerException if the file or encoding is null
-     * @throws IOException in case of an I/O error
-     */
-    public FileWriterWithEncoding(final File file, final String encoding, final boolean append) throws IOException {
-        super();
-        this.out = initWriter(file, encoding, append);
-    }
-
-    /**
-     * Constructs a FileWriterWithEncoding with a file encoding.
-     *
-     * @param file  the file to write to, not null
-     * @param encoding  the encoding to use, not null
-     * @throws NullPointerException if the file or encoding is null
-     * @throws IOException in case of an I/O error
-     */
-    public FileWriterWithEncoding(final File file, final Charset encoding) throws IOException {
-        this(file, encoding, false);
-    }
-
-    /**
-     * Constructs a FileWriterWithEncoding with a file encoding.
-     *
-     * @param file  the file to write to, not null
-     * @param encoding  the encoding to use, not null
-     * @param append  true if content should be appended, false to overwrite
-     * @throws NullPointerException if the file or encoding is null
-     * @throws IOException in case of an I/O error
-     */
-    public FileWriterWithEncoding(final File file, final Charset encoding, final boolean append) throws IOException {
-        super();
-        this.out = initWriter(file, encoding, append);
-    }
-
-    /**
-     * Constructs a FileWriterWithEncoding with a file encoding.
-     *
-     * @param file  the file to write to, not null
-     * @param encoding  the encoding to use, not null
-     * @throws NullPointerException if the file or encoding is null
-     * @throws IOException in case of an I/O error
-     */
-    public FileWriterWithEncoding(final File file, final CharsetEncoder encoding) throws IOException {
-        this(file, encoding, false);
-    }
-
-    /**
-     * Constructs a FileWriterWithEncoding with a file encoding.
-     *
-     * @param file  the file to write to, not null
-     * @param encoding  the encoding to use, not null
-     * @param append  true if content should be appended, false to overwrite
-     * @throws NullPointerException if the file or encoding is null
-     * @throws IOException in case of an I/O error
-     */
-    public FileWriterWithEncoding(final File file, final CharsetEncoder encoding, final boolean append)
-            throws IOException {
-        super();
-        this.out = initWriter(file, encoding, append);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Initialise the wrapped file writer.
-     * Ensure that a cleanup occurs if the writer creation fails.
-     *
-     * @param file  the file to be accessed
-     * @param encoding  the encoding to use - may be Charset, CharsetEncoder or String
-     * @param append  true to append
-     * @return the initialised writer
-     * @throws NullPointerException if the file or encoding is null
-     * @throws IOException if an error occurs
-     */
-     private static Writer initWriter(final File file, final Object encoding, final boolean append) throws IOException {
-        if (file == null) {
-            throw new NullPointerException("File is missing");
-        }
-        if (encoding == null) {
-            throw new NullPointerException("Encoding is missing");
-        }
-        final boolean fileExistedAlready = file.exists();
-        OutputStream stream = null;
-        Writer writer = null;
-        try {
-            stream = new FileOutputStream(file, append);
-            if (encoding instanceof Charset) {
-                writer = new OutputStreamWriter(stream, (Charset)encoding);
-            } else if (encoding instanceof CharsetEncoder) {
-                writer = new OutputStreamWriter(stream, (CharsetEncoder)encoding);
-            } else {
-                writer = new OutputStreamWriter(stream, (String)encoding);
-            }
-        } catch (final IOException ex) {
-            IOUtils.closeQuietly(writer);
-            IOUtils.closeQuietly(stream);
-            if (fileExistedAlready == false) {
-                FileUtils.deleteQuietly(file);
-            }
-            throw ex;
-        } catch (final RuntimeException ex) {
-            IOUtils.closeQuietly(writer);
-            IOUtils.closeQuietly(stream);
-            if (fileExistedAlready == false) {
-                FileUtils.deleteQuietly(file);
-            }
-            throw ex;
-        }
-        return writer;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Write a character.
-     * @param idx the character to write
-     * @throws IOException if an I/O error occurs
-     */
-     @Override
-    public void write(final int idx) throws IOException {
-        out.write(idx);
-    }
-
-    /**
-     * Write the characters from an array.
-     * @param chr the characters to write
-     * @throws IOException if an I/O error occurs
-     */
-     @Override
-    public void write(final char[] chr) throws IOException {
-        out.write(chr);
-    }
-
-    /**
-     * Write the specified characters from an array.
-     * @param chr the characters to write
-     * @param st The start offset
-     * @param end The number of characters to write
-     * @throws IOException if an I/O error occurs
-     */
-     @Override
-    public void write(final char[] chr, final int st, final int end) throws IOException {
-        out.write(chr, st, end);
-    }
-
-    /**
-     * Write the characters from a string.
-     * @param str the string to write
-     * @throws IOException if an I/O error occurs
-     */
-     @Override
-    public void write(final String str) throws IOException {
-        out.write(str);
-    }
-
-    /**
-     * Write the specified characters from a string.
-     * @param str the string to write
-     * @param st The start offset
-     * @param end The number of characters to write
-     * @throws IOException if an I/O error occurs
-     */
-     @Override
-    public void write(final String str, final int st, final int end) throws IOException {
-        out.write(str, st, end);
-    }
-
-    /**
-     * Flush the stream.
-     * @throws IOException if an I/O error occurs
-     */
-     @Override
-    public void flush() throws IOException {
-        out.flush();
-    }
-
-    /**
-     * Close the stream.
-     * @throws IOException if an I/O error occurs
-     */
-     @Override
-    public void close() throws IOException {
-        out.close();
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/LockableFileWriter.java b/trunk/src/main/java/org/apache/commons/io/output/LockableFileWriter.java
deleted file mode 100644
index ee74b42..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/LockableFileWriter.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.nio.charset.Charset;
-
-import org.apache.commons.io.Charsets;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-
-/**
- * FileWriter that will create and honor lock files to allow simple
- * cross thread file lock handling.
- * <p>
- * This class provides a simple alternative to <code>FileWriter</code>
- * that will use a lock file to prevent duplicate writes.
- * <p>
- * <b>N.B.</b> the lock file is deleted when {@link #close()} is called
- * - or if the main file cannot be opened initially.
- * In the (unlikely) event that the lockfile cannot be deleted,
- * this is not reported, and subsequent requests using
- * the same lockfile will fail.
- * <p>
- * By default, the file will be overwritten, but this may be changed to append.
- * The lock directory may be specified, but defaults to the system property
- * <code>java.io.tmpdir</code>.
- * The encoding may also be specified, and defaults to the platform default.
- *
- * @version $Id$
- */
-public class LockableFileWriter extends Writer {
-    // Cannot extend ProxyWriter, as requires writer to be
-    // known when super() is called
-
-    /** The extension for the lock file. */
-    private static final String LCK = ".lck";
-
-    /** The writer to decorate. */
-    private final Writer out;
-    /** The lock file. */
-    private final File lockFile;
-
-    /**
-     * Constructs a LockableFileWriter.
-     * If the file exists, it is overwritten.
-     *
-     * @param fileName  the file to write to, not null
-     * @throws NullPointerException if the file is null
-     * @throws IOException in case of an I/O error
-     */
-    public LockableFileWriter(final String fileName) throws IOException {
-        this(fileName, false, null);
-    }
-
-    /**
-     * Constructs a LockableFileWriter.
-     *
-     * @param fileName  file to write to, not null
-     * @param append  true if content should be appended, false to overwrite
-     * @throws NullPointerException if the file is null
-     * @throws IOException in case of an I/O error
-     */
-    public LockableFileWriter(final String fileName, final boolean append) throws IOException {
-        this(fileName, append, null);
-    }
-
-    /**
-     * Constructs a LockableFileWriter.
-     *
-     * @param fileName  the file to write to, not null
-     * @param append  true if content should be appended, false to overwrite
-     * @param lockDir  the directory in which the lock file should be held
-     * @throws NullPointerException if the file is null
-     * @throws IOException in case of an I/O error
-     */
-    public LockableFileWriter(final String fileName, final boolean append, final String lockDir) throws IOException {
-        this(new File(fileName), append, lockDir);
-    }
-
-    /**
-     * Constructs a LockableFileWriter.
-     * If the file exists, it is overwritten.
-     *
-     * @param file  the file to write to, not null
-     * @throws NullPointerException if the file is null
-     * @throws IOException in case of an I/O error
-     */
-    public LockableFileWriter(final File file) throws IOException {
-        this(file, false, null);
-    }
-
-    /**
-     * Constructs a LockableFileWriter.
-     *
-     * @param file  the file to write to, not null
-     * @param append  true if content should be appended, false to overwrite
-     * @throws NullPointerException if the file is null
-     * @throws IOException in case of an I/O error
-     */
-    public LockableFileWriter(final File file, final boolean append) throws IOException {
-        this(file, append, null);
-    }
-
-    /**
-     * Constructs a LockableFileWriter.
-     *
-     * @param file  the file to write to, not null
-     * @param append  true if content should be appended, false to overwrite
-     * @param lockDir  the directory in which the lock file should be held
-     * @throws NullPointerException if the file is null
-     * @throws IOException in case of an I/O error
-     * @deprecated 2.5 use {@link #LockableFileWriter(File, Charset, boolean, String)} instead
-     */
-    @Deprecated
-    public LockableFileWriter(final File file, final boolean append, final String lockDir) throws IOException {
-        this(file, Charset.defaultCharset(), append, lockDir);
-    }
-
-    /**
-     * Constructs a LockableFileWriter with a file encoding.
-     *
-     * @param file  the file to write to, not null
-     * @param encoding  the encoding to use, null means platform default
-     * @throws NullPointerException if the file is null
-     * @throws IOException in case of an I/O error
-     * @since 2.3
-     */
-    public LockableFileWriter(final File file, final Charset encoding) throws IOException {
-        this(file, encoding, false, null);
-    }
-
-    /**
-     * Constructs a LockableFileWriter with a file encoding.
-     *
-     * @param file  the file to write to, not null
-     * @param encoding  the encoding to use, null means platform default
-     * @throws NullPointerException if the file is null
-     * @throws IOException in case of an I/O error
-     * @throws java.nio.charset.UnsupportedCharsetException
-     *             thrown instead of {@link java.io.UnsupportedEncodingException} in version 2.2 if the encoding is not
-     *             supported.
-     */
-    public LockableFileWriter(final File file, final String encoding) throws IOException {
-        this(file, encoding, false, null);
-    }
-
-    /**
-     * Constructs a LockableFileWriter with a file encoding.
-     *
-     * @param file  the file to write to, not null
-     * @param encoding  the encoding to use, null means platform default
-     * @param append  true if content should be appended, false to overwrite
-     * @param lockDir  the directory in which the lock file should be held
-     * @throws NullPointerException if the file is null
-     * @throws IOException in case of an I/O error
-     * @since 2.3
-     */
-    public LockableFileWriter(File file, final Charset encoding, final boolean append,
-            String lockDir) throws IOException {
-        super();
-        // init file to create/append
-        file = file.getAbsoluteFile();
-        if (file.getParentFile() != null) {
-            FileUtils.forceMkdir(file.getParentFile());
-        }
-        if (file.isDirectory()) {
-            throw new IOException("File specified is a directory");
-        }
-
-        // init lock file
-        if (lockDir == null) {
-            lockDir = System.getProperty("java.io.tmpdir");
-        }
-        final File lockDirFile = new File(lockDir);
-        FileUtils.forceMkdir(lockDirFile);
-        testLockDir(lockDirFile);
-        lockFile = new File(lockDirFile, file.getName() + LCK);
-
-        // check if locked
-        createLock();
-
-        // init wrapped writer
-        out = initWriter(file, encoding, append);
-    }
-
-    /**
-     * Constructs a LockableFileWriter with a file encoding.
-     *
-     * @param file  the file to write to, not null
-     * @param encoding  the encoding to use, null means platform default
-     * @param append  true if content should be appended, false to overwrite
-     * @param lockDir  the directory in which the lock file should be held
-     * @throws NullPointerException if the file is null
-     * @throws IOException in case of an I/O error
-     * @throws java.nio.charset.UnsupportedCharsetException
-     *             thrown instead of {@link java.io.UnsupportedEncodingException} in version 2.2 if the encoding is not
-     *             supported.
-     */
-    public LockableFileWriter(final File file, final String encoding, final boolean append,
-            final String lockDir) throws IOException {
-        this(file, Charsets.toCharset(encoding), append, lockDir);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Tests that we can write to the lock directory.
-     *
-     * @param lockDir  the File representing the lock directory
-     * @throws IOException if we cannot write to the lock directory
-     * @throws IOException if we cannot find the lock file
-     */
-    private void testLockDir(final File lockDir) throws IOException {
-        if (!lockDir.exists()) {
-            throw new IOException(
-                    "Could not find lockDir: " + lockDir.getAbsolutePath());
-        }
-        if (!lockDir.canWrite()) {
-            throw new IOException(
-                    "Could not write to lockDir: " + lockDir.getAbsolutePath());
-        }
-    }
-
-    /**
-     * Creates the lock file.
-     *
-     * @throws IOException if we cannot create the file
-     */
-    private void createLock() throws IOException {
-        synchronized (LockableFileWriter.class) {
-            if (!lockFile.createNewFile()) {
-                throw new IOException("Can't write file, lock " +
-                        lockFile.getAbsolutePath() + " exists");
-            }
-            lockFile.deleteOnExit();
-        }
-    }
-
-    /**
-     * Initialise the wrapped file writer.
-     * Ensure that a cleanup occurs if the writer creation fails.
-     *
-     * @param file  the file to be accessed
-     * @param encoding  the encoding to use
-     * @param append  true to append
-     * @return The initialised writer
-     * @throws IOException if an error occurs
-     */
-    private Writer initWriter(final File file, final Charset encoding, final boolean append) throws IOException {
-        final boolean fileExistedAlready = file.exists();
-        OutputStream stream = null;
-        Writer writer = null;
-        try {
-            stream = new FileOutputStream(file.getAbsolutePath(), append);
-            writer = new OutputStreamWriter(stream, Charsets.toCharset(encoding));
-        } catch (final IOException ex) {
-            IOUtils.closeQuietly(writer);
-            IOUtils.closeQuietly(stream);
-            FileUtils.deleteQuietly(lockFile);
-            if (fileExistedAlready == false) {
-                FileUtils.deleteQuietly(file);
-            }
-            throw ex;
-        } catch (final RuntimeException ex) {
-            IOUtils.closeQuietly(writer);
-            IOUtils.closeQuietly(stream);
-            FileUtils.deleteQuietly(lockFile);
-            if (fileExistedAlready == false) {
-                FileUtils.deleteQuietly(file);
-            }
-            throw ex;
-        }
-        return writer;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Closes the file writer and deletes the lockfile (if possible).
-     *
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void close() throws IOException {
-        try {
-            out.close();
-        } finally {
-            lockFile.delete();
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Write a character.
-     * @param idx the character to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final int idx) throws IOException {
-        out.write(idx);
-    }
-
-    /**
-     * Write the characters from an array.
-     * @param chr the characters to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final char[] chr) throws IOException {
-        out.write(chr);
-    }
-
-    /**
-     * Write the specified characters from an array.
-     * @param chr the characters to write
-     * @param st The start offset
-     * @param end The number of characters to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final char[] chr, final int st, final int end) throws IOException {
-        out.write(chr, st, end);
-    }
-
-    /**
-     * Write the characters from a string.
-     * @param str the string to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final String str) throws IOException {
-        out.write(str);
-    }
-
-    /**
-     * Write the specified characters from a string.
-     * @param str the string to write
-     * @param st The start offset
-     * @param end The number of characters to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final String str, final int st, final int end) throws IOException {
-        out.write(str, st, end);
-    }
-
-    /**
-     * Flush the stream.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void flush() throws IOException {
-        out.flush();
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/NullOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/NullOutputStream.java
deleted file mode 100644
index f412131..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/NullOutputStream.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * This OutputStream writes all data to the famous <b>/dev/null</b>.
- * <p>
- * This output stream has no destination (file/socket etc.) and all
- * bytes written to it are ignored and lost.
- *</p>
- * @version $Id$
- */
-public class NullOutputStream extends OutputStream {
-
-    /**
-     * A singleton.
-     */
-    public static final NullOutputStream NULL_OUTPUT_STREAM = new NullOutputStream();
-
-    /**
-     * Does nothing - output to <code>/dev/null</code>.
-     * @param b The bytes to write
-     * @param off The start offset
-     * @param len The number of bytes to write
-     */
-    @Override
-    public void write(final byte[] b, final int off, final int len) {
-        //to /dev/null
-    }
-
-    /**
-     * Does nothing - output to <code>/dev/null</code>.
-     * @param b The byte to write
-     */
-    @Override
-    public void write(final int b) {
-        //to /dev/null
-    }
-
-    /**
-     * Does nothing - output to <code>/dev/null</code>.
-     * @param b The bytes to write
-     * @throws IOException never
-     */
-    @Override
-    public void write(final byte[] b) throws IOException {
-        //to /dev/null
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/NullWriter.java b/trunk/src/main/java/org/apache/commons/io/output/NullWriter.java
deleted file mode 100644
index df29cb8..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/NullWriter.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.Writer;
-
-/**
- * This {@link Writer} writes all data to the famous <b>/dev/null</b>.
- * <p>
- * This <code>Writer</code> has no destination (file/socket etc.) and all
- * characters written to it are ignored and lost.
- *
- * @version $Id$
- */
-public class NullWriter extends Writer {
-
-    /**
-     * A singleton.
-     */
-    public static final NullWriter NULL_WRITER = new NullWriter();
-
-    /**
-     * Constructs a new NullWriter.
-     */
-    public NullWriter() {
-    }
-
-    /**
-     * Does nothing - output to <code>/dev/null</code>.
-     * @param c The character to write
-     * @return this writer
-     * @since 2.0
-     */
-    @Override
-    public Writer append(final char c) {
-        //to /dev/null
-        return this;
-    }
-
-    /**
-     * Does nothing - output to <code>/dev/null</code>.
-     * @param csq The character sequence to write
-     * @param start The index of the first character to write
-     * @param end  The index of the first character to write (exclusive)
-     * @return this writer
-     * @since 2.0
-     */
-    @Override
-    public Writer append(final CharSequence csq, final int start, final int end) {
-        //to /dev/null
-        return this;
-    }
-
-    /**
-     * Does nothing - output to <code>/dev/null</code>.
-     * @param csq The character sequence to write
-     * @return this writer
-     * @since 2.0
-     */
-    @Override
-    public Writer append(final CharSequence csq) {
-        //to /dev/null
-        return this;
-    }
-
-    /**
-     * Does nothing - output to <code>/dev/null</code>.
-     * @param idx The character to write
-     */
-    @Override
-    public void write(final int idx) {
-        //to /dev/null
-    }
-
-    /**
-     * Does nothing - output to <code>/dev/null</code>.
-     * @param chr The characters to write
-     */
-    @Override
-    public void write(final char[] chr) {
-        //to /dev/null
-    }
-
-    /**
-     * Does nothing - output to <code>/dev/null</code>.
-     * @param chr The characters to write
-     * @param st The start offset
-     * @param end The number of characters to write
-     */
-    @Override
-    public void write(final char[] chr, final int st, final int end) {
-        //to /dev/null
-    }
-
-    /**
-     * Does nothing - output to <code>/dev/null</code>.
-     * @param str The string to write
-     */
-    @Override
-    public void write(final String str) {
-        //to /dev/null
-    }
-
-    /**
-     * Does nothing - output to <code>/dev/null</code>.
-     * @param str The string to write
-     * @param st The start offset
-     * @param end The number of characters to write
-     */
-    @Override
-    public void write(final String str, final int st, final int end) {
-        //to /dev/null
-    }
-
-    /** @see java.io.Writer#flush() */
-    @Override
-    public void flush() {
-        //to /dev/null
-    }
-
-    /** @see java.io.Writer#close() */
-    @Override
-    public void close() {
-        //to /dev/null
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/ProxyOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/ProxyOutputStream.java
deleted file mode 100644
index 1cbdc5f..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/ProxyOutputStream.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * A Proxy stream which acts as expected, that is it passes the method 
- * calls on to the proxied stream and doesn't change which methods are 
- * being called. It is an alternative base class to FilterOutputStream
- * to increase reusability.
- * <p>
- * See the protected methods for ways in which a subclass can easily decorate
- * a stream with custom pre-, post- or error processing functionality.
- * 
- * @version $Id$
- */
-public class ProxyOutputStream extends FilterOutputStream {
-
-    /**
-     * Constructs a new ProxyOutputStream.
-     * 
-     * @param proxy  the OutputStream to delegate to
-     */
-    public ProxyOutputStream(final OutputStream proxy) {
-        super(proxy);
-        // the proxy is stored in a protected superclass variable named 'out'
-    }
-
-    /**
-     * Invokes the delegate's <code>write(int)</code> method.
-     * @param idx the byte to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final int idx) throws IOException {
-        try {
-            beforeWrite(1);
-            out.write(idx);
-            afterWrite(1);
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>write(byte[])</code> method.
-     * @param bts the bytes to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final byte[] bts) throws IOException {
-        try {
-            final int len = bts != null ? bts.length : 0;
-            beforeWrite(len);
-            out.write(bts);
-            afterWrite(len);
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>write(byte[])</code> method.
-     * @param bts the bytes to write
-     * @param st The start offset
-     * @param end The number of bytes to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final byte[] bts, final int st, final int end) throws IOException {
-        try {
-            beforeWrite(end);
-            out.write(bts, st, end);
-            afterWrite(end);
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>flush()</code> method.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void flush() throws IOException {
-        try {
-            out.flush();
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>close()</code> method.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void close() throws IOException {
-        try {
-            out.close();
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invoked by the write methods before the call is proxied. The number
-     * of bytes to be written (1 for the {@link #write(int)} method, buffer
-     * length for {@link #write(byte[])}, etc.) is given as an argument.
-     * <p>
-     * Subclasses can override this method to add common pre-processing
-     * functionality without having to override all the write methods.
-     * The default implementation does nothing.
-     *
-     * @since 2.0
-     * @param n number of bytes to be written
-     * @throws IOException if the pre-processing fails
-     */
-    protected void beforeWrite(final int n) throws IOException {
-    }
-
-    /**
-     * Invoked by the write methods after the proxied call has returned
-     * successfully. The number of bytes written (1 for the
-     * {@link #write(int)} method, buffer length for {@link #write(byte[])},
-     * etc.) is given as an argument.
-     * <p>
-     * Subclasses can override this method to add common post-processing
-     * functionality without having to override all the write methods.
-     * The default implementation does nothing.
-     *
-     * @since 2.0
-     * @param n number of bytes written
-     * @throws IOException if the post-processing fails
-     */
-    protected void afterWrite(final int n) throws IOException {
-    }
-
-    /**
-     * Handle any IOExceptions thrown.
-     * <p>
-     * This method provides a point to implement custom exception
-     * handling. The default behaviour is to re-throw the exception.
-     * @param e The IOException thrown
-     * @throws IOException if an I/O error occurs
-     * @since 2.0
-     */
-    protected void handleIOException(final IOException e) throws IOException {
-        throw e;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/ProxyWriter.java b/trunk/src/main/java/org/apache/commons/io/output/ProxyWriter.java
deleted file mode 100644
index c50fb11..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/ProxyWriter.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.FilterWriter;
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * A Proxy stream which acts as expected, that is it passes the method 
- * calls on to the proxied stream and doesn't change which methods are 
- * being called. It is an alternative base class to FilterWriter
- * to increase reusability, because FilterWriter changes the 
- * methods being called, such as write(char[]) to write(char[], int, int)
- * and write(String) to write(String, int, int).
- * 
- * @version $Id$
- */
-public class ProxyWriter extends FilterWriter {
-
-    /**
-     * Constructs a new ProxyWriter.
-     * 
-     * @param proxy  the Writer to delegate to
-     */
-    public ProxyWriter(final Writer proxy) {
-        super(proxy);
-        // the proxy is stored in a protected superclass variable named 'out'
-    }
-
-    /**
-     * Invokes the delegate's <code>append(char)</code> method.
-     * @param c The character to write
-     * @return this writer
-     * @throws IOException if an I/O error occurs
-     * @since 2.0
-     */
-    @Override
-    public Writer append(final char c) throws IOException {
-        try {
-            beforeWrite(1);
-            out.append(c);
-            afterWrite(1);
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-        return this;
-    }
-
-    /**
-     * Invokes the delegate's <code>append(CharSequence, int, int)</code> method.
-     * @param csq The character sequence to write
-     * @param start The index of the first character to write
-     * @param end  The index of the first character to write (exclusive)
-     * @return this writer
-     * @throws IOException if an I/O error occurs
-     * @since 2.0
-     */
-    @Override
-    public Writer append(final CharSequence csq, final int start, final int end) throws IOException {
-        try {
-            beforeWrite(end - start);
-            out.append(csq, start, end);
-            afterWrite(end - start);
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-        return this;
-    }
-
-    /**
-     * Invokes the delegate's <code>append(CharSequence)</code> method.
-     * @param csq The character sequence to write
-     * @return this writer
-     * @throws IOException if an I/O error occurs
-     * @since 2.0
-     */
-    @Override
-    public Writer append(final CharSequence csq) throws IOException {
-        try {
-            int len = 0;
-            if (csq != null) {
-                len = csq.length();
-            }
-
-            beforeWrite(len);
-            out.append(csq);
-            afterWrite(len);
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-        return this;
-    }
-
-    /**
-     * Invokes the delegate's <code>write(int)</code> method.
-     * @param idx the character to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final int idx) throws IOException {
-        try {
-            beforeWrite(1);
-            out.write(idx);
-            afterWrite(1);
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>write(char[])</code> method.
-     * @param chr the characters to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final char[] chr) throws IOException {
-        try {
-            int len = 0;
-            if (chr != null) {
-                len = chr.length;
-            }
-
-            beforeWrite(len);
-            out.write(chr);
-            afterWrite(len);
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>write(char[], int, int)</code> method.
-     * @param chr the characters to write
-     * @param st The start offset
-     * @param len The number of characters to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final char[] chr, final int st, final int len) throws IOException {
-        try {
-            beforeWrite(len);
-            out.write(chr, st, len);
-            afterWrite(len);
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>write(String)</code> method.
-     * @param str the string to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final String str) throws IOException {
-        try {
-            int len = 0;
-            if (str != null) {
-                len = str.length();
-            }
-
-            beforeWrite(len);
-            out.write(str);
-            afterWrite(len);
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>write(String)</code> method.
-     * @param str the string to write
-     * @param st The start offset
-     * @param len The number of characters to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final String str, final int st, final int len) throws IOException {
-        try {
-            beforeWrite(len);
-            out.write(str, st, len);
-            afterWrite(len);
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>flush()</code> method.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void flush() throws IOException {
-        try {
-            out.flush();
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invokes the delegate's <code>close()</code> method.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void close() throws IOException {
-        try {
-            out.close();
-        } catch (final IOException e) {
-            handleIOException(e);
-        }
-    }
-
-    /**
-     * Invoked by the write methods before the call is proxied. The number
-     * of chars to be written (1 for the {@link #write(int)} method, buffer
-     * length for {@link #write(char[])}, etc.) is given as an argument.
-     * <p>
-     * Subclasses can override this method to add common pre-processing
-     * functionality without having to override all the write methods.
-     * The default implementation does nothing.
-     *
-     * @since 2.0
-     * @param n number of chars to be written
-     * @throws IOException if the pre-processing fails
-     */
-    protected void beforeWrite(final int n) throws IOException {
-    }
-
-    /**
-     * Invoked by the write methods after the proxied call has returned
-     * successfully. The number of chars written (1 for the
-     * {@link #write(int)} method, buffer length for {@link #write(char[])},
-     * etc.) is given as an argument.
-     * <p>
-     * Subclasses can override this method to add common post-processing
-     * functionality without having to override all the write methods.
-     * The default implementation does nothing.
-     *
-     * @since 2.0
-     * @param n number of chars written
-     * @throws IOException if the post-processing fails
-     */
-    protected void afterWrite(final int n) throws IOException {
-    }
-
-    /**
-     * Handle any IOExceptions thrown.
-     * <p>
-     * This method provides a point to implement custom exception
-     * handling. The default behaviour is to re-throw the exception.
-     * @param e The IOException thrown
-     * @throws IOException if an I/O error occurs
-     * @since 2.0
-     */
-    protected void handleIOException(final IOException e) throws IOException {
-        throw e;
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/StringBuilderWriter.java b/trunk/src/main/java/org/apache/commons/io/output/StringBuilderWriter.java
deleted file mode 100644
index e6be6cb..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/StringBuilderWriter.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.Serializable;
-import java.io.Writer;
-
-/**
- * {@link Writer} implementation that outputs to a {@link StringBuilder}.
- * <p>
- * <strong>NOTE:</strong> This implementation, as an alternative to
- * <code>java.io.StringWriter</code>, provides an <i>un-synchronized</i>
- * (i.e. for use in a single thread) implementation for better performance.
- * For safe usage with multiple {@link Thread}s then
- * <code>java.io.StringWriter</code> should be used.
- *
- * @version $Id$
- * @since 2.0
- */
-public class StringBuilderWriter extends Writer implements Serializable {
-
-    private static final long serialVersionUID = -146927496096066153L;
-    private final StringBuilder builder;
-
-    /**
-     * Construct a new {@link StringBuilder} instance with default capacity.
-     */
-    public StringBuilderWriter() {
-        this.builder = new StringBuilder();
-    }
-
-    /**
-     * Construct a new {@link StringBuilder} instance with the specified capacity.
-     *
-     * @param capacity The initial capacity of the underlying {@link StringBuilder}
-     */
-    public StringBuilderWriter(final int capacity) {
-        this.builder = new StringBuilder(capacity);
-    }
-
-    /**
-     * Construct a new instance with the specified {@link StringBuilder}.
-     * 
-     * <p>If {@code builder} is null a new instance with default capacity will be created.</p>
-     *
-     * @param builder The String builder. May be null.
-     */
-    public StringBuilderWriter(final StringBuilder builder) {
-        this.builder = builder != null ? builder : new StringBuilder();
-    }
-
-    /**
-     * Append a single character to this Writer.
-     *
-     * @param value The character to append
-     * @return This writer instance
-     */
-    @Override
-    public Writer append(final char value) {
-        builder.append(value);
-        return this;
-    }
-
-    /**
-     * Append a character sequence to this Writer.
-     *
-     * @param value The character to append
-     * @return This writer instance
-     */
-    @Override
-    public Writer append(final CharSequence value) {
-        builder.append(value);
-        return this;
-    }
-
-    /**
-     * Append a portion of a character sequence to the {@link StringBuilder}.
-     *
-     * @param value The character to append
-     * @param start The index of the first character
-     * @param end The index of the last character + 1
-     * @return This writer instance
-     */
-    @Override
-    public Writer append(final CharSequence value, final int start, final int end) {
-        builder.append(value, start, end);
-        return this;
-    }
-
-    /**
-     * Closing this writer has no effect. 
-     */
-    @Override
-    public void close() {
-        // no-op
-    }
-
-    /**
-     * Flushing this writer has no effect. 
-     */
-    @Override
-    public void flush() {
-        // no-op
-    }
-
-
-    /**
-     * Write a String to the {@link StringBuilder}.
-     * 
-     * @param value The value to write
-     */
-    @Override
-    public void write(final String value) {
-        if (value != null) {
-            builder.append(value);
-        }
-    }
-
-    /**
-     * Write a portion of a character array to the {@link StringBuilder}.
-     *
-     * @param value The value to write
-     * @param offset The index of the first character
-     * @param length The number of characters to write
-     */
-    @Override
-    public void write(final char[] value, final int offset, final int length) {
-        if (value != null) {
-            builder.append(value, offset, length);
-        }
-    }
-
-    /**
-     * Return the underlying builder.
-     *
-     * @return The underlying builder
-     */
-    public StringBuilder getBuilder() {
-        return builder;
-    }
-
-    /**
-     * Returns {@link StringBuilder#toString()}.
-     *
-     * @return The contents of the String builder.
-     */
-    @Override
-    public String toString() {
-        return builder.toString();
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/TaggedOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/TaggedOutputStream.java
deleted file mode 100644
index ae63a7d..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/TaggedOutputStream.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Serializable;
-import java.util.UUID;
-
-import org.apache.commons.io.TaggedIOException;
-
-/**
- * An output stream decorator that tags potential exceptions so that the
- * stream that caused the exception can easily be identified. This is
- * done by using the {@link TaggedIOException} class to wrap all thrown
- * {@link IOException}s. See below for an example of using this class.
- * <pre>
- * TaggedOutputStream stream = new TaggedOutputStream(...);
- * try {
- *     // Processing that may throw an IOException either from this stream
- *     // or from some other IO activity like temporary files, etc.
- *     writeToStream(stream);
- * } catch (IOException e) {
- *     if (stream.isCauseOf(e)) {
- *         // The exception was caused by this stream.
- *         // Use e.getCause() to get the original exception.
- *     } else {
- *         // The exception was caused by something else.
- *     }
- * }
- * </pre>
- * <p>
- * Alternatively, the {@link #throwIfCauseOf(Exception)} method can be
- * used to let higher levels of code handle the exception caused by this
- * stream while other processing errors are being taken care of at this
- * lower level.
- * <pre>
- * TaggedOutputStream stream = new TaggedOutputStream(...);
- * try {
- *     writeToStream(stream);
- * } catch (IOException e) {
- *     stream.throwIfCauseOf(e);
- *     // ... or process the exception that was caused by something else
- * }
- * </pre>
- *
- * @see TaggedIOException
- * @since 2.0
- */
-public class TaggedOutputStream extends ProxyOutputStream {
-
-    /**
-     * The unique tag associated with exceptions from stream.
-     */
-    private final Serializable tag = UUID.randomUUID();
-
-    /**
-     * Creates a tagging decorator for the given output stream.
-     *
-     * @param proxy output stream to be decorated
-     */
-    public TaggedOutputStream(final OutputStream proxy) {
-        super(proxy);
-    }
-
-    /**
-     * Tests if the given exception was caused by this stream.
-     *
-     * @param exception an exception
-     * @return {@code true} if the exception was thrown by this stream,
-     *         {@code false} otherwise
-     */
-    public boolean isCauseOf(final Exception exception) {
-        return TaggedIOException.isTaggedWith(exception, tag);
-    }
-
-    /**
-     * Re-throws the original exception thrown by this stream. This method
-     * first checks whether the given exception is a {@link TaggedIOException}
-     * wrapper created by this decorator, and then unwraps and throws the
-     * original wrapped exception. Returns normally if the exception was
-     * not thrown by this stream.
-     *
-     * @param exception an exception
-     * @throws IOException original exception, if any, thrown by this stream
-     */
-    public void throwIfCauseOf(final Exception exception) throws IOException {
-        TaggedIOException.throwCauseIfTaggedWith(exception, tag);
-    }
-
-    /**
-     * Tags any IOExceptions thrown, wrapping and re-throwing.
-     *
-     * @param e The IOException thrown
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    protected void handleIOException(final IOException e) throws IOException {
-        throw new TaggedIOException(e, tag);
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/TeeOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/TeeOutputStream.java
deleted file mode 100644
index 7b71794..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/TeeOutputStream.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Classic splitter of OutputStream. Named after the unix 'tee' 
- * command. It allows a stream to be branched off so there 
- * are now two streams.
- *
- * @version $Id$
- */
-public class TeeOutputStream extends ProxyOutputStream {
-
-    /** the second OutputStream to write to */
-    protected OutputStream branch; //TODO consider making this private
-
-    /**
-     * Constructs a TeeOutputStream.
-     * @param out the main OutputStream
-     * @param branch the second OutputStream
-     */
-    public TeeOutputStream(final OutputStream out, final OutputStream branch) {
-        super(out);
-        this.branch = branch;
-    }
-
-    /**
-     * Write the bytes to both streams.
-     * @param b the bytes to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public synchronized void write(final byte[] b) throws IOException {
-        super.write(b);
-        this.branch.write(b);
-    }
-
-    /**
-     * Write the specified bytes to both streams.
-     * @param b the bytes to write
-     * @param off The start offset
-     * @param len The number of bytes to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public synchronized void write(final byte[] b, final int off, final int len) throws IOException {
-        super.write(b, off, len);
-        this.branch.write(b, off, len);
-    }
-
-    /**
-     * Write a byte to both streams.
-     * @param b the byte to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public synchronized void write(final int b) throws IOException {
-        super.write(b);
-        this.branch.write(b);
-    }
-
-    /**
-     * Flushes both streams.
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void flush() throws IOException {
-        super.flush();
-        this.branch.flush();
-    }
-
-    /**
-     * Closes both output streams.
-     * 
-     * If closing the main output stream throws an exception, attempt to close the branch output stream.
-     * 
-     * If closing the main and branch output streams both throw exceptions, which exceptions is thrown by this method is
-     * currently unspecified and subject to change.
-     * 
-     * @throws IOException
-     *             if an I/O error occurs
-     */
-    @Override
-    public void close() throws IOException {
-        try {
-            super.close();
-        } finally {
-            this.branch.close();
-        }
-    }
-
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/ThresholdingOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/ThresholdingOutputStream.java
deleted file mode 100644
index 2c54c52..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/ThresholdingOutputStream.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-
-/**
- * An output stream which triggers an event when a specified number of bytes of
- * data have been written to it. The event can be used, for example, to throw
- * an exception if a maximum has been reached, or to switch the underlying
- * stream type when the threshold is exceeded.
- * <p>
- * This class overrides all <code>OutputStream</code> methods. However, these
- * overrides ultimately call the corresponding methods in the underlying output
- * stream implementation.
- * <p>
- * NOTE: This implementation may trigger the event <em>before</em> the threshold
- * is actually reached, since it triggers when a pending write operation would
- * cause the threshold to be exceeded.
- *
- * @version $Id$
- */
-public abstract class ThresholdingOutputStream
-    extends OutputStream
-{
-
-    // ----------------------------------------------------------- Data members
-
-
-    /**
-     * The threshold at which the event will be triggered.
-     */
-    private final int threshold;
-
-
-    /**
-     * The number of bytes written to the output stream.
-     */
-    private long written;
-
-
-    /**
-     * Whether or not the configured threshold has been exceeded.
-     */
-    private boolean thresholdExceeded;
-
-
-    // ----------------------------------------------------------- Constructors
-
-
-    /**
-     * Constructs an instance of this class which will trigger an event at the
-     * specified threshold.
-     *
-     * @param threshold The number of bytes at which to trigger an event.
-     */
-    public ThresholdingOutputStream(final int threshold)
-    {
-        this.threshold = threshold;
-    }
-
-
-    // --------------------------------------------------- OutputStream methods
-
-
-    /**
-     * Writes the specified byte to this output stream.
-     *
-     * @param b The byte to be written.
-     *
-     * @exception IOException if an error occurs.
-     */
-    @Override
-    public void write(final int b) throws IOException
-    {
-        checkThreshold(1);
-        getStream().write(b);
-        written++;
-    }
-
-
-    /**
-     * Writes <code>b.length</code> bytes from the specified byte array to this
-     * output stream.
-     *
-     * @param b The array of bytes to be written.
-     *
-     * @exception IOException if an error occurs.
-     */
-    @Override
-    public void write(final byte b[]) throws IOException
-    {
-        checkThreshold(b.length);
-        getStream().write(b);
-        written += b.length;
-    }
-
-
-    /**
-     * Writes <code>len</code> bytes from the specified byte array starting at
-     * offset <code>off</code> to this output stream.
-     *
-     * @param b   The byte array from which the data will be written.
-     * @param off The start offset in the byte array.
-     * @param len The number of bytes to write.
-     *
-     * @exception IOException if an error occurs.
-     */
-    @Override
-    public void write(final byte b[], final int off, final int len) throws IOException
-    {
-        checkThreshold(len);
-        getStream().write(b, off, len);
-        written += len;
-    }
-
-
-    /**
-     * Flushes this output stream and forces any buffered output bytes to be
-     * written out.
-     *
-     * @exception IOException if an error occurs.
-     */
-    @Override
-    public void flush() throws IOException
-    {
-        getStream().flush();
-    }
-
-
-    /**
-     * Closes this output stream and releases any system resources associated
-     * with this stream.
-     *
-     * @exception IOException if an error occurs.
-     */
-    @Override
-    public void close() throws IOException
-    {
-        try
-        {
-            flush();
-        }
-        catch (final IOException ignored)
-        {
-            // ignore
-        }
-        getStream().close();
-    }
-
-
-    // --------------------------------------------------------- Public methods
-
-
-    /**
-     * Returns the threshold, in bytes, at which an event will be triggered.
-     *
-     * @return The threshold point, in bytes.
-     */
-    public int getThreshold()
-    {
-        return threshold;
-    }
-
-
-    /**
-     * Returns the number of bytes that have been written to this output stream.
-     *
-     * @return The number of bytes written.
-     */
-    public long getByteCount()
-    {
-        return written;
-    }
-
-
-    /**
-     * Determines whether or not the configured threshold has been exceeded for
-     * this output stream.
-     *
-     * @return {@code true} if the threshold has been reached;
-     *         {@code false} otherwise.
-     */
-    public boolean isThresholdExceeded()
-    {
-        return written > threshold;
-    }
-
-
-    // ------------------------------------------------------ Protected methods
-
-
-    /**
-     * Checks to see if writing the specified number of bytes would cause the
-     * configured threshold to be exceeded. If so, triggers an event to allow
-     * a concrete implementation to take action on this.
-     *
-     * @param count The number of bytes about to be written to the underlying
-     *              output stream.
-     *
-     * @exception IOException if an error occurs.
-     */
-    protected void checkThreshold(final int count) throws IOException
-    {
-        if (!thresholdExceeded && written + count > threshold)
-        {
-            thresholdExceeded = true;
-            thresholdReached();
-        }
-    }
-
-    /**
-     * Resets the byteCount to zero.  You can call this from 
-     * {@link #thresholdReached()} if you want the event to be triggered again. 
-     */
-    protected void resetByteCount() 
-    {
-        this.thresholdExceeded = false;
-        this.written = 0;
-    }
-
-    /**
-     * Sets the byteCount to count.  Usefull for re-opening an output stream
-     * that been previously written to.
-     *
-     * @param count The number of bytes that have already been written to the
-     * output stream
-     *
-     * @since 2.5
-     */
-    protected void setByteCount(final long count) {
-        this.written = count;
-    }
-
-
-    // ------------------------------------------------------- Abstract methods
-
-
-    /**
-     * Returns the underlying output stream, to which the corresponding
-     * <code>OutputStream</code> methods in this class will ultimately delegate.
-     *
-     * @return The underlying output stream.
-     *
-     * @exception IOException if an error occurs.
-     */
-    protected abstract OutputStream getStream() throws IOException;
-
-
-    /**
-     * Indicates that the configured threshold has been reached, and that a
-     * subclass should take whatever action necessary on this event. This may
-     * include changing the underlying output stream.
-     *
-     * @exception IOException if an error occurs.
-     */
-    protected abstract void thresholdReached() throws IOException;
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/WriterOutputStream.java b/trunk/src/main/java/org/apache/commons/io/output/WriterOutputStream.java
deleted file mode 100644
index 753833e..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/WriterOutputStream.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetDecoder;
-import java.nio.charset.CoderResult;
-import java.nio.charset.CodingErrorAction;
-
-/**
- * {@link OutputStream} implementation that transforms a byte stream to a
- * character stream using a specified charset encoding and writes the resulting
- * stream to a {@link Writer}. The stream is transformed using a
- * {@link CharsetDecoder} object, guaranteeing that all charset
- * encodings supported by the JRE are handled correctly.
- * <p>
- * The output of the {@link CharsetDecoder} is buffered using a fixed size buffer.
- * This implies that the data is written to the underlying {@link Writer} in chunks
- * that are no larger than the size of this buffer. By default, the buffer is
- * flushed only when it overflows or when {@link #flush()} or {@link #close()}
- * is called. In general there is therefore no need to wrap the underlying {@link Writer}
- * in a {@link java.io.BufferedWriter}. {@link WriterOutputStream} can also
- * be instructed to flush the buffer after each write operation. In this case, all
- * available data is written immediately to the underlying {@link Writer}, implying that
- * the current position of the {@link Writer} is correlated to the current position
- * of the {@link WriterOutputStream}.
- * <p>
- * {@link WriterOutputStream} implements the inverse transformation of {@link java.io.OutputStreamWriter};
- * in the following example, writing to {@code out2} would have the same result as writing to
- * {@code out} directly (provided that the byte sequence is legal with respect to the
- * charset encoding):
- * <pre>
- * OutputStream out = ...
- * Charset cs = ...
- * OutputStreamWriter writer = new OutputStreamWriter(out, cs);
- * WriterOutputStream out2 = new WriterOutputStream(writer, cs);</pre>
- * {@link WriterOutputStream} implements the same transformation as {@link java.io.InputStreamReader},
- * except that the control flow is reversed: both classes transform a byte stream
- * into a character stream, but {@link java.io.InputStreamReader} pulls data from the underlying stream,
- * while {@link WriterOutputStream} pushes it to the underlying stream.
- * <p>
- * Note that while there are use cases where there is no alternative to using
- * this class, very often the need to use this class is an indication of a flaw
- * in the design of the code. This class is typically used in situations where an existing
- * API only accepts an {@link OutputStream} object, but where the stream is known to represent
- * character data that must be decoded for further use.
- * <p>
- * Instances of {@link WriterOutputStream} are not thread safe.
- * 
- * @see org.apache.commons.io.input.ReaderInputStream
- * 
- * @since 2.0
- */
-public class WriterOutputStream extends OutputStream {
-    private static final int DEFAULT_BUFFER_SIZE = 1024;
-
-    private final Writer writer;
-    private final CharsetDecoder decoder;
-    private final boolean writeImmediately;
-
-    /**
-     * ByteBuffer used as input for the decoder. This buffer can be small
-     * as it is used only to transfer the received data to the
-     * decoder.
-     */
-    private final ByteBuffer decoderIn = ByteBuffer.allocate(128);
-
-    /**
-     * CharBuffer used as output for the decoder. It should be
-     * somewhat larger as we write from this buffer to the
-     * underlying Writer.
-     */
-    private final CharBuffer decoderOut;
-
-    /**
-     * Constructs a new {@link WriterOutputStream} with a default output buffer size of
-     * 1024 characters. The output buffer will only be flushed when it overflows or when
-     * {@link #flush()} or {@link #close()} is called.
-     * 
-     * @param writer the target {@link Writer}
-     * @param decoder the charset decoder
-     * @since 2.1
-     */
-    public WriterOutputStream(final Writer writer, final CharsetDecoder decoder) {
-        this(writer, decoder, DEFAULT_BUFFER_SIZE, false);
-    }
-
-    /**
-     * Constructs a new {@link WriterOutputStream}.
-     * 
-     * @param writer the target {@link Writer}
-     * @param decoder the charset decoder
-     * @param bufferSize the size of the output buffer in number of characters
-     * @param writeImmediately If {@code true} the output buffer will be flushed after each
-     *                         write operation, i.e. all available data will be written to the
-     *                         underlying {@link Writer} immediately. If {@code false}, the
-     *                         output buffer will only be flushed when it overflows or when
-     *                         {@link #flush()} or {@link #close()} is called.
-     * @since 2.1
-     */
-    public WriterOutputStream(final Writer writer, final CharsetDecoder decoder, final int bufferSize,
-                              final boolean writeImmediately) {
-        this.writer = writer;
-        this.decoder = decoder;
-        this.writeImmediately = writeImmediately;
-        decoderOut = CharBuffer.allocate(bufferSize);
-    }
-
-    /**
-     * Constructs a new {@link WriterOutputStream}.
-     * 
-     * @param writer the target {@link Writer}
-     * @param charset the charset encoding
-     * @param bufferSize the size of the output buffer in number of characters
-     * @param writeImmediately If {@code true} the output buffer will be flushed after each
-     *                         write operation, i.e. all available data will be written to the
-     *                         underlying {@link Writer} immediately. If {@code false}, the
-     *                         output buffer will only be flushed when it overflows or when
-     *                         {@link #flush()} or {@link #close()} is called.
-     */
-    public WriterOutputStream(final Writer writer, final Charset charset, final int bufferSize,
-                              final boolean writeImmediately) {
-        this(writer,
-             charset.newDecoder()
-                    .onMalformedInput(CodingErrorAction.REPLACE)
-                    .onUnmappableCharacter(CodingErrorAction.REPLACE)
-                    .replaceWith("?"),
-             bufferSize,
-             writeImmediately);
-    }
-
-    /**
-     * Constructs a new {@link WriterOutputStream} with a default output buffer size of
-     * 1024 characters. The output buffer will only be flushed when it overflows or when
-     * {@link #flush()} or {@link #close()} is called.
-     * 
-     * @param writer the target {@link Writer}
-     * @param charset the charset encoding
-     */
-    public WriterOutputStream(final Writer writer, final Charset charset) {
-        this(writer, charset, DEFAULT_BUFFER_SIZE, false);
-    }
-
-    /**
-     * Constructs a new {@link WriterOutputStream}.
-     * 
-     * @param writer the target {@link Writer}
-     * @param charsetName the name of the charset encoding
-     * @param bufferSize the size of the output buffer in number of characters
-     * @param writeImmediately If {@code true} the output buffer will be flushed after each
-     *                         write operation, i.e. all available data will be written to the
-     *                         underlying {@link Writer} immediately. If {@code false}, the
-     *                         output buffer will only be flushed when it overflows or when
-     *                         {@link #flush()} or {@link #close()} is called.
-     */
-    public WriterOutputStream(final Writer writer, final String charsetName, final int bufferSize,
-                              final boolean writeImmediately) {
-        this(writer, Charset.forName(charsetName), bufferSize, writeImmediately);
-    }
-
-    /**
-     * Constructs a new {@link WriterOutputStream} with a default output buffer size of
-     * 1024 characters. The output buffer will only be flushed when it overflows or when
-     * {@link #flush()} or {@link #close()} is called.
-     * 
-     * @param writer the target {@link Writer}
-     * @param charsetName the name of the charset encoding
-     */
-    public WriterOutputStream(final Writer writer, final String charsetName) {
-        this(writer, charsetName, DEFAULT_BUFFER_SIZE, false);
-    }
-
-    /**
-     * Constructs a new {@link WriterOutputStream} that uses the default character encoding
-     * and with a default output buffer size of 1024 characters. The output buffer will only
-     * be flushed when it overflows or when {@link #flush()} or {@link #close()} is called.
-     * 
-     * @param writer the target {@link Writer}
-     * @deprecated 2.5 use {@link #WriterOutputStream(Writer, Charset)} instead
-     */
-    @Deprecated
-    public WriterOutputStream(final Writer writer) {
-        this(writer, Charset.defaultCharset(), DEFAULT_BUFFER_SIZE, false);
-    }
-
-    /**
-     * Write bytes from the specified byte array to the stream.
-     * 
-     * @param b the byte array containing the bytes to write
-     * @param off the start offset in the byte array
-     * @param len the number of bytes to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final byte[] b, int off, int len) throws IOException {
-        while (len > 0) {
-            final int c = Math.min(len, decoderIn.remaining());
-            decoderIn.put(b, off, c);
-            processInput(false);
-            len -= c;
-            off += c;
-        }
-        if (writeImmediately) {
-            flushOutput();
-        }
-    }
-
-    /**
-     * Write bytes from the specified byte array to the stream.
-     * 
-     * @param b the byte array containing the bytes to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final byte[] b) throws IOException {
-        write(b, 0, b.length);
-    }
-
-    /**
-     * Write a single byte to the stream.
-     * 
-     * @param b the byte to write
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void write(final int b) throws IOException {
-        write(new byte[] { (byte)b }, 0, 1);
-    }
-
-    /**
-     * Flush the stream. Any remaining content accumulated in the output buffer
-     * will be written to the underlying {@link Writer}. After that
-     * {@link Writer#flush()} will be called. 
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void flush() throws IOException {
-        flushOutput();
-        writer.flush();
-    }
-
-    /**
-     * Close the stream. Any remaining content accumulated in the output buffer
-     * will be written to the underlying {@link Writer}. After that
-     * {@link Writer#close()} will be called. 
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    public void close() throws IOException {
-        processInput(true);
-        flushOutput();
-        writer.close();
-    }
-
-    /**
-     * Decode the contents of the input ByteBuffer into a CharBuffer.
-     * 
-     * @param endOfInput indicates end of input
-     * @throws IOException if an I/O error occurs
-     */
-    private void processInput(final boolean endOfInput) throws IOException {
-        // Prepare decoderIn for reading
-        decoderIn.flip();
-        CoderResult coderResult;
-        while (true) {
-            coderResult = decoder.decode(decoderIn, decoderOut, endOfInput);
-            if (coderResult.isOverflow()) {
-                flushOutput();
-            } else if (coderResult.isUnderflow()) {
-                break;
-            } else {
-                // The decoder is configured to replace malformed input and unmappable characters,
-                // so we should not get here.
-                throw new IOException("Unexpected coder result");
-            }
-        }
-        // Discard the bytes that have been read
-        decoderIn.compact();
-    }
-
-    /**
-     * Flush the output.
-     * 
-     * @throws IOException if an I/O error occurs
-     */
-    private void flushOutput() throws IOException {
-        if (decoderOut.position() > 0) {
-            writer.write(decoderOut.array(), 0, decoderOut.position());
-            decoderOut.rewind();
-        }
-    }
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/XmlStreamWriter.java b/trunk/src/main/java/org/apache/commons/io/output/XmlStreamWriter.java
deleted file mode 100644
index 5e75197..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/XmlStreamWriter.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.io.input.XmlStreamReader;
-
-/**
- * Character stream that handles all the necessary Voodo to figure out the
- * charset encoding of the XML document written to the stream.
- *
- * @version $Id$
- * @see XmlStreamReader
- * @since 2.0
- */
-public class XmlStreamWriter extends Writer {
-    private static final int BUFFER_SIZE = 4096;
-
-    private final OutputStream out;
-
-    private final String defaultEncoding;
-
-    private StringWriter xmlPrologWriter = new StringWriter(BUFFER_SIZE);
-
-    private Writer writer;
-
-    private String encoding;
-
-    /**
-     * Construct an new XML stream writer for the specified output stream
-     * with a default encoding of UTF-8.
-     *
-     * @param out The output stream
-     */
-    public XmlStreamWriter(final OutputStream out) {
-        this(out, null);
-    }
-
-    /**
-     * Construct an new XML stream writer for the specified output stream
-     * with the specified default encoding.
-     *
-     * @param out The output stream
-     * @param defaultEncoding The default encoding if not encoding could be detected
-     */
-    public XmlStreamWriter(final OutputStream out, final String defaultEncoding) {
-        this.out = out;
-        this.defaultEncoding = defaultEncoding != null ? defaultEncoding : "UTF-8";
-    }
-
-    /**
-     * Construct an new XML stream writer for the specified file
-     * with a default encoding of UTF-8.
-     * 
-     * @param file The file to write to
-     * @throws FileNotFoundException if there is an error creating or
-     * opening the file
-     */
-    public XmlStreamWriter(final File file) throws FileNotFoundException {
-        this(file, null);
-    }
-
-    /**
-     * Construct an new XML stream writer for the specified file
-     * with the specified default encoding.
-     * 
-     * @param file The file to write to
-     * @param defaultEncoding The default encoding if not encoding could be detected
-     * @throws FileNotFoundException if there is an error creating or
-     * opening the file
-     */
-    public XmlStreamWriter(final File file, final String defaultEncoding) throws FileNotFoundException {
-        this(new FileOutputStream(file), defaultEncoding);
-    }
-
-    /**
-     * Return the detected encoding.
-     *
-     * @return the detected encoding
-     */
-    public String getEncoding() {
-        return encoding;
-    }
-
-    /**
-     * Return the default encoding.
-     *
-     * @return the default encoding
-     */
-    public String getDefaultEncoding() {
-        return defaultEncoding;
-    }
-
-    /**
-     * Close the underlying writer.
-     *
-     * @throws IOException if an error occurs closing the underlying writer
-     */
-    @Override
-    public void close() throws IOException {
-        if (writer == null) {
-            encoding = defaultEncoding;
-            writer = new OutputStreamWriter(out, encoding);
-            writer.write(xmlPrologWriter.toString());
-        }
-        writer.close();
-    }
-
-    /**
-     * Flush the underlying writer.
-     *
-     * @throws IOException if an error occurs flushing the underlying writer
-     */
-    @Override
-    public void flush() throws IOException {
-        if (writer != null) {
-            writer.flush();
-        }
-    }
-
-    /**
-     * Detect the encoding.
-     *
-     * @param cbuf the buffer to write the characters from
-     * @param off The start offset
-     * @param len The number of characters to write
-     * @throws IOException if an error occurs detecting the encoding
-     */
-    private void detectEncoding(final char[] cbuf, final int off, final int len)
-            throws IOException {
-        int size = len;
-        final StringBuffer xmlProlog = xmlPrologWriter.getBuffer();
-        if (xmlProlog.length() + len > BUFFER_SIZE) {
-            size = BUFFER_SIZE - xmlProlog.length();
-        }
-        xmlPrologWriter.write(cbuf, off, size);
-
-        // try to determine encoding
-        if (xmlProlog.length() >= 5) {
-            if (xmlProlog.substring(0, 5).equals("<?xml")) {
-                // try to extract encoding from XML prolog
-                final int xmlPrologEnd = xmlProlog.indexOf("?>");
-                if (xmlPrologEnd > 0) {
-                    // ok, full XML prolog written: let's extract encoding
-                    final Matcher m = ENCODING_PATTERN.matcher(xmlProlog.substring(0,
-                            xmlPrologEnd));
-                    if (m.find()) {
-                        encoding = m.group(1).toUpperCase();
-                        encoding = encoding.substring(1, encoding.length() - 1);
-                    } else {
-                        // no encoding found in XML prolog: using default
-                        // encoding
-                        encoding = defaultEncoding;
-                    }
-                } else {
-                    if (xmlProlog.length() >= BUFFER_SIZE) {
-                        // no encoding found in first characters: using default
-                        // encoding
-                        encoding = defaultEncoding;
-                    }
-                }
-            } else {
-                // no XML prolog: using default encoding
-                encoding = defaultEncoding;
-            }
-            if (encoding != null) {
-                // encoding has been chosen: let's do it
-                xmlPrologWriter = null;
-                writer = new OutputStreamWriter(out, encoding);
-                writer.write(xmlProlog.toString());
-                if (len > size) {
-                    writer.write(cbuf, off + size, len - size);
-                }
-            }
-        }
-    }
-
-    /**
-     * Write the characters to the underlying writer, detecing encoding.
-     * 
-     * @param cbuf the buffer to write the characters from
-     * @param off The start offset
-     * @param len The number of characters to write
-     * @throws IOException if an error occurs detecting the encoding
-     */
-    @Override
-    public void write(final char[] cbuf, final int off, final int len) throws IOException {
-        if (xmlPrologWriter != null) {
-            detectEncoding(cbuf, off, len);
-        } else {
-            writer.write(cbuf, off, len);
-        }
-    }
-
-    static final Pattern ENCODING_PATTERN = XmlStreamReader.ENCODING_PATTERN;
-}
diff --git a/trunk/src/main/java/org/apache/commons/io/output/package.html b/trunk/src/main/java/org/apache/commons/io/output/package.html
deleted file mode 100644
index 4415613..0000000
--- a/trunk/src/main/java/org/apache/commons/io/output/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<html>
-<body>
-<p>
-This package provides implementations of output classes, such as
-<code>OutputStream</code> and <code>Writer</code>.
-</p>
-</body>
-</html>
diff --git a/trunk/src/main/java/org/apache/commons/io/overview.html b/trunk/src/main/java/org/apache/commons/io/overview.html
deleted file mode 100644
index 5f2ff1e..0000000
--- a/trunk/src/main/java/org/apache/commons/io/overview.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<html>
-<body bgcolor="white">
-<p>
-The commons-io component contains utility classes,
-filters, streams, readers and writers.
-</p>
-<p>
-These classes aim to add to the standard JDK IO classes.
-The utilities provide convenience wrappers around the JDK, simplifying
-various operations into pre-tested units of code.
-The filters and streams provide useful implementations that perhaps should
-be in the JDK itself.
-</p>
-</body>
-</html>
diff --git a/trunk/src/main/java/org/apache/commons/io/package.html b/trunk/src/main/java/org/apache/commons/io/package.html
deleted file mode 100644
index 914a0a6..0000000
--- a/trunk/src/main/java/org/apache/commons/io/package.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<html>
-<body bgcolor="white">
-<p>
-This package defines utility classes for working with streams, readers,
-writers and files. The most commonly used classes are described here:
-</p>
-<p>
-<b>IOUtils</b> is the most frequently used class.
-It provides operations to read, write, copy and close streams.
-</p>
-<p>
-<b>FileUtils</b> provides operations based around the JDK File class.
-These include reading, writing, copying, comparing and deleting.
-</p>
-<p>
-<b>FilenameUtils</b> provides utilities based on filenames.
-This utility class manipulates filenames without using File objects.
-It aims to simplify the transition between Windows and Unix.
-Before using this class however, you should consider whether you should
-be using File objects.
-</p>
-<p>
-<b>FileSystemUtils</b> allows access to the filing system in ways the JDK
-does not support. At present this allows you to get the free space on a drive.
-</p>
-<p>
-<b>EndianUtils</b> swaps data between Big-Endian and Little-Endian formats.
-</p>
-</body>
-</html>
diff --git a/trunk/src/media/io-logo-white.xcf b/trunk/src/media/io-logo-white.xcf
deleted file mode 100644
index a3c899b..0000000
--- a/trunk/src/media/io-logo-white.xcf
+++ /dev/null
Binary files differ
diff --git a/trunk/src/media/logo.gif b/trunk/src/media/logo.gif
deleted file mode 100644
index 314441b..0000000
--- a/trunk/src/media/logo.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/src/site/resources/download_io.cgi b/trunk/src/site/resources/download_io.cgi
deleted file mode 100755
index 495cde1..0000000
--- a/trunk/src/site/resources/download_io.cgi
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-# Just call the standard mirrors.cgi script. It will use download.html
-# as the input template.
-exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $*
\ No newline at end of file
diff --git a/trunk/src/site/resources/images/io-logo-white.png b/trunk/src/site/resources/images/io-logo-white.png
deleted file mode 100644
index 75be7af..0000000
--- a/trunk/src/site/resources/images/io-logo-white.png
+++ /dev/null
Binary files differ
diff --git a/trunk/src/site/site.xml b/trunk/src/site/site.xml
deleted file mode 100644
index 84ec68c..0000000
--- a/trunk/src/site/site.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<project name="Commons IO">
-    <bannerRight>
-        <name>Commons IO</name>
-        <src>/images/io-logo-white.png</src>
-        <href>/index.html</href>
-    </bannerRight>
-
-    <body>
-        <menu name="Commons IO">
-            <item name="Overview"             href="/index.html"/>
-            <item name="Download"             href="http://commons.apache.org/io/download_io.cgi"/>
-            <item name="User guide"           href="/description.html"/>
-            <item name="Best practices"       href="/bestpractices.html"/>
-            <item name="Javadoc 2.4"          href="/javadocs/api-2.4/index.html"/>
-            <item name="Javadoc 2.2"          href="/javadocs/api-2.2/index.html"/>
-            <item name="Javadoc 1.4"          href="/javadocs/api-1.4/index.html"/>
-        </menu>
-
-        <menu name="Development">
-            <item name="Building"             href="/building.html"/>
-            <item name="Mailing lists"        href="/mail-lists.html"/>
-            <item name="Issue Tracking"       href="/issue-tracking.html"/>
-            <item name="Team"                 href="/team-list.html"/>
-            <item name="Tasks"                href="/tasks.html"/>
-            <item name="Proposal"             href="/proposal.html"/>
-            <item name="SVN repository"       href="/source-repository.html"/>
-            <item name="Javadoc (latest SVN)" href="apidocs/index.html"/>
-        </menu>
-
-    </body>
-
-</project>
diff --git a/trunk/src/site/xdoc/bestpractices.xml b/trunk/src/site/xdoc/bestpractices.xml
deleted file mode 100644
index a4382df..0000000
--- a/trunk/src/site/xdoc/bestpractices.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Best practices</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-  <body>
-
-    <section name="Best practices">
-        <p>
-            This document presents a number of 'best practices' in the IO area.
-        </p>
-    </section>
-
-    <section name="java.io.File">
-    
-        <p>
-            Often, you have to deal with files and filenames. There are many
-            things that can go wrong:
-        </p>
-        <ul>
-            <li>A class works in Unix but doesn't on Windows (or vice versa)</li>
-            <li>Invalid filenames due to double or missing path separators</li>
-            <li>UNC filenames (on Windows) don't work with my home-grown filename utility function</li>
-            <li>etc. etc.</li>
-        </ul>
-        <p>
-            These are good reasons not to work with filenames as Strings.
-            Using java.io.File instead handles many of the above cases nicely.
-            Thus, our best practice recommendation is to use java.io.File
-            instead of String for filenames to avoid platform dependencies.
-        </p>
-        <p>
-            <i>
-            Version 1.1 of commons-io now includes a dedicated filename
-            handling class - <a href="javadocs/api-release/index.html?org/apache/commons/io/FilenameUtils.html">FilenameUtils</a>.
-            This does handle many of these filename issues, however we still
-            recommend, wherever possible, that you use java.io.File objects.
-            </i>
-        </p>
-        <p>
-            Let's look at an example.
-        </p>
-        <source>
- public static String getExtension(String filename) {
-   int index = filename.lastIndexOf('.');
-   if (index == -1) {
-     return "";
-   } else {
-     return filename.substring(index + 1);
-   }
- }</source>
-        <p>
-            Easy enough? Right, but what happens if someone passes in a full path 
-            instead of only a filename? Consider the following, perfectly legal path:
-            "C:\Temp\documentation.new\README".
-            The method as defined above would return "new\README" - definitely
-            not what you wanted.
-        </p>
-        <p>
-            Please use java.io.File for filenames instead of Strings.
-            The functionality that the class provides is well tested.
-            In FileUtils you will find other useful utility functions
-            around java.io.File.
-        </p>
-        <p>
-            Instead of:
-        </p>
-        <source>
- String tmpdir = "/var/tmp";
- String tmpfile = tmpdir + System.getProperty("file.separator") + "test.tmp";
- InputStream in = new java.io.FileInputStream(tmpfile);</source>
-        <p>
-            ...write:
-        </p>
-        <source>
- File tmpdir = new File("/var/tmp");
- File tmpfile = new File(tmpdir, "test.tmp");
- InputStream in = new java.io.FileInputStream(tmpfile);</source>
-
-    </section>
-    
-    <section name="Buffering streams">
-        <p>
-            IO performance depends a lot from the buffering strategy. Usually, it's 
-            quite fast to read packets with the size of 512 or 1024 bytes because
-            these sizes match well with the packet sizes used on harddisks in 
-            file systems or file system caches. But as soon as you have to read only 
-            a few bytes and that many times performance drops significantly.
-        </p>
-        <p>
-            Make sure you're properly buffering streams when reading or writing 
-            streams, especially when working with files. Just decorate your 
-            FileInputStream with a BufferedInputStream:
-        </p>
-        <source>
- InputStream in = new java.io.FileInputStream(myfile);
- try {
-   in = new java.io.BufferedInputStream(in);
-   
-   in.read(.....
- } finally {
-   IOUtils.closeQuietly(in);
- }</source>
-        <p>
-            Pay attention that you're not buffering an already buffered stream. Some
-            components like XML parsers may do their own buffering so decorating
-            the InputStream you pass to the XML parser does nothing but slowing down
-            your code. If you use our CopyUtils or IOUtils you don't need to 
-            additionally buffer the streams you use as the code in there already
-            buffers the copy process. Always check the Javadocs for information. 
-            Another case where buffering is unnecessary is when you write to a 
-            ByteArrayOutputStream since you're writing to memory only.
-        </p>
-    </section>
-
-  </body>
-
-</document>
diff --git a/trunk/src/site/xdoc/building.xml b/trunk/src/site/xdoc/building.xml
deleted file mode 100644
index eed872e..0000000
--- a/trunk/src/site/xdoc/building.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Building</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-<!-- ================================================== -->
-<section name="Overview">
-<p>
-  Commons IO uses <a href="http://maven.apache.org">Maven 2+</a> or
-  <a href="http://ant.apache.org">Ant</a> as a build system.
-</p>
-<p>
-  Commons IO requires a minimum of JDK 1.5 to build.
-</p>
-<p>
-  You may also be interested in the upgrade notes:<br />
-  Upgrade <a href="upgradeto2_0_1.html">from 2.0 to 2.0.1</a><br />
-  Upgrade <a href="upgradeto2_0.html">from 1.4 to 2.0</a><br />
-  Upgrade <a href="upgradeto1_4.html">from 1.3.2 to 1.4</a><br />
-  Upgrade <a href="upgradeto1_3_2.html">from 1.3, or 1.3.1 to 1.3.2</a><br />
-  Upgrade <a href="upgradeto1_3_1.html">from 1.3 to 1.3.1</a><br />
-  Upgrade <a href="upgradeto1_3.html">from 1.2 to 1.3</a><br />
-  Upgrade <a href="upgradeto1_2.html">from 1.1 to 1.2</a><br />
-  Upgrade <a href="upgradeto1_1.html">from 1.0 to 1.1</a><br />
-</p>
-</section>
-<section name="Maven 2 Goals">
-  <p>
-    The following <a href="http://maven.apache.org">Maven</a> commands can be used to build io:
-  </p>
-  <ul>
-    <li><code>mvn clean</code> - clean up</li>
-    <li><code>mvn test</code> - compile and run the unit tests</li>
-    <li><code>mvn site</code> - create io documentation</li>
-    <li><code>mvn package</code> - build the jar</li>
-    <li><code>mvn package -Prc</code> - Create the source and binary distributions</li>
-  </ul>
-</section>
-<!-- ================================================== -->
-<section name="Ant Goals">
-  <p>
-    <strong>Note:</strong>
-    <ul>
-        <li>Dependencies are automatically downloaded if not specified explicitly in
-            a <code>build.properties</code> file.</li>
-    </ul>
-  </p>
-  <p>
-    The following <a href="http://ant.apache.org">Ant</a> commands can be used to build io:
-  </p>
-  <ul>
-    <li><code>ant clean</code> - clean up</li>
-    <li><code>ant test</code> - compile and run the unit tests</li>
-    <li><code>ant javadoc</code> - create javadocs</li>
-    <li><code>ant jar</code> - build the jar</li>
-    <li><code>ant dist</code> - Create the source and binary distributions</li>
-  </ul>
-</section>
-<!-- ================================================== -->
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/description.xml b/trunk/src/site/xdoc/description.xml
deleted file mode 100644
index df0d55c..0000000
--- a/trunk/src/site/xdoc/description.xml
+++ /dev/null
@@ -1,259 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>User guide</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-  <body>
-
-    <section name="User guide">
-        <p>
-            Commons-IO contains
-            <a href="#Utility classes">utility classes</a>,
-            <a href="#Endian classes">endian classes</a>,
-            <a href="#Line iterator">line iterator</a>,
-            <a href="#File filters">file filters</a>,
-            <a href="#File comparators">file comparators</a> and
-            <a href="#Streams">stream implementations</a>.
-        </p>
-
-        <p>
-            For a more detailed descriptions, take a look at the
-            <a href="api-release/index.html">javadocs</a>.
-        </p>
-    </section>
-
-    <section name="Utility classes">
-        <subsection name="IOUtils">
-            <p>
-                <a href="javadocs/api-release/index.html?org/apache/commons/io/IOUtils.html">IOUtils</a>
-                contains utility methods dealing with reading, writing and copying.
-                The methods work on InputStream, OutputStream, Reader and Writer.
-            </p>
-            <p>
-                As an example, consider the task of reading bytes
-                from a URL, and printing them. This would typically done like this:
-            </p>
-
-            <source>
- InputStream in = new URL( "http://commons.apache.org" ).openStream();
- try {
-   InputStreamReader inR = new InputStreamReader( in );
-   BufferedReader buf = new BufferedReader( inR );
-   String line;
-   while ( ( line = buf.readLine() ) != null ) {
-     System.out.println( line );
-   }
- } finally {
-   in.close();
- }</source>
-
-            <p>
-                With the IOUtils class, that could be done with:
-            </p>
-
-            <source>
- InputStream in = new URL( "http://commons.apache.org" ).openStream();
- try {
-   System.out.println( IOUtils.toString( in ) );
- } finally {
-   IOUtils.closeQuietly(in);
- }</source>
-
-            <p>
-                In certain application domains, such IO operations are
-                common, and this class can save a great deal of time. And you can
-                rely on well-tested code.
-            </p>
-            <p>
-                For utility code such as this, flexibility and speed are of primary importance.
-                However you should also understand the limitations of this approach.
-                Using the above technique to read a 1GB file would result in an
-                attempt to create a 1GB String object!
-            </p>
-
-        </subsection>
-
-        <subsection name="FileUtils">
-            <p>
-                The <a href="api-release/index.html?org/apache/commons/io/FileUtils.html">FileUtils</a>
-                class contains utility methods for working with File objects.
-                These include reading, writing, copying and comparing files.
-            </p>
-            <p>
-                For example to read an entire file line by line you could use:
-            </p>
-            <source>
- File file = new File("/commons/io/project.properties");
- List lines = FileUtils.readLines(file, "UTF-8");</source>
-        </subsection>
-
-        <subsection name="FilenameUtils">
-            <p>
-                The <a href="api-release/index.html?org/apache/commons/io/FilenameUtils.html">FilenameUtils</a>
-                class contains utility methods for working with filenames <i>without</i>
-                using File objects. The class aims to be consistent
-                between Unix and Windows, to aid transitions between these
-                environments (such as moving from development to production).
-            </p>
-            <p>
-                For example to normalize a filename removing double dot segments:
-            </p>
-            <source>
- String filename = "C:/commons/io/../lang/project.xml";
- String normalized = FilenameUtils.normalize(filename);
- // result is "C:/commons/lang/project.xml"</source>
-        </subsection>
-
-        <subsection name="FileSystemUtils">
-            <p>
-                The <a href="api-release/index.html?org/apache/commons/io/FileSystemUtils.html">FileSystemUtils</a>
-                class contains
-                utility methods for working with the file system
-                to access functionality not supported by the JDK.
-                Currently, the only method is to get the free space on a drive.
-                Note that this uses the command line, not native code.
-            </p>
-            <p>
-                For example to find the free space on a drive:
-            </p>
-            <source>
- long freeSpace = FileSystemUtils.freeSpace("C:/");</source>
-        </subsection>
-
-    </section>
-
-    <section name="Endian classes">
-        <p>
-            Different computer architectures adopt different
-            conventions for byte ordering. In so-called
-            "Little Endian" architectures (eg Intel), the low-order
-            byte is stored in memory at the lowest address, and
-            subsequent bytes at higher addresses. For "Big Endian"
-            architectures (eg Motorola), the situation is reversed.
-        </p>
-
-        <p>
-        There are two classes in this package of relevance:
-        </p>
-
-        <ul>
-           <li>
-           The <a href="api-release/index.html?org/apache/commons/io/EndianUtils.html">EndianUtils</a>
-           class contains static methods for swapping the Endian-ness
-           of Java primitives and streams.
-           </li>
-
-           <li>
-           The <a href="api-release/index.html?org/apache/commons/io/input/SwappedDataInputStream.html">SwappedDataInputStream</a>
-           class is an implementation of the <code>DataInput</code> interface. With
-           this, one can read data from files of non-native Endian-ness.
-           </li>
-        </ul>
-
-        <p>
-            For more information, see
-            <a
-                href="http://www.cs.umass.edu/~verts/cs32/endian.html">http://www.cs.umass.edu/~verts/cs32/endian.html</a>
-         </p>
-
-    </section>
-
-    <section name="Line iterator">
-        <p>
-            The <code>org.apache.commons.io.LineIterator</code> class
-            provides a flexible way for working with a line-based file.
-            An instance can be created directly, or via factory methods on
-            <code>FileUtils</code> or <code>IOUtils</code>.
-            The recommended usage pattern is:
-        </p>
-        <source>
- LineIterator it = FileUtils.lineIterator(file, "UTF-8");
- try {
-   while (it.hasNext()) {
-     String line = it.nextLine();
-     /// do something with line
-   }
- } finally {
-   LineIterator.closeQuietly(iterator);
- }</source>
-    </section>
-
-    <section name="File filters">
-        <p>
-            The <code>org.apache.commons.io.filefilter</code>
-            package defines an interface
-            (<a href="api-release/index.html?org/apache/commons/io/filefilter/IOFileFilter.html">IOFileFilter</a>)
-            that combines both <code>java.io.FileFilter</code> and
-            <code>java.io.FilenameFilter</code>. Besides
-            that the package offers a series of ready-to-use
-            implementations of the <code>IOFileFilter</code>
-            interface including
-            implementation that allow you to combine other such filters.
-
-            These filters can be used to list files or in FileDialog, for example.
-        </p>
-        <p>
-            See the
-            <a href="api-release/index.html?org/apache/commons/io/filefilter/package-summary.html">filefilter</a>
-            package javadoc for more details.
-        </p>
-    </section>
-
-    <section name="File comparators">
-        <p>
-            The <code>org.apache.commons.io.comparator</code>
-            package provides a number of <code>java.util.Comparator</code>
-            implementations for <code>java.io.File</code>.
-
-            These comparators can be used to sort lists and arrays of files, for example.
-        </p>
-        <p>
-            See the
-            <a href="api-release/index.html?org/apache/commons/io/comparator/package-summary.html">comparator</a>
-            package javadoc for more details.
-        </p>
-    </section>
-
-    <section name="Streams">
-        <p>
-            The <code>org.apache.commons.io.input</code> and
-            <code>org.apache.commons.io.output</code> packages
-            contain various useful implementations of streams.
-            These include:
-            <ul>
-            <li>Null output stream - that silently absorbs all data sent to it</li>
-            <li>Tee output stream - that sends output data to two streams instead of one</li>
-            <li>Byte array output stream - that is a faster version of the JDK class</li>
-            <li>Counting streams - that count the number of bytes passed</li>
-            <li>Proxy streams - that delegate to the correct method in the proxy</li>
-            <li>Lockable writer - that provides synchronization of writes using a lock file</li>
-            </ul>
-        </p>
-        <p>
-            See the
-            <a href="api-release/index.html?org/apache/commons/io/input/package-summary.html">input</a> or
-            <a href="api-release/index.html?org/apache/commons/io/output/package-summary.html">output</a>
-            package javadoc for more details.
-        </p>
-    </section>
-
-  </body>
-
-</document>
diff --git a/trunk/src/site/xdoc/download_io.xml b/trunk/src/site/xdoc/download_io.xml
deleted file mode 100644
index bbb2565..0000000
--- a/trunk/src/site/xdoc/download_io.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<!--
- +======================================================================+
- |****                                                              ****|
- |****      THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN      ****|
- |****                    DO NOT EDIT DIRECTLY                      ****|
- |****                                                              ****|
- +======================================================================+
- | TEMPLATE FILE: download-page-template.xml                            |
- | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
- +======================================================================+
- |                                                                      |
- | 1) Re-generate using: mvn commons:download-page                      |
- |                                                                      |
- | 2) Set the following properties in the component's pom:              |
- |    - commons.componentid (required, alphabetic, lower case)          |
- |    - commons.release.version (required)                              |
- |    - commons.binary.suffix (optional)                                |
- |      (defaults to "-bin", set to "" for pre-maven2 releases)         |
- |                                                                      |
- | 3) Example Properties                                                |
- |                                                                      |
- |  <properties>                                                        |
- |    <commons.componentid>math</commons.componentid>                   |
- |    <commons.release.version>1.2</commons.release.version>            |
- |  </properties>                                                       |
- |                                                                      |
- +======================================================================+
--->
-<document>
-  <properties>
-    <title>Download Apache Commons IO</title>
-    <author email="dev@commons.apache.org">Commons Documentation Team</author>
-  </properties>
-  <body>
-    <section name="Download Apache Commons IO">
-    <subsection name="Using a Mirror">
-      <p>
-        We recommend you use a mirror to download our release
-        builds, but you <strong>must</strong> verify the integrity of
-        the downloaded files using signatures downloaded from our main
-        distribution directories. Recent releases (48 hours) may not yet
-        be available from the mirrors.
-      </p>
-
-      <p>
-        You are currently using <b>[preferred]</b>.  If you
-        encounter a problem with this mirror, please select another
-        mirror.  If all mirrors are failing, there are <i>backup</i>
-        mirrors (at the end of the mirrors list) that should be
-        available.
-        <br></br>
-        [if-any logo]<a href="[link]"><img align="right" src="[logo]" border="0"></img></a>[end]
-      </p>
-
-      <form action="[location]" method="get" id="SelectMirror">
-        <p>
-          Other mirrors:
-          <select name="Preferred">
-          [if-any http]
-            [for http]<option value="[http]">[http]</option>[end]
-          [end]
-          [if-any ftp]
-            [for ftp]<option value="[ftp]">[ftp]</option>[end]
-          [end]
-          [if-any backup]
-            [for backup]<option value="[backup]">[backup] (backup)</option>[end]
-          [end]
-          </select>
-          <input type="submit" value="Change"></input>
-        </p>
-      </form>
-
-      <p>
-        The <a href="http://www.apache.org/dist/commons/KEYS">KEYS</a>
-        link links to the code signing keys used to sign the product.
-        The <code>PGP</code> link downloads the OpenPGP compatible signature from our main site.
-        The <code>MD5</code> link downloads the checksum from the main site.
-      </p>
-    </subsection>
-    </section>
-    <section name="Apache Commons IO 2.5 (requires JDK 1.6+)">
-      <subsection name="Binaries">
-        <table>
-          <tr>
-              <td><a href="[preferred]/commons/io/binaries/commons-io-2.5-bin.tar.gz">commons-io-2.5-bin.tar.gz</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.5-bin.tar.gz.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.5-bin.tar.gz.asc">pgp</a></td>
-          </tr>
-          <tr>
-              <td><a href="[preferred]/commons/io/binaries/commons-io-2.5-bin.zip">commons-io-2.5-bin.zip</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.5-bin.zip.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/binaries/commons-io-2.5-bin.zip.asc">pgp</a></td>
-          </tr>
-        </table>
-      </subsection>
-      <subsection name="Source">
-        <table>
-          <tr>
-              <td><a href="[preferred]/commons/io/source/commons-io-2.5-src.tar.gz">commons-io-2.5-src.tar.gz</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.5-src.tar.gz.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.5-src.tar.gz.asc">pgp</a></td>
-          </tr>
-          <tr>
-              <td><a href="[preferred]/commons/io/source/commons-io-2.5-src.zip">commons-io-2.5-src.zip</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.5-src.zip.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/io/source/commons-io-2.5-src.zip.asc">pgp</a></td>
-          </tr>
-        </table>
-      </subsection>
-    </section>
-    <section name="Archives">
-        <p>
-          Older releases can be obtained from the archives.
-        </p>
-        <ul>
-          <li class="download"><a href="[preferred]/commons/io/">browse download area</a></li>
-          <li><a href="http://archive.apache.org/dist/commons/io/">archives...</a></li>
-        </ul>
-    </section>
-  </body>
-</document>
diff --git a/trunk/src/site/xdoc/index.xml b/trunk/src/site/xdoc/index.xml
deleted file mode 100644
index 7a1f160..0000000
--- a/trunk/src/site/xdoc/index.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Commons IO Overview</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-<!-- ================================================== -->
-<section name="Commons IO">
-<p>
-Commons IO is a library of utilities to assist with developing IO functionality.
-</p>
-<p>
-There are six main areas included:
-<ul>
-<li><a href="javadocs/api-release/index.html?org/apache/commons/io/package-summary.html">Utility classes</a>
-   - with static methods to perform common tasks</li>
-<li><a href="javadocs/api-release/index.html?org/apache/commons/io/input/package-summary.html">Input</a>
-   - useful Input Stream and Reader implementations</li>
-<li><a href="javadocs/api-release/index.html?org/apache/commons/io/output/package-summary.html">Output</a>
-   - useful Output Stream and Writer implementations</li>
-<li><a href="javadocs/api-release/index.html?org/apache/commons/io/filefilter/package-summary.html">Filters</a>
-   - various implementations of file filters</li>
-<li><a href="javadocs/api-release/index.html?org/apache/commons/io/comparator/package-summary.html">Comparators</a>
-   - various implementations of <code>java.util.Comparator</code> for files</li>
-<li><a href="javadocs/api-release/index.html?org/apache/commons/io/monitor/package-summary.html">File Monitor</a>
-   - a component for monitoring file system events</li>
-</ul>
-</p>
-</section>
-<!-- ================================================== -->
-<section name="Releases">
-
-    <subsection name="Commons IO 2.5 (requires JDK 1.6+)">
-        <p>
-            Commons IO 2.5 is the latest version and requires a minimum of JDK 1.6 -
-            <a href="http://commons.apache.org/io/download_io.cgi">Download now!</a>
-        </p>
-        <p>
-            View the
-            <a href="upgradeto2_5.html">Release Notes</a>
-            and
-            <a href="javadocs/api-release/index.html">JavaDoc API documents</a>
-        </p>
-    </subsection>
-
-
-    <subsection name="Commons IO 2.4 (requires JDK 1.6+)">
-<p>
-    Commons IO 2.4 requires a minimum of JDK 1.6 -
-<a href="http://commons.apache.org/io/download_io.cgi">Download now!</a>
-</p> 
-<p>
-View the <a href="upgradeto2_4.html">Release Notes</a> and
-<a href="javadocs/api-release/index.html">JavaDoc API documents</a>
-</p> 
-</subsection>
-
-<subsection name="Commons IO 2.2 (requires JDK 1.5+)">
-<p>
-Commons IO 2.2 requires a minimum of JDK 1.5 -
-<a href="http://commons.apache.org/io/download_io.cgi">Download now!</a>
-</p> 
-<p>
-View the <a href="upgradeto2_2.html">Release Notes</a> and
-<a href="javadocs/api-2.2/index.html">JavaDoc API documents</a>
-</p> 
-</subsection>
-
-<subsection name="Older Releases">
-<p>
-For previous releases, see the <a href="http://archive.apache.org/dist/commons/io/">Apache Archive</a>.
-</p> 
-</subsection>
-
-</section>
-<!-- ================================================== -->
-<section name="Support">
-<p>
-The <a href="mail-lists.html">commons mailing lists</a> act as the main support forum.
-The user list is suitable for most library usage queries.
-The dev list is intended for the development discussion.
-Please remember that the lists are shared between all commons components,
-so prefix your email by [io].
-</p>
-<p>
-Issues may be reported via <a href="issue-tracking.html">ASF JIRA</a>.
-Please read the instructions carefully to submit a useful bug report or enhancement request.
-</p>
-</section>
-<!-- ================================================== -->
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/issue-tracking.xml b/trunk/src/site/xdoc/issue-tracking.xml
deleted file mode 100644
index 9e05944..0000000
--- a/trunk/src/site/xdoc/issue-tracking.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<!--
- +======================================================================+
- |****                                                              ****|
- |****      THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN      ****|
- |****                    DO NOT EDIT DIRECTLY                      ****|
- |****                                                              ****|
- +======================================================================+
- | TEMPLATE FILE: issue-tracking-template.xml                           |
- | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
- +======================================================================+
- |                                                                      |
- | 1) Re-generate using: mvn commons:jira-page                          |
- |                                                                      |
- | 2) Set the following properties in the component's pom:              |
- |    - commons.jira.id  (required, alphabetic, upper case)             |
- |    - commons.jira.pid (required, numeric)                            |
- |                                                                      |
- | 3) Example Properties                                                |
- |                                                                      |
- |  <properties>                                                        |
- |    <commons.jira.id>MATH</commons.jira.id>                           |
- |    <commons.jira.pid>12310485</commons.jira.pid>                     |
- |  </properties>                                                       |
- |                                                                      |
- +======================================================================+
--->
-<document>
-  <properties>
-    <title>Commons IO Issue tracking</title>
-    <author email="dev@commons.apache.org">Commons Documentation Team</author>
-  </properties>
-  <body>
-
-    <section name="Commons IO Issue tracking">
-      <p>
-      Commons IO uses <a href="http://issues.apache.org/jira/">ASF JIRA</a> for tracking issues.
-      See the <a href="http://issues.apache.org/jira/browse/IO">Commons IO JIRA project page</a>.
-      </p>
-
-      <p>
-      To use JIRA you may need to <a href="http://issues.apache.org/jira/secure/Signup!default.jspa">create an account</a>
-      (if you have previously created/updated Commons issues using Bugzilla an account will have been automatically
-      created and you can use the <a href="http://issues.apache.org/jira/secure/ForgotPassword!default.jspa">Forgot Password</a>
-      page to get a new password).
-      </p>
-
-      <p>
-      If you would like to report a bug, or raise an enhancement request with
-      Commons IO please do the following:
-      <ol>
-        <li><a href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;pid=12310477&amp;sorter/field=issuekey&amp;sorter/order=DESC&amp;status=1&amp;status=3&amp;status=4">Search existing open bugs</a>.
-            If you find your issue listed then please add a comment with your details.</li>
-        <li><a href="mail-lists.html">Search the mailing list archive(s)</a>.
-            You may find your issue or idea has already been discussed.</li>
-        <li>Decide if your issue is a bug or an enhancement.</li>
-        <li>Submit either a <a href="http://issues.apache.org/jira/secure/CreateIssueDetails!init.jspa?pid=12310477&amp;issuetype=1&amp;priority=4&amp;assignee=-1">bug report</a>
-            or <a href="http://issues.apache.org/jira/secure/CreateIssueDetails!init.jspa?pid=12310477&amp;issuetype=4&amp;priority=4&amp;assignee=-1">enhancement request</a>.</li>
-      </ol>
-      </p>
-
-      <p>
-      Please also remember these points:
-      <ul>
-        <li>the more information you provide, the better we can help you</li>
-        <li>test cases are vital, particularly for any proposed enhancements</li>
-        <li>the developers of Commons IO are all unpaid volunteers</li>
-      </ul>
-      </p>
-
-      <p>
-      For more information on subversion and creating patches see the
-      <a href="http://www.apache.org/dev/contributors.html">Apache Contributors Guide</a>.
-      </p>
-
-      <p>
-      You may also find these links useful:
-      <ul>
-        <li><a href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;pid=12310477&amp;sorter/field=issuekey&amp;sorter/order=DESC&amp;status=1&amp;status=3&amp;status=4">All Open Commons IO bugs</a></li>
-        <li><a href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;pid=12310477&amp;sorter/field=issuekey&amp;sorter/order=DESC&amp;status=5&amp;status=6">All Resolved Commons IO bugs</a></li>
-        <li><a href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;pid=12310477&amp;sorter/field=issuekey&amp;sorter/order=DESC">All Commons IO bugs</a></li>
-      </ul>
-      </p>
-    </section>
-  </body>
-</document>
diff --git a/trunk/src/site/xdoc/mail-lists.xml b/trunk/src/site/xdoc/mail-lists.xml
deleted file mode 100644
index 0e375ac..0000000
--- a/trunk/src/site/xdoc/mail-lists.xml
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<!--
- +======================================================================+
- |****                                                              ****|
- |****      THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN      ****|
- |****                    DO NOT EDIT DIRECTLY                      ****|
- |****                                                              ****|
- +======================================================================+
- | TEMPLATE FILE: mail-lists-template.xml                               |
- | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
- +======================================================================+
- |                                                                      |
- | 1) Re-generate using: mvn commons:mail-page                          |
- |                                                                      |
- | 2) Set the following properties in the component's pom:              |
- |    - commons.componentid (required, alphabetic, lower case)          |
- |                                                                      |
- | 3) Example Properties                                                |
- |                                                                      |
- |  <properties>                                                        |
- |    <commons.componentid>math</commons.componentid>                   |
- |  </properties>                                                       |
- |                                                                      |
- +======================================================================+
--->
-<document>
-  <properties>
-    <title>Commons IO Mailing Lists</title>
-    <author email="dev@commons.apache.org">Commons Documentation Team</author>
-  </properties>
-  <body>
-
-    <section name="Overview">
-      <p>
-        <a href="index.html">Commons IO</a> shares mailing lists with all the other 
-        <a href="http://commons.apache.org/components.html">Commons Components</a>.
-        To make it easier for people to only read messages related to components they are interested in,
-        the convention in Commons is to prefix the subject line of messages with the component's name,
-        for example:
-        <ul>
-          <li>[io] Problem with the ...</li>
-        </ul>
-      </p>
-      <p>
-        Questions related to the usage of Commons IO should be posted to the
-        <a href="http://mail-archives.apache.org/mod_mbox/commons-user/">User List</a>.
-        <br />
-        The <a href="http://mail-archives.apache.org/mod_mbox/commons-dev/">Developer List</a>
-        is for questions and discussion related to the development of Commons IO.
-        <br />
-        Please do not cross-post; developers are also subscribed to the user list.
-      </p>
-      <p>
-        <strong>Note:</strong> please don't send patches or attachments to any of the mailing lists.
-        Patches are best handled via the <a href="issue-tracking.html">Issue Tracking</a> system. 
-        Otherwise, please upload the file to a public server and include the URL in the mail. 
-      </p>
-    </section>
-
-    <section name="Commons IO Mailing Lists">
-      <p>
-        <strong>Please prefix the subject line of any messages for <a href="index.html">Commons IO</a>
-        with <i>[io]</i></strong> - <i>thanks!</i>
-        <br />
-        <br />
-      </p>
-
-      <table>
-        <tr>
-          <th>Name</th>
-          <th>Subscribe</th>
-          <th>Unsubscribe</th>
-          <th>Post</th>
-          <th>Archive</th>
-          <th>Other Archives</th>
-        </tr>
-
-
-        <tr>
-          <td>
-            <strong>Commons User List</strong>
-            <br /><br />
-            Questions on using Commons IO.
-            <br /><br />
-          </td>
-          <td><a href="mailto:user-subscribe@commons.apache.org">Subscribe</a></td>
-          <td><a href="mailto:user-unsubscribe@commons.apache.org">Unsubscribe</a></td>
-          <td><a href="mailto:user@commons.apache.org?subject=[io]">Post</a></td>
-          <td><a href="http://mail-archives.apache.org/mod_mbox/commons-user/">mail-archives.apache.org</a></td>
-          <td><a href="http://markmail.org/list/org.apache.commons.users/">markmail.org</a><br />
-              <a href="http://www.mail-archive.com/user@commons.apache.org/">www.mail-archive.com</a><br />
-              <a href="http://news.gmane.org/gmane.comp.jakarta.commons.devel">news.gmane.org</a>
-          </td>
-        </tr>
-
-
-        <tr>
-          <td>
-            <strong>Commons Developer List</strong>
-            <br /><br />
-            Discussion of development of Commons IO.
-            <br /><br />
-          </td>
-          <td><a href="mailto:dev-subscribe@commons.apache.org">Subscribe</a></td>
-          <td><a href="mailto:dev-unsubscribe@commons.apache.org">Unsubscribe</a></td>
-          <td><a href="mailto:dev@commons.apache.org?subject=[io]">Post</a></td>
-          <td><a href="http://mail-archives.apache.org/mod_mbox/commons-dev/">mail-archives.apache.org</a></td>
-          <td><a href="http://markmail.org/list/org.apache.commons.dev/">markmail.org</a><br />
-              <a href="http://www.mail-archive.com/dev@commons.apache.org/">www.mail-archive.com</a><br />
-              <a href="http://news.gmane.org/gmane.comp.jakarta.commons.devel">news.gmane.org</a>
-          </td>
-        </tr>
-
-
-        <tr>
-          <td>
-            <strong>Commons Issues List</strong>
-            <br /><br />
-            Only for e-mails automatically generated by the <a href="issue-tracking.html">issue tracking</a> system.
-            <br /><br />
-          </td>
-          <td><a href="mailto:issues-subscribe@commons.apache.org">Subscribe</a></td>
-          <td><a href="mailto:issues-unsubscribe@commons.apache.org">Unsubscribe</a></td>
-          <td><i>read only</i></td>
-          <td><a href="http://mail-archives.apache.org/mod_mbox/commons-issues/">mail-archives.apache.org</a></td>
-          <td><a href="http://markmail.org/list/org.apache.commons.issues/">markmail.org</a><br />
-              <a href="http://www.mail-archive.com/issues@commons.apache.org/">www.mail-archive.com</a>
-          </td>
-        </tr>
-
-
-        <tr>
-          <td>
-            <strong>Commons Commits List</strong>
-            <br /><br />
-            Only for e-mails automatically generated by the <a href="source-repository.html">source control</a> system.
-            <br /><br />
-          </td>
-          <td><a href="mailto:commits-subscribe@commons.apache.org">Subscribe</a></td>
-          <td><a href="mailto:commits-unsubscribe@commons.apache.org">Unsubscribe</a></td>
-          <td><i>read only</i></td>
-          <td><a href="http://mail-archives.apache.org/mod_mbox/commons-commits/">mail-archives.apache.org</a></td>
-          <td><a href="http://markmail.org/list/org.apache.commons.commits/">markmail.org</a><br />
-              <a href="http://www.mail-archive.com/commits@commons.apache.org/">www.mail-archive.com</a>
-          </td>
-        </tr>
-
-      </table>
-
-    </section>
-    <section name="Apache Mailing Lists">
-      <p>
-        Other mailing lists which you may find useful include:
-      </p>
-
-      <table>
-        <tr>
-          <th>Name</th>
-          <th>Subscribe</th>
-          <th>Unsubscribe</th>
-          <th>Post</th>
-          <th>Archive</th>
-          <th>Other Archives</th>
-        </tr>
-        <tr>
-          <td>
-            <strong>Apache Announce List</strong>
-            <br /><br />
-            General announcements of Apache project releases.
-            <br /><br />
-          </td>
-          <td><a class="externalLink" href="mailto:announce-subscribe@apache.org">Subscribe</a></td> 
-          <td><a class="externalLink" href="mailto:announce-unsubscribe@apache.org">Unsubscribe</a></td> 
-          <td><i>read only</i></td>
-          <td><a class="externalLink" href="http://mail-archives.apache.org/mod_mbox/www-announce/">mail-archives.apache.org</a></td> 
-          <td><a class="externalLink" href="http://markmail.org/list/org.apache.announce/">markmail.org</a><br />
-              <a class="externalLink" href="http://old.nabble.com/Apache-News-and-Announce-f109.html">old.nabble.com</a><br />
-              <a class="externalLink" href="http://www.mail-archive.com/announce@apache.org/">www.mail-archive.com</a><br />
-              <a class="externalLink" href="http://news.gmane.org/gmane.comp.apache.announce">news.gmane.org</a>
-          </td>
-        </tr>
-      </table>
-
-    </section>
-  </body>
-</document>
diff --git a/trunk/src/site/xdoc/proposal.xml b/trunk/src/site/xdoc/proposal.xml
deleted file mode 100644
index ac20c4d..0000000
--- a/trunk/src/site/xdoc/proposal.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="xdoc.xsl"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Proposal</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
- <body>
-  
- 
-<section name="Proposal for IO Package">
- 
-  
-
-<subsection name="(0) Rationale">
-  
-<p>Many software projects have a need to perform I/O in various ways, and
-the JDK class libraries provide a lot of functionality, but sometimes you
-need just a little bit more.  The io package seeks to  encapsulate some of
-the most popular i/o base classes into one easy to  use package.</p>
-   
-</subsection>
-<subsection name="(1) Scope of the Package">
-  
-<p>This proposal is to create a package of Java utility classes for  various
-types of i/o related activity.</p>
-   
-</subsection>
-<subsection name="(1.5) Interaction With Other Packages">
-  
-<p><em>IO</em> relies only on standard JDK 1.2 (or later) APIs for production
-deployment.  It utilizes the JUnit unit testing framework for developing
-and executing unit tests, but this is of interest only to developers of the
-component.  IO will be a dependency for several existing components in the
-open source world.</p>
-  
-<p>No external configuration files are utilized.</p>
-   
-</subsection>
-<subsection name="(2) Initial Source of the Package">
-  
-<p>The original Java classes are splashed around various Apache  subprojects.
- We intend to seek them out and integrate them.</p>
-  
-<p>The proposed package name for the new component is <code>org.apache.commons.io</code>.</p>
-   
-</subsection>
-<subsection name="(3)  Required Jakarta-Commons Resources">
-  
-<ul>
- <li>CVS Repository - New directory <code>io</code> in the     <code>jakarta-commons</code>
-CVS repository.</li>
- <li>Mailing List - Discussions will take place on the general     <em>dev@commons.apache.org</em>
-mailing list.  To help     list subscribers identify messages of interest,
-it is suggested that     the message subject of messages about this component
-be prefixed with     [IO].</li>
- <li>Bugzilla - New component "IO" under the "Commons" product     category,
-with appropriate version identifiers as needed.</li>
- <li>Jyve FAQ - New category "commons-io" (when available).</li>
- 
-</ul>
-   
-</subsection>
-<subsection name="(4) Initial Committers">
-  
-<p>The initial committers on the IO component shall be Scott Sanders and
-Nicola Ken Barozzi and Henri Yandell</p>
-    
-</subsection>
-</section>
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/tasks.xml b/trunk/src/site/xdoc/tasks.xml
deleted file mode 100644
index 76919fd..0000000
--- a/trunk/src/site/xdoc/tasks.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Tasks</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-  <body>
-    <section name="Tasks and Ideas for the future">
-      <p>
-        The following are some of the proposed ideas and tasks for commons-io:
-      </p>
-      <ul>
-        <li>A proper user guide</li>
-        <li>A URLUtils class that has many of the FileUtils operations, but for a URL</li>
-        <li>FilePoller for telling when a file changes. Look in Tomcat, or GenJava[bayard] (One implemented in bugzilla awaiting investigation)</li>
-        <li>A "hot folder" handler which triggers an action when a new file has been uploaded to an FTP directory, for example.</li>
-        <li>JoinReader/ConcatReader. One in GenJava, one submitted to Bayard</li>
-        <li>FormattedWriter, when it writes out values it uses Format objects to output them. </li>
-        <li>FixedWidthReader. Reads in files with a known width, ie) mainframe like. </li>
-      </ul>
-    </section>
-  </body>
-</document>
diff --git a/trunk/src/site/xdoc/upgradeto1_1.xml b/trunk/src/site/xdoc/upgradeto1_1.xml
deleted file mode 100644
index 1b0e725..0000000
--- a/trunk/src/site/xdoc/upgradeto1_1.xml
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Upgrade from 1.0 to 1.1</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-
-<section name="Upgrade">
-<p>
-These are the release notes and advice for upgrading Commons-IO from
-version 1.0 to version 1.1.
-<source>
-Commons IO is a package of Java utility classes for java.io's hierarchy.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-Commons IO contains utility classes, stream implementations, file filters, 
-and endian transformation classes.
-
-
-Incompatible changes from 1.0
------------------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes, except:
-- FileUtils.writeStringToFile()
-    A null encoding previously used 'ISO-8859-1', now it uses the platform default
-    Generally this will make no difference
-
-- LockableFileWriter
-    Improved validation and now create directories if necesssary
-
-plus these bug fixes may affect you semantically:
-- FileUtils.touch()  (Bug fix 29821)
-    Now creates the file if it did not previously exist
-
-- FileUtils.toFile(URL) (Bug fix 32575)
-    Now handles escape syntax such as %20
-
-- FileUtils.sizeOfDirectory()  (Bug fix 36801)
-    May now return a size of 0 if the directory is security restricted
-
-
-Deprecations from 1.0
----------------------
-- CopyUtils has been deprecated.
-    Its methods have been moved to IOUtils.
-    The new IOUtils methods handle nulls better, and have clearer names.
-
-- IOUtils.toByteArray(String) - Use {@link String#getBytes()}
-- IOUtils.toString(byte[]) - Use {@link String#String(byte[])}
-- IOUtils.toString(byte[],String) - Use {@link String#String(byte[],String)}
-
-
-Bug fixes from 1.0
-------------------
-- FileUtils - touch()  [29821]
-    Now creates the file if it did not previously exist
-
-- FileUtils - toFile(URL)  [32575]
-    Now handles escape syntax such as %20
-
-- FileFilterUtils - makeCVSAware(IOFileFilter)  [33023]
-    Fixed bug that caused method to be completely broken
-
-- CountingInputStream  [33336]
-    Fixed bug that caused the count to reduce by one at the end of the stream
-
-- CountingInputStream - skip(long)  [34311]
-    Bytes from calls to this method were not previously counted
-
-- NullOutputStream  [33481]
-    Remove unnecessary synchronization
-
-- AbstractFileFilter - accept(File, String)  [30992]
-    Fixed broken implementation
-
-- FileUtils  [36801]
-    Previously threw NPE when listing files in a security restricted directory
-    Now throw IOException with a better message
-
-- FileUtils - writeStringToFile()
-    Null encoding now correctly uses the platform default
-
-
-Enhancements from 1.0
----------------------
-- FilenameUtils - new class  [33303,29351]
-    A static utility class for working with filenames
-    Seeks to ease the pain of developing on Windows and deploying on Unix
-
-- FileSystemUtils - new class  [32982,36325]
-    A static utility class for working with file systems
-    Provides one method at present, to get the free space on the filing system
-
-- IOUtils - new public constants
-    Constants for directory and line separators on Windows and Unix
-
-- IOUtils - toByteArray(Reader,encoding)
-    Handles encodings when reading to a byte array
-
-- IOUtils - toCharArray(InputStream)  [28979]
-          - toCharArray(InputStream,encoding)
-          - toCharArray(Reader)
-    Reads a stream/reader into a charatcter array
-
-- IOUtils - readLines(InputStream)  [36214]
-          - readLines(InputStream,encoding)
-          - readLines(Reader)
-    Reads a stream/reader line by line into a List of Strings
-
-- IOUtils - toInputStream(String)  [32958]
-          - toInputStream(String,encoding)
-    Creates an input stream that uses the string as a source of data
-
-- IOUtils - writeLines(Collection,lineEnding,OutputStream)  [36214]
-          - writeLines(Collection,lineEnding,OutputStream,encoding)
-          - writeLines(Collection,lineEnding,Writer)
-    Writes a collection to a stream/writer line by line
-
-- IOUtils - write(...)
-    Write data to a stream/writer (moved from CopyUtils with better null handling)
-
-- IOUtils - copy(...)
-    Copy data between streams (moved from CopyUtils with better null handling)
-
-- IOUtils - contentEquals(Reader,Reader)
-    Method to compare the contents of two readers
-
-- FileUtils - toFiles(URL[])
-    Converts an array of URLs to an array of Files
-
-- FileUtils - copyDirectory()  [32944]
-    New methods to copy a directory
-
-- FileUtils - readFileToByteArray(File)
-    Reads an entire file into a byte array
-
-- FileUtils - writeByteArrayToFile(File,byte[])
-    Writes a byte array to a file
-
-- FileUtils - readLines(File,encoding)  [36214]
-    Reads a file line by line into a List of Strings
-
-- FileUtils - writeLines(File,encoding,List)
-              writeLines(File,encoding,List,lineEnding)
-    Writes a collection to a file line by line
-
-- FileUtils - EMPTY_FILE_ARRAY
-    Constant for an empty array of File objects
-
-- ConditionalFileFilter - new interface  [30705]
-    Defines the behaviour of list based filters
-
-- AndFileFilter, OrFileFilter  [30705]
-    Now support a list of filters to and/or
-
-- WildcardFilter  [31115]
-    New filter that can match using wildcard file names
-
-- FileFilterUtils - makeSVNAware(IOFileFilter)
-    New method, like makeCVSAware, that ignores Subversion source control directories
-
-- ClassLoaderObjectInputStream
-    An ObjectInputStream that supports a ClassLoader
-
-- CountingInputStream,CountingOutputStream - resetCount()  [28976]
-    Adds the ability to reset the count part way through reading/writing the stream
-
-- DeferredFileOutputStream - writeTo(OutputStream)  [34173]
-    New method to allow current contents to be written to a stream
-
-- DeferredFileOutputStream  [34142]
-    Performance optimizations avoiding double buffering
-
-- LockableFileWriter - encoding support [36825]
-    Add support for character encodings to LockableFileWriter
-    Improve the validation
-    Create directories if necesssary
-
-- IOUtils and EndianUtils are no longer final  [28978]
-    Allows developers to have subclasses if desired
-</source>
-</p>
-</section>
-
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/upgradeto1_2.xml b/trunk/src/site/xdoc/upgradeto1_2.xml
deleted file mode 100644
index 67b45d3..0000000
--- a/trunk/src/site/xdoc/upgradeto1_2.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Upgrade from 1.1 to 1.2</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-
-<section name="Upgrade">
-<p>
-These are the release notes and advice for upgrading Commons-IO from
-version 1.1 to version 1.2.
-<source>
-Commons IO is a package of Java utility classes for java.io's hierarchy.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-Commons IO contains utility classes, stream implementations, file filters, 
-and endian transformation classes.
-
-
-Compatibility with 1.1
-----------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-
-
-Deprecations from 1.1
----------------------
-
-
-Bug fixes from 1.1
-------------------
-- FileSystemUtils.freeSpace(drive)
-  Fix to allow Windows based command to function in French locale
-
-- FileUtils.read*
-  Increase certainty that files are closed in case of error
-
-- LockableFileWriter
-  Locking mechanism was broken and only provided limited protection [38942]
-  File deletion and locking in case of constructor error was broken
-
-
-Enhancements from 1.1
----------------------
-- AgeFileFilter/SizeFileFilter
-  New file filters that compares against the age and size of the file
-
-- FileSystemUtils.freeSpaceKb(drive)
-  New method that unifies result to be in kilobytes [38574]
-
-- FileUtils.contentEquals(File,File)
-  Performance improved by adding length and file location checking
-
-- FileUtils.iterateFiles
-  Two new method to provide direct access to iterators over files
-
-- FileUtils.lineIterator
-  IOUtils.lineIterator
-  New methods to provide an iterator over the lines in a file [38083]
-
-- FileUtils.copyDirectoryToDirectory
-  New method to copy a directory to within another directory [36315]
-
-</source>
-</p>
-</section>
-
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/upgradeto1_3.xml b/trunk/src/site/xdoc/upgradeto1_3.xml
deleted file mode 100644
index a243a3e..0000000
--- a/trunk/src/site/xdoc/upgradeto1_3.xml
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Upgrade from 1.2 to 1.3</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-
-<section name="Upgrade">
-<p>
-These are the release notes and advice for upgrading Commons-IO from
-version 1.2 to version 1.3.
-<source>
-Commons IO is a package of Java utility classes for java.io's hierarchy.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-Commons IO contains utility classes, stream implementations, file filters, 
-and endian transformation classes.
-
-
-Compatibility with 1.2
-----------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-
-Deprecations from 1.2
----------------------
-- WildcardFilter deprecated, replaced by WildcardFileFilter
-  - old class only accepted files, thus had a confusing dual purpose
-
-- FileSystemUtils.freeSpace deprecated, replaced by freeSpaceKb
-  - freeSpace returns a result that varies by operating system and
-    thus isn't that useful
-  - freeSpaceKb returns much better and more consistent results
-  - freeSpaceKb existed in v1.2, so this is a gentle cutover
-
-
-Bug fixes from 1.2
-------------------
-- LineIterator now implements Iterator
-  - It was always supposed to...
-
-- FileSystemUtils.freeSpace/freeSpaceKb [IO-83]
-  - These should now work on AIX and HP-UX
-
-- FileSystemUtils.freeSpace/freeSpaceKb [IO-90]
-  - Avoid infinite looping in Windows
-  - Catch more errors with nice messages
-
-- FileSystemUtils.freeSpace [IO-91]
-  - This is now documented not to work on SunOS 5
-
-- FileSystemUtils [IO-93]
-  - Fixed resource leak leading to 'Too many open files' error
-  - Previously did not destroy Process instances (as JDK Javadoc is so poor)
-  - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4801027
-
-- FileUtils.touch [IO-100]
-  - The touch method previously gave no indication when the file could not
-    be touched successfully (such as due to access restrictions) - it now
-    throws an IOException if the last modified date cannot be changed
-
-- FileCleaner
-  - This now handles the situation where an error occurs when deleting the file
-
-- IOUtils.copy [IO-84]
-  - Copy methods could return inaccurate byte/char count for large streams
-  - The copy(InputStream, OutputStream) method now returns -1 if the count is greater than an int
-  - The copy(Reader, Writer) method now throws now returns -1 if the count is greater than an int
-  - Added a new copyLarge(InputStream, OutputStream) method that returns a long
-  - Added a new copyLarge(Reader, Writer) method that returns a long
-
-- CountingInputStream/CountingOutputStream [IO-84]
-  - Methods were declared as int thus the count was innacurate for large streams
-  - new long based methods getByteCount()/resetByteCount() added
-  - existing methods changed to throw an exception if the count is greater than an int
-
-- FileBasedTestCase
-  - Fixed bug in compare content methods identified by GNU classpath
-
-- EndianUtils.writeSwappedLong(byte[], int) [IO-101]
-  - An int overrun in the bit shifting when it should have been a long
-
-- EndianUtils.writeSwappedLong(InputStream) [IO-102]
-  - The return of input.read(byte[]) was not being checked to ensure all 8 bytes were read
-
-Enhancements from 1.2
----------------------
-- DirectoryWalker [IO-86]
-  - New class designed for subclassing to walk through a set of files.
-    DirectoryWalker provides the walk of the directories, filtering of
-    directories and files, and cancellation support. The subclass must provide
-    the specific behaviour, such as text searching or image processing.
-
-- IOCase
-  - New class/enumeration for case-sensitivity control
-
-- FilenameUtils
-  - New methods to handle case-sensitivity
-  - wildcardMatch - new method that has IOCase as a parameter
-  - equals - new method that has IOCase as a parameter
-
-- FileUtils [IO-108] - new default encoding methods for:
-  - readFileToString(File)
-  - readLines(File)
-  - lineIterator(File)
-  - writeStringToFile(File, String)
-  - writeLines(File, Collection)
-  - writeLines(File, Collection, String)
-
-- FileUtils.openOutputStream  [IO-107]
-  - new method to open a FileOutputStream, creating parent directories if required
-- FileUtils.touch
-- FileUtils.copyURLToFile
-- FileUtils.writeStringToFile
-- FileUtils.writeByteArrayToFile
-- FileUtils.writeLines
-  - enhanced to create parent directories if required
-- FileUtils.openInputStream  [IO-107]
-  - new method to open a FileInputStream, providing better error messages than the JDK
-
-- FileUtils.isFileOlder
-  - new methods to check if a file is older (i.e. isFileOlder()) - counterparts
-    to the existing isFileNewer() methods.
-
-- FileUtils.checksum, FileUtils.checksumCRC32
-  - new methods to create a checksum of a file
-
-- FileUtils.copyFileToDirectory  [IO-104]
-  - new variant that optionally retains the file date
-
-- FileDeleteStrategy
-- FileCleaner    [IO-56,IO-70]
-  - FileDeleteStrategy is a strategy for handling file deletion
-  - This can be used as a calback in FileCleaner
-  - Together these allow FileCleaner to do a forceDelete to kill directories
-
-- FileCleaner.exitWhenFinished [IO-99]
-  - A new method that allows the internal cleaner thread to be cleanly terminated
-
-- WildcardFileFilter
-  - Replacement for WildcardFilter
-  - Accepts both files and directories
-  - Ability to control case-sensitivity
-
-- NameFileFilter
-  - Ability to control case-sensitivity
-
-- FileFileFilter
-  - New IOFileFilter implementation
-  - Accepts files where File.isFile() is true
-  - In other words it filters out directories
-  - Singleton instance provided (FILE)
-
-- CanReadFileFilter
-  - New IOFileFilter implementation
-  - Accepts files where File.canRead() is true
-  - Singleton instances provided (CAN_READ/CANNOT_READ/READ_ONLY)
-
-- CanWriteFileFilter
-  - New IOFileFilter implementation
-  - Accepts files where File.canWrite() is true
-  - Singleton instances provided (CAN_WRITE/CANNOT_WRITE)
-
-- HiddenFileFilter
-  - New IOFileFilter implementation
-  - Accepts files where File.isHidden() is true
-  - Singleton instances provided (HIDDEN/VISIBLE)
-
-- EmptyFileFilter
-  - New IOFileFilter implementation
-  - Accepts files or directories that are empty
-  - Singleton instances provided (EMPTY/NOT_EMPTY)
-
-- TrueFileFilter/FalseFileFilter/DirectoryFileFilter
-  - New singleton instance constants (TRUE/FALSE/DIRECTORY)
-  - The new constants are more JDK 1.5 friendly with regards to static imports
-    (whereas if everything uses INSTANCE, then they just clash)
-  - The old INSTANCE constants are still present and have not been deprecated
-
-- FileFilterUtils.sizeRangeFileFilter
-  - new sizeRangeFileFilter(long minimumSize, long maximumSize) method which 
-    creates a filter that accepts files within the specified size range.
-
-- FileFilterUtils.makeDirectoryOnly/makeFileOnly
-  - two new methods that decorate a file filter to make it apply to
-    directories only or files only
-
-- NullWriter
-  - New writer that acts as a sink for all data, as per /dev/null
-
-- NullInputStream
-  - New input stream that emulates a stream of a specified size
-
-- NullReader
-  - New reader that emulates a reader of a specified size
-
-- ByteArrayOutputStream  [IO-97]
-  - Performance enhancements
-
-</source>
-</p>
-</section>
-
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/upgradeto1_3_1.xml b/trunk/src/site/xdoc/upgradeto1_3_1.xml
deleted file mode 100644
index baec5c1..0000000
--- a/trunk/src/site/xdoc/upgradeto1_3_1.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Upgrade from 1.3 to 1.3.1</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-
-<section name="Upgrade">
-<p>
-These are the release notes and advice for upgrading Commons-IO from
-version 1.3 to version 1.3.1.
-<source>
-Commons IO is a package of Java utility classes for java.io's hierarchy.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-Commons IO contains utility classes, stream implementations, file filters, 
-and endian transformation classes.
-
-
-Compatibility with 1.3
-----------------------
-Binary compatible - No
-  See [IO-113]
-
-Source compatible - No
-  See [IO-113]
-
-Semantic compatible - Yes
-
-
-Bug fixes from 1.3
-------------------
-
-- FileUtils
-  - NPE in openOutputStream(File) when file has no parent in path [IO-112]
-  - readFileToString(File) is not static [IO-113]
-</source>
-</p>
-</section>
-
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/upgradeto1_3_2.xml b/trunk/src/site/xdoc/upgradeto1_3_2.xml
deleted file mode 100644
index 4baebea..0000000
--- a/trunk/src/site/xdoc/upgradeto1_3_2.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Upgrade from 1.3, or 1.3.1, to 1.3.2</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-
-<section name="Upgrade">
-<p>
-These are the release notes and advice for upgrading Commons-IO from
-version 1.3, or 1.3.1, to version 1.3.2.
-<source>
-Commons IO is a package of Java utility classes for java.io's hierarchy.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-Commons IO contains utility classes, stream implementations, file filters, 
-and endian transformation classes.
-
-
-Compatibility with 1.3.1
-------------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-
-Compatibility with 1.3
-----------------------
-Binary compatible - No
-  See [IO-113]
-
-Source compatible - No
-  See [IO-113]
-
-Semantic compatible - Yes
-
-
-Enhancements since 1.3.1
-------------------------
-
-- Created the FileCleaningTracker, basically a non-static version of the
-  FileCleaner, which can be controlled by the user. [IO-116]
-- The FileCleaner is deprecated. (For reasons of compatibility, the
-  deprecation warnings are hidden within the 1.3 branch. They'll be
-  visible, as of version 1.4.)
-
-
-Bug fixes from 1.3.1
---------------------
-
-- Some tests, which are implicitly assuming a Unix-like file system, are
-  now skipped on Windows. [IO-115]
-
-
-Bug fixes from 1.3
-------------------
-
-- FileUtils
-  - NPE in openOutputStream(File) when file has no parent in path [IO-112]
-  - readFileToString(File) is not static [IO-113]
-</source>
-</p>
-</section>
-
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/upgradeto1_4.xml b/trunk/src/site/xdoc/upgradeto1_4.xml
deleted file mode 100644
index 7056de7..0000000
--- a/trunk/src/site/xdoc/upgradeto1_4.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Upgrade from 1.3.2 to 1.4</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-
-<section name="Upgrade">
-<p>
-These are the release notes and advice for upgrading Commons-IO from
-version 1.3.2 to version 1.4.
-<source>
-Commons IO is a package of Java utility classes for java.io's hierarchy.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-Commons IO contains utility classes, stream implementations, file filters, 
-file comparators and endian transformation classes.
-
-
-Compatibility with 1.3.2
-------------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-Commons IO 1.4 introduces four new implementations which depend on JDK 1.4 features
-(CharSequenceReader, FileWriterWithEncoding, IOExceptionWithCause and RegexFileFilter).
-It has been built with the JDK source and target options set to JDK 1.3 and, except for
-those implementations, can be used with JDK 1.3 (see IO IO-127).
-
-
-Deprecations from 1.3.2
------------------------
-- FileCleaner deprecated in favour of FileCleaningTracker [see IO-116]
-
-
-Bug fixes from 1.3.2
---------------------
-- FileUtils
-  - forceDelete of orphaned Softlinks does not work [IO-147]
-  - Infinite loop on FileUtils.copyDirectory when the destination directory is within
-    the source directory [IO-141]
-
-- HexDump
-  - HexDump's use of static StringBuffers isn't thread-safe [IO-136]
-
-
-Enhancements from 1.3.2
------------------------
-- FileUtils
-  - Add a deleteQuietly method [IO-135]
-  - Add a copyDirectory() method that makes use of FileFilter [IO-105]
-  - Add moveDirectory() and moveFile() methods [IO-77]
-
-- FilenameUtils
-  - Add file name extension separator constants[IO-149]
-
-- IOExceptionWithCause [IO-148]
-  - Add a new IOException implementation with constructors which take a cause
-
-- TeeInputStream [IO-129]
-  - Add new Tee input stream implementation
-
-- FileWriterWithEncoding [IO-153]
-  - Add new File Writer implementation that accepts an encoding
-
-- CharSequenceReader [IO-138]
-  - Add new Reader implementation that handles any CharSequence (String,
-    StringBuffer, StringBuilder or CharBuffer) 
-
-- ThesholdingOuputStream [IO-121]
-  - Add a reset() method which sets the count of the bytes written back to zero.
-
-- DeferredFileOutputStream [IO-130]
-  - Add support for temporary files
-
-- ByteArrayOutputStream
-  - Add a new write(InputStream) method [IO-152]
-
-- New Closed Input/Output stream implementations [IO-122]
-  - AutoCloseInputStream - automatically closes and discards the underlying input stream
-  - ClosedInputStream - returns -1 for any read attempts
-  - ClosedOutputStream - throws an IOException for any write attempts
-  - CloseShieldInputStream - prevents the underlying input stream from being closed.
-  - CloseShieldOutputStream - prevents the underlying output stream from being closed.
-
-- Add Singleton Constants to several stream classes [IO-143]
-
-- PrefixFileFilter [IO-126]
-  - Add faciltiy to specify case sensitivity on prefix matching
-
-- SuffixFileFilter [IO-126]
-  - Add faciltiy to specify case sensitivity on suffix matching
-
-- RegexFileFilter [IO-74]
-  - Add new regular expression file filter implementation
-
-- Make IOFileFilter implementations Serializable [IO-131]
-
-- Improve IOFileFilter toString() methods [IO-120]
-
-- Make fields final so classes are immutable/threadsafe [IO-133]
-  - changes to Age, Delegate, Name, Not, Prefix, Regex, Size, Suffix and Wildcard IOFileFilter
-    implementations.
-
-- IOCase
-  - Add a compare method to IOCase [IO-144]
-
-- Add a package of java.util.Comparator implementations for files [IO-145]
-  - DefaultFileComparator - compare files using the default File.compareTo(File) method.
-  - ExtensionFileComparator - compares files using file name extensions.
-  - LastModifiedFileComparator - compares files using the last modified date/time.
-  - NameFileComparator - compares files using file names.
-  - PathFileComparator - compares files using file paths.
-  - SizeFileComparator - compares files using file sizes.
-</source>
-</p>
-</section>
-
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/upgradeto2_0.xml b/trunk/src/site/xdoc/upgradeto2_0.xml
deleted file mode 100644
index 3a9dd0a..0000000
--- a/trunk/src/site/xdoc/upgradeto2_0.xml
+++ /dev/null
@@ -1,157 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Upgrade from 1.4 to 2.0</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-
-<section name="Upgrade">
-<p>
-These are the release notes and advice for upgrading Commons-IO from
-version 1.4 to version 2.0.
-<source>
-Commons IO is a package of Java utility classes for java.io's hierarchy.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-Commons IO contains utility classes, stream implementations, file filters, 
-file comparators and endian transformation classes.
-
-
-Compatibility with 1.4
-----------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-Commons IO 2.0 requires a minimum of JDK 1.5
- (Commons IO 1.4 had a minimum of JDK 1.3) 
-
-
-Deprecations from 1.4
----------------------
-
-- IOUtils
-  - write(StringBuffer, Writer) in favour of write(CharSequence, Writer)
-  - write(StringBuffer, OutputStream)  in favour of write(CharSequence, OutputStream)
-  - write(StringBuffer, OutputStream, String) in favour of write(CharSequence, OutputStream, String)
-
-- FileFilterUtils
-  - andFileFilter(IOFileFilter, IOFileFilter) in favour of and(IOFileFilter...) 
-  - orFileFilter(IOFileFilter, IOFileFilter)  in favour of or(IOFileFilter...)
-
-
-Enhancements from 1.4
----------------------
-
-  * [IO-140] Move minimum Java requirement from JDK 1.3 to JDK 1.5
-             - use Generics
-             - add new CharSequence write() flavour methods to IOUtils and FileUtils
-             - replace StringBuffer with StringBuilder, where appropriate
-             - add new Reader/Writer methods to ProxyReader and ProxyWriter
-             - Annotate with @Override and @Deprecated
-
-  * [IO-178] New BOMInputStream and ByteOrderMark implementations - to detect and optionally exclude an initial Byte Order mark (BOM)
-  * [IO-197] New BoundedInputStream (copied from from Apache JackRabbit)
-  * [IO-193] New Broken Input and Output streams
-  * [IO-132] New File Listener/Monitor facility
-  * [IO-158] New ReaderInputStream and WriterOutputStream implementations
-  * [IO-139] New StringBuilder Writer implementation
-  * [IO-192] New Tagged Input and Output streams
-  * [IO-177] New Tailer class - simple implementation of the Unix "tail -f" functionality
-  * [IO-162] New XML Stream Reader/Writer implementations (from ROME via plexus-utils)
-
-  * [IO-142] Comparators - add facility to sort file lists/arrays
-  * [IO-186] Comparators - new Composite and Directory File Comparator implementations
-  * [IO-176] DirectoryWalker - add filterDirectoryContents() callback method for filtering directory contents
-  * [IO-210] FileFilter - new Magic Number FileFilter
-  * [IO-221] FileFilterUtils - add methods for suffix and prefix filters which take an IOCase object
-  * [IO-232] FileFilterUtils - add method for name filters which take an IOCase object
-  * [IO-229] FileFilterUtils - add varargs and() and or() methods
-  * [IO-198] FileFilterUtils - add ability to apply file filters to collections and arrays
-  * [IO-156] FilenameUtils - add normalize() and normalizeNoEndSeparator() methods which allow the separator character to be specified
-  * [IO-194] FileSystemUtils - add freeSpaceKb() method with no input arguments
-  * [IO-185] FileSystemUtils - add freeSpaceKb() methods that take a timeout parameter - fixes freeSpaceWindows() blocks
-  * [IO-155] FileUtils - use NIO to copy files
-  * [IO-168] FileUtils - add new isSymlink() method
-  * [IO-219] FileUtils - throw FileExistsException when moving a file or directory if the destination already exists
-  * [IO-234] FileUtils - add Methods for retrieving System User/Temp directories/paths
-  * [IO-208] FileUtils - add timeout (connection and read) support for copyURLToFile() method 
-  * [IO-238] FileUtils - add sizeOf(File) method
-  * [IO-181] LineIterator now implements Iterable
-  * [IO-224] IOUtils - add closeQuietly(Closeable) and closeQuietly(Socket) methods
-  * [IO-203] IOUtils - add skipFully() method for InputStreams
-  * [IO-137] IOUtils and ByteArrayOutputStream - add toBufferedInputStream() method to avoid unnecessary array allocation/copy
-  * [IO-195] Proxy streams/Reader/Writer - provide exception handling methods
-  * [IO-211] Proxy Input/Output streams - add pre/post processing support
-  * [IO-242] Proxy Reader/Writer - add pre/post processing support
-
-
-Bug fixes from 1.4
-------------------
-  * [IO-214] ByteArrayOutputStream - fix inconsistent synchronization of fields
-  * [IO-201] Counting Input/Output streams - fix inconsistent synchronization
-  * [IO-159] FileCleaningTracker - fix remove() never returns null
-  * [IO-220] FileCleaningTracker - fix Vector performs badly under load
-  * [IO-167] FilenameUtils - fix case-insensitive string handling in FilenameUtils and FilesystemUtils
-  * [IO-179] FilenameUtils - fix StringIndexOutOfBounds exception in getPathNoEndSeparator()
-  * [IO-248] FilenameUtils - fix getFullPathNoEndSeparator() returns empty while path is a one level directory
-  * [IO-246] FilenameUtils - fix wildcardMatch gives incorrect results 
-  * [IO-187] FileSystemUtils - fix freeSpaceKb() doesn't work with relative paths on Linux
-  * [IO-160] FileSystemUtils - fix freeSpace() fails on solaris
-  * [IO-209] FileSystemUtils - fix freeSpaceKb() fails to return correct size for a windows mount point
-  * [IO-163] FileUtils - fix toURLs() using deprecated method of conversion to URL
-  * [IO-168] FileUtils - fix Symbolic links followed when deleting directory
-  * [IO-231] FileUtils - fix wrong exception message generated in isFileNewer() method
-  * [IO-207] FileUtils - fix race condition in forceMkdir() method
-  * [IO-217] FileUtils - fix copyDirectoryToDirectory() makes infinite loops
-  * [IO-166] FileUtils - fix URL decoding in toFile(URL)
-  * [IO-190] FileUtils - fix copyDirectory not preserving lastmodified date on sub-directories
-  * [IO-240] FileFilterUtils - ensure cvsFilter and svnFilter are only created once.
-  * [IO-175] IOUtils - fix copyFile() issues with very large files
-  * [IO-191] Improvements from static analysis
-  * [IO-216] LockableFileWriter - delete files quietly when an exception is thrown during initialization
-  * [IO-243] SwappedDataInputStream - fix readBoolean is inverted
-  * [IO-235] Tests - remove unused YellOnFlushAndCloseOutputStream from CopyUtilsTest
-  * [IO-161] Tests - fix FileCleaningTrackerTestCase hanging
-
-
-Documentation changes from 1.4
-------------------------------
-  * [IO-183 FilenameUtils.getExtension() method documentation improvements
-  * [IO-226 FileUtils.byteCountToDisplaySize() documentation corrections
-  * [IO-205 FileUtils.forceMkdir() documentation improvements
-  * [IO-215 FileUtils copy file/directory improve documentation regarding preserving the last modified date
-  * [IO-189 HexDump.dump() method documentation improvements
-  * [IO-171 IOCase document that it assumes there are only two OSes: Windows and Unix
-  * [IO-223 IOUtils.copy() documentation corrections
-  * [IO-247 IOUtils.closeQuietly() improve documentation with examples
-  * [IO-202 NotFileFilter documentation corrections
-  * [IO-206 ProxyInputStream - fix misleading parameter names
-  * [IO-212 ProxyInputStream.skip() documentation corrections
-</source>
-</p>
-</section>
-
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/upgradeto2_0_1.xml b/trunk/src/site/xdoc/upgradeto2_0_1.xml
deleted file mode 100644
index 5f6f53e..0000000
--- a/trunk/src/site/xdoc/upgradeto2_0_1.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Upgrade from 2.0 to 2.0.1</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-
-<section name="Upgrade">
-<p>
-These are the release notes and advice for upgrading Commons-IO from
-version 2.0 to version 2.0.1
-<source>
-Commons IO is a package of Java utility classes for java.io's hierarchy.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-Commons IO contains utility classes, stream implementations, file filters, 
-file comparators and endian transformation classes.
-
-
-Compatibility with 2.0 and 1.4
-------------------------------
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-Commons IO 2.0.1 requires a minimum of JDK 1.5
- (Commons IO 1.4 had a minimum of JDK 1.3) 
-
-
-Enhancements from 2.0
----------------------
-
-   * [IO-256] - Provide thread factory for FileAlternationMonitor
-
-
-Bug fixes from 2.0
-------------------
-
-   * [IO-257] - BOMInputStream.read(byte[]) can return 0 which it should not
-   * [IO-258] - XmlStreamReader consumes the stream during encoding detection
-</source>
-</p>
-</section>
-
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/upgradeto2_1.xml b/trunk/src/site/xdoc/upgradeto2_1.xml
deleted file mode 100644
index f1f75b5..0000000
--- a/trunk/src/site/xdoc/upgradeto2_1.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Upgrade from 2.0.1 to 2.1</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-
-<section name="Upgrade">
-<p>
-These are the release notes and advice for upgrading Commons-IO from
-version 2.0.1 to version 2.1
-<source>
-Commons IO is a package of Java utility classes for java.io's hierarchy.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-Commons IO contains utility classes, stream implementations, file filters, 
-file comparators and endian transformation classes.
-
-Compatibility with 2.0.1 and 1.4
---------------------------------
-
-Binary compatible - Yes
-
-Source compatible - Yes
-
-Semantic compatible - Yes
-  Check the bug fixes section for semantic bug fixes
-
-Commons IO 2.1 requires a minimum of JDK 1.5
-  (Commons IO 1.4 had a minimum of JDK 1.3) 
-
-
-New features since 2.0.1
-------------------------
-
-o Use standard Maven directory layout  Issue: IO-285. Thanks to ggregory. 
-o Add IOUtils API toString for URL and URI to get contents  Issue: IO-284. Thanks to ggregory. 
-o Add API FileUtils.copyFile(File input, OutputStream output)  Issue: IO-282. Thanks to ggregory. 
-o FileAlterationObserver has no getter for FileFilter  Issue: IO-262. 
-o Add FileUtils.getFile API with varargs parameter  Issue: IO-261. 
-o Add new APPEND parameter for writing string into files  Issue: IO-182. 
-o Add new read method "toByteArray" to handle InputStream with known size.  Issue: IO-251. Thanks to Marco Albini. 
-
-Fixed Bugs since 2.0.1
-----------------------
-
-o Dubious use of mkdirs() return code  Issue: IO-280. Thanks to sebb. 
-o ReaderInputStream enters infinite loop when it encounters an unmappable character  Issue: IO-277. 
-o FileUtils.moveFile() JavaDoc should specify FileExistsException thrown  Issue: IO-264. 
-o ClassLoaderObjectInputStream does not handle Proxy classes  Issue: IO-260. 
-o Tailer returning partial lines when reaching EOF before EOL  Issue: IO-274. Thanks to Frank Grimes. 
-o FileUtils.copyFile() throws IOException when copying large files to a shared directory (on Windows)  Issue: IO-266. Thanks to Igor Smereka. 
-o FileSystemUtils.freeSpaceKb throws exception for Windows volumes with no visible files.
-        Improve coverage by also looking for hidden files.  Issue: IO-263. Thanks to Gil Adam. 
-
-Changes since 2.0.1
--------------------
-o FileAlterationMonitor.stop(boolean allowIntervalToFinish)  Issue: IO-259. 
-</source>
-</p>
-</section>
-
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/upgradeto2_2.xml b/trunk/src/site/xdoc/upgradeto2_2.xml
deleted file mode 100644
index 45497e6..0000000
--- a/trunk/src/site/xdoc/upgradeto2_2.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Upgrade from 2.1 to 2.2</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-
-<section name="Upgrade">
-<p>
-These are the release notes and advice for upgrading Commons-IO from
-version 2.1 to version 2.2
-<source>
-Commons IO is a package of Java utility classes like java.io.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-Commons IO contains utility classes, stream implementations, file filters, 
-file comparators, endian transformation classes, and much more.
-
-==============================================================================
-Commons IO Package Version 2.2
-==============================================================================
-
-Changes in this version include:
-
-New features:
-o IO-305:  New copyLarge() method in IOUtils that takes additional offset, length arguments Thanks to Manoj Mokashi. 
-o IO-287:  Use terabyte (TB) , petabyte (PB) and exabyte (EB) in FileUtils.byteCountToDisplaySize(long size) Thanks to Ron Kuris, Gary Gregory. 
-o IO-173:  FileUtils.listFiles() doesn't return directories Thanks to Marcos Vinícius da Silva. 
-o IO-297:  CharSequenceInputStream to efficiently stream content of a CharSequence Thanks to Oleg Kalnichevski. 
-o IO-304:  The second constructor of Tailer class does not pass 'delay' to the third one Thanks to liangly. 
-o IO-303:  TeeOutputStream does not call branch.close() when main.close() throws an exception Thanks to fabian.barney. 
-o IO-302:  ArrayIndexOutOfBoundsException in BOMInputStream when reading a file without BOM multiple times Thanks to jsteuerwald, detinho. 
-o IO-301:  Add IOUtils.closeQuietly(Selector) necessary Thanks to kaykay.unique. 
-o IO-292:  IOUtils.closeQuietly() should take a ServerSocket as a parameter Thanks to sebb. 
-o IO-290:  Add read/readFully methods to IOUtils Thanks to sebb. 
-o IO-288:  Supply a ReversedLinesFileReader Thanks to Georg Henzler. 
-o IO-291:  Add new function FileUtils.directoryContains. Thanks to ggregory. 
-o IO-275:  FileUtils.contentEquals and IOUtils.contentEquals - Add option to ignore "line endings"
-        Added contentEqualsIgnoreEOL methods to both classes Thanks to CJ Aspromgos. 
-
-Fixed Bugs:
-o IO-300:  FileUtils.moveDirectoryToDirectory removes source directory if destination is a subdirectory 
-o IO-307:  ReaderInputStream#read(byte[] b, int off, int len) should check for valid parameters 
-o IO-306:  ReaderInputStream#read(byte[] b, int off, int len) should always return 0 for length == 0 
-o IO-276:  "FileUtils#deleteDirectoryOnExit(File)" does not work Thanks to nkami. 
-o IO-273:  BoundedInputStream.read() treats max differently from BoundedInputStream.read(byte[]...) Thanks to sebb. 
-o IO-298:  Various methods of class 'org.apache.commons.io.FileUtils' incorrectly suppress 'java.io.IOException' Thanks to Christian Schulte. 
-
-Changes:
-o IO-296:  ReaderInputStream optimization: more efficient reading of small chunks of data Thanks to Oleg Kalnichevski. 
-
-Compatibility with 2.1 and 1.4:
-Binary compatible: Yes
-Source compatible: Yes
-Semantic compatible: Yes. Check the bug fixes section for semantic bug fixes
-
-Commons IO 2.2 requires a minimum of JDK 1.5. 
-Commons IO 1.4 requires a minimum of JDK 1.3. 
-</source>
-</p>
-</section>
-
-</body>
-</document>
diff --git a/trunk/src/site/xdoc/upgradeto2_3.xml b/trunk/src/site/xdoc/upgradeto2_3.xml
deleted file mode 100644
index 56a4948..0000000
--- a/trunk/src/site/xdoc/upgradeto2_3.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0"?>

-<!--

-Licensed to the Apache Software Foundation (ASF) under one or more

-contributor license agreements.  See the NOTICE file distributed with

-this work for additional information regarding copyright ownership.

-The ASF licenses this file to You under the Apache License, Version 2.0

-(the "License"); you may not use this file except in compliance with

-the License.  You may obtain a copy of the License at

-

-     http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed under the License is distributed on an "AS IS" BASIS,

-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<document>

- <properties>

-  <title>Upgrade from 2.2 to 2.3</title>

-  <author email="dev@commons.apache.org">Commons Documentation Team</author>

- </properties>

-<body>

-

-<section name="Upgrade">

-<p>

-These are the release notes and advice for upgrading Commons-IO from

-version 2.2 to version 2.3

-<source>

-Commons IO is a package of Java utility classes like java.io.  

-Classes in this package are considered to be so standard and of such high 

-reuse as to justify existence in java.io.

-

-The Commons IO library contains utility classes, stream implementations, file filters, 

-file comparators, endian transformation classes, and much more.

-

-==============================================================================

-Apache Commons IO Version 2.3-SNAPSHOT

-==============================================================================

-

-Changes in this version include:

-

-New features:

-o IO-322:  Add and use class Charsets. Thanks to ggregory. 

-o IO-321:  ByteOrderMark UTF_32LE is incorrect. Thanks to ggregory. 

-o IO-318:  Add Charset sister APIs to method that take a String charset name. Thanks to ggregory. 

-

-Compatibility with 2.2 and 1.4:

-Binary compatible: Yes.

-Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.

-Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.

-

-Commons IO 2.3 requires JDK 1.6 or later.

-Commons IO 2.2 requires JDK 1.5 or later.

-Commons IO 1.4 requires JDK 1.3 or later.

-</source>

-</p>

-</section>

-

-</body>

-</document>

diff --git a/trunk/src/site/xdoc/upgradeto2_4.xml b/trunk/src/site/xdoc/upgradeto2_4.xml
deleted file mode 100644
index 9f46468..0000000
--- a/trunk/src/site/xdoc/upgradeto2_4.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
- <properties>
-  <title>Upgrade from 2.3 to 2.4</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
-<body>
-
-<section name="Upgrade">
-<p>
-These are the release notes and advice for upgrading Commons-IO from
-version 2.3 to version 2.4
-<source>
-Commons IO is a package of Java utility classes like java.io.  
-Classes in this package are considered to be so standard and of such high 
-reuse as to justify existence in java.io.
-
-The Commons IO library contains utility classes, stream implementations, file filters, 
-file comparators, endian transformation classes, and much more.
-
-==============================================================================
-Apache Commons IO Version 2.4-SNAPSHOT
-==============================================================================
-
-Changes in this version include:
-
-New features:
-o IO-269:  Tailer locks file from deletion/rename on Windows. Thanks to sebb. 
-o IO-333:  Export OSGi packages at version 1.x in addition to 2.x. Thanks to fmeschbe. 
-o IO-320:  Add XmlStreamReader support for UTF-32. Thanks to ggregory. 
-o IO-331:  BOMInputStream wrongly detects UTF-32LE_BOM files as UTF-16LE_BOM files in method getBOM(). Thanks to ggregory. 
-o IO-327:  Add byteCountToDisplaySize(BigInteger). Thanks to ggregory. 
-o IO-326:  Add new FileUtils.sizeOf[Directory] APIs to return BigInteger. Thanks to ggregory. 
-o IO-325:  Add IOUtils.toByteArray methods to work with URL and URI. Thanks to raviprak. 
-o IO-324:  Add missing Charset sister APIs to method that take a String charset name. Thanks to raviprak. 
-
-Fixed Bugs:
-o IO-279:  Tailer erroneously considers file as new. Thanks to Sergio Bossa, Chris Baron. 
-o IO-335:  Tailer#readLines - incorrect CR handling. 
-o IO-334:  FileUtils.toURLs throws NPE for null parameter; document the behavior. 
-o IO-332:  Improve tailer's reading performance. Thanks to liangly. 
-o IO-279:  Improve Tailer performance with buffered reads (see IO-332). 
-o IO-329:  FileUtils.writeLines uses unbuffered IO. Thanks to tivv. 
-o IO-319:  FileUtils.sizeOfDirectory follows symbolic links. Thanks to raviprak. 
-
-Compatibility with 2.3:
-Binary compatible: Yes.
-Source compatible: Yes.
-Semantic compatible: Yes.
-
-Compatibility with 2.2 and 1.4:
-Binary compatible: Yes.
-Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
-
-Commons IO 2.4 requires JDK 1.6 or later.
-Commons IO 2.3 requires JDK 1.6 or later.
-Commons IO 2.2 requires JDK 1.5 or later.
-Commons IO 1.4 requires JDK 1.3 or later.
-</source>
-</p>
-</section>
-
-</body>
-</document>
diff --git a/trunk/src/test/java/org/apache/commons/io/ByteOrderMarkTestCase.java b/trunk/src/test/java/org/apache/commons/io/ByteOrderMarkTestCase.java
deleted file mode 100644
index ec2ec68..0000000
--- a/trunk/src/test/java/org/apache/commons/io/ByteOrderMarkTestCase.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.nio.charset.Charset;
-import java.util.Arrays;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-
-/**
- * Test for {@link ByteOrderMark}.
- *
- * @version $Id$
- */
-public class ByteOrderMarkTestCase extends FileBasedTestCase {
-
-    private static final ByteOrderMark TEST_BOM_1 = new ByteOrderMark("test1", 1);
-    private static final ByteOrderMark TEST_BOM_2 = new ByteOrderMark("test2", 1, 2);
-    private static final ByteOrderMark TEST_BOM_3 = new ByteOrderMark("test3", 1, 2, 3);
-
-    public ByteOrderMarkTestCase(final String name) {
-        super(name);
-    }
-
-    /** Test {@link ByteOrderMark#getCharsetName()} */
-    public void testCharsetName() {
-        assertEquals("test1 name", "test1", TEST_BOM_1.getCharsetName());
-        assertEquals("test2 name", "test2", TEST_BOM_2.getCharsetName());
-        assertEquals("test3 name", "test3", TEST_BOM_3.getCharsetName());
-    }
-
-    /** Tests that {@link ByteOrderMark#getCharsetName()} can be loaded as a {@link java.nio.charset.Charset} as advertised. */
-    public void testConstantCharsetNames() {
-        assertNotNull(Charset.forName(ByteOrderMark.UTF_8.getCharsetName()));
-        assertNotNull(Charset.forName(ByteOrderMark.UTF_16BE.getCharsetName()));
-        assertNotNull(Charset.forName(ByteOrderMark.UTF_16LE.getCharsetName()));
-        assertNotNull(Charset.forName(ByteOrderMark.UTF_32BE.getCharsetName()));
-        assertNotNull(Charset.forName(ByteOrderMark.UTF_32LE.getCharsetName()));
-    }
-
-    /** Test {@link ByteOrderMark#length()} */
-    public void testLength() {
-        assertEquals("test1 length", 1, TEST_BOM_1.length());
-        assertEquals("test2 length", 2, TEST_BOM_2.length());
-        assertEquals("test3 length", 3, TEST_BOM_3.length());
-    }
-
-    /** Test {@link ByteOrderMark#get(int)} */
-    public void testGet() {
-        assertEquals("test1 get(0)", 1, TEST_BOM_1.get(0));
-        assertEquals("test2 get(0)", 1, TEST_BOM_2.get(0));
-        assertEquals("test2 get(1)", 2, TEST_BOM_2.get(1));
-        assertEquals("test3 get(0)", 1, TEST_BOM_3.get(0));
-        assertEquals("test3 get(1)", 2, TEST_BOM_3.get(1));
-        assertEquals("test3 get(2)", 3, TEST_BOM_3.get(2));
-    }
-
-    /** Test {@link ByteOrderMark#getBytes()} */
-    public void testGetBytes() {
-        assertTrue("test1 bytes", Arrays.equals(TEST_BOM_1.getBytes(), new byte[] {(byte)1}));
-        assertTrue("test1 bytes", Arrays.equals(TEST_BOM_2.getBytes(), new byte[] {(byte)1, (byte)2}));
-        assertTrue("test1 bytes", Arrays.equals(TEST_BOM_3.getBytes(), new byte[] {(byte)1, (byte)2, (byte)3}));
-    }
-
-    /** Test {@link ByteOrderMark#equals(Object)} */
-    public void testEquals() {
-        assertTrue("test1 equals", TEST_BOM_1.equals(TEST_BOM_1));
-        assertTrue("test2 equals", TEST_BOM_2.equals(TEST_BOM_2));
-        assertTrue("test3 equals", TEST_BOM_3.equals(TEST_BOM_3));
-
-        assertFalse("Object not equal",  TEST_BOM_1.equals(new Object()));
-        assertFalse("test1-1 not equal", TEST_BOM_1.equals(new ByteOrderMark("1a", 2)));
-        assertFalse("test1-2 not test2", TEST_BOM_1.equals(new ByteOrderMark("1b", 1, 2)));
-        assertFalse("test2 not equal", TEST_BOM_2.equals(new ByteOrderMark("2", 1, 1)));
-        assertFalse("test3 not equal", TEST_BOM_3.equals(new ByteOrderMark("3", 1, 2, 4)));
-    }
-
-    /** Test {@link ByteOrderMark#hashCode()} */
-    public void testHashCode() {
-        final int bomClassHash = ByteOrderMark.class.hashCode();
-        assertEquals("hash test1 ", bomClassHash + 1,  TEST_BOM_1.hashCode());
-        assertEquals("hash test2 ", bomClassHash + 3,  TEST_BOM_2.hashCode());
-        assertEquals("hash test3 ", bomClassHash + 6,  TEST_BOM_3.hashCode());
-    }
-
-    /** Test Erros */
-    public void testErrors() {
-        try {
-            new ByteOrderMark(null, 1,2,3);
-            fail("null charset name, expected IllegalArgumentException");
-        } catch (final IllegalArgumentException e) {
-            // expected
-        }
-        try {
-            new ByteOrderMark("", 1,2,3);
-            fail("no charset name, expected IllegalArgumentException");
-        } catch (final IllegalArgumentException e) {
-            // expected
-        }
-        try {
-            new ByteOrderMark("a", (int[])null);
-            fail("null bytes, expected IllegalArgumentException");
-        } catch (final IllegalArgumentException e) {
-            // expected
-        }
-        try {
-            new ByteOrderMark("b");
-            fail("empty bytes, expected IllegalArgumentException");
-        } catch (final IllegalArgumentException e) {
-            // expected
-        }
-    }
-
-    /** Test {@link ByteOrderMark#toString()} */
-    public void testToString() {
-        assertEquals("test1 ", "ByteOrderMark[test1: 0x1]",          TEST_BOM_1.toString());
-        assertEquals("test2 ", "ByteOrderMark[test2: 0x1,0x2]",      TEST_BOM_2.toString());
-        assertEquals("test3 ", "ByteOrderMark[test3: 0x1,0x2,0x3]",  TEST_BOM_3.toString());
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/CharsetsTestCase.java b/trunk/src/test/java/org/apache/commons/io/CharsetsTestCase.java
deleted file mode 100644
index 9f50dd0..0000000
--- a/trunk/src/test/java/org/apache/commons/io/CharsetsTestCase.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*

- * Licensed to the Apache Software Foundation (ASF) under one or more

- * contributor license agreements.  See the NOTICE file distributed with

- * this work for additional information regarding copyright ownership.

- * The ASF licenses this file to You under the Apache License, Version 2.0

- * (the "License"); you may not use this file except in compliance with

- * the License.  You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-

-package org.apache.commons.io;

-

-import java.nio.charset.Charset;

-import java.util.SortedMap;

-

-import org.junit.Assert;

-import org.junit.Test;

-

-/**

- * Tests {@link Charsets}.

- * 

- * @version $Id: CharEncodingTest.java 1298985 2012-03-09 19:12:49Z ggregory $

- */

-public class CharsetsTestCase {

-

-    @Test

-    public void testRequiredCharsets() {

-        final SortedMap<String, Charset> requiredCharsets = Charsets.requiredCharsets();

-        // test for what we expect to be there as of Java 6

-        // Make sure the object at the given key is the right one

-        Assert.assertEquals(requiredCharsets.get("US-ASCII").name(), "US-ASCII");

-        Assert.assertEquals(requiredCharsets.get("ISO-8859-1").name(), "ISO-8859-1");

-        Assert.assertEquals(requiredCharsets.get("UTF-8").name(), "UTF-8");

-        Assert.assertEquals(requiredCharsets.get("UTF-16").name(), "UTF-16");

-        Assert.assertEquals(requiredCharsets.get("UTF-16BE").name(), "UTF-16BE");

-        Assert.assertEquals(requiredCharsets.get("UTF-16LE").name(), "UTF-16LE");

-    }

-

-    @Test

-    @SuppressWarnings("deprecation") // unavoidable until Java 7

-    public void testIso8859_1() {

-        Assert.assertEquals("ISO-8859-1", Charsets.ISO_8859_1.name());

-    }

-

-    @Test

-    public void testToCharset() {

-        Assert.assertEquals(Charset.defaultCharset(), Charsets.toCharset((String) null));

-        Assert.assertEquals(Charset.defaultCharset(), Charsets.toCharset((Charset) null));

-        Assert.assertEquals(Charset.defaultCharset(), Charsets.toCharset(Charset.defaultCharset()));

-        Assert.assertEquals(Charset.forName("UTF-8"), Charsets.toCharset(Charset.forName("UTF-8")));

-    }

-

-    @Test

-    @SuppressWarnings("deprecation") // unavoidable until Java 7

-    public void testUsAscii() {

-        Assert.assertEquals("US-ASCII", Charsets.US_ASCII.name());

-    }

-

-    @Test

-    @SuppressWarnings("deprecation") // unavoidable until Java 7

-    public void testUtf16() {

-        Assert.assertEquals("UTF-16", Charsets.UTF_16.name());

-    }

-

-    @Test

-    @SuppressWarnings("deprecation") // unavoidable until Java 7

-    public void testUtf16Be() {

-        Assert.assertEquals("UTF-16BE", Charsets.UTF_16BE.name());

-    }

-

-    @Test

-    @SuppressWarnings("deprecation") // unavoidable until Java 7

-    public void testUtf16Le() {

-        Assert.assertEquals("UTF-16LE", Charsets.UTF_16LE.name());

-    }

-

-    @Test

-    @SuppressWarnings("deprecation") // unavoidable until Java 7

-    public void testUtf8() {

-        Assert.assertEquals("UTF-8", Charsets.UTF_8.name());

-    }

-

-}

diff --git a/trunk/src/test/java/org/apache/commons/io/CopyUtilsTest.java b/trunk/src/test/java/org/apache/commons/io/CopyUtilsTest.java
deleted file mode 100644
index 70eb689..0000000
--- a/trunk/src/test/java/org/apache/commons/io/CopyUtilsTest.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.Arrays;
-
-import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.commons.io.testtools.FileBasedTestCase;
-import org.apache.commons.io.testtools.YellOnCloseInputStream;
-import org.apache.commons.io.testtools.YellOnFlushAndCloseOutputStream;
-
-@SuppressWarnings("deprecation") // these are test cases for the deprecated CopyUtils
-
-/**
- * JUnit tests for CopyUtils.
- *
- * @version $Id$
- * @see CopyUtils
- */
-public class CopyUtilsTest extends FileBasedTestCase {
-
-    /*
-     * NOTE this is not particularly beautiful code. A better way to check for
-     * flush and close status would be to implement "trojan horse" wrapper
-     * implementations of the various stream classes, which set a flag when
-     * relevant methods are called. (JT)
-     */
-
-    private static final int FILE_SIZE = 1024 * 4 + 1;
-
-
-    private final byte[] inData = generateTestData(FILE_SIZE);
-
-    public CopyUtilsTest(final String testName) {
-        super(testName);
-    }
-
-    // ----------------------------------------------------------------
-    // Setup
-    // ----------------------------------------------------------------
-
-    @Override
-    public void setUp() throws Exception {
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-    }
-
-    // ----------------------------------------------------------------
-    // Tests
-    // ----------------------------------------------------------------
-
-    public void testCtor() {
-        new CopyUtils();
-        // Nothing to assert, the constructor is public and does not blow up.
-    }
-
-    public void testCopy_byteArrayToOutputStream() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        CopyUtils.copy(inData, out);
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testCopy_byteArrayToWriter() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-        final Writer writer = new java.io.OutputStreamWriter(out, "US-ASCII");
-
-        CopyUtils.copy(inData, writer);
-        writer.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testCopy_byteArrayToWriterWithEncoding() throws Exception {
-        final String inDataStr = "data";
-        final String charsetName = "UTF-8";
-        final StringWriter writer = new StringWriter();
-        CopyUtils.copy(inDataStr.getBytes(charsetName), writer, charsetName);
-        assertEquals(inDataStr, writer.toString());
-    }
-
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    public void testCopy_inputStreamToOutputStream() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        final int count = CopyUtils.copy(in, out);
-
-        assertEquals("Not all bytes were read", 0, in.available());
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-        assertEquals(inData.length, count);
-    }
-
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    public void testCopy_inputStreamToWriter() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-        final Writer writer = new java.io.OutputStreamWriter(out, "US-ASCII");
-
-        CopyUtils.copy(in, writer);
-        writer.flush();
-
-        assertEquals("Not all bytes were read", 0, in.available());
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testCopy_inputStreamToWriterWithEncoding() throws Exception {
-        final String inDataStr = "data";
-        final String charsetName = "UTF-8";
-        final StringWriter writer = new StringWriter();
-        CopyUtils.copy(new ByteArrayInputStream(inDataStr.getBytes(charsetName)), writer, charsetName);
-        assertEquals(inDataStr, writer.toString());
-    }
-
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    public void testCopy_readerToOutputStream() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-        final Reader reader = new java.io.InputStreamReader(in, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        CopyUtils.copy(reader, out);
-        //Note: this method *does* flush. It is equivalent to:
-        //  OutputStreamWriter _out = new OutputStreamWriter(fout);
-        //  IOUtils.copy( fin, _out, 4096 ); // copy( Reader, Writer, int );
-        //  _out.flush();
-        //  out = fout;
-
-        // Note: rely on the method to flush
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    public void testCopy_readerToWriter() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-        final Reader reader = new java.io.InputStreamReader(in, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-        final Writer writer = new java.io.OutputStreamWriter(out, "US-ASCII");
-
-        final int count = CopyUtils.copy(reader, writer);
-        writer.flush();
-        assertEquals(
-            "The number of characters returned by copy is wrong",
-            inData.length,
-            count);
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testCopy_stringToOutputStream() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        CopyUtils.copy(str, out);
-        //Note: this method *does* flush. It is equivalent to:
-        //  OutputStreamWriter _out = new OutputStreamWriter(fout);
-        //  IOUtils.copy( str, _out, 4096 ); // copy( Reader, Writer, int );
-        //  _out.flush();
-        //  out = fout;
-        // note: we don't flush here; this IOUtils method does it for us
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testCopy_stringToWriter() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-        final Writer writer = new java.io.OutputStreamWriter(out, "US-ASCII");
-
-        CopyUtils.copy(str, writer);
-        writer.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-} // CopyUtilsTest
diff --git a/trunk/src/test/java/org/apache/commons/io/DemuxTestCase.java b/trunk/src/test/java/org/apache/commons/io/DemuxTestCase.java
deleted file mode 100644
index 1c5b3ad..0000000
--- a/trunk/src/test/java/org/apache/commons/io/DemuxTestCase.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Random;
-
-import org.apache.commons.io.input.DemuxInputStream;
-import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.commons.io.output.DemuxOutputStream;
-import org.junit.Test;
-
-/**
- * Basic unit tests for the multiplexing streams.
- */
-public class DemuxTestCase {
-    private static final String T1 = "Thread1";
-    private static final String T2 = "Thread2";
-    private static final String T3 = "Thread3";
-    private static final String T4 = "Thread4";
-
-    private static final String DATA1 = "Data for thread1";
-    private static final String DATA2 = "Data for thread2";
-    private static final String DATA3 = "Data for thread3";
-    private static final String DATA4 = "Data for thread4";
-
-    private static final Random c_random = new Random();
-    private final HashMap<String, ByteArrayOutputStream> m_outputMap = new HashMap<String, ByteArrayOutputStream>();
-    private final HashMap<String, Thread> m_threadMap = new HashMap<String, Thread>();
-
-    @SuppressWarnings("deprecation") // unavoidable until Java 7
-    private String getOutput(final String threadName) {
-        final ByteArrayOutputStream output =
-                m_outputMap.get(threadName);
-        assertNotNull("getOutput()", output);
-
-        return output.toString(Charsets.UTF_8);
-    }
-
-    private String getInput(final String threadName) {
-        final ReaderThread thread = (ReaderThread) m_threadMap.get(threadName);
-        assertNotNull("getInput()", thread);
-
-        return thread.getData();
-    }
-
-    private void doStart()
-            throws Exception {
-        for (String name : m_threadMap.keySet()) {
-            final Thread thread = m_threadMap.get(name);
-            thread.start();
-        }
-    }
-
-    private void doJoin()
-            throws Exception {
-        for (String name : m_threadMap.keySet()) {
-            final Thread thread = m_threadMap.get(name);
-            thread.join();
-        }
-    }
-
-    private void startWriter(final String name,
-                             final String data,
-                             final DemuxOutputStream demux)
-            throws Exception {
-        final ByteArrayOutputStream output = new ByteArrayOutputStream();
-        m_outputMap.put(name, output);
-        final WriterThread thread =
-                new WriterThread(name, data, output, demux);
-        m_threadMap.put(name, thread);
-    }
-
-    private void startReader(final String name,
-                             final String data,
-                             final DemuxInputStream demux)
-            throws Exception {
-        final ByteArrayInputStream input = new ByteArrayInputStream(data.getBytes());
-        final ReaderThread thread = new ReaderThread(name, input, demux);
-        m_threadMap.put(name, thread);
-    }
-
-    @Test
-    public void testOutputStream()
-            throws Exception {
-        final DemuxOutputStream output = new DemuxOutputStream();
-        startWriter(T1, DATA1, output);
-        startWriter(T2, DATA2, output);
-        startWriter(T3, DATA3, output);
-        startWriter(T4, DATA4, output);
-
-        doStart();
-        doJoin();
-
-        assertEquals("Data1", DATA1, getOutput(T1));
-        assertEquals("Data2", DATA2, getOutput(T2));
-        assertEquals("Data3", DATA3, getOutput(T3));
-        assertEquals("Data4", DATA4, getOutput(T4));
-    }
-
-    @Test
-    public void testInputStream()
-            throws Exception {
-        final DemuxInputStream input = new DemuxInputStream();
-        startReader(T1, DATA1, input);
-        startReader(T2, DATA2, input);
-        startReader(T3, DATA3, input);
-        startReader(T4, DATA4, input);
-
-        doStart();
-        doJoin();
-
-        assertEquals("Data1", DATA1, getInput(T1));
-        assertEquals("Data2", DATA2, getInput(T2));
-        assertEquals("Data3", DATA3, getInput(T3));
-        assertEquals("Data4", DATA4, getInput(T4));
-    }
-
-    private static class ReaderThread
-            extends Thread {
-        private final StringBuffer m_buffer = new StringBuffer();
-        private final InputStream m_input;
-        private final DemuxInputStream m_demux;
-
-        ReaderThread(final String name,
-                     final InputStream input,
-                     final DemuxInputStream demux) {
-            super(name);
-            m_input = input;
-            m_demux = demux;
-        }
-
-        public String getData() {
-            return m_buffer.toString();
-        }
-
-        @Override
-        public void run() {
-            m_demux.bindStream(m_input);
-
-            try {
-                int ch = m_demux.read();
-                while (-1 != ch) {
-                    //System.out.println( "Reading: " + (char)ch );
-                    m_buffer.append((char) ch);
-
-                    final int sleepTime = Math.abs(c_random.nextInt() % 10);
-                    Thread.sleep(sleepTime);
-                    ch = m_demux.read();
-                }
-            } catch (final Exception e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    private static class WriterThread
-            extends Thread {
-        private final byte[] m_data;
-        private final OutputStream m_output;
-        private final DemuxOutputStream m_demux;
-
-        WriterThread(final String name,
-                     final String data,
-                     final OutputStream output,
-                     final DemuxOutputStream demux) {
-            super(name);
-            m_output = output;
-            m_demux = demux;
-            m_data = data.getBytes();
-        }
-
-        @Override
-        public void run() {
-            m_demux.bindStream(m_output);
-            for (final byte element : m_data) {
-                try {
-                    //System.out.println( "Writing: " + (char)m_data[ i ] );
-                    m_demux.write(element);
-                    final int sleepTime = Math.abs(c_random.nextInt() % 10);
-                    Thread.sleep(sleepTime);
-                } catch (final Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-}
-
diff --git a/trunk/src/test/java/org/apache/commons/io/DirectoryWalkerTestCase.java b/trunk/src/test/java/org/apache/commons/io/DirectoryWalkerTestCase.java
deleted file mode 100644
index 2536925..0000000
--- a/trunk/src/test/java/org/apache/commons/io/DirectoryWalkerTestCase.java
+++ /dev/null
@@ -1,571 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.commons.io.filefilter.FileFilterUtils;
-import org.apache.commons.io.filefilter.IOFileFilter;
-import org.apache.commons.io.filefilter.NameFileFilter;
-import org.apache.commons.io.filefilter.OrFileFilter;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * This is used to test DirectoryWalker for correctness.
- *
- * @version $Id$
- * @see DirectoryWalker
- *
- */
-public class DirectoryWalkerTestCase {
-
-    // Directories
-    private static final File current      = new File(".");
-    private static final File javaDir      = new File("src/main/java");
-    private static final File orgDir       = new File(javaDir, "org");
-    private static final File apacheDir    = new File(orgDir, "apache");
-    private static final File commonsDir   = new File(apacheDir, "commons");
-    private static final File ioDir        = new File(commonsDir, "io");
-    private static final File outputDir    = new File(ioDir, "output");
-    private static final File[] dirs       = new File[] {orgDir, apacheDir, commonsDir, ioDir, outputDir};
-
-    // Files
-    private static final File filenameUtils = new File(ioDir, "FilenameUtils.java");
-    private static final File ioUtils       = new File(ioDir, "IOUtils.java");
-    private static final File proxyWriter   = new File(outputDir, "ProxyWriter.java");
-    private static final File nullStream    = new File(outputDir, "NullOutputStream.java");
-    private static final File[] ioFiles     = new File[] {filenameUtils, ioUtils};
-    private static final File[] outputFiles = new File[] {proxyWriter, nullStream};
-
-    // Filters
-    private static final IOFileFilter dirsFilter        = createNameFilter(dirs);
-    private static final IOFileFilter iofilesFilter     = createNameFilter(ioFiles);
-    private static final IOFileFilter outputFilesFilter = createNameFilter(outputFiles);
-    private static final IOFileFilter ioDirAndFilesFilter = new OrFileFilter(dirsFilter, iofilesFilter);
-    private static final IOFileFilter dirsAndFilesFilter = new OrFileFilter(ioDirAndFilesFilter, outputFilesFilter);
-
-    // Filter to exclude SVN files
-    private static final IOFileFilter NOT_SVN = FileFilterUtils.makeSVNAware(null);
-
-    //-----------------------------------------------------------------------
-
-    /**
-     * Test Filtering
-     */
-    @Test
-    public void testFilter() {
-        final List<File> results = new TestFileFinder(dirsAndFilesFilter, -1).find(javaDir);
-        assertEquals("Result Size", 1 + dirs.length + ioFiles.length + outputFiles.length, results.size());
-        assertTrue("Start Dir", results.contains(javaDir));
-        checkContainsFiles("Dir", dirs, results);
-        checkContainsFiles("IO File", ioFiles, results);
-        checkContainsFiles("Output File", outputFiles, results);
-    }
-
-    /**
-     * Test Filtering and limit to depth 0
-     */
-    @Test
-    public void testFilterAndLimitA() {
-        final List<File> results = new TestFileFinder(NOT_SVN, 0).find(javaDir);
-        assertEquals("[A] Result Size", 1, results.size());
-        assertTrue("[A] Start Dir",   results.contains(javaDir));
-    }
-
-    /**
-     * Test Filtering and limit to depth 1
-     */
-    @Test
-    public void testFilterAndLimitB() {
-        final List<File> results = new TestFileFinder(NOT_SVN, 1).find(javaDir);
-        assertEquals("[B] Result Size", 2, results.size());
-        assertTrue("[B] Start Dir",   results.contains(javaDir));
-        assertTrue("[B] Org Dir",     results.contains(orgDir));
-    }
-
-    /**
-     * Test Filtering and limit to depth 3
-     */
-    @Test
-    public void testFilterAndLimitC() {
-        final List<File> results = new TestFileFinder(NOT_SVN, 3).find(javaDir);
-        assertEquals("[C] Result Size", 4, results.size());
-        assertTrue("[C] Start Dir",   results.contains(javaDir));
-        assertTrue("[C] Org Dir",     results.contains(orgDir));
-        assertTrue("[C] Apache Dir",  results.contains(apacheDir));
-        assertTrue("[C] Commons Dir", results.contains(commonsDir));
-    }
-
-    /**
-     * Test Filtering and limit to depth 5
-     */
-    @Test
-    public void testFilterAndLimitD() {
-        final List<File> results = new TestFileFinder(dirsAndFilesFilter, 5).find(javaDir);
-        assertEquals("[D] Result Size", 1 + dirs.length + ioFiles.length, results.size());
-        assertTrue("[D] Start Dir", results.contains(javaDir));
-        checkContainsFiles("[D] Dir", dirs, results);
-        checkContainsFiles("[D] File", ioFiles, results);
-    }
-
-    /**
-     * Test separate dir and file filters
-     */
-    @Test
-    public void testFilterDirAndFile1() {
-        final List<File> results = new TestFileFinder(dirsFilter, iofilesFilter, -1).find(javaDir);
-        assertEquals("[DirAndFile1] Result Size", 1 + dirs.length + ioFiles.length, results.size());
-        assertTrue("[DirAndFile1] Start Dir", results.contains(javaDir));
-        checkContainsFiles("[DirAndFile1] Dir", dirs, results);
-        checkContainsFiles("[DirAndFile1] File", ioFiles, results);
-    }
-
-    /**
-     * Test separate dir and file filters
-     */
-    @Test
-    public void testFilterDirAndFile2() {
-        final List<File> results = new TestFileFinder(null, null, -1).find(javaDir);
-        assertTrue("[DirAndFile2] Result Size", results.size() > 1 + dirs.length + ioFiles.length);
-        assertTrue("[DirAndFile2] Start Dir", results.contains(javaDir));
-        checkContainsFiles("[DirAndFile2] Dir", dirs, results);
-        checkContainsFiles("[DirAndFile2] File", ioFiles, results);
-    }
-
-    /**
-     * Test separate dir and file filters
-     */
-    @Test
-    public void testFilterDirAndFile3() {
-        final List<File> results = new TestFileFinder(dirsFilter, null, -1).find(javaDir);
-        final List<File> resultDirs = directoriesOnly(results);
-        assertEquals("[DirAndFile3] Result Size", 1 + dirs.length, resultDirs.size());
-        assertTrue("[DirAndFile3] Start Dir", results.contains(javaDir));
-        checkContainsFiles("[DirAndFile3] Dir", dirs, resultDirs);
-    }
-
-    /**
-     * Test separate dir and file filters
-     */
-    @Test
-    public void testFilterDirAndFile4() {
-        final List<File> results = new TestFileFinder(null, iofilesFilter, -1).find(javaDir);
-        final List<File> resultFiles = filesOnly(results);
-        assertEquals("[DirAndFile4] Result Size", ioFiles.length, resultFiles.size());
-        assertTrue("[DirAndFile4] Start Dir", results.contains(javaDir));
-        checkContainsFiles("[DirAndFile4] File", ioFiles, resultFiles);
-    }
-
-    /**
-     * Test Limiting to current directory
-     */
-    @Test
-    public void testLimitToCurrent() {
-        final List<File> results = new TestFileFinder(null, 0).find(current);
-        assertEquals("Result Size", 1, results.size());
-        assertTrue("Current Dir", results.contains(new File(".")));
-    }
-
-    /**
-     * test an invalid start directory
-     */
-    @Test
-    public void testMissingStartDirectory() {
-
-        // TODO is this what we want with invalid directory?
-        final File invalidDir = new File("invalid-dir");
-        final List<File> results = new TestFileFinder(null, -1).find(invalidDir);
-        assertEquals("Result Size", 1, results.size());
-        assertTrue("Current Dir", results.contains(invalidDir));
-
-        try {
-            new TestFileFinder(null, -1).find(null);
-            fail("Null start directory didn't throw Exception");
-        } catch (final NullPointerException ignore) {
-            // expected result
-        }
-    }
-
-    /**
-     * test an invalid start directory
-     */
-    @Test
-    public void testHandleStartDirectoryFalse() {
-
-        final List<File> results = new TestFalseFileFinder(null, -1).find(current);
-        assertEquals("Result Size", 0, results.size());
-
-    }
-
-    // ------------ Convenience Test Methods ------------------------------------
-
-    /**
-     * Check the files in the array are in the results list.
-     */
-    private void checkContainsFiles(final String prefix, final File[] files, final Collection<File> results) {
-        for (int i = 0; i < files.length; i++) {
-            assertTrue(prefix + "["+i+"] " + files[i], results.contains(files[i]));
-        }
-    }
-
-    private void checkContainsString(final String prefix, final File[] files, final Collection<String> results) {
-        for (int i = 0; i < files.length; i++) {
-            assertTrue(prefix + "["+i+"] " + files[i], results.contains(files[i].toString()));
-        }
-    }
-
-    /**
-     * Extract the directories.
-     */
-    private List<File> directoriesOnly(final Collection<File> results) {
-        final List<File> list = new ArrayList<File>(results.size());
-        for (final File file : results) {
-            if (file.isDirectory()) {
-                list.add(file);
-            }
-        }
-        return list;
-    }
-
-    /**
-     * Extract the files.
-     */
-    private List<File> filesOnly(final Collection<File> results) {
-        final List<File> list = new ArrayList<File>(results.size());
-        for (final File file : results) {
-            if (file.isFile()) {
-                list.add(file);
-            }
-        }
-        return list;
-    }
-
-    /**
-     * Create an name filter containg the names of the files
-     * in the array.
-     */
-    private static IOFileFilter createNameFilter(final File[] files) {
-        final String[] names = new String[files.length];
-        for (int i = 0; i < files.length; i++) {
-            names[i] = files[i].getName();
-        }
-        return new NameFileFilter(names);
-    }
-
-    /**
-     * Test Cancel
-     */
-    @Test
-    public void testCancel() {
-        String cancelName = null;
-
-        // Cancel on a file
-        try {
-            cancelName = "DirectoryWalker.java";
-            new TestCancelWalker(cancelName, false).find(javaDir);
-            fail("CancelException not thrown for '" + cancelName + "'");
-        } catch (final DirectoryWalker.CancelException cancel) {
-            assertEquals("File:  " + cancelName,   cancelName, cancel.getFile().getName());
-            assertEquals("Depth: " + cancelName,  5, cancel.getDepth());
-        } catch(final IOException ex) {
-            fail("IOException: " + cancelName + " " + ex);
-        }
-
-        // Cancel on a directory
-        try {
-            cancelName = "commons";
-            new TestCancelWalker(cancelName, false).find(javaDir);
-            fail("CancelException not thrown for '" + cancelName + "'");
-        } catch (final DirectoryWalker.CancelException cancel) {
-            assertEquals("File:  " + cancelName,   cancelName, cancel.getFile().getName());
-            assertEquals("Depth: " + cancelName,  3, cancel.getDepth());
-        } catch(final IOException ex) {
-            fail("IOException: " + cancelName + " " + ex);
-        }
-
-        // Suppress CancelException (use same file name as preceding test)
-        try {
-            final List<File> results = new TestCancelWalker(cancelName, true).find(javaDir);
-            final File lastFile = results.get(results.size() - 1);
-            assertEquals("Suppress:  " + cancelName,   cancelName, lastFile.getName());
-        } catch(final IOException ex) {
-            fail("Suppress threw " + ex);
-        }
-
-    }
-
-    /**
-     * Test Cancel
-     */
-    @Test
-    public void testMultiThreadCancel() {
-        String cancelName = "DirectoryWalker.java";
-        TestMultiThreadCancelWalker walker = new TestMultiThreadCancelWalker(cancelName, false);
-        // Cancel on a file
-        try {
-            walker.find(javaDir);
-            fail("CancelException not thrown for '" + cancelName + "'");
-        } catch (final DirectoryWalker.CancelException cancel) {
-            final File last = walker.results.get(walker.results.size() - 1);
-            assertEquals(cancelName, last.getName());
-            assertEquals("Depth: " + cancelName,  5, cancel.getDepth());
-        } catch(final IOException ex) {
-            fail("IOException: " + cancelName + " " + ex);
-        }
-
-        // Cancel on a directory
-        try {
-            cancelName = "commons";
-            walker = new TestMultiThreadCancelWalker(cancelName, false);
-            walker.find(javaDir);
-            fail("CancelException not thrown for '" + cancelName + "'");
-        } catch (final DirectoryWalker.CancelException cancel) {
-            assertEquals("File:  " + cancelName,   cancelName, cancel.getFile().getName());
-            assertEquals("Depth: " + cancelName,  3, cancel.getDepth());
-        } catch(final IOException ex) {
-            fail("IOException: " + cancelName + " " + ex);
-        }
-
-        // Suppress CancelException (use same file name as preceding test)
-        try {
-            walker = new TestMultiThreadCancelWalker(cancelName, true);
-            final List<File> results = walker.find(javaDir);
-            final File lastFile = results.get(results.size() - 1);
-            assertEquals("Suppress:  " + cancelName, cancelName, lastFile.getName());
-        } catch(final IOException ex) {
-            fail("Suppress threw " + ex);
-        }
-
-    }
-
-    /**
-     * Test Filtering
-     */
-    @Test
-    public void testFilterString() {
-        final List<String> results = new TestFileFinderString(dirsAndFilesFilter, -1).find(javaDir);
-        assertEquals("Result Size", outputFiles.length + ioFiles.length, results.size());
-        checkContainsString("IO File", ioFiles, results);
-        checkContainsString("Output File", outputFiles, results);
-    }
-
-    // ------------ Test DirectoryWalker implementation --------------------------
-
-    /**
-     * Test DirectoryWalker implementation that finds files in a directory hierarchy
-     * applying a file filter.
-     */
-    private static class TestFileFinder extends DirectoryWalker<File> {
-
-        protected TestFileFinder(final FileFilter filter, final int depthLimit) {
-            super(filter, depthLimit);
-        }
-
-        protected TestFileFinder(final IOFileFilter dirFilter, final IOFileFilter fileFilter, final int depthLimit) {
-            super(dirFilter, fileFilter, depthLimit);
-        }
-
-        /** find files. */
-        protected List<File> find(final File startDirectory) {
-           final List<File> results = new ArrayList<File>();
-           try {
-               walk(startDirectory, results);
-           } catch(final IOException ex) {
-               Assert.fail(ex.toString());
-           }
-           return results;
-        }
-
-        /** Handles a directory end by adding the File to the result set. */
-        @Override
-        protected void handleDirectoryEnd(final File directory, final int depth, final Collection<File> results) {
-            results.add(directory);
-        }
-
-        /** Handles a file by adding the File to the result set. */
-        @Override
-        protected void handleFile(final File file, final int depth, final Collection<File> results) {
-            results.add(file);
-        }
-    }
-
-    // ------------ Test DirectoryWalker implementation --------------------------
-
-    /**
-     * Test DirectoryWalker implementation that always returns false
-     * from handleDirectoryStart()
-     */
-    private static class TestFalseFileFinder extends TestFileFinder {
-
-        protected TestFalseFileFinder(final FileFilter filter, final int depthLimit) {
-            super(filter, depthLimit);
-        }
-
-        /** Always returns false. */
-        @Override
-        protected boolean handleDirectory(final File directory, final int depth, final Collection<File> results) {
-            return false;
-        }
-    }
-
-    // ------------ Test DirectoryWalker implementation --------------------------
-
-    /**
-     * Test DirectoryWalker implementation that finds files in a directory hierarchy
-     * applying a file filter.
-     */
-    static class TestCancelWalker extends DirectoryWalker<File> {
-        private final String cancelFileName;
-        private final boolean suppressCancel;
-
-        TestCancelWalker(final String cancelFileName,final boolean suppressCancel) {
-            super();
-            this.cancelFileName = cancelFileName;
-            this.suppressCancel = suppressCancel;
-        }
-
-        /** find files. */
-        protected List<File> find(final File startDirectory) throws IOException {
-           final List<File> results = new ArrayList<File>();
-           walk(startDirectory, results);
-           return results;
-        }
-
-        /** Handles a directory end by adding the File to the result set. */
-        @Override
-        protected void handleDirectoryEnd(final File directory, final int depth, final Collection<File> results) throws IOException {
-            results.add(directory);
-            if (cancelFileName.equals(directory.getName())) {
-                throw new CancelException(directory, depth);
-            }
-        }
-
-        /** Handles a file by adding the File to the result set. */
-        @Override
-        protected void handleFile(final File file, final int depth, final Collection<File> results) throws IOException {
-            results.add(file);
-            if (cancelFileName.equals(file.getName())) {
-                throw new CancelException(file, depth);
-            }
-        }
-
-        /** Handles Cancel. */
-        @Override
-        protected void handleCancelled(final File startDirectory, final Collection<File> results,
-                       final CancelException cancel) throws IOException {
-            if (!suppressCancel) {
-                super.handleCancelled(startDirectory, results, cancel);
-            }
-        }
-    }
-
-    /**
-     * Test DirectoryWalker implementation that finds files in a directory hierarchy
-     * applying a file filter.
-     */
-    static class TestMultiThreadCancelWalker extends DirectoryWalker<File> {
-        private final String cancelFileName;
-        private final boolean suppressCancel;
-        private boolean cancelled;
-        public List<File> results;
-
-        TestMultiThreadCancelWalker(final String cancelFileName, final boolean suppressCancel) {
-            super();
-            this.cancelFileName = cancelFileName;
-            this.suppressCancel = suppressCancel;
-        }
-
-        /** find files. */
-        protected List<File> find(final File startDirectory) throws IOException {
-           results = new ArrayList<File>();
-           walk(startDirectory, results);
-           return results;
-        }
-
-        /** Handles a directory end by adding the File to the result set. */
-        @Override
-        protected void handleDirectoryEnd(final File directory, final int depth, final Collection<File> results) throws IOException {
-            results.add(directory);
-            assertFalse(cancelled);
-            if (cancelFileName.equals(directory.getName())) {
-                cancelled = true;
-            }
-        }
-
-        /** Handles a file by adding the File to the result set. */
-        @Override
-        protected void handleFile(final File file, final int depth, final Collection<File> results) throws IOException {
-            results.add(file);
-            assertFalse(cancelled);
-            if (cancelFileName.equals(file.getName())) {
-                cancelled = true;
-            }
-        }
-
-        /** Handles Cancelled. */
-        @Override
-        protected boolean handleIsCancelled(final File file, final int depth, final Collection<File> results) throws IOException {
-            return cancelled;
-        }
-
-        /** Handles Cancel. */
-        @Override
-        protected void handleCancelled(final File startDirectory, final Collection<File> results,
-                       final CancelException cancel) throws IOException {
-            if (!suppressCancel) {
-                super.handleCancelled(startDirectory, results, cancel);
-            }
-        }
-    }
-
-    /**
-     * Test DirectoryWalker implementation that finds files in a directory hierarchy
-     * applying a file filter.
-     */
-    private static class TestFileFinderString extends DirectoryWalker<String> {
-
-        protected TestFileFinderString(final FileFilter filter, final int depthLimit) {
-            super(filter, depthLimit);
-        }
-
-        /** find files. */
-        protected List<String> find(final File startDirectory) {
-           final List<String> results = new ArrayList<String>();
-           try {
-               walk(startDirectory, results);
-           } catch(final IOException ex) {
-               Assert.fail(ex.toString());
-           }
-           return results;
-        }
-
-        /** Handles a file by adding the File to the result set. */
-        @Override
-        protected void handleFile(final File file, final int depth, final Collection<String> results) {
-            results.add(file.toString());
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/DirectoryWalkerTestCaseJava4.java b/trunk/src/test/java/org/apache/commons/io/DirectoryWalkerTestCaseJava4.java
deleted file mode 100644
index a000c1b..0000000
--- a/trunk/src/test/java/org/apache/commons/io/DirectoryWalkerTestCaseJava4.java
+++ /dev/null
@@ -1,550 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import junit.framework.TestCase;
-import org.apache.commons.io.filefilter.FileFilterUtils;
-import org.apache.commons.io.filefilter.IOFileFilter;
-import org.apache.commons.io.filefilter.NameFileFilter;
-import org.apache.commons.io.filefilter.OrFileFilter;
-import org.junit.Assert;
-
-/**
- * This is used to test DirectoryWalker for correctness when using Java4 (i.e. no generics).
- *
- * @version $Id$
- * @see DirectoryWalker
- */
-@SuppressWarnings({"unchecked", "rawtypes"}) // Java4
-public class DirectoryWalkerTestCaseJava4 extends TestCase {
-
-    // Directories
-    private static final File current = new File(".");
-    private static final File javaDir = new File("src/main/java");
-    private static final File orgDir = new File(javaDir, "org");
-    private static final File apacheDir = new File(orgDir, "apache");
-    private static final File commonsDir = new File(apacheDir, "commons");
-    private static final File ioDir = new File(commonsDir, "io");
-    private static final File outputDir = new File(ioDir, "output");
-    private static final File[] dirs = new File[]{orgDir, apacheDir, commonsDir, ioDir, outputDir};
-
-    // Files
-    private static final File filenameUtils = new File(ioDir, "FilenameUtils.java");
-    private static final File ioUtils = new File(ioDir, "IOUtils.java");
-    private static final File proxyWriter = new File(outputDir, "ProxyWriter.java");
-    private static final File nullStream = new File(outputDir, "NullOutputStream.java");
-    private static final File[] ioFiles = new File[]{filenameUtils, ioUtils};
-    private static final File[] outputFiles = new File[]{proxyWriter, nullStream};
-
-    // Filters
-    private static final IOFileFilter dirsFilter = createNameFilter(dirs);
-    private static final IOFileFilter iofilesFilter = createNameFilter(ioFiles);
-    private static final IOFileFilter outputFilesFilter = createNameFilter(outputFiles);
-    private static final IOFileFilter ioDirAndFilesFilter = new OrFileFilter(dirsFilter, iofilesFilter);
-    private static final IOFileFilter dirsAndFilesFilter = new OrFileFilter(ioDirAndFilesFilter, outputFilesFilter);
-
-    // Filter to exclude SVN files
-    private static final IOFileFilter NOT_SVN = FileFilterUtils.makeSVNAware(null);
-
-    public DirectoryWalkerTestCaseJava4(final String name) {
-        super(name);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    //-----------------------------------------------------------------------
-
-    /**
-     * Test Filtering
-     */
-    public void testFilter() {
-        final List<File> results = new TestFileFinder(dirsAndFilesFilter, -1).find(javaDir);
-        assertEquals("Result Size", 1 + dirs.length + ioFiles.length + outputFiles.length, results.size());
-        assertTrue("Start Dir", results.contains(javaDir));
-        checkContainsFiles("Dir", dirs, results);
-        checkContainsFiles("IO File", ioFiles, results);
-        checkContainsFiles("Output File", outputFiles, results);
-    }
-
-    /**
-     * Test Filtering and limit to depth 0
-     */
-    public void testFilterAndLimitA() {
-        final List<File> results = new TestFileFinder(NOT_SVN, 0).find(javaDir);
-        assertEquals("[A] Result Size", 1, results.size());
-        assertTrue("[A] Start Dir", results.contains(javaDir));
-    }
-
-    /**
-     * Test Filtering and limit to depth 1
-     */
-    public void testFilterAndLimitB() {
-        final List<File> results = new TestFileFinder(NOT_SVN, 1).find(javaDir);
-        assertEquals("[B] Result Size", 2, results.size());
-        assertTrue("[B] Start Dir", results.contains(javaDir));
-        assertTrue("[B] Org Dir", results.contains(orgDir));
-    }
-
-    /**
-     * Test Filtering and limit to depth 3
-     */
-    public void testFilterAndLimitC() {
-        final List<File> results = new TestFileFinder(NOT_SVN, 3).find(javaDir);
-        assertEquals("[C] Result Size", 4, results.size());
-        assertTrue("[C] Start Dir", results.contains(javaDir));
-        assertTrue("[C] Org Dir", results.contains(orgDir));
-        assertTrue("[C] Apache Dir", results.contains(apacheDir));
-        assertTrue("[C] Commons Dir", results.contains(commonsDir));
-    }
-
-    /**
-     * Test Filtering and limit to depth 5
-     */
-    public void testFilterAndLimitD() {
-        final List<File> results = new TestFileFinder(dirsAndFilesFilter, 5).find(javaDir);
-        assertEquals("[D] Result Size", 1 + dirs.length + ioFiles.length, results.size());
-        assertTrue("[D] Start Dir", results.contains(javaDir));
-        checkContainsFiles("[D] Dir", dirs, results);
-        checkContainsFiles("[D] File", ioFiles, results);
-    }
-
-    /**
-     * Test separate dir and file filters
-     */
-    public void testFilterDirAndFile1() {
-        final List<File> results = new TestFileFinder(dirsFilter, iofilesFilter, -1).find(javaDir);
-        assertEquals("[DirAndFile1] Result Size", 1 + dirs.length + ioFiles.length, results.size());
-        assertTrue("[DirAndFile1] Start Dir", results.contains(javaDir));
-        checkContainsFiles("[DirAndFile1] Dir", dirs, results);
-        checkContainsFiles("[DirAndFile1] File", ioFiles, results);
-    }
-
-    /**
-     * Test separate dir and file filters
-     */
-    public void testFilterDirAndFile2() {
-        final List<File> results = new TestFileFinder(null, null, -1).find(javaDir);
-        assertTrue("[DirAndFile2] Result Size", results.size() > 1 + dirs.length + ioFiles.length);
-        assertTrue("[DirAndFile2] Start Dir", results.contains(javaDir));
-        checkContainsFiles("[DirAndFile2] Dir", dirs, results);
-        checkContainsFiles("[DirAndFile2] File", ioFiles, results);
-    }
-
-    /**
-     * Test separate dir and file filters
-     */
-    public void testFilterDirAndFile3() {
-        final List<File> results = new TestFileFinder(dirsFilter, null, -1).find(javaDir);
-        final List resultDirs = directoriesOnly(results);
-        assertEquals("[DirAndFile3] Result Size", 1 + dirs.length, resultDirs.size());
-        assertTrue("[DirAndFile3] Start Dir", results.contains(javaDir));
-        checkContainsFiles("[DirAndFile3] Dir", dirs, resultDirs);
-    }
-
-    /**
-     * Test separate dir and file filters
-     */
-    public void testFilterDirAndFile4() {
-        final List<File> results = new TestFileFinder(null, iofilesFilter, -1).find(javaDir);
-        final List resultFiles = filesOnly(results);
-        assertEquals("[DirAndFile4] Result Size", ioFiles.length, resultFiles.size());
-        assertTrue("[DirAndFile4] Start Dir", results.contains(javaDir));
-        checkContainsFiles("[DirAndFile4] File", ioFiles, resultFiles);
-    }
-
-    /**
-     * Test Limiting to current directory
-     */
-    public void testLimitToCurrent() {
-        final List<File> results = new TestFileFinder(null, 0).find(current);
-        assertEquals("Result Size", 1, results.size());
-        assertTrue("Current Dir", results.contains(new File(".")));
-    }
-
-    /**
-     * test an invalid start directory
-     */
-    public void testMissingStartDirectory() {
-
-        // TODO is this what we want with invalid directory?
-        final File invalidDir = new File("invalid-dir");
-        final List<File> results = new TestFileFinder(null, -1).find(invalidDir);
-        assertEquals("Result Size", 1, results.size());
-        assertTrue("Current Dir", results.contains(invalidDir));
-
-        try {
-            new TestFileFinder(null, -1).find(null);
-            fail("Null start directory didn't throw Exception");
-        } catch (final NullPointerException ignore) {
-            // expected result
-        }
-    }
-
-    /**
-     * test an invalid start directory
-     */
-    public void testHandleStartDirectoryFalse() {
-
-        final List<File> results = new TestFalseFileFinder(null, -1).find(current);
-        assertEquals("Result Size", 0, results.size());
-
-    }
-
-    // ------------ Convenience Test Methods ------------------------------------
-
-    /**
-     * Check the files in the array are in the results list.
-     */
-    private void checkContainsFiles(final String prefix, final File[] files, final Collection results) {
-        for (int i = 0; i < files.length; i++) {
-            assertTrue(prefix + "[" + i + "] " + files[i], results.contains(files[i]));
-        }
-    }
-
-    /**
-     * Extract the directories.
-     */
-    private List directoriesOnly(final Collection<File> results) {
-        final List list = new ArrayList(results.size());
-        for (File file : results) {
-            if (file.isDirectory()) {
-                list.add(file);
-            }
-        }
-        return list;
-    }
-
-    /**
-     * Extract the files.
-     */
-    private List filesOnly(final Collection<File> results) {
-        final List list = new ArrayList(results.size());
-        for (File file : results) {
-            if (file.isFile()) {
-                list.add(file);
-            }
-        }
-        return list;
-    }
-
-    /**
-     * Create an name filter containg the names of the files
-     * in the array.
-     */
-    private static IOFileFilter createNameFilter(final File[] files) {
-        final String[] names = new String[files.length];
-        for (int i = 0; i < files.length; i++) {
-            names[i] = files[i].getName();
-        }
-        return new NameFileFilter(names);
-    }
-
-    /**
-     * Test Cancel
-     */
-    public void testCancel() {
-        String cancelName = null;
-
-        // Cancel on a file
-        try {
-            cancelName = "DirectoryWalker.java";
-            new TestCancelWalker(cancelName, false).find(javaDir);
-            fail("CancelException not thrown for '" + cancelName + "'");
-        } catch (final DirectoryWalker.CancelException cancel) {
-            assertEquals("File:  " + cancelName, cancelName, cancel.getFile().getName());
-            assertEquals("Depth: " + cancelName, 5, cancel.getDepth());
-        } catch (final IOException ex) {
-            fail("IOException: " + cancelName + " " + ex);
-        }
-
-        // Cancel on a directory
-        try {
-            cancelName = "commons";
-            new TestCancelWalker(cancelName, false).find(javaDir);
-            fail("CancelException not thrown for '" + cancelName + "'");
-        } catch (final DirectoryWalker.CancelException cancel) {
-            assertEquals("File:  " + cancelName, cancelName, cancel.getFile().getName());
-            assertEquals("Depth: " + cancelName, 3, cancel.getDepth());
-        } catch (final IOException ex) {
-            fail("IOException: " + cancelName + " " + ex);
-        }
-
-        // Suppress CancelException (use same file name as preceding test)
-        try {
-            final List results = new TestCancelWalker(cancelName, true).find(javaDir);
-            final File lastFile = (File) results.get(results.size() - 1);
-            assertEquals("Suppress:  " + cancelName, cancelName, lastFile.getName());
-        } catch (final IOException ex) {
-            fail("Suppress threw " + ex);
-        }
-
-    }
-
-    /**
-     * Test Cancel
-     */
-    public void testMultiThreadCancel() {
-        String cancelName = "DirectoryWalker.java";
-        TestMultiThreadCancelWalker walker = new TestMultiThreadCancelWalker(cancelName, false);
-        // Cancel on a file
-        try {
-            walker.find(javaDir);
-            fail("CancelException not thrown for '" + cancelName + "'");
-        } catch (final DirectoryWalker.CancelException cancel) {
-            final File last = (File) walker.results.get(walker.results.size() - 1);
-            assertEquals(cancelName, last.getName());
-            assertEquals("Depth: " + cancelName, 5, cancel.getDepth());
-        } catch (final IOException ex) {
-            fail("IOException: " + cancelName + " " + ex);
-        }
-
-        // Cancel on a directory
-        try {
-            cancelName = "commons";
-            walker = new TestMultiThreadCancelWalker(cancelName, false);
-            walker.find(javaDir);
-            fail("CancelException not thrown for '" + cancelName + "'");
-        } catch (final DirectoryWalker.CancelException cancel) {
-            assertEquals("File:  " + cancelName, cancelName, cancel.getFile().getName());
-            assertEquals("Depth: " + cancelName, 3, cancel.getDepth());
-        } catch (final IOException ex) {
-            fail("IOException: " + cancelName + " " + ex);
-        }
-
-        // Suppress CancelException (use same file name as preceding test)
-        try {
-            walker = new TestMultiThreadCancelWalker(cancelName, true);
-            final List results = walker.find(javaDir);
-            final File lastFile = (File) results.get(results.size() - 1);
-            assertEquals("Suppress:  " + cancelName, cancelName, lastFile.getName());
-        } catch (final IOException ex) {
-            fail("Suppress threw " + ex);
-        }
-
-    }
-
-    // ------------ Test DirectoryWalker implementation --------------------------
-
-    /**
-     * Test DirectoryWalker implementation that finds files in a directory hierarchy
-     * applying a file filter.
-     */
-    private static class TestFileFinder extends DirectoryWalker {
-
-        protected TestFileFinder(final FileFilter filter, final int depthLimit) {
-            super(filter, depthLimit);
-        }
-
-        protected TestFileFinder(final IOFileFilter dirFilter, final IOFileFilter fileFilter, final int depthLimit) {
-            super(dirFilter, fileFilter, depthLimit);
-        }
-
-        /**
-         * find files.
-         */
-        protected List<File> find(final File startDirectory) {
-            final List<File> results = new ArrayList<File>();
-            try {
-                walk(startDirectory, results);
-            } catch (final IOException ex) {
-                Assert.fail(ex.toString());
-            }
-            return results;
-        }
-
-        /**
-         * Handles a directory end by adding the File to the result set.
-         */
-        @Override
-        protected void handleDirectoryEnd(final File directory, final int depth, final Collection results) {
-            results.add(directory);
-        }
-
-        /**
-         * Handles a file by adding the File to the result set.
-         */
-        @Override
-        protected void handleFile(final File file, final int depth, final Collection results) {
-            results.add(file);
-        }
-    }
-
-    // ------------ Test DirectoryWalker implementation --------------------------
-
-    /**
-     * Test DirectoryWalker implementation that always returns false
-     * from handleDirectoryStart()
-     */
-    private static class TestFalseFileFinder extends TestFileFinder {
-
-        protected TestFalseFileFinder(final FileFilter filter, final int depthLimit) {
-            super(filter, depthLimit);
-        }
-
-        /**
-         * Always returns false.
-         */
-        @Override
-        protected boolean handleDirectory(final File directory, final int depth, final Collection results) {
-            return false;
-        }
-    }
-
-    // ------------ Test DirectoryWalker implementation --------------------------
-
-    /**
-     * Test DirectoryWalker implementation that finds files in a directory hierarchy
-     * applying a file filter.
-     */
-    static class TestCancelWalker extends DirectoryWalker {
-        private final String cancelFileName;
-        private final boolean suppressCancel;
-
-        TestCancelWalker(final String cancelFileName, final boolean suppressCancel) {
-            super();
-            this.cancelFileName = cancelFileName;
-            this.suppressCancel = suppressCancel;
-        }
-
-        /**
-         * find files.
-         */
-        protected List find(final File startDirectory) throws IOException {
-            final List results = new ArrayList();
-            walk(startDirectory, results);
-            return results;
-        }
-
-        /**
-         * Handles a directory end by adding the File to the result set.
-         */
-        @Override
-        protected void handleDirectoryEnd(final File directory, final int depth, final Collection results) throws IOException {
-            results.add(directory);
-            if (cancelFileName.equals(directory.getName())) {
-                throw new CancelException(directory, depth);
-            }
-        }
-
-        /**
-         * Handles a file by adding the File to the result set.
-         */
-        @Override
-        protected void handleFile(final File file, final int depth, final Collection results) throws IOException {
-            results.add(file);
-            if (cancelFileName.equals(file.getName())) {
-                throw new CancelException(file, depth);
-            }
-        }
-
-        /**
-         * Handles Cancel.
-         */
-        @Override
-        protected void handleCancelled(final File startDirectory, final Collection results,
-                                       final CancelException cancel) throws IOException {
-            if (!suppressCancel) {
-                super.handleCancelled(startDirectory, results, cancel);
-            }
-        }
-    }
-
-    /**
-     * Test DirectoryWalker implementation that finds files in a directory hierarchy
-     * applying a file filter.
-     */
-    static class TestMultiThreadCancelWalker extends DirectoryWalker {
-        private final String cancelFileName;
-        private final boolean suppressCancel;
-        private boolean cancelled;
-        public List results;
-
-        TestMultiThreadCancelWalker(final String cancelFileName, final boolean suppressCancel) {
-            super();
-            this.cancelFileName = cancelFileName;
-            this.suppressCancel = suppressCancel;
-        }
-
-        /**
-         * find files.
-         */
-        protected List find(final File startDirectory) throws IOException {
-            results = new ArrayList();
-            walk(startDirectory, results);
-            return results;
-        }
-
-        /**
-         * Handles a directory end by adding the File to the result set.
-         */
-        @Override
-        protected void handleDirectoryEnd(final File directory, final int depth, final Collection results) throws IOException {
-            results.add(directory);
-            assertFalse(cancelled);
-            if (cancelFileName.equals(directory.getName())) {
-                cancelled = true;
-            }
-        }
-
-        /**
-         * Handles a file by adding the File to the result set.
-         */
-        @Override
-        protected void handleFile(final File file, final int depth, final Collection results) throws IOException {
-            results.add(file);
-            assertFalse(cancelled);
-            if (cancelFileName.equals(file.getName())) {
-                cancelled = true;
-            }
-        }
-
-        /**
-         * Handles Cancelled.
-         */
-        @Override
-        protected boolean handleIsCancelled(final File file, final int depth, final Collection results) throws IOException {
-            return cancelled;
-        }
-
-        /**
-         * Handles Cancel.
-         */
-        @Override
-        protected void handleCancelled(final File startDirectory, final Collection results,
-                                       final CancelException cancel) throws IOException {
-            if (!suppressCancel) {
-                super.handleCancelled(startDirectory, results, cancel);
-            }
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/EndianUtilsTest.java b/trunk/src/test/java/org/apache/commons/io/EndianUtilsTest.java
deleted file mode 100644
index 06bc423..0000000
--- a/trunk/src/test/java/org/apache/commons/io/EndianUtilsTest.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.EOFException;
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-/**
- * @version $Id$
- */
-public class EndianUtilsTest extends TestCase {
-
-    public EndianUtilsTest(final String name) {
-        super(name);
-    }
-
-    public void testCtor() {
-        new EndianUtils();
-        // Constructor does not blow up.
-    }
-
-    public void testEOFException() throws IOException {
-        final ByteArrayInputStream input = new ByteArrayInputStream(new byte[] {});
-        try {
-            EndianUtils.readSwappedDouble(input);
-            fail("Expected EOFException");
-        } catch (final EOFException e) {
-            // expected
-        }
-    }
-
-    public void testSwapShort() {
-        assertEquals( (short) 0, EndianUtils.swapShort( (short) 0 ) );
-        assertEquals( (short) 0x0201, EndianUtils.swapShort( (short) 0x0102 ) );
-        assertEquals( (short) 0xffff, EndianUtils.swapShort( (short) 0xffff ) );
-        assertEquals( (short) 0x0102, EndianUtils.swapShort( (short) 0x0201 ) );
-    }
-
-    public void testSwapInteger() {
-        assertEquals( 0, EndianUtils.swapInteger( 0 ) );
-        assertEquals( 0x04030201, EndianUtils.swapInteger( 0x01020304 ) );
-        assertEquals( 0x01000000, EndianUtils.swapInteger( 0x00000001 ) );
-        assertEquals( 0x00000001, EndianUtils.swapInteger( 0x01000000 ) );
-        assertEquals( 0x11111111, EndianUtils.swapInteger( 0x11111111 ) );
-        assertEquals( 0xabcdef10, EndianUtils.swapInteger( 0x10efcdab ) );
-        assertEquals( 0xab, EndianUtils.swapInteger( 0xab000000 ) );
-    }
-
-    public void testSwapLong() {
-        assertEquals( 0, EndianUtils.swapLong( 0 ) );
-        assertEquals( 0x0807060504030201L, EndianUtils.swapLong( 0x0102030405060708L ) );
-        assertEquals( 0xffffffffffffffffL, EndianUtils.swapLong( 0xffffffffffffffffL ) );
-        assertEquals( 0xab, EndianUtils.swapLong( 0xab00000000000000L ) );
-    }
-
-    public void testSwapFloat() {
-        assertEquals( 0.0f, EndianUtils.swapFloat( 0.0f ), 0.0 );
-        final float f1 = Float.intBitsToFloat( 0x01020304 );
-        final float f2 = Float.intBitsToFloat( 0x04030201 );
-        assertEquals( f2, EndianUtils.swapFloat( f1 ), 0.0 );
-    }
-
-    public void testSwapDouble() {
-        assertEquals( 0.0, EndianUtils.swapDouble( 0.0 ), 0.0 );
-        final double d1 = Double.longBitsToDouble( 0x0102030405060708L );
-        final double d2 = Double.longBitsToDouble( 0x0807060504030201L );
-        assertEquals( d2, EndianUtils.swapDouble( d1 ), 0.0 );
-    }
-
-    /**
-     * Tests all swapXxxx methods for symmetry when going from one endian
-     * to another and back again.
-     */
-    public void testSymmetry() {
-        assertEquals( (short) 0x0102, EndianUtils.swapShort( EndianUtils.swapShort( (short) 0x0102 ) ) );
-        assertEquals( 0x01020304, EndianUtils.swapInteger( EndianUtils.swapInteger( 0x01020304 ) ) );
-        assertEquals( 0x0102030405060708L, EndianUtils.swapLong( EndianUtils.swapLong( 0x0102030405060708L ) ) );
-        final float f1 = Float.intBitsToFloat( 0x01020304 );
-        assertEquals( f1, EndianUtils.swapFloat( EndianUtils.swapFloat( f1 ) ), 0.0 );
-        final double d1 = Double.longBitsToDouble( 0x0102030405060708L );
-        assertEquals( d1, EndianUtils.swapDouble( EndianUtils.swapDouble( d1 ) ), 0.0 );
-    }
-
-    public void testReadSwappedShort() throws IOException {
-        final byte[] bytes = new byte[] { 0x02, 0x01 };
-        assertEquals( 0x0102, EndianUtils.readSwappedShort( bytes, 0 ) );
-
-        final ByteArrayInputStream input = new ByteArrayInputStream(bytes);
-        assertEquals( 0x0102, EndianUtils.readSwappedShort( input ) );
-    }
-
-    public void testWriteSwappedShort() throws IOException {
-        byte[] bytes = new byte[2];
-        EndianUtils.writeSwappedShort( bytes, 0, (short) 0x0102 );
-        assertEquals( 0x02, bytes[0] );
-        assertEquals( 0x01, bytes[1] );
-
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream(2);
-        EndianUtils.writeSwappedShort( baos, (short) 0x0102 );
-        bytes = baos.toByteArray();
-        assertEquals( 0x02, bytes[0] );
-        assertEquals( 0x01, bytes[1] );
-    }
-
-    public void testReadSwappedUnsignedShort() throws IOException {
-        final byte[] bytes = new byte[] { 0x02, 0x01 };
-        assertEquals( 0x00000102, EndianUtils.readSwappedUnsignedShort( bytes, 0 ) );
-
-        final ByteArrayInputStream input = new ByteArrayInputStream(bytes);
-        assertEquals( 0x00000102, EndianUtils.readSwappedUnsignedShort( input ) );
-    }
-
-    public void testReadSwappedInteger() throws IOException {
-        final byte[] bytes = new byte[] { 0x04, 0x03, 0x02, 0x01 };
-        assertEquals( 0x01020304, EndianUtils.readSwappedInteger( bytes, 0 ) );
-
-        final ByteArrayInputStream input = new ByteArrayInputStream(bytes);
-        assertEquals( 0x01020304, EndianUtils.readSwappedInteger( input ) );
-    }
-
-    public void testWriteSwappedInteger() throws IOException {
-        byte[] bytes = new byte[4];
-        EndianUtils.writeSwappedInteger( bytes, 0, 0x01020304 );
-        assertEquals( 0x04, bytes[0] );
-        assertEquals( 0x03, bytes[1] );
-        assertEquals( 0x02, bytes[2] );
-        assertEquals( 0x01, bytes[3] );
-
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream(4);
-        EndianUtils.writeSwappedInteger( baos, 0x01020304 );
-        bytes = baos.toByteArray();
-        assertEquals( 0x04, bytes[0] );
-        assertEquals( 0x03, bytes[1] );
-        assertEquals( 0x02, bytes[2] );
-        assertEquals( 0x01, bytes[3] );
-    }
-
-    public void testReadSwappedUnsignedInteger() throws IOException {
-        final byte[] bytes = new byte[] { 0x04, 0x03, 0x02, 0x01 };
-        assertEquals( 0x0000000001020304L, EndianUtils.readSwappedUnsignedInteger( bytes, 0 ) );
-
-        final ByteArrayInputStream input = new ByteArrayInputStream(bytes);
-        assertEquals( 0x0000000001020304L, EndianUtils.readSwappedUnsignedInteger( input ) );
-    }
-
-    public void testReadSwappedLong() throws IOException {
-        final byte[] bytes = new byte[] { 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01 };
-        assertEquals( 0x0102030405060708L, EndianUtils.readSwappedLong( bytes, 0 ) );
-
-        final ByteArrayInputStream input = new ByteArrayInputStream(bytes);
-        assertEquals( 0x0102030405060708L, EndianUtils.readSwappedLong( input ) );
-    }
-
-    public void testWriteSwappedLong() throws IOException {
-        byte[] bytes = new byte[8];
-        EndianUtils.writeSwappedLong( bytes, 0, 0x0102030405060708L );
-        assertEquals( 0x08, bytes[0] );
-        assertEquals( 0x07, bytes[1] );
-        assertEquals( 0x06, bytes[2] );
-        assertEquals( 0x05, bytes[3] );
-        assertEquals( 0x04, bytes[4] );
-        assertEquals( 0x03, bytes[5] );
-        assertEquals( 0x02, bytes[6] );
-        assertEquals( 0x01, bytes[7] );
-
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream(8);
-        EndianUtils.writeSwappedLong( baos, 0x0102030405060708L );
-        bytes = baos.toByteArray();
-        assertEquals( 0x08, bytes[0] );
-        assertEquals( 0x07, bytes[1] );
-        assertEquals( 0x06, bytes[2] );
-        assertEquals( 0x05, bytes[3] );
-        assertEquals( 0x04, bytes[4] );
-        assertEquals( 0x03, bytes[5] );
-        assertEquals( 0x02, bytes[6] );
-        assertEquals( 0x01, bytes[7] );
-    }
-
-    public void testReadSwappedFloat() throws IOException {
-        final byte[] bytes = new byte[] { 0x04, 0x03, 0x02, 0x01 };
-        final float f1 = Float.intBitsToFloat( 0x01020304 );
-        final float f2 = EndianUtils.readSwappedFloat( bytes, 0 );
-        assertEquals( f1, f2, 0.0 );
-
-        final ByteArrayInputStream input = new ByteArrayInputStream(bytes);
-        assertEquals( f1, EndianUtils.readSwappedFloat( input ), 0.0 );
-    }
-
-    public void testWriteSwappedFloat() throws IOException {
-        byte[] bytes = new byte[4];
-        final float f1 = Float.intBitsToFloat( 0x01020304 );
-        EndianUtils.writeSwappedFloat( bytes, 0, f1 );
-        assertEquals( 0x04, bytes[0] );
-        assertEquals( 0x03, bytes[1] );
-        assertEquals( 0x02, bytes[2] );
-        assertEquals( 0x01, bytes[3] );
-
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream(4);
-        EndianUtils.writeSwappedFloat( baos, f1 );
-        bytes = baos.toByteArray();
-        assertEquals( 0x04, bytes[0] );
-        assertEquals( 0x03, bytes[1] );
-        assertEquals( 0x02, bytes[2] );
-        assertEquals( 0x01, bytes[3] );
-    }
-
-    public void testReadSwappedDouble() throws IOException {
-        final byte[] bytes = new byte[] { 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01 };
-        final double d1 = Double.longBitsToDouble( 0x0102030405060708L );
-        final double d2 = EndianUtils.readSwappedDouble( bytes, 0 );
-        assertEquals( d1, d2, 0.0 );
-
-        final ByteArrayInputStream input = new ByteArrayInputStream(bytes);
-        assertEquals( d1, EndianUtils.readSwappedDouble( input ), 0.0 );
-    }
-
-    public void testWriteSwappedDouble() throws IOException {
-        byte[] bytes = new byte[8];
-        final double d1 = Double.longBitsToDouble( 0x0102030405060708L );
-        EndianUtils.writeSwappedDouble( bytes, 0, d1 );
-        assertEquals( 0x08, bytes[0] );
-        assertEquals( 0x07, bytes[1] );
-        assertEquals( 0x06, bytes[2] );
-        assertEquals( 0x05, bytes[3] );
-        assertEquals( 0x04, bytes[4] );
-        assertEquals( 0x03, bytes[5] );
-        assertEquals( 0x02, bytes[6] );
-        assertEquals( 0x01, bytes[7] );
-
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream(8);
-        EndianUtils.writeSwappedDouble( baos, d1 );
-        bytes = baos.toByteArray();
-        assertEquals( 0x08, bytes[0] );
-        assertEquals( 0x07, bytes[1] );
-        assertEquals( 0x06, bytes[2] );
-        assertEquals( 0x05, bytes[3] );
-        assertEquals( 0x04, bytes[4] );
-        assertEquals( 0x03, bytes[5] );
-        assertEquals( 0x02, bytes[6] );
-        assertEquals( 0x01, bytes[7] );
-    }
-
-    // tests #IO-101
-    public void testSymmetryOfLong() {
-
-        final double[] tests = new double[] {34.345, -345.5645, 545.12, 10.043, 7.123456789123};
-        for (final double test : tests) {
-
-            // testing the real problem
-            byte[] buffer = new byte[8];
-            final long ln1 = Double.doubleToLongBits( test );
-            EndianUtils.writeSwappedLong(buffer, 0, ln1);
-            final long ln2 = EndianUtils.readSwappedLong(buffer, 0);
-            assertEquals( ln1, ln2 );
-
-            // testing the bug report
-            buffer = new byte[8];
-            EndianUtils.writeSwappedDouble(buffer, 0, test);
-            final double val = EndianUtils.readSwappedDouble(buffer, 0);
-            assertEquals( test, val, 0 );
-        }
-    }
-
-    // tests #IO-117
-    public void testUnsignedOverrun() throws Exception {
-        final byte[] target = new byte[] { 0, 0, 0, (byte)0x80 };
-        final long expected = 0x80000000L;
-
-        long actual = EndianUtils.readSwappedUnsignedInteger(target, 0);
-        assertEquals("readSwappedUnsignedInteger(byte[], int) was incorrect", expected, actual);
-
-        final ByteArrayInputStream in = new ByteArrayInputStream(target);
-        actual = EndianUtils.readSwappedUnsignedInteger(in);
-        assertEquals("readSwappedUnsignedInteger(InputStream) was incorrect", expected, actual);
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FileCleanerTestCase.java b/trunk/src/test/java/org/apache/commons/io/FileCleanerTestCase.java
deleted file mode 100644
index 3904fac..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FileCleanerTestCase.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-@SuppressWarnings("deprecation") // testing deprecated class
-/**
- * This is used to test FileCleaner for correctness.
- *
- * @version $Id$
-
- * @see FileCleaner
- */
-public class FileCleanerTestCase extends FileCleaningTrackerTestCase {
-    @Override
-    protected FileCleaningTracker newInstance() {
-        return FileCleaner.getInstance();
-    }
-
-    public FileCleanerTestCase(final String name) {
-        super(name);
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FileCleaningTrackerTestCase.java b/trunk/src/test/java/org/apache/commons/io/FileCleaningTrackerTestCase.java
deleted file mode 100644
index dfeb29a..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FileCleaningTrackerTestCase.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.io.RandomAccessFile;
-import java.lang.ref.ReferenceQueue;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * This is used to test {@link FileCleaningTracker} for correctness.
- *
- * @version $Id$
- * @see FileCleaningTracker
- */
-public class FileCleaningTrackerTestCase extends FileBasedTestCase {
-    protected FileCleaningTracker newInstance() {
-        return new FileCleaningTracker();
-    }
-
-    private File testFile;
-    private FileCleaningTracker theInstance;
-
-    public FileCleaningTrackerTestCase(final String name) {
-        super(name);
-        testFile = new File(getTestDirectory(), "file-test.txt");
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        theInstance = newInstance();
-        getTestDirectory().mkdirs();
-    }
-
-    /** @see junit.framework.TestCase#tearDown() */
-    @Override
-    protected void tearDown() throws Exception {
-        FileUtils.deleteDirectory(getTestDirectory());
-
-        // reset file cleaner class, so as not to break other tests
-
-        /**
-         * The following block of code can possibly be removed when the
-         * deprecated {@link FileCleaner} is gone. The question is, whether
-         * we want to support reuse of {@link FileCleaningTracker} instances,
-         * which we should, IMO, not.
-         */
-        {
-            theInstance.q = new ReferenceQueue<Object>();
-            theInstance.trackers.clear();
-            theInstance.deleteFailures.clear();
-            theInstance.exitWhenFinished = false;
-            theInstance.reaper = null;
-        }
-
-        theInstance = null;
-    }
-
-    //-----------------------------------------------------------------------
-    public void testFileCleanerFile() throws Exception {
-        final String path = testFile.getPath();
-
-        assertFalse(testFile.exists());
-        RandomAccessFile r = new RandomAccessFile(testFile, "rw");
-        assertTrue(testFile.exists());
-
-        assertEquals(0, theInstance.getTrackCount());
-        theInstance.track(path, r);
-        assertEquals(1, theInstance.getTrackCount());
-
-        r.close();
-        testFile = null;
-        r = null;
-
-        waitUntilTrackCount();
-        pauseForDeleteToComplete(new File(path));
-
-        assertEquals(0, theInstance.getTrackCount());
-        assertEquals(showFailures(), false, new File(path).exists());
-    }
-
-    public void testFileCleanerDirectory() throws Exception {
-        createFile(testFile, 100);
-        assertTrue(testFile.exists());
-        assertTrue(getTestDirectory().exists());
-
-        Object obj = new Object();
-        assertEquals(0, theInstance.getTrackCount());
-        theInstance.track(getTestDirectory(), obj);
-        assertEquals(1, theInstance.getTrackCount());
-
-        obj = null;
-
-        waitUntilTrackCount();
-
-        assertEquals(0, theInstance.getTrackCount());
-        assertTrue(testFile.exists());  // not deleted, as dir not empty
-        assertTrue(testFile.getParentFile().exists());  // not deleted, as dir not empty
-    }
-
-    public void testFileCleanerDirectory_NullStrategy() throws Exception {
-        createFile(testFile, 100);
-        assertTrue(testFile.exists());
-        assertTrue(getTestDirectory().exists());
-
-        Object obj = new Object();
-        assertEquals(0, theInstance.getTrackCount());
-        theInstance.track(getTestDirectory(), obj, null);
-        assertEquals(1, theInstance.getTrackCount());
-
-        obj = null;
-
-        waitUntilTrackCount();
-
-        assertEquals(0, theInstance.getTrackCount());
-        assertTrue(testFile.exists());  // not deleted, as dir not empty
-        assertTrue(testFile.getParentFile().exists());  // not deleted, as dir not empty
-    }
-
-    public void testFileCleanerDirectory_ForceStrategy() throws Exception {
-        createFile(testFile, 100);
-        assertTrue(testFile.exists());
-        assertTrue(getTestDirectory().exists());
-
-        Object obj = new Object();
-        assertEquals(0, theInstance.getTrackCount());
-        theInstance.track(getTestDirectory(), obj, FileDeleteStrategy.FORCE);
-        assertEquals(1, theInstance.getTrackCount());
-
-        obj = null;
-
-        waitUntilTrackCount();
-        pauseForDeleteToComplete(testFile.getParentFile());
-
-        assertEquals(0, theInstance.getTrackCount());
-        assertEquals(showFailures(), false, new File(testFile.getPath()).exists());
-        assertEquals(showFailures(), false, testFile.getParentFile().exists());
-    }
-
-    public void testFileCleanerNull() throws Exception {
-        try {
-            theInstance.track((File) null, new Object());
-            fail();
-        } catch (final NullPointerException ex) {
-            // expected
-        }
-        try {
-            theInstance.track((File) null, new Object(), FileDeleteStrategy.NORMAL);
-            fail();
-        } catch (final NullPointerException ex) {
-            // expected
-        }
-        try {
-            theInstance.track((String) null, new Object());
-            fail();
-        } catch (final NullPointerException ex) {
-            // expected
-        }
-        try {
-            theInstance.track((String) null, new Object(), FileDeleteStrategy.NORMAL);
-            fail();
-        } catch (final NullPointerException ex) {
-            // expected
-        }
-    }
-
-    public void testFileCleanerExitWhenFinishedFirst() throws Exception {
-        assertFalse(theInstance.exitWhenFinished);
-        theInstance.exitWhenFinished();
-        assertTrue(theInstance.exitWhenFinished);
-        assertEquals(null, theInstance.reaper);
-
-        waitUntilTrackCount();
-
-        assertEquals(0, theInstance.getTrackCount());
-        assertTrue(theInstance.exitWhenFinished);
-        assertEquals(null, theInstance.reaper);
-    }
-
-    public void testFileCleanerExitWhenFinished_NoTrackAfter() throws Exception {
-        assertFalse(theInstance.exitWhenFinished);
-        theInstance.exitWhenFinished();
-        assertTrue(theInstance.exitWhenFinished);
-        assertEquals(null, theInstance.reaper);
-
-        final String path = testFile.getPath();
-        final Object marker = new Object();
-        try {
-            theInstance.track(path, marker);
-            fail();
-        } catch (final IllegalStateException ex) {
-            // expected
-        }
-        assertTrue(theInstance.exitWhenFinished);
-        assertEquals(null, theInstance.reaper);
-    }
-
-    public void testFileCleanerExitWhenFinished1() throws Exception {
-        final String path = testFile.getPath();
-
-        assertEquals("1-testFile exists", false, testFile.exists());
-        RandomAccessFile r = new RandomAccessFile(testFile, "rw");
-        assertEquals("2-testFile exists", true, testFile.exists());
-
-        assertEquals("3-Track Count", 0, theInstance.getTrackCount());
-        theInstance.track(path, r);
-        assertEquals("4-Track Count", 1, theInstance.getTrackCount());
-        assertEquals("5-exitWhenFinished", false, theInstance.exitWhenFinished);
-        assertEquals("6-reaper.isAlive", true, theInstance.reaper.isAlive());
-
-        assertEquals("7-exitWhenFinished", false, theInstance.exitWhenFinished);
-        theInstance.exitWhenFinished();
-        assertEquals("8-exitWhenFinished", true, theInstance.exitWhenFinished);
-        assertEquals("9-reaper.isAlive", true, theInstance.reaper.isAlive());
-
-        r.close();
-        testFile = null;
-        r = null;
-
-        waitUntilTrackCount();
-        pauseForDeleteToComplete(new File(path));
-
-        assertEquals("10-Track Count", 0, theInstance.getTrackCount());
-        assertEquals("11-testFile exists " + showFailures(), false, new File(path).exists());
-        assertEquals("12-exitWhenFinished", true, theInstance.exitWhenFinished);
-        assertEquals("13-reaper.isAlive", false, theInstance.reaper.isAlive());
-    }
-
-    public void testFileCleanerExitWhenFinished2() throws Exception {
-        final String path = testFile.getPath();
-
-        assertFalse(testFile.exists());
-        RandomAccessFile r = new RandomAccessFile(testFile, "rw");
-        assertTrue(testFile.exists());
-
-        assertEquals(0, theInstance.getTrackCount());
-        theInstance.track(path, r);
-        assertEquals(1, theInstance.getTrackCount());
-        assertFalse(theInstance.exitWhenFinished);
-        assertTrue(theInstance.reaper.isAlive());
-
-        r.close();
-        testFile = null;
-        r = null;
-
-        waitUntilTrackCount();
-        pauseForDeleteToComplete(new File(path));
-
-        assertEquals(0, theInstance.getTrackCount());
-        assertEquals(showFailures(), false, new File(path).exists());
-        assertFalse(theInstance.exitWhenFinished);
-        assertTrue(theInstance.reaper.isAlive());
-
-        assertFalse(theInstance.exitWhenFinished);
-        theInstance.exitWhenFinished();
-        for (int i = 0; i < 20 && theInstance.reaper.isAlive(); i++) {
-            Thread.sleep(500L);  // allow reaper thread to die
-        }
-        assertTrue(theInstance.exitWhenFinished);
-        assertFalse(theInstance.reaper.isAlive());
-    }
-
-    //-----------------------------------------------------------------------
-    private void pauseForDeleteToComplete(File file) {
-        int count = 0;
-        while(file.exists() && count++ < 40) {
-            try {
-                Thread.sleep(500L);
-            } catch (final InterruptedException e) {
-            }
-            file = new File(file.getPath());
-        }
-    }
-    private String showFailures() throws Exception {
-        if (theInstance.deleteFailures.size() == 1) {
-            return "[Delete Failed: " + theInstance.deleteFailures.get(0) + "]";
-        } else {
-            return "[Delete Failures: " + theInstance.deleteFailures.size() + "]";
-        }
-    }
-
-    private void waitUntilTrackCount() throws Exception {
-        System.gc();
-        Thread.sleep(500);
-        int count = 0;
-        while(theInstance.getTrackCount() != 0 && count++ < 5) {
-            List<String> list = new ArrayList<String>();
-            try {
-                long i = 0;
-                while (theInstance.getTrackCount() != 0) {
-                    list.add("A Big String A Big String A Big String A Big String A Big String A Big String A Big String A Big String A Big String A Big String " + (i++));
-                }
-            } catch (final Throwable ignored) {
-            }
-            list = null;
-            System.gc();
-            Thread.sleep(1000);
-        }
-        if (theInstance.getTrackCount() != 0) {
-            throw new IllegalStateException("Your JVM is not releasing References, try running the testcase with less memory (-Xmx)");
-        }
-
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java b/trunk/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java
deleted file mode 100644
index d7f8b43..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * Test for FileDeleteStrategy.
- *
- * @version $Id$
- * @see FileDeleteStrategy
- */
-public class FileDeleteStrategyTestCase extends FileBasedTestCase {
-
-    public FileDeleteStrategyTestCase(final String name) {
-        super(name);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    //-----------------------------------------------------------------------
-    public void testDeleteNormal() throws Exception {
-        final File baseDir = getTestDirectory();
-        final File subDir = new File(baseDir, "test");
-        assertTrue(subDir.mkdir());
-        final File subFile = new File(subDir, "a.txt");
-        createFile(subFile, 16);
-
-        assertTrue(subDir.exists());
-        assertTrue(subFile.exists());
-        // delete dir
-        try {
-            FileDeleteStrategy.NORMAL.delete(subDir);
-            fail();
-        } catch (final IOException ex) {
-            // expected
-        }
-        assertTrue(subDir.exists());
-        assertTrue(subFile.exists());
-        // delete file
-        FileDeleteStrategy.NORMAL.delete(subFile);
-        assertTrue(subDir.exists());
-        assertFalse(subFile.exists());
-        // delete dir
-        FileDeleteStrategy.NORMAL.delete(subDir);
-        assertFalse(subDir.exists());
-        // delete dir
-        FileDeleteStrategy.NORMAL.delete(subDir);  // no error
-        assertFalse(subDir.exists());
-    }
-
-    public void testDeleteQuietlyNormal() throws Exception {
-        final File baseDir = getTestDirectory();
-        final File subDir = new File(baseDir, "test");
-        assertTrue(subDir.mkdir());
-        final File subFile = new File(subDir, "a.txt");
-        createFile(subFile, 16);
-
-        assertTrue(subDir.exists());
-        assertTrue(subFile.exists());
-        // delete dir
-        assertFalse(FileDeleteStrategy.NORMAL.deleteQuietly(subDir));
-        assertTrue(subDir.exists());
-        assertTrue(subFile.exists());
-        // delete file
-        assertTrue(FileDeleteStrategy.NORMAL.deleteQuietly(subFile));
-        assertTrue(subDir.exists());
-        assertFalse(subFile.exists());
-        // delete dir
-        assertTrue(FileDeleteStrategy.NORMAL.deleteQuietly(subDir));
-        assertFalse(subDir.exists());
-        // delete dir
-        assertTrue(FileDeleteStrategy.NORMAL.deleteQuietly(subDir));  // no error
-        assertFalse(subDir.exists());
-    }
-
-    public void testDeleteForce() throws Exception {
-        final File baseDir = getTestDirectory();
-        final File subDir = new File(baseDir, "test");
-        assertTrue(subDir.mkdir());
-        final File subFile = new File(subDir, "a.txt");
-        createFile(subFile, 16);
-
-        assertTrue(subDir.exists());
-        assertTrue(subFile.exists());
-        // delete dir
-        FileDeleteStrategy.FORCE.delete(subDir);
-        assertFalse(subDir.exists());
-        assertFalse(subFile.exists());
-        // delete dir
-        FileDeleteStrategy.FORCE.delete(subDir);  // no error
-        assertFalse(subDir.exists());
-    }
-
-    public void testDeleteNull() throws Exception {
-        try {
-            FileDeleteStrategy.NORMAL.delete(null);
-            fail();
-        } catch (final NullPointerException ex) {
-            // expected
-        }
-        assertTrue(FileDeleteStrategy.NORMAL.deleteQuietly(null));
-    }
-
-    public void testToString() {
-        assertEquals("FileDeleteStrategy[Normal]", FileDeleteStrategy.NORMAL.toString());
-        assertEquals("FileDeleteStrategy[Force]", FileDeleteStrategy.FORCE.toString());
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FileSystemUtilsTestCase.java b/trunk/src/test/java/org/apache/commons/io/FileSystemUtilsTestCase.java
deleted file mode 100644
index 33028cd..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FileSystemUtilsTestCase.java
+++ /dev/null
@@ -1,574 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.util.Locale;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-import org.junit.Assert;
-
-/**
- * This is used to test FileSystemUtils.
- *
- * @version $Id$
- */
-public class FileSystemUtilsTestCase extends FileBasedTestCase {
-
-    public FileSystemUtilsTestCase(final String name) {
-        super(name);
-    }
-
-    //-----------------------------------------------------------------------
-    public void testGetFreeSpace_String() throws Exception {
-        // test coverage, as we can't check value
-        if (File.separatorChar == '/') {
-            // have to figure out unix block size
-            String[] cmd = null;
-            String osName = System.getProperty("os.name");
-            osName = osName.toLowerCase(Locale.ENGLISH);
-
-            if (osName.contains("hp-ux") || osName.contains("aix")) {
-                cmd = new String[]{"df", "-P", "/"};
-            } else if (osName.contains("sunos") || osName.contains("sun os")
-                    || osName.contains("solaris")) {
-                cmd = new String[]{"/usr/xpg4/bin/df", "-P", "/"};
-            } else {
-                cmd = new String[]{"df", "/"};
-            }
-            final Process proc = Runtime.getRuntime().exec(cmd);
-            boolean kilobyteBlock = true;
-            BufferedReader r = null;
-            try {
-                r = new BufferedReader(new InputStreamReader(proc.getInputStream()));
-                final String line = r.readLine();
-                Assert.assertNotNull("Unexpected null line", line);
-                if (line.contains("512")) {
-                    kilobyteBlock = false;
-                }
-            } finally {
-                IOUtils.closeQuietly(r);
-            }
-
-            // now perform the test
-            @SuppressWarnings("deprecation")
-            final
-            long free = FileSystemUtils.freeSpace("/");
-            final long kb = FileSystemUtils.freeSpaceKb("/");
-            if (kilobyteBlock) {
-                assertEquals(free, kb, 256d);
-            } else {
-                assertEquals(free / 2d, kb, 256d);
-            }
-        } else {
-            @SuppressWarnings("deprecation")
-            final
-            long bytes = FileSystemUtils.freeSpace("");
-            final long kb = FileSystemUtils.freeSpaceKb("");
-            assertEquals((double) bytes / 1024, kb, 256d);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    public void testGetFreeSpaceOS_String_NullPath() throws Exception {
-        final FileSystemUtils fsu = new FileSystemUtils();
-        try {
-            fsu.freeSpaceOS(null, 1, false, -1);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-        try {
-            fsu.freeSpaceOS(null, 1, true, -1);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-    }
-
-    public void testGetFreeSpaceOS_String_InitError() throws Exception {
-        final FileSystemUtils fsu = new FileSystemUtils();
-        try {
-            fsu.freeSpaceOS("", -1, false, -1);
-            fail();
-        } catch (final IllegalStateException ex) {
-        }
-        try {
-            fsu.freeSpaceOS("", -1, true, -1);
-            fail();
-        } catch (final IllegalStateException ex) {
-        }
-    }
-
-    public void testGetFreeSpaceOS_String_Other() throws Exception {
-        final FileSystemUtils fsu = new FileSystemUtils();
-        try {
-            fsu.freeSpaceOS("", 0, false, -1);
-            fail();
-        } catch (final IllegalStateException ex) {
-        }
-        try {
-            fsu.freeSpaceOS("", 0, true, -1);
-            fail();
-        } catch (final IllegalStateException ex) {
-        }
-    }
-
-    public void testGetFreeSpaceOS_String_Windows() throws Exception {
-        final FileSystemUtils fsu = new FileSystemUtils() {
-            @Override
-            protected long freeSpaceWindows(final String path, final long timeout) throws IOException {
-                return 12345L;
-            }
-        };
-        assertEquals(12345L, fsu.freeSpaceOS("", 1, false, -1));
-        assertEquals(12345L / 1024, fsu.freeSpaceOS("", 1, true, -1));
-    }
-
-    public void testGetFreeSpaceOS_String_Unix() throws Exception {
-        final FileSystemUtils fsu = new FileSystemUtils() {
-            @Override
-            protected long freeSpaceUnix(final String path, final boolean kb, final boolean posix, final long timeout) throws IOException {
-                return kb ? 12345L : 54321;
-            }
-        };
-        assertEquals(54321L, fsu.freeSpaceOS("", 2, false, -1));
-        assertEquals(12345L, fsu.freeSpaceOS("", 2, true, -1));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testGetFreeSpaceWindows_String_ParseCommaFormatBytes() throws Exception {
-        // this is the format of response when calling dir /c
-        // we have now switched to dir /-c, so we should never get this
-        final String lines =
-                " Volume in drive C is HDD\n" +
-                        " Volume Serial Number is XXXX-YYYY\n" +
-                        "\n" +
-                        " Directory of C:\\Documents and Settings\\Xxxx\n" +
-                        "\n" +
-                        "19/08/2005  22:43    <DIR>          .\n" +
-                        "19/08/2005  22:43    <DIR>          ..\n" +
-                        "11/08/2005  01:07                81 build.properties\n" +
-                        "17/08/2005  21:44    <DIR>          Desktop\n" +
-                        "               7 File(s)        180,260 bytes\n" +
-                        "              10 Dir(s)  41,411,551,232 bytes free";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        assertEquals(41411551232L, fsu.freeSpaceWindows("", -1));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testGetFreeSpaceWindows_String_EmptyPath() throws Exception {
-        final String lines =
-                " Volume in drive C is HDD\n" +
-                        " Volume Serial Number is XXXX-YYYY\n" +
-                        "\n" +
-                        " Directory of C:\\Documents and Settings\\Xxxx\n" +
-                        "\n" +
-                        "19/08/2005  22:43    <DIR>          .\n" +
-                        "19/08/2005  22:43    <DIR>          ..\n" +
-                        "11/08/2005  01:07                81 build.properties\n" +
-                        "17/08/2005  21:44    <DIR>          Desktop\n" +
-                        "               7 File(s)         180260 bytes\n" +
-                        "              10 Dir(s)     41411551232 bytes free";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines, "dir /a /-c ");
-        assertEquals(41411551232L, fsu.freeSpaceWindows("", -1));
-    }
-
-    public void testGetFreeSpaceWindows_String_NormalResponse() throws Exception {
-        final String lines =
-                " Volume in drive C is HDD\n" +
-                        " Volume Serial Number is XXXX-YYYY\n" +
-                        "\n" +
-                        " Directory of C:\\Documents and Settings\\Xxxx\n" +
-                        "\n" +
-                        "19/08/2005  22:43    <DIR>          .\n" +
-                        "19/08/2005  22:43    <DIR>          ..\n" +
-                        "11/08/2005  01:07                81 build.properties\n" +
-                        "17/08/2005  21:44    <DIR>          Desktop\n" +
-                        "               7 File(s)         180260 bytes\n" +
-                        "              10 Dir(s)     41411551232 bytes free";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines, "dir /a /-c \"C:\"");
-        assertEquals(41411551232L, fsu.freeSpaceWindows("C:", -1));
-    }
-
-    public void testGetFreeSpaceWindows_String_StripDrive() throws Exception {
-        final String lines =
-                " Volume in drive C is HDD\n" +
-                        " Volume Serial Number is XXXX-YYYY\n" +
-                        "\n" +
-                        " Directory of C:\\Documents and Settings\\Xxxx\n" +
-                        "\n" +
-                        "19/08/2005  22:43    <DIR>          .\n" +
-                        "19/08/2005  22:43    <DIR>          ..\n" +
-                        "11/08/2005  01:07                81 build.properties\n" +
-                        "17/08/2005  21:44    <DIR>          Desktop\n" +
-                        "               7 File(s)         180260 bytes\n" +
-                        "              10 Dir(s)     41411551232 bytes free";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines, "dir /a /-c \"C:\\somedir\"");
-        assertEquals(41411551232L, fsu.freeSpaceWindows("C:\\somedir", -1));
-    }
-
-    public void testGetFreeSpaceWindows_String_quoted() throws Exception {
-        final String lines =
-                " Volume in drive C is HDD\n" +
-                        " Volume Serial Number is XXXX-YYYY\n" +
-                        "\n" +
-                        " Directory of C:\\Documents and Settings\\Xxxx\n" +
-                        "\n" +
-                        "19/08/2005  22:43    <DIR>          .\n" +
-                        "19/08/2005  22:43    <DIR>          ..\n" +
-                        "11/08/2005  01:07                81 build.properties\n" +
-                        "17/08/2005  21:44    <DIR>          Desktop\n" +
-                        "               7 File(s)         180260 bytes\n" +
-                        "              10 Dir(s)     41411551232 bytes free";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines, "dir /a /-c \"C:\\somedir\"");
-        assertEquals(41411551232L, fsu.freeSpaceWindows("\"C:\\somedir\"", -1));
-    }
-
-    public void testGetFreeSpaceWindows_String_EmptyResponse() throws Exception {
-        final String lines = "";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        try {
-            fsu.freeSpaceWindows("C:", -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-    }
-
-    public void testGetFreeSpaceWindows_String_EmptyMultiLineResponse() throws Exception {
-        final String lines = "\n\n";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        try {
-            fsu.freeSpaceWindows("C:", -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-    }
-
-    public void testGetFreeSpaceWindows_String_InvalidTextResponse() throws Exception {
-        final String lines = "BlueScreenOfDeath";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        try {
-            fsu.freeSpaceWindows("C:", -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-    }
-
-    public void testGetFreeSpaceWindows_String_NoSuchDirectoryResponse() throws Exception {
-        final String lines =
-                " Volume in drive C is HDD\n" +
-                        " Volume Serial Number is XXXX-YYYY\n" +
-                        "\n" +
-                        " Directory of C:\\Documents and Settings\\empty" +
-                        "\n";
-        final FileSystemUtils fsu = new MockFileSystemUtils(1, lines);
-        try {
-            fsu.freeSpaceWindows("C:", -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    public void testGetFreeSpaceUnix_String_EmptyPath() throws Exception {
-        final String lines =
-                "Filesystem           1K-blocks      Used Available Use% Mounted on\n" +
-                        "xxx:/home/users/s     14428928  12956424   1472504  90% /home/users/s";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        try {
-            fsu.freeSpaceUnix("", false, false, -1);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("", true, false, -1);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("", true, true, -1);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("", false, true, -1);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-    }
-
-    public void testGetFreeSpaceUnix_String_NormalResponseLinux() throws Exception {
-        // from Sourceforge 'GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)'
-        final String lines =
-                "Filesystem           1K-blocks      Used Available Use% Mounted on\n" +
-                        "/dev/xxx                497944    308528    189416  62% /";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        assertEquals(189416L, fsu.freeSpaceUnix("/", false, false, -1));
-    }
-
-    public void testGetFreeSpaceUnix_String_NormalResponseFreeBSD() throws Exception {
-        // from Apache 'FreeBSD 6.1-RELEASE (SMP-turbo)'
-        final String lines =
-                "Filesystem  1K-blocks      Used    Avail Capacity  Mounted on\n" +
-                        "/dev/xxxxxx    128990    102902    15770    87%    /";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        assertEquals(15770L, fsu.freeSpaceUnix("/", false, false, -1));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testGetFreeSpaceUnix_String_NormalResponseKbLinux() throws Exception {
-        // from Sourceforge 'GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)'
-        // df, df -k and df -kP are all identical
-        final String lines =
-                "Filesystem           1K-blocks      Used Available Use% Mounted on\n" +
-                        "/dev/xxx                497944    308528    189416  62% /";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        assertEquals(189416L, fsu.freeSpaceUnix("/", true, false, -1));
-    }
-
-    public void testGetFreeSpaceUnix_String_NormalResponseKbFreeBSD() throws Exception {
-        // from Apache 'FreeBSD 6.1-RELEASE (SMP-turbo)'
-        // df and df -k are identical, but df -kP uses 512 blocks (not relevant as not used)
-        final String lines =
-                "Filesystem  1K-blocks      Used    Avail Capacity  Mounted on\n" +
-                        "/dev/xxxxxx    128990    102902    15770    87%    /";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        assertEquals(15770L, fsu.freeSpaceUnix("/", true, false, -1));
-    }
-
-    public void testGetFreeSpaceUnix_String_NormalResponseKbSolaris() throws Exception {
-        // from IO-91 - ' SunOS et 5.10 Generic_118822-25 sun4u sparc SUNW,Ultra-4'
-        // non-kb response does not contain free space - see IO-91
-        final String lines =
-                "Filesystem            kbytes    used   avail capacity  Mounted on\n" +
-                        "/dev/dsk/x0x0x0x0    1350955  815754  481163    63%";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        assertEquals(481163L, fsu.freeSpaceUnix("/dev/dsk/x0x0x0x0", true, false, -1));
-    }
-
-    public void testGetFreeSpaceUnix_String_LongResponse() throws Exception {
-        final String lines =
-                "Filesystem           1K-blocks      Used Available Use% Mounted on\n" +
-                        "xxx-yyyyyyy-zzz:/home/users/s\n" +
-                        "                      14428928  12956424   1472504  90% /home/users/s";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        assertEquals(1472504L, fsu.freeSpaceUnix("/home/users/s", false, false, -1));
-    }
-
-    public void testGetFreeSpaceUnix_String_LongResponseKb() throws Exception {
-        final String lines =
-                "Filesystem           1K-blocks      Used Available Use% Mounted on\n" +
-                        "xxx-yyyyyyy-zzz:/home/users/s\n" +
-                        "                      14428928  12956424   1472504  90% /home/users/s";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        assertEquals(1472504L, fsu.freeSpaceUnix("/home/users/s", true, false, -1));
-    }
-
-    public void testGetFreeSpaceUnix_String_EmptyResponse() throws Exception {
-        final String lines = "";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        try {
-            fsu.freeSpaceUnix("/home/users/s", false, false, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", true, false, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", false, true, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", true, true, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-    }
-
-    public void testGetFreeSpaceUnix_String_InvalidResponse1() throws Exception {
-        final String lines =
-                "Filesystem           1K-blocks      Used Available Use% Mounted on\n" +
-                        "                      14428928  12956424       100";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        try {
-            fsu.freeSpaceUnix("/home/users/s", false, false, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", true, false, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", false, true, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", true, true, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-    }
-
-    public void testGetFreeSpaceUnix_String_InvalidResponse2() throws Exception {
-        final String lines =
-                "Filesystem           1K-blocks      Used Available Use% Mounted on\n" +
-                        "xxx:/home/users/s     14428928  12956424   nnnnnnn  90% /home/users/s";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        try {
-            fsu.freeSpaceUnix("/home/users/s", false, false, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", true, false, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", false, true, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", true, true, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-    }
-
-    public void testGetFreeSpaceUnix_String_InvalidResponse3() throws Exception {
-        final String lines =
-                "Filesystem           1K-blocks      Used Available Use% Mounted on\n" +
-                        "xxx:/home/users/s     14428928  12956424        -1  90% /home/users/s";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        try {
-            fsu.freeSpaceUnix("/home/users/s", false, false, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", true, false, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", false, true, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", true, true, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-    }
-
-    public void testGetFreeSpaceUnix_String_InvalidResponse4() throws Exception {
-        final String lines =
-                "Filesystem           1K-blocks      Used Available Use% Mounted on\n" +
-                        "xxx-yyyyyyy-zzz:/home/users/s";
-        final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
-        try {
-            fsu.freeSpaceUnix("/home/users/s", false, false, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", true, false, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", false, true, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            fsu.freeSpaceUnix("/home/users/s", true, true, -1);
-            fail();
-        } catch (final IOException ex) {
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    static class MockFileSystemUtils extends FileSystemUtils {
-        private final int exitCode;
-        private final byte[] bytes;
-        private final String cmd;
-
-        public MockFileSystemUtils(final int exitCode, final String lines) {
-            this(exitCode, lines, null);
-        }
-
-        public MockFileSystemUtils(final int exitCode, final String lines, final String cmd) {
-            this.exitCode = exitCode;
-            this.bytes = lines.getBytes();
-            this.cmd = cmd;
-        }
-
-        @Override
-        Process openProcess(final String[] params) {
-            if (cmd != null) {
-                assertEquals(cmd, params[params.length - 1]);
-            }
-            return new Process() {
-                @Override
-                public InputStream getErrorStream() {
-                    return null;
-                }
-
-                @Override
-                public InputStream getInputStream() {
-                    return new ByteArrayInputStream(bytes);
-                }
-
-                @Override
-                public OutputStream getOutputStream() {
-                    return null;
-                }
-
-                @Override
-                public int waitFor() throws InterruptedException {
-                    return exitCode;
-                }
-
-                @Override
-                public int exitValue() {
-                    return exitCode;
-                }
-
-                @Override
-                public void destroy() {
-                }
-            };
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java b/trunk/src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
deleted file mode 100644
index be499a7..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * Test cases for FileUtils.cleanDirectory() method.
- *
- * @version $Id$
- */
-public class FileUtilsCleanDirectoryTestCase extends FileBasedTestCase {
-    final File top = getLocalTestDirectory();
-
-    public FileUtilsCleanDirectoryTestCase(final String name) {
-        super(name);
-    }
-
-    private File getLocalTestDirectory() {
-        return new File(getTestDirectory(), "list-files");
-    }
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    @Override
-    protected void setUp() throws Exception {
-        top.mkdirs();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    @Override
-    protected void tearDown() throws Exception {
-        chmod(top, 775, true);
-        FileUtils.deleteDirectory(top);
-    }
-
-    //-----------------------------------------------------------------------
-    public void testCleanEmpty() throws Exception {
-        assertEquals(0, top.list().length);
-
-        FileUtils.cleanDirectory(top);
-
-        assertEquals(0, top.list().length);
-    }
-
-    public void testDeletesRegular() throws Exception {
-        FileUtils.touch(new File(top, "regular"));
-        FileUtils.touch(new File(top, ".hidden"));
-
-        assertEquals(2, top.list().length);
-
-        FileUtils.cleanDirectory(top);
-
-        assertEquals(0, top.list().length);
-    }
-
-    public void testDeletesNested() throws Exception {
-        final File nested = new File(top, "nested");
-
-        assertTrue(nested.mkdirs());
-
-        FileUtils.touch(new File(nested, "file"));
-
-        assertEquals(1, top.list().length);
-
-        FileUtils.cleanDirectory(top);
-
-        assertEquals(0, top.list().length);
-    }
-
-    public void testThrowsOnNullList() throws Exception {
-        if (System.getProperty("os.name").startsWith("Win")  ||  !chmod(top, 0, false)) {
-            // test wont work if we can't restrict permissions on the
-            // directory, so skip it.
-            return;
-        }
-
-        try {
-            FileUtils.cleanDirectory(top);
-            fail("expected IOException");
-        } catch (final IOException e) {
-            assertEquals("Failed to list contents of " +
-                    top.getAbsolutePath(), e.getMessage());
-        }
-    }
-
-    public void testThrowsOnCannotDeleteFile() throws Exception {
-        final File file = new File(top, "restricted");
-        FileUtils.touch(file);
-
-        if (System.getProperty("os.name").startsWith("Win")  ||  !chmod(top, 500, false)) {
-            // test wont work if we can't restrict permissions on the
-            // directory, so skip it.
-            return;
-        }
-
-        try {
-            FileUtils.cleanDirectory(top);
-            fail("expected IOException");
-        } catch (final IOException e) {
-            assertEquals("Unable to delete file: " +
-                    file.getAbsolutePath(), e.getMessage());
-        }
-    }
-
-    private boolean chmod(final File file, final int mode, final boolean recurse)
-            throws InterruptedException {
-        // TODO: Refactor this to FileSystemUtils
-        final List<String> args = new ArrayList<String>();
-        args.add("chmod");
-
-        if (recurse) {
-            args.add("-R");
-        }
-
-        args.add(Integer.toString(mode));
-        args.add(file.getAbsolutePath());
-
-        Process proc;
-
-        try {
-            proc = Runtime.getRuntime().exec(
-                    args.toArray(new String[args.size()]));
-        } catch (final IOException e) {
-            return false;
-        }
-        final int result = proc.waitFor();
-        return result == 0;
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FileUtilsCleanSymlinksTestCase.java b/trunk/src/test/java/org/apache/commons/io/FileUtilsCleanSymlinksTestCase.java
deleted file mode 100644
index f50d083..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FileUtilsCleanSymlinksTestCase.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * Test cases for FileUtils.cleanDirectory() method that involve symlinks.
- * &amp; FileUtils.isSymlink(File file)
- */
-public class FileUtilsCleanSymlinksTestCase extends FileBasedTestCase {
-
-    final File top = getTestDirectory();
-
-    public FileUtilsCleanSymlinksTestCase(final String name) {
-        super(name);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        top.mkdirs();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        FileUtils.deleteDirectory(top);
-    }
-
-    public void testCleanDirWithSymlinkFile() throws Exception {
-        if (System.getProperty("os.name").startsWith("Win")) {
-            // cant create symlinks in windows.
-            return;
-        }
-
-        final File realOuter = new File(top, "realouter");
-        assertTrue(realOuter.mkdirs());
-
-        final File realInner = new File(realOuter, "realinner");
-        assertTrue(realInner.mkdirs());
-
-        final File realFile = new File(realInner, "file1");
-        FileUtils.touch(realFile);
-        assertEquals(1, realInner.list().length);
-
-        final File randomFile = new File(top, "randomfile");
-        FileUtils.touch(randomFile);
-
-        final File symlinkFile = new File(realInner, "fakeinner");
-        setupSymlink(randomFile, symlinkFile);
-
-        assertEquals(2, realInner.list().length);
-
-        // assert contents of the real directory were removed including the symlink
-        FileUtils.cleanDirectory(realOuter);
-        assertEquals(0, realOuter.list().length);
-
-        // ensure that the contents of the symlink were NOT removed.
-        assertTrue(randomFile.exists());
-        assertFalse(symlinkFile.exists());
-    }
-
-
-    public void testCleanDirWithASymlinkDir() throws Exception {
-        if (System.getProperty("os.name").startsWith("Win")) {
-            // cant create symlinks in windows.
-            return;
-        }
-
-        final File realOuter = new File(top, "realouter");
-        assertTrue(realOuter.mkdirs());
-
-        final File realInner = new File(realOuter, "realinner");
-        assertTrue(realInner.mkdirs());
-
-        FileUtils.touch(new File(realInner, "file1"));
-        assertEquals(1, realInner.list().length);
-
-        final File randomDirectory = new File(top, "randomDir");
-        assertTrue(randomDirectory.mkdirs());
-
-        FileUtils.touch(new File(randomDirectory, "randomfile"));
-        assertEquals(1, randomDirectory.list().length);
-
-        final File symlinkDirectory = new File(realOuter, "fakeinner");
-        setupSymlink(randomDirectory, symlinkDirectory);
-
-        assertEquals(1, symlinkDirectory.list().length);
-
-        // assert contents of the real directory were removed including the symlink
-        FileUtils.cleanDirectory(realOuter);
-        assertEquals(0, realOuter.list().length);
-
-        // ensure that the contents of the symlink were NOT removed.
-        assertEquals("Contents of sym link should not have been removed", 1, randomDirectory.list().length);
-    }
-
-    public void testCleanDirWithParentSymlinks() throws Exception {
-        if (System.getProperty("os.name").startsWith("Win")) {
-            // cant create symlinks in windows.
-            return;
-        }
-
-        final File realParent = new File(top, "realparent");
-        assertTrue(realParent.mkdirs());
-
-        final File realInner = new File(realParent, "realinner");
-        assertTrue(realInner.mkdirs());
-
-        FileUtils.touch(new File(realInner, "file1"));
-        assertEquals(1, realInner.list().length);
-
-        final File randomDirectory = new File(top, "randomDir");
-        assertTrue(randomDirectory.mkdirs());
-
-        FileUtils.touch(new File(randomDirectory, "randomfile"));
-        assertEquals(1, randomDirectory.list().length);
-
-        final File symlinkDirectory = new File(realParent, "fakeinner");
-        setupSymlink(randomDirectory, symlinkDirectory);
-
-        assertEquals(1, symlinkDirectory.list().length);
-
-        final File symlinkParentDirectory = new File(top, "fakeouter");
-        setupSymlink(realParent, symlinkParentDirectory);
-
-        // assert contents of the real directory were removed including the symlink
-        FileUtils.cleanDirectory(symlinkParentDirectory);// should clean the contents of this but not recurse into other links
-        assertEquals(0, symlinkParentDirectory.list().length);
-        assertEquals(0, realParent.list().length);
-
-        // ensure that the contents of the symlink were NOT removed.
-        assertEquals("Contents of sym link should not have been removed", 1, randomDirectory.list().length);
-    }
-
-    public void testStillClearsIfGivenDirectoryIsASymlink() throws Exception {
-        if (System.getProperty("os.name").startsWith("Win")) {
-            // cant create symlinks in windows.
-            return;
-        }
-
-        final File randomDirectory = new File(top, "randomDir");
-        assertTrue(randomDirectory.mkdirs());
-
-        FileUtils.touch(new File(randomDirectory, "randomfile"));
-        assertEquals(1, randomDirectory.list().length);
-
-        final File symlinkDirectory = new File(top, "fakeDir");
-        setupSymlink(randomDirectory, symlinkDirectory);
-
-        FileUtils.cleanDirectory(symlinkDirectory);
-        assertEquals(0, symlinkDirectory.list().length);
-        assertEquals(0, randomDirectory.list().length);
-    }
-
-
-    public void testIdentifiesSymlinkDir() throws Exception {
-        if (System.getProperty("os.name").startsWith("Win")) {
-            // cant create symlinks in windows.
-            return;
-        }
-
-        final File randomDirectory = new File(top, "randomDir");
-        assertTrue(randomDirectory.mkdirs());
-
-        final File symlinkDirectory = new File(top, "fakeDir");
-        setupSymlink(randomDirectory, symlinkDirectory);
-
-        assertTrue(FileUtils.isSymlink(symlinkDirectory));
-        assertFalse(FileUtils.isSymlink(randomDirectory));
-    }
-
-    public void testIdentifiesSymlinkFile() throws Exception {
-        if (System.getProperty("os.name").startsWith("Win")) {
-            // cant create symlinks in windows.
-            return;
-        }
-
-        final File randomFile = new File(top, "randomfile");
-        FileUtils.touch(randomFile);
-
-        final File symlinkFile = new File(top, "fakeinner");
-        setupSymlink(randomFile, symlinkFile);
-
-        assertTrue(FileUtils.isSymlink(symlinkFile));
-        assertFalse(FileUtils.isSymlink(randomFile));
-    }
-
-    public void testIdentifiesBrokenSymlinkFile() throws Exception {
-        if (System.getProperty("os.name").startsWith("Win")) {
-            // cant create symlinks in windows.
-            return;
-        }
-
-        final File noexistFile = new File(top, "noexist");
-        final File symlinkFile = new File(top, "fakeinner");
-        final File badSymlinkInPathFile = new File(symlinkFile, "fakeinner");
-        final File noexistParentFile = new File("noexist", "file");
-
-        setupSymlink(noexistFile, symlinkFile);
-
-        assertTrue(FileUtils.isSymlink(symlinkFile));
-        assertFalse(FileUtils.isSymlink(noexistFile));
-        assertFalse(FileUtils.isSymlink(noexistParentFile));
-        assertFalse(FileUtils.isSymlink(badSymlinkInPathFile));
-    }
-
-    public void testCorrectlyIdentifySymlinkWithParentSymLink() throws Exception {
-        if (System.getProperty("os.name").startsWith("Win")) {
-            // cant create symlinks in windows.
-            return;
-        }
-
-        final File realParent = new File(top, "realparent");
-        assertTrue(realParent.mkdirs());
-
-        final File symlinkParentDirectory = new File(top, "fakeparent");
-        setupSymlink(realParent, symlinkParentDirectory);
-
-        final File realChild = new File(symlinkParentDirectory, "realChild");
-        assertTrue(realChild.mkdirs());
-
-        final File symlinkChild = new File(symlinkParentDirectory, "fakeChild");
-        setupSymlink(realChild, symlinkChild);
-
-        assertTrue(FileUtils.isSymlink(symlinkChild));
-        assertFalse(FileUtils.isSymlink(realChild));
-    }
-
-    private void setupSymlink(final File res, final File link) throws Exception {
-        // create symlink
-        final List<String> args = new ArrayList<String>();
-        args.add("ln");
-        args.add("-s");
-
-        args.add(res.getAbsolutePath());
-        args.add(link.getAbsolutePath());
-
-        Process proc;
-
-        proc = Runtime.getRuntime().exec(args.toArray(new String[args.size()]));
-        proc.waitFor();
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FileUtilsDirectoryContainsTestCase.java b/trunk/src/test/java/org/apache/commons/io/FileUtilsDirectoryContainsTestCase.java
deleted file mode 100644
index dabeee2..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FileUtilsDirectoryContainsTestCase.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-import org.junit.Test;
-
-/**
- * This class ensure the correctness of {@link FileUtils#directoryContains(File,File)}.
- * 
- * @see FileUtils#directoryContains(File, File)
- * @since 2.2
- * @version $Id$
- */
-public class FileUtilsDirectoryContainsTestCase extends FileBasedTestCase {
-
-    private File directory1;
-    private File directory2;
-    private File directory3;
-    private File file1; 
-    private File file1ByRelativeDirectory2; 
-    private File file2; 
-    private File file2ByRelativeDirectory1; 
-    private File file3;
-    final File top = getTestDirectory();
-
-    public FileUtilsDirectoryContainsTestCase(final String name) {
-        super(name);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        top.mkdirs();
-
-        directory1 = new File(top, "directory1");
-        directory2 = new File(top, "directory2");
-        directory3 = new File(directory2, "directory3");
-
-        directory1.mkdir();
-        directory2.mkdir();
-        directory3.mkdir();
-
-        file1 = new File(directory1, "file1");
-        file2 = new File(directory2, "file2");
-        file3 = new File(top, "file3");
-
-        // Tests case with relative path
-        file1ByRelativeDirectory2 = new File(getTestDirectory(), "directory2/../directory1/file1");
-        file2ByRelativeDirectory1 = new File(getTestDirectory(), "directory1/../directory2/file2");
-
-        FileUtils.touch(file1);
-        FileUtils.touch(file2);
-        FileUtils.touch(file3);
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        FileUtils.deleteDirectory(top);
-    }
-
-    @Test
-    public void testCanonicalPath() throws IOException {
-        assertTrue(FileUtils.directoryContains(directory1, file1ByRelativeDirectory2));
-        assertTrue(FileUtils.directoryContains(directory2, file2ByRelativeDirectory1));
-
-        assertFalse(FileUtils.directoryContains(directory1, file2ByRelativeDirectory1));
-        assertFalse(FileUtils.directoryContains(directory2, file1ByRelativeDirectory2));
-    }
-
-    @Test
-    public void testDirectoryContainsDirectory() throws IOException {
-        assertTrue(FileUtils.directoryContains(top, directory1));
-        assertTrue(FileUtils.directoryContains(top, directory2));
-        assertTrue(FileUtils.directoryContains(top, directory3));
-        assertTrue(FileUtils.directoryContains(directory2, directory3));
-    }
-
-    @Test
-    public void testDirectoryContainsFile() throws IOException {
-        assertTrue(FileUtils.directoryContains(directory1, file1));
-        assertTrue(FileUtils.directoryContains(directory2, file2));
-    }
-
-    @Test
-    public void testDirectoryDoesNotContainFile() throws IOException {
-        assertFalse(FileUtils.directoryContains(directory1, file2));
-        assertFalse(FileUtils.directoryContains(directory2, file1));
-
-        assertFalse(FileUtils.directoryContains(directory1, file3));
-        assertFalse(FileUtils.directoryContains(directory2, file3));
-    }
-
-    @Test
-    public void testDirectoryDoesNotContainsDirectory() throws IOException {
-        assertFalse(FileUtils.directoryContains(directory1, top));
-        assertFalse(FileUtils.directoryContains(directory2, top));
-        assertFalse(FileUtils.directoryContains(directory3, top));
-        assertFalse(FileUtils.directoryContains(directory3, directory2));
-    }
-
-    @Test
-    public void testDirectoryDoesNotExist() throws IOException {
-        final File dir = new File("DOESNOTEXIST");
-        assertFalse(dir.exists());
-        try {
-            assertFalse(FileUtils.directoryContains(dir, file1));
-            fail("Expected " + IllegalArgumentException.class.getName());
-        } catch (final IllegalArgumentException e) {
-            // expected
-        }
-    }
-
-    @Test
-    public void testSameFile() throws IOException {
-        try {
-            assertTrue(FileUtils.directoryContains(file1, file1));
-            fail("Expected " + IllegalArgumentException.class.getName());
-        } catch (final IllegalArgumentException e) {
-            // expected
-        }
-    }
-
-    @Test
-    public void testIO466() throws IOException {
-            File fooFile = new File(directory1.getParent(), "directory1.txt");
-            assertFalse(FileUtils.directoryContains(directory1, fooFile));
-    }
-
-    @Test
-    public void testFileDoesNotExist() throws IOException {
-        assertFalse(FileUtils.directoryContains(top, null));
-        final File file = new File("DOESNOTEXIST");
-        assertFalse(file.exists());
-        assertFalse(FileUtils.directoryContains(top, file));
-    }
-
-    /**
-     * Test to demonstrate a file which does not exist returns false
-     * @throws IOException If an I/O error occurs
-     */
-    @Test
-    public void testFileDoesNotExistBug() throws IOException {
-        final File file = new File(top, "DOESNOTEXIST");
-        assertTrue("Check directory exists", top.exists());
-        assertFalse("Check file does not exist", file.exists());
-        assertFalse("Direcory does not contain unrealized file", FileUtils.directoryContains(top, file));
-    }
-
-    @Test
-    public void testUnrealizedContainment() throws IOException {
-        final File dir = new File("DOESNOTEXIST");
-        final File file = new File(dir, "DOESNOTEXIST2");
-        assertFalse(dir.exists());
-        assertFalse(file.exists());
-        try {
-            assertTrue(FileUtils.directoryContains(dir, file));
-        } catch (final IllegalArgumentException e) {
-            // expected
-        }
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FileUtilsFileNewerTestCase.java b/trunk/src/test/java/org/apache/commons/io/FileUtilsFileNewerTestCase.java
deleted file mode 100644
index 4d11ce7..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FileUtilsFileNewerTestCase.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.util.Date;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * This is used to test FileUtils for correctness.
- */
-public class FileUtilsFileNewerTestCase extends FileBasedTestCase {
-
-    // Test data
-    private static final int FILE1_SIZE = 1;
-    private static final int FILE2_SIZE = 1024 * 4 + 1;
-
-    private final File m_testFile1;
-    private final File m_testFile2;
-
-    public FileUtilsFileNewerTestCase(final String name) {
-        super(name);
-
-        m_testFile1 = new File(getTestDirectory(), "file1-test.txt");
-        m_testFile2 = new File(getTestDirectory(), "file2-test.txt");
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        getTestDirectory().mkdirs();
-        createFile(m_testFile1, FILE1_SIZE);
-        createFile(m_testFile2, FILE2_SIZE);
-    }
-
-    /** @see junit.framework.TestCase#tearDown() */
-    @Override
-    protected void tearDown() throws Exception {
-        m_testFile1.delete();
-        m_testFile2.delete();
-    }
-
-    /**
-     * Tests the <code>isFileNewer(File, *)</code> methods which a "normal" file.
-     *
-     * @see FileUtils#isFileNewer(File, long)
-     * @see FileUtils#isFileNewer(File, Date)
-     * @see FileUtils#isFileNewer(File, File)
-     */
-    public void testIsFileNewer() {
-        if (!m_testFile1.exists()) {
-            throw new IllegalStateException("The m_testFile1 should exist");
-        }
-
-        final long fileLastModified = m_testFile1.lastModified();
-        final long TWO_SECOND = 2000;
-
-        testIsFileNewer("two second earlier is not newer" , m_testFile1, fileLastModified + TWO_SECOND, false);
-        testIsFileNewer("same time is not newer" , m_testFile1, fileLastModified, false);
-        testIsFileNewer("two second later is newer" , m_testFile1, fileLastModified - TWO_SECOND, true);
-    }
-
-    /**
-     * Tests the <code>isFileNewer(File, *)</code> methods which a not existing file.
-     *
-     * @see FileUtils#isFileNewer(File, long)
-     * @see FileUtils#isFileNewer(File, Date)
-     * @see FileUtils#isFileNewer(File, File)
-     */
-    public void testIsFileNewerImaginaryFile() {
-        final File imaginaryFile = new File(getTestDirectory(), "imaginaryFile");
-        if (imaginaryFile.exists()) {
-            throw new IllegalStateException("The imaginary File exists");
-        }
-
-        testIsFileNewer("imaginary file can be newer" , imaginaryFile, m_testFile2.lastModified(), false);
-    }
-
-    /**
-     * Tests the <code>isFileNewer(File, *)</code> methods which the specified conditions.
-     * 
-     * Creates :
-     * <ul>
-     * <li>a <code>Date</code> which represents the time reference</li>
-     * <li>a temporary file with the same last modification date than the time reference</li>
-     * </ul>
-     * Then compares (with the needed <code>isFileNewer</code> method) the last modification date of
-     * the specified file with the specified time reference, the created <code>Date</code> and the temporary
-     * file.
-     * <br>
-     * The test is successfull if the three comparaisons return the specified wanted result.
-     *
-     * @param description describes the tested situation
-     * @param file the file of which the last modification date is compared
-     * @param time the time reference measured in milliseconds since the epoch
-     * @param wantedResult the expected result
-     *
-     * @see FileUtils#isFileNewer(File, long)
-     * @see FileUtils#isFileNewer(File, Date)
-     * @see FileUtils#isFileNewer(File, File)
-     */
-    protected void testIsFileNewer(final String description, final File file, final long time, final boolean wantedResult)  {
-        assertEquals(description + " - time", wantedResult, FileUtils.isFileNewer(file, time));
-        assertEquals(description + " - date", wantedResult, FileUtils.isFileNewer(file, new Date(time)));
-
-        final File temporaryFile = m_testFile2;
-
-        temporaryFile.setLastModified(time);
-        assertEquals("The temporary file hasn't the right last modification date", time, temporaryFile.lastModified());
-        assertEquals(description + " - file", wantedResult, FileUtils.isFileNewer(file, temporaryFile));
-    }
-
-    /**
-     * Tests the <code>isFileNewer(File, long)</code> method without specifying a <code>File</code>.
-     * <br>
-     * The test is successfull if the method throws an <code>IllegalArgumentException</code>.
-     */
-    public void testIsFileNewerNoFile() {
-        try {
-            FileUtils.isFileNewer(null,0);
-            fail("File not specified");
-        } catch (final IllegalArgumentException e) {}
-    }
-
-    /**
-     * Tests the <code>isFileNewer(File, Date)</code> method without specifying a <code>Date</code>.
-     * <br>
-     * The test is successfull if the method throws an <code>IllegalArgumentException</code>.
-     */
-    public void testIsFileNewerNoDate() {
-        try {
-            FileUtils.isFileNewer(m_testFile1, (Date) null);
-            fail("Date not specified");
-        } catch (final IllegalArgumentException e) {}
-    }
-
-    /**
-     * Tests the <code>isFileNewer(File, File)</code> method without specifying a reference <code>File</code>.
-     * <br>
-     * The test is successfull if the method throws an <code>IllegalArgumentException</code>.
-     */
-    public void testIsFileNewerNoFileReference() {
-        try {
-            FileUtils.isFileNewer(m_testFile1, (File) null);
-            fail("Reference file not specified");
-        } catch (final IllegalArgumentException e) {}
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FileUtilsListFilesTestCase.java b/trunk/src/test/java/org/apache/commons/io/FileUtilsListFilesTestCase.java
deleted file mode 100644
index 775fc71..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FileUtilsListFilesTestCase.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.apache.commons.io.filefilter.FileFilterUtils;
-import org.apache.commons.io.filefilter.IOFileFilter;
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * Test cases for FileUtils.listFiles() methods.
- */
-public class FileUtilsListFilesTestCase extends FileBasedTestCase {
-
-    public FileUtilsListFilesTestCase(final String name) {
-        super(name);
-    }
-
-    private File getLocalTestDirectory() {
-        return new File(getTestDirectory(), "list-files");
-    }
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    @Override
-    protected void setUp() throws Exception {
-        File dir = getLocalTestDirectory();
-        if (dir.exists()) {
-            FileUtils.deleteDirectory(dir);
-        }
-        dir.mkdirs();
-        File file = new File(dir, "dummy-build.xml");
-        FileUtils.touch(file);
-        file = new File(dir, "README");
-        FileUtils.touch(file);
-
-        dir = new File(dir, "subdir1");
-        dir.mkdirs();
-        file = new File(dir, "dummy-build.xml");
-        FileUtils.touch(file);
-        file = new File(dir, "dummy-readme.txt");
-        FileUtils.touch(file);
-
-        dir = new File(dir, "subsubdir1");
-        dir.mkdirs();
-        file = new File(dir, "dummy-file.txt");
-        FileUtils.touch(file);
-        file = new File(dir, "dummy-index.html");
-        FileUtils.touch(file);
-
-        dir = dir.getParentFile();
-        dir = new File(dir, "CVS");
-        dir.mkdirs();
-        file = new File(dir, "Entries");
-        FileUtils.touch(file);
-        file = new File(dir, "Repository");
-        FileUtils.touch(file);
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    @Override
-    protected void tearDown() throws Exception {
-        final File dir = getLocalTestDirectory();
-        FileUtils.deleteDirectory(dir);
-    }
-
-    private Collection<String> filesToFilenames(final Collection<File> files) {
-        final Collection<String> filenames = new ArrayList<String>(files.size());
-        for (final File file : files) {
-            filenames.add(file.getName());
-        }
-        return filenames;
-    }
-
-    private Collection<String> filesToFilenames(final Iterator<File> files) {
-        final Collection<String> filenames = new ArrayList<String>();
-        while (files.hasNext()) {
-            filenames.add(files.next().getName());
-        }
-        return filenames;
-    }
-
-    public void testIterateFilesByExtension() throws Exception {
-        final String[] extensions = { "xml", "txt" };
-
-        Iterator<File> files = FileUtils.iterateFiles(getLocalTestDirectory(), extensions, false);
-        Collection<String> filenames = filesToFilenames(files);
-        assertEquals(1, filenames.size());
-        assertTrue(filenames.contains("dummy-build.xml"));
-        assertFalse(filenames.contains("README"));
-        assertFalse(filenames.contains("dummy-file.txt"));
-
-        files = FileUtils.iterateFiles(getLocalTestDirectory(), extensions, true);
-        filenames = filesToFilenames(files);
-        assertEquals(4, filenames.size());
-        assertTrue(filenames.contains("dummy-file.txt"));
-        assertFalse(filenames.contains("dummy-index.html"));
-
-        files = FileUtils.iterateFiles(getLocalTestDirectory(), null, false);
-        filenames = filesToFilenames(files);
-        assertEquals(2, filenames.size());
-        assertTrue(filenames.contains("dummy-build.xml"));
-        assertTrue(filenames.contains("README"));
-        assertFalse(filenames.contains("dummy-file.txt"));
-    }
-
-    public void testListFilesByExtension() throws Exception {
-        final String[] extensions = {"xml", "txt"};
-
-        Collection<File> files = FileUtils.listFiles(getLocalTestDirectory(), extensions, false);
-        assertEquals(1, files.size());
-        Collection<String> filenames = filesToFilenames(files);
-        assertTrue(filenames.contains("dummy-build.xml"));
-        assertFalse(filenames.contains("README"));
-        assertFalse(filenames.contains("dummy-file.txt"));
-
-        files = FileUtils.listFiles(getLocalTestDirectory(), extensions, true);
-        filenames = filesToFilenames(files);
-        assertEquals(4, filenames.size());
-        assertTrue(filenames.contains("dummy-file.txt"));
-        assertFalse(filenames.contains("dummy-index.html"));
-
-        files = FileUtils.listFiles(getLocalTestDirectory(), null, false);
-        assertEquals(2, files.size());
-        filenames = filesToFilenames(files);
-        assertTrue(filenames.contains("dummy-build.xml"));
-        assertTrue(filenames.contains("README"));
-        assertFalse(filenames.contains("dummy-file.txt"));
-    }
-
-    public void testListFiles() throws Exception {
-        Collection<File> files;
-        Collection<String> filenames;
-        IOFileFilter fileFilter;
-        IOFileFilter dirFilter;
-
-        //First, find non-recursively
-        fileFilter = FileFilterUtils.trueFileFilter();
-        files = FileUtils.listFiles(getLocalTestDirectory(), fileFilter, null);
-        filenames = filesToFilenames(files);
-        assertTrue("'dummy-build.xml' is missing", filenames.contains("dummy-build.xml"));
-        assertFalse("'dummy-index.html' shouldn't be found", filenames.contains("dummy-index.html"));
-        assertFalse("'Entries' shouldn't be found", filenames.contains("Entries"));
-
-        //Second, find recursively
-        fileFilter = FileFilterUtils.trueFileFilter();
-        dirFilter = FileFilterUtils.notFileFilter(FileFilterUtils.nameFileFilter("CVS"));
-        files = FileUtils.listFiles(getLocalTestDirectory(), fileFilter, dirFilter);
-        filenames = filesToFilenames(files);
-        assertTrue("'dummy-build.xml' is missing", filenames.contains("dummy-build.xml"));
-        assertTrue("'dummy-index.html' is missing", filenames.contains("dummy-index.html"));
-        assertFalse("'Entries' shouldn't be found", filenames.contains("Entries"));
-
-        //Do the same as above but now with the filter coming from FileFilterUtils
-        fileFilter = FileFilterUtils.trueFileFilter();
-        dirFilter = FileFilterUtils.makeCVSAware(null);
-        files = FileUtils.listFiles(getLocalTestDirectory(), fileFilter, dirFilter);
-        filenames = filesToFilenames(files);
-        assertTrue("'dummy-build.xml' is missing", filenames.contains("dummy-build.xml"));
-        assertTrue("'dummy-index.html' is missing", filenames.contains("dummy-index.html"));
-        assertFalse("'Entries' shouldn't be found", filenames.contains("Entries"));
-
-        //Again with the CVS filter but now with a non-null parameter
-        fileFilter = FileFilterUtils.trueFileFilter();
-        dirFilter = FileFilterUtils.prefixFileFilter("sub");
-        dirFilter = FileFilterUtils.makeCVSAware(dirFilter);
-        files = FileUtils.listFiles(getLocalTestDirectory(), fileFilter, dirFilter);
-        filenames = filesToFilenames(files);
-        assertTrue("'dummy-build.xml' is missing", filenames.contains("dummy-build.xml"));
-        assertTrue("'dummy-index.html' is missing", filenames.contains("dummy-index.html"));
-        assertFalse("'Entries' shouldn't be found", filenames.contains("Entries"));
-
-        try {
-            FileUtils.listFiles(getLocalTestDirectory(), null, null);
-            fail("Expected error about null parameter");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-    }
-
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java b/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
deleted file mode 100644
index d3fe7b5..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
+++ /dev/null
@@ -1,2631 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.math.BigInteger;
-import java.net.URL;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.CRC32;
-import java.util.zip.Checksum;
-
-import org.apache.commons.io.filefilter.NameFileFilter;
-import org.apache.commons.io.filefilter.WildcardFileFilter;
-import org.apache.commons.io.testtools.FileBasedTestCase;
-import org.junit.Assert;
-
-/**
- * This is used to test FileUtils for correctness.
- *
- * @version $Id$
- * @see FileUtils
- */
-@SuppressWarnings("deprecation") // unit tests include tests of many deprecated methods
-public class FileUtilsTestCase extends FileBasedTestCase {
-
-    // Test data
-
-    /**
-     * Size of test directory.
-     */
-    private static final int TEST_DIRECTORY_SIZE = 0;
-
-    /**
-     * Size of test directory.
-     */
-    private static final BigInteger TEST_DIRECTORY_SIZE_BI = BigInteger.ZERO;
-
-    /**
-     * Size (greater of zero) of test file.
-     */
-    private static final BigInteger TEST_DIRECTORY_SIZE_GT_ZERO_BI = BigInteger.valueOf(100);
-
-    /**
-     * List files recursively
-     */
-    private static final ListDirectoryWalker LIST_WALKER = new ListDirectoryWalker();
-
-    /**
-     * Delay in milliseconds to make sure test for "last modified date" are accurate
-     */
-    //private static final int LAST_MODIFIED_DELAY = 600;
-
-    private final File testFile1;
-    private final File testFile2;
-
-    private final int testFile1Size;
-    private final int testFile2Size;
-
-    public FileUtilsTestCase(final String name) {
-        super(name);
-
-        testFile1 = new File(getTestDirectory(), "file1-test.txt");
-        testFile2 = new File(getTestDirectory(), "file1a-test.txt");
-
-        testFile1Size = (int) testFile1.length();
-        testFile2Size = (int) testFile2.length();
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        getTestDirectory().mkdirs();
-        createFile(testFile1, testFile1Size);
-        createFile(testFile2, testFile2Size);
-        FileUtils.deleteDirectory(getTestDirectory());
-        getTestDirectory().mkdirs();
-        createFile(testFile1, testFile1Size);
-        createFile(testFile2, testFile2Size);
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        FileUtils.deleteDirectory(getTestDirectory());
-    }
-
-    //-----------------------------------------------------------------------
-    public void testGetFile() {
-        final File expected_A = new File("src");
-        final File expected_B = new File(expected_A, "main");
-        final File expected_C = new File(expected_B, "java");
-        assertEquals("A", expected_A, FileUtils.getFile("src"));
-        assertEquals("B", expected_B, FileUtils.getFile("src", "main"));
-        assertEquals("C", expected_C, FileUtils.getFile("src", "main", "java"));
-        try {
-            FileUtils.getFile((String[]) null);
-            fail("Expected NullPointerException");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-    }
-
-    public void testGetFile_Parent() {
-        final File parent = new File("parent");
-        final File expected_A = new File(parent, "src");
-        final File expected_B = new File(expected_A, "main");
-        final File expected_C = new File(expected_B, "java");
-        assertEquals("A", expected_A, FileUtils.getFile(parent, "src"));
-        assertEquals("B", expected_B, FileUtils.getFile(parent, "src", "main"));
-        assertEquals("C", expected_C, FileUtils.getFile(parent, "src", "main", "java"));
-        try {
-            FileUtils.getFile(parent, (String[]) null);
-            fail("Expected NullPointerException");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-        try {
-            FileUtils.getFile((File) null, "src");
-            fail("Expected NullPointerException");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-    }
-
-    public void testGetTempDirectoryPath() {
-        assertEquals(System.getProperty("java.io.tmpdir"),
-                FileUtils.getTempDirectoryPath());
-    }
-
-    public void testGetTempDirectory() {
-        final File tempDirectory = new File(System.getProperty("java.io.tmpdir"));
-        assertEquals(tempDirectory, FileUtils.getTempDirectory());
-    }
-
-    public void testGetUserDirectoryPath() {
-        assertEquals(System.getProperty("user.home"),
-                FileUtils.getUserDirectoryPath());
-    }
-
-    public void testGetUserDirectory() {
-        final File userDirectory = new File(System.getProperty("user.home"));
-        assertEquals(userDirectory, FileUtils.getUserDirectory());
-    }
-
-    //-----------------------------------------------------------------------
-    public void test_openInputStream_exists() throws Exception {
-        final File file = new File(getTestDirectory(), "test.txt");
-        createLineBasedFile(file, new String[]{"Hello"});
-        FileInputStream in = null;
-        try {
-            in = FileUtils.openInputStream(file);
-            assertEquals('H', in.read());
-        } finally {
-            IOUtils.closeQuietly(in);
-        }
-    }
-
-    public void test_openInputStream_existsButIsDirectory() throws Exception {
-        final File directory = new File(getTestDirectory(), "subdir");
-        directory.mkdirs();
-        FileInputStream in = null;
-        try {
-            in = FileUtils.openInputStream(directory);
-            fail();
-        } catch (final IOException ioe) {
-            // expected
-        } finally {
-            IOUtils.closeQuietly(in);
-        }
-    }
-
-    public void test_openInputStream_notExists() throws Exception {
-        final File directory = new File(getTestDirectory(), "test.txt");
-        FileInputStream in = null;
-        try {
-            in = FileUtils.openInputStream(directory);
-            fail();
-        } catch (final IOException ioe) {
-            // expected
-        } finally {
-            IOUtils.closeQuietly(in);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    void openOutputStream_noParent(final boolean createFile) throws Exception {
-        final File file = new File("test.txt");
-        assertNull(file.getParentFile());
-        try {
-            if (createFile) {
-                createLineBasedFile(file, new String[]{"Hello"});
-            }
-            FileOutputStream out = null;
-            try {
-                out = FileUtils.openOutputStream(file);
-                out.write(0);
-            } finally {
-                IOUtils.closeQuietly(out);
-            }
-            assertTrue(file.exists());
-        } finally {
-            if (file.delete() == false) {
-                file.deleteOnExit();
-            }
-        }
-    }
-
-    public void test_openOutputStream_noParentCreateFile() throws Exception {
-        openOutputStream_noParent(true);
-    }
-
-    public void test_openOutputStream_noParentNoFile() throws Exception {
-        openOutputStream_noParent(false);
-    }
-
-
-    public void test_openOutputStream_exists() throws Exception {
-        final File file = new File(getTestDirectory(), "test.txt");
-        createLineBasedFile(file, new String[]{"Hello"});
-        FileOutputStream out = null;
-        try {
-            out = FileUtils.openOutputStream(file);
-            out.write(0);
-        } finally {
-            IOUtils.closeQuietly(out);
-        }
-        assertTrue(file.exists());
-    }
-
-    public void test_openOutputStream_existsButIsDirectory() throws Exception {
-        final File directory = new File(getTestDirectory(), "subdir");
-        directory.mkdirs();
-        FileOutputStream out = null;
-        try {
-            out = FileUtils.openOutputStream(directory);
-            fail();
-        } catch (final IOException ioe) {
-            // expected
-        } finally {
-            IOUtils.closeQuietly(out);
-        }
-    }
-
-    public void test_openOutputStream_notExists() throws Exception {
-        final File file = new File(getTestDirectory(), "a/test.txt");
-        FileOutputStream out = null;
-        try {
-            out = FileUtils.openOutputStream(file);
-            out.write(0);
-        } finally {
-            IOUtils.closeQuietly(out);
-        }
-        assertTrue(file.exists());
-    }
-
-    public void test_openOutputStream_notExistsCannotCreate() throws Exception {
-        // according to Wikipedia, most filing systems have a 256 limit on filename
-        final String longStr =
-                "abcdevwxyzabcdevwxyzabcdevwxyzabcdevwxyzabcdevwxyz" +
-                        "abcdevwxyzabcdevwxyzabcdevwxyzabcdevwxyzabcdevwxyz" +
-                        "abcdevwxyzabcdevwxyzabcdevwxyzabcdevwxyzabcdevwxyz" +
-                        "abcdevwxyzabcdevwxyzabcdevwxyzabcdevwxyzabcdevwxyz" +
-                        "abcdevwxyzabcdevwxyzabcdevwxyzabcdevwxyzabcdevwxyz" +
-                        "abcdevwxyzabcdevwxyzabcdevwxyzabcdevwxyzabcdevwxyz";  // 300 chars
-        final File file = new File(getTestDirectory(), "a/" + longStr + "/test.txt");
-        FileOutputStream out = null;
-        try {
-            out = FileUtils.openOutputStream(file);
-            fail();
-        } catch (final IOException ioe) {
-            // expected
-        } finally {
-            IOUtils.closeQuietly(out);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // byteCountToDisplaySize
-    public void testByteCountToDisplaySizeBigInteger() {
-        final BigInteger b1023 = BigInteger.valueOf(1023);
-        final BigInteger b1025 = BigInteger.valueOf(1025);
-        final BigInteger KB1 = BigInteger.valueOf(1024);
-        final BigInteger MB1 = KB1.multiply(KB1);
-        final BigInteger GB1 = MB1.multiply(KB1);
-        final BigInteger GB2 = GB1.add(GB1);
-        final BigInteger TB1 = GB1.multiply(KB1);
-        final BigInteger PB1 = TB1.multiply(KB1);
-        final BigInteger EB1 = PB1.multiply(KB1);
-        assertEquals(FileUtils.byteCountToDisplaySize(BigInteger.ZERO), "0 bytes");
-        assertEquals(FileUtils.byteCountToDisplaySize(BigInteger.ONE), "1 bytes");
-        assertEquals(FileUtils.byteCountToDisplaySize(b1023), "1023 bytes");
-        assertEquals(FileUtils.byteCountToDisplaySize(KB1), "1 KB");
-        assertEquals(FileUtils.byteCountToDisplaySize(b1025), "1 KB");
-        assertEquals(FileUtils.byteCountToDisplaySize(MB1.subtract(BigInteger.ONE)), "1023 KB");
-        assertEquals(FileUtils.byteCountToDisplaySize(MB1), "1 MB");
-        assertEquals(FileUtils.byteCountToDisplaySize(MB1.add(BigInteger.ONE)), "1 MB");
-        assertEquals(FileUtils.byteCountToDisplaySize(GB1.subtract(BigInteger.ONE)), "1023 MB");
-        assertEquals(FileUtils.byteCountToDisplaySize(GB1), "1 GB");
-        assertEquals(FileUtils.byteCountToDisplaySize(GB1.add(BigInteger.ONE)), "1 GB");
-        assertEquals(FileUtils.byteCountToDisplaySize(GB2), "2 GB");
-        assertEquals(FileUtils.byteCountToDisplaySize(GB2.subtract(BigInteger.ONE)), "1 GB");
-        assertEquals(FileUtils.byteCountToDisplaySize(TB1), "1 TB");
-        assertEquals(FileUtils.byteCountToDisplaySize(PB1), "1 PB");
-        assertEquals(FileUtils.byteCountToDisplaySize(EB1), "1 EB");
-        assertEquals(FileUtils.byteCountToDisplaySize(Long.MAX_VALUE), "7 EB");
-        // Other MAX_VALUEs
-        assertEquals(FileUtils.byteCountToDisplaySize(BigInteger.valueOf(Character.MAX_VALUE)), "63 KB");
-        assertEquals(FileUtils.byteCountToDisplaySize(BigInteger.valueOf(Short.MAX_VALUE)), "31 KB");
-        assertEquals(FileUtils.byteCountToDisplaySize(BigInteger.valueOf(Integer.MAX_VALUE)), "1 GB");
-    }
-
-    public void testByteCountToDisplaySizeLong() {
-        assertEquals(FileUtils.byteCountToDisplaySize(0), "0 bytes");
-        assertEquals(FileUtils.byteCountToDisplaySize(1), "1 bytes");
-        assertEquals(FileUtils.byteCountToDisplaySize(1023), "1023 bytes");
-        assertEquals(FileUtils.byteCountToDisplaySize(1024), "1 KB");
-        assertEquals(FileUtils.byteCountToDisplaySize(1025), "1 KB");
-        assertEquals(FileUtils.byteCountToDisplaySize(1024 * 1023), "1023 KB");
-        assertEquals(FileUtils.byteCountToDisplaySize(1024 * 1024), "1 MB");
-        assertEquals(FileUtils.byteCountToDisplaySize(1024 * 1025), "1 MB");
-        assertEquals(FileUtils.byteCountToDisplaySize(1024 * 1024 * 1023), "1023 MB");
-        assertEquals(FileUtils.byteCountToDisplaySize(1024 * 1024 * 1024), "1 GB");
-        assertEquals(FileUtils.byteCountToDisplaySize(1024 * 1024 * 1025), "1 GB");
-        assertEquals(FileUtils.byteCountToDisplaySize(1024L * 1024 * 1024 * 2), "2 GB");
-        assertEquals(FileUtils.byteCountToDisplaySize(1024 * 1024 * 1024 * 2 - 1), "1 GB");
-        assertEquals(FileUtils.byteCountToDisplaySize(1024L * 1024 * 1024 * 1024), "1 TB");
-        assertEquals(FileUtils.byteCountToDisplaySize(1024L * 1024 * 1024 * 1024 * 1024), "1 PB");
-        assertEquals(FileUtils.byteCountToDisplaySize(1024L * 1024 * 1024 * 1024 * 1024 * 1024), "1 EB");
-        assertEquals(FileUtils.byteCountToDisplaySize(Long.MAX_VALUE), "7 EB");
-        // Other MAX_VALUEs
-        assertEquals(FileUtils.byteCountToDisplaySize(Character.MAX_VALUE), "63 KB");
-        assertEquals(FileUtils.byteCountToDisplaySize(Short.MAX_VALUE), "31 KB");
-        assertEquals(FileUtils.byteCountToDisplaySize(Integer.MAX_VALUE), "1 GB");
-    }
-
-    //-----------------------------------------------------------------------
-    public void testToFile1() throws Exception {
-        final URL url = new URL("file", null, "a/b/c/file.txt");
-        final File file = FileUtils.toFile(url);
-        assertTrue(file.toString().contains("file.txt"));
-    }
-
-    public void testToFile2() throws Exception {
-        final URL url = new URL("file", null, "a/b/c/file%20n%61me%2520.tx%74");
-        final File file = FileUtils.toFile(url);
-        assertTrue(file.toString().contains("file name%20.txt"));
-    }
-
-    public void testToFile3() throws Exception {
-        assertEquals(null, FileUtils.toFile(null));
-        assertEquals(null, FileUtils.toFile(new URL("http://jakarta.apache.org")));
-    }
-
-    public void testToFile4() throws Exception {
-        final URL url = new URL("file", null, "a/b/c/file%%20%me.txt%");
-        final File file = FileUtils.toFile(url);
-        assertTrue(file.toString().contains("file% %me.txt%"));
-    }
-
-    /* IO-252 */
-    public void testToFile5() throws Exception {
-        final URL url = new URL("file", null, "both%20are%20100%20%25%20true");
-        final File file = FileUtils.toFile(url);
-        assertEquals("both are 100 % true", file.toString());
-    }
-
-    public void testToFileUtf8() throws Exception {
-        final URL url = new URL("file", null, "/home/%C3%A4%C3%B6%C3%BC%C3%9F");
-        final File file = FileUtils.toFile(url);
-        assertTrue(file.toString().contains("\u00E4\u00F6\u00FC\u00DF"));
-    }
-
-    public void testDecodeUrl() {
-        assertEquals("", FileUtils.decodeUrl(""));
-        assertEquals("foo", FileUtils.decodeUrl("foo"));
-        assertEquals("+", FileUtils.decodeUrl("+"));
-        assertEquals("% ", FileUtils.decodeUrl("%25%20"));
-        assertEquals("%20", FileUtils.decodeUrl("%2520"));
-        assertEquals("jar:file:/C:/dir/sub dir/1.0/foo-1.0.jar!/org/Bar.class", FileUtils
-                .decodeUrl("jar:file:/C:/dir/sub%20dir/1.0/foo-1.0.jar!/org/Bar.class"));
-    }
-
-    public void testDecodeUrlLenient() {
-        assertEquals(" ", FileUtils.decodeUrl(" "));
-        assertEquals("\u00E4\u00F6\u00FC\u00DF", FileUtils.decodeUrl("\u00E4\u00F6\u00FC\u00DF"));
-        assertEquals("%", FileUtils.decodeUrl("%"));
-        assertEquals("% ", FileUtils.decodeUrl("%%20"));
-        assertEquals("%2", FileUtils.decodeUrl("%2"));
-        assertEquals("%2G", FileUtils.decodeUrl("%2G"));
-    }
-
-    public void testDecodeUrlNullSafe() {
-        assertNull(FileUtils.decodeUrl(null));
-    }
-
-    public void testDecodeUrlEncodingUtf8() {
-        assertEquals("\u00E4\u00F6\u00FC\u00DF", FileUtils.decodeUrl("%C3%A4%C3%B6%C3%BC%C3%9F"));
-    }
-
-    // toFiles
-
-    public void testToFiles1() throws Exception {
-        final URL[] urls = new URL[]{
-                new URL("file", null, "file1.txt"),
-                new URL("file", null, "file2.txt"),
-        };
-        final File[] files = FileUtils.toFiles(urls);
-
-        assertEquals(urls.length, files.length);
-        assertEquals("File: " + files[0], true, files[0].toString().contains("file1.txt"));
-        assertEquals("File: " + files[1], true, files[1].toString().contains("file2.txt"));
-    }
-
-    public void testToFiles2() throws Exception {
-        final URL[] urls = new URL[]{
-                new URL("file", null, "file1.txt"),
-                null,
-        };
-        final File[] files = FileUtils.toFiles(urls);
-
-        assertEquals(urls.length, files.length);
-        assertEquals("File: " + files[0], true, files[0].toString().contains("file1.txt"));
-        assertEquals("File: " + files[1], null, files[1]);
-    }
-
-    public void testToFiles3() throws Exception {
-        final URL[] urls = null;
-        final File[] files = FileUtils.toFiles(urls);
-
-        assertEquals(0, files.length);
-    }
-
-    public void testToFiles3a() throws Exception {
-        final URL[] urls = new URL[0]; // empty array
-        final File[] files = FileUtils.toFiles(urls);
-
-        assertEquals(0, files.length);
-    }
-
-    public void testToFiles4() throws Exception {
-        final URL[] urls = new URL[]{
-                new URL("file", null, "file1.txt"),
-                new URL("http", "jakarta.apache.org", "file1.txt"),
-        };
-        try {
-            FileUtils.toFiles(urls);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-    }
-
-    // toURLs
-
-    public void testToURLs1() throws Exception {
-        final File[] files = new File[]{
-                new File(getTestDirectory(), "file1.txt"),
-                new File(getTestDirectory(), "file2.txt"),
-                new File(getTestDirectory(), "test file.txt"),
-        };
-        final URL[] urls = FileUtils.toURLs(files);
-
-        assertEquals(files.length, urls.length);
-        assertTrue(urls[0].toExternalForm().startsWith("file:"));
-        assertTrue(urls[0].toExternalForm().contains("file1.txt"));
-        assertTrue(urls[1].toExternalForm().startsWith("file:"));
-        assertTrue(urls[1].toExternalForm().contains("file2.txt"));
-
-        // Test escaped char
-        assertTrue(urls[2].toExternalForm().startsWith("file:"));
-        assertTrue(urls[2].toExternalForm().contains("test%20file.txt"));
-    }
-
-//    public void testToURLs2() throws Exception {
-//        File[] files = new File[] {
-//            new File(getTestDirectory(), "file1.txt"),
-//            null,
-//        };
-//        URL[] urls = FileUtils.toURLs(files);
-//
-//        assertEquals(files.length, urls.length);
-//        assertTrue(urls[0].toExternalForm().startsWith("file:"));
-//        assertTrue(urls[0].toExternalForm().indexOf("file1.txt") > 0);
-//        assertEquals(null, urls[1]);
-//    }
-//
-//    public void testToURLs3() throws Exception {
-//        File[] files = null;
-//        URL[] urls = FileUtils.toURLs(files);
-//
-//        assertEquals(0, urls.length);
-//    }
-
-    public void testToURLs3a() throws Exception {
-        final File[] files = new File[0]; // empty array
-        final URL[] urls = FileUtils.toURLs(files);
-
-        assertEquals(0, urls.length);
-    }
-
-    // contentEquals
-
-    public void testContentEquals() throws Exception {
-        // Non-existent files
-        final File file = new File(getTestDirectory(), getName());
-        final File file2 = new File(getTestDirectory(), getName() + "2");
-        // both don't  exist
-        assertTrue(FileUtils.contentEquals(file, file));
-        assertTrue(FileUtils.contentEquals(file, file2));
-        assertTrue(FileUtils.contentEquals(file2, file2));
-        assertTrue(FileUtils.contentEquals(file2, file));
-
-        // Directories
-        try {
-            FileUtils.contentEquals(getTestDirectory(), getTestDirectory());
-            fail("Comparing directories should fail with an IOException");
-        } catch (final IOException ioe) {
-            //expected
-        }
-
-        // Different files
-        final File objFile1 =
-                new File(getTestDirectory(), getName() + ".object");
-        objFile1.deleteOnExit();
-        FileUtils.copyURLToFile(
-                getClass().getResource("/java/lang/Object.class"),
-                objFile1);
-
-        final File objFile1b =
-                new File(getTestDirectory(), getName() + ".object2");
-        objFile1.deleteOnExit();
-        FileUtils.copyURLToFile(
-                getClass().getResource("/java/lang/Object.class"),
-                objFile1b);
-
-        final File objFile2 =
-                new File(getTestDirectory(), getName() + ".collection");
-        objFile2.deleteOnExit();
-        FileUtils.copyURLToFile(
-                getClass().getResource("/java/util/Collection.class"),
-                objFile2);
-
-        assertFalse(FileUtils.contentEquals(objFile1, objFile2));
-        assertFalse(FileUtils.contentEquals(objFile1b, objFile2));
-        assertTrue(FileUtils.contentEquals(objFile1, objFile1b));
-
-        assertTrue(FileUtils.contentEquals(objFile1, objFile1));
-        assertTrue(FileUtils.contentEquals(objFile1b, objFile1b));
-        assertTrue(FileUtils.contentEquals(objFile2, objFile2));
-
-        // Equal files
-        file.createNewFile();
-        file2.createNewFile();
-        assertTrue(FileUtils.contentEquals(file, file));
-        assertTrue(FileUtils.contentEquals(file, file2));
-    }
-
-    public void testContentEqualsIgnoreEOL() throws Exception {
-        // Non-existent files
-        final File file1 = new File(getTestDirectory(), getName());
-        final File file2 = new File(getTestDirectory(), getName() + "2");
-        // both don't  exist
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(file1, file1, null));
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(file1, file2, null));
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(file2, file2, null));
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(file2, file1, null));
-
-        // Directories
-        try {
-            FileUtils.contentEqualsIgnoreEOL(getTestDirectory(), getTestDirectory(), null);
-            fail("Comparing directories should fail with an IOException");
-        } catch (final IOException ioe) {
-            //expected
-        }
-
-        // Different files
-        final File tfile1 = new File(getTestDirectory(), getName() + ".txt1");
-        tfile1.deleteOnExit();
-        FileUtils.write(tfile1, "123\r");
-
-        final File tfile2 = new File(getTestDirectory(), getName() + ".txt2");
-        tfile1.deleteOnExit();
-        FileUtils.write(tfile2, "123\n");
-
-        final File tfile3 = new File(getTestDirectory(), getName() + ".collection");
-        tfile3.deleteOnExit();
-        FileUtils.write(tfile3, "123\r\n2");
-
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(tfile1, tfile1, null));
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(tfile2, tfile2, null));
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(tfile3, tfile3, null));
-
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(tfile1, tfile2, null));
-        assertFalse(FileUtils.contentEqualsIgnoreEOL(tfile1, tfile3, null));
-        assertFalse(FileUtils.contentEqualsIgnoreEOL(tfile2, tfile3, null));
-
-        final URL urlCR = getClass().getResource("FileUtilsTestDataCR.dat");
-        assertNotNull(urlCR);
-        final File cr = new File(urlCR.getPath());
-        assertTrue(cr.exists());
-
-        final URL urlCRLF = getClass().getResource("FileUtilsTestDataCRLF.dat");
-        assertNotNull(urlCRLF);
-        final File crlf = new File(urlCRLF.getPath());
-        assertTrue(crlf.exists());
-
-        final URL urlLF = getClass().getResource("FileUtilsTestDataLF.dat");
-        assertNotNull(urlLF);
-        final File lf = new File(urlLF.getPath());
-        assertTrue(lf.exists());
-
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(cr, cr, null));
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(crlf, crlf, null));
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(lf, lf, null));
-
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(cr, crlf, null));
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(cr, lf, null));
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(crlf, lf, null));
-
-        // Check the files behave OK when EOL is not ignored
-        assertTrue(FileUtils.contentEquals(cr, cr));
-        assertTrue(FileUtils.contentEquals(crlf, crlf));
-        assertTrue(FileUtils.contentEquals(lf, lf));
-
-        assertFalse(FileUtils.contentEquals(cr, crlf));
-        assertFalse(FileUtils.contentEquals(cr, lf));
-        assertFalse(FileUtils.contentEquals(crlf, lf));
-
-        // Equal files
-        file1.createNewFile();
-        file2.createNewFile();
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(file1, file1, null));
-        assertTrue(FileUtils.contentEqualsIgnoreEOL(file1, file2, null));
-    }
-
-    // copyURLToFile
-
-    public void testCopyURLToFile() throws Exception {
-        // Creates file
-        final File file = new File(getTestDirectory(), getName());
-        file.deleteOnExit();
-
-        // Loads resource
-        final String resourceName = "/java/lang/Object.class";
-        FileUtils.copyURLToFile(getClass().getResource(resourceName), file);
-
-        // Tests that resuorce was copied correctly
-        final FileInputStream fis = new FileInputStream(file);
-        try {
-            assertTrue(
-                    "Content is not equal.",
-                    IOUtils.contentEquals(
-                            getClass().getResourceAsStream(resourceName),
-                            fis));
-        } finally {
-            fis.close();
-        }
-        //TODO Maybe test copy to itself like for copyFile()
-    }
-
-    public void testCopyURLToFileWithTimeout() throws Exception {
-        // Creates file
-        final File file = new File(getTestDirectory(), "testCopyURLToFileWithTimeout");
-        file.deleteOnExit();
-
-        // Loads resource
-        final String resourceName = "/java/lang/Object.class";
-        FileUtils.copyURLToFile(getClass().getResource(resourceName), file, 500, 500);
-
-        // Tests that resuorce was copied correctly
-        final FileInputStream fis = new FileInputStream(file);
-        try {
-            assertTrue(
-                    "Content is not equal.",
-                    IOUtils.contentEquals(
-                            getClass().getResourceAsStream(resourceName),
-                            fis));
-        } finally {
-            fis.close();
-        }
-        //TODO Maybe test copy to itself like for copyFile()
-    }
-
-    // forceMkdir
-
-    public void testForceMkdir() throws Exception {
-        // Tests with existing directory
-        FileUtils.forceMkdir(getTestDirectory());
-
-        // Creates test file
-        final File testFile = new File(getTestDirectory(), getName());
-        testFile.deleteOnExit();
-        testFile.createNewFile();
-        assertTrue("Test file does not exist.", testFile.exists());
-
-        // Tests with existing file
-        try {
-            FileUtils.forceMkdir(testFile);
-            fail("Exception expected.");
-        } catch (final IOException ex) {
-        }
-
-        testFile.delete();
-
-        // Tests with non-existent directory
-        FileUtils.forceMkdir(testFile);
-        assertTrue("Directory was not created.", testFile.exists());
-    }
-
-    public void testForceMkdirParent() throws Exception {
-        // Tests with existing directory
-        assertTrue(getTestDirectory().exists());
-        final File testParentDir = new File(getTestDirectory(), "testForceMkdirParent");
-        try {
-            testParentDir.delete();
-            assertFalse(testParentDir.exists());
-            final File testFile = new File(testParentDir, "test.txt");
-            assertFalse(testParentDir.exists());
-            assertFalse(testFile.exists());
-            // Create
-            FileUtils.forceMkdirParent(testFile);
-            assertTrue(testParentDir.exists());
-            assertFalse(testFile.exists());
-            // Again
-            FileUtils.forceMkdirParent(testFile);
-            assertTrue(testParentDir.exists());
-            assertFalse(testFile.exists());
-        } finally {
-            testParentDir.delete();
-        }
-    }
-
-    // sizeOfDirectory
-
-    public void testSizeOfDirectory() throws Exception {
-        final File file = new File(getTestDirectory(), getName());
-
-        // Non-existent file
-        try {
-            FileUtils.sizeOfDirectory(file);
-            fail("Exception expected.");
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        // Creates file
-        file.createNewFile();
-        file.deleteOnExit();
-
-        // Existing file
-        try {
-            FileUtils.sizeOfDirectory(file);
-            fail("Exception expected.");
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        // Existing directory
-        file.delete();
-        file.mkdir();
-
-        // Create a cyclic symlink
-        this.createCircularSymLink(file);
-
-        assertEquals(
-                "Unexpected directory size",
-                TEST_DIRECTORY_SIZE,
-                FileUtils.sizeOfDirectory(file));
-    }
-
-    private void createCircularSymLink(final File file) throws IOException {
-        if (!FilenameUtils.isSystemWindows()) {
-            Runtime.getRuntime()
-                    .exec("ln -s " + file + "/.. " + file + "/cycle");
-        } else {
-            try {
-                Runtime.getRuntime()
-                        .exec("mklink /D " + file + "/cycle" + file + "/.. ");
-            } catch (final IOException ioe) { // So that tests run in FAT filesystems
-                //don't fail
-            }
-        }
-    }
-
-    public void testSizeOfDirectoryAsBigInteger() throws Exception {
-        final File file = new File(getTestDirectory(), getName());
-
-        // Non-existent file
-        try {
-            FileUtils.sizeOfDirectoryAsBigInteger(file);
-            fail("Exception expected.");
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        // Creates file
-        file.createNewFile();
-        file.deleteOnExit();
-
-        // Existing file
-        try {
-            FileUtils.sizeOfDirectoryAsBigInteger(file);
-            fail("Exception expected.");
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        // Existing directory
-        file.delete();
-        file.mkdir();
-
-        this.createCircularSymLink(file);
-
-        assertEquals("Unexpected directory size", TEST_DIRECTORY_SIZE_BI, FileUtils.sizeOfDirectoryAsBigInteger(file));
-
-        // Existing directory which size is greater than zero
-        file.delete();
-        file.mkdir();
-
-        final File nonEmptyFile = new File(file, "nonEmptyFile" + System.nanoTime());
-        this.createFile(nonEmptyFile, TEST_DIRECTORY_SIZE_GT_ZERO_BI.longValue());
-        nonEmptyFile.deleteOnExit();
-
-        assertEquals("Unexpected directory size", TEST_DIRECTORY_SIZE_GT_ZERO_BI,
-                FileUtils.sizeOfDirectoryAsBigInteger(file));
-
-        nonEmptyFile.delete();
-        file.delete();
-    }
-
-    // Compare sizes of a directory tree using long and BigInteger methods
-    public void testCompareSizeOf() {
-        final File start = new File("src/test/java");
-        final long sizeLong1 = FileUtils.sizeOf(start);
-        final BigInteger sizeBig = FileUtils.sizeOfAsBigInteger(start);
-        final long sizeLong2 = FileUtils.sizeOf(start);
-        assertEquals("Size should not change", sizeLong1, sizeLong2);
-        assertEquals("longSize should equal BigSize", sizeLong1, sizeBig.longValue());
-    }
-
-    public void testSizeOf() throws Exception {
-        final File file = new File(getTestDirectory(), getName());
-
-        // Null argument
-        try {
-            FileUtils.sizeOf(null);
-            fail("Exception expected.");
-        } catch (final NullPointerException ex) {
-        }
-
-        // Non-existent file
-        try {
-            FileUtils.sizeOf(file);
-            fail("Exception expected.");
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        // Creates file
-        file.createNewFile();
-        file.deleteOnExit();
-
-        // New file
-        assertEquals(0, FileUtils.sizeOf(file));
-        file.delete();
-
-        // Existing file
-        assertEquals("Unexpected files size",
-                testFile1Size,
-                FileUtils.sizeOf(testFile1));
-
-        // Existing directory
-        assertEquals("Unexpected directory size",
-                TEST_DIRECTORY_SIZE,
-                FileUtils.sizeOf(getTestDirectory()));
-    }
-
-    public void testSizeOfAsBigInteger() throws Exception {
-        final File file = new File(getTestDirectory(), getName());
-
-        // Null argument
-        try {
-            FileUtils.sizeOfAsBigInteger(null);
-            fail("Exception expected.");
-        } catch (final NullPointerException ex) {
-        }
-
-        // Non-existent file
-        try {
-            FileUtils.sizeOfAsBigInteger(file);
-            fail("Exception expected.");
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        // Creates file
-        file.createNewFile();
-        file.deleteOnExit();
-
-        // New file
-        assertEquals(BigInteger.ZERO, FileUtils.sizeOfAsBigInteger(file));
-        file.delete();
-
-        // Existing file
-        assertEquals("Unexpected files size",
-                BigInteger.valueOf(testFile1Size),
-                FileUtils.sizeOfAsBigInteger(testFile1));
-
-        // Existing directory
-        assertEquals("Unexpected directory size",
-                TEST_DIRECTORY_SIZE_BI,
-                FileUtils.sizeOfAsBigInteger(getTestDirectory()));
-    }
-
-    // isFileNewer / isFileOlder
-    public void testIsFileNewerOlder() throws Exception {
-        final File reference = new File(getTestDirectory(), "FileUtils-reference.txt");
-        final File oldFile = new File(getTestDirectory(), "FileUtils-old.txt");
-        final File newFile = new File(getTestDirectory(), "FileUtils-new.txt");
-        final File invalidFile = new File(getTestDirectory(), "FileUtils-invalid-file.txt");
-
-        // Create Files
-        createFile(oldFile, 0);
-
-        do {
-            try {
-                Thread.sleep(1000);
-            } catch (final InterruptedException ie) {
-                // ignore
-            }
-            createFile(reference, 0);
-        } while (oldFile.lastModified() == reference.lastModified());
-
-        final Date date = new Date();
-        final long now = date.getTime();
-
-        do {
-            try {
-                Thread.sleep(1000);
-            } catch (final InterruptedException ie) {
-                // ignore
-            }
-            createFile(newFile, 0);
-        } while (reference.lastModified() == newFile.lastModified());
-
-        // Test isFileNewer()
-        assertFalse("Old File - Newer - File", FileUtils.isFileNewer(oldFile, reference));
-        assertFalse("Old File - Newer - Date", FileUtils.isFileNewer(oldFile, date));
-        assertFalse("Old File - Newer - Mili", FileUtils.isFileNewer(oldFile, now));
-        assertTrue("New File - Newer - File", FileUtils.isFileNewer(newFile, reference));
-        assertTrue("New File - Newer - Date", FileUtils.isFileNewer(newFile, date));
-        assertTrue("New File - Newer - Mili", FileUtils.isFileNewer(newFile, now));
-        assertFalse("Invalid - Newer - File", FileUtils.isFileNewer(invalidFile, reference));
-        final String invalidFileName = invalidFile.getName();
-        try {
-            FileUtils.isFileNewer(newFile, invalidFile);
-            fail("Should have cause IllegalArgumentException");
-        } catch (final IllegalArgumentException iae) {
-            final String message = iae.getMessage();
-            assertTrue("Message should contain: " + invalidFileName + " but was: " + message, message.contains(invalidFileName));
-        }
-
-        // Test isFileOlder()
-        assertTrue("Old File - Older - File", FileUtils.isFileOlder(oldFile, reference));
-        assertTrue("Old File - Older - Date", FileUtils.isFileOlder(oldFile, date));
-        assertTrue("Old File - Older - Mili", FileUtils.isFileOlder(oldFile, now));
-        assertFalse("New File - Older - File", FileUtils.isFileOlder(newFile, reference));
-        assertFalse("New File - Older - Date", FileUtils.isFileOlder(newFile, date));
-        assertFalse("New File - Older - Mili", FileUtils.isFileOlder(newFile, now));
-        assertFalse("Invalid - Older - File", FileUtils.isFileOlder(invalidFile, reference));
-        try {
-            FileUtils.isFileOlder(newFile, invalidFile);
-            fail("Should have cause IllegalArgumentException");
-        } catch (final IllegalArgumentException iae) {
-            final String message = iae.getMessage();
-            assertTrue("Message should contain: " + invalidFileName + " but was: " + message, message.contains(invalidFileName));
-        }
-
-
-        // ----- Test isFileNewer() exceptions -----
-        // Null File
-        try {
-            FileUtils.isFileNewer(null, now);
-            fail("Newer Null, expected IllegalArgumentExcepion");
-        } catch (final IllegalArgumentException expected) {
-            // expected result
-        }
-
-        // Null reference File
-        try {
-            FileUtils.isFileNewer(oldFile, (File) null);
-            fail("Newer Null reference, expected IllegalArgumentExcepion");
-        } catch (final IllegalArgumentException expected) {
-            // expected result
-        }
-
-        // Invalid reference File
-        try {
-            FileUtils.isFileNewer(oldFile, invalidFile);
-            fail("Newer invalid reference, expected IllegalArgumentExcepion");
-        } catch (final IllegalArgumentException expected) {
-            // expected result
-        }
-
-        // Null reference Date
-        try {
-            FileUtils.isFileNewer(oldFile, (Date) null);
-            fail("Newer Null date, expected IllegalArgumentExcepion");
-        } catch (final IllegalArgumentException expected) {
-            // expected result
-        }
-
-
-        // ----- Test isFileOlder() exceptions -----
-        // Null File
-        try {
-            FileUtils.isFileOlder(null, now);
-            fail("Older Null, expected IllegalArgumentExcepion");
-        } catch (final IllegalArgumentException expected) {
-            // expected result
-        }
-
-        // Null reference File
-        try {
-            FileUtils.isFileOlder(oldFile, (File) null);
-            fail("Older Null reference, expected IllegalArgumentExcepion");
-        } catch (final IllegalArgumentException expected) {
-            // expected result
-        }
-
-        // Invalid reference File
-        try {
-            FileUtils.isFileOlder(oldFile, invalidFile);
-            fail("Older invalid reference, expected IllegalArgumentExcepion");
-        } catch (final IllegalArgumentException expected) {
-            // expected result
-        }
-
-        // Null reference Date
-        try {
-            FileUtils.isFileOlder(oldFile, (Date) null);
-            fail("Older Null date, expected IllegalArgumentExcepion");
-        } catch (final IllegalArgumentException expected) {
-            // expected result
-        }
-
-    }
-
-    // copyFile
-
-    public void testCopyFile1() throws Exception {
-        final File destination = new File(getTestDirectory(), "copy1.txt");
-
-        //Thread.sleep(LAST_MODIFIED_DELAY);
-        //This is to slow things down so we can catch if
-        //the lastModified date is not ok
-
-        FileUtils.copyFile(testFile1, destination);
-        assertTrue("Check Exist", destination.exists());
-        assertEquals("Check Full copy", testFile1Size, destination.length());
-        /* disabled: Thread.sleep doesn't work reliantly for this case
-        assertTrue("Check last modified date preserved",
-            testFile1.lastModified() == destination.lastModified());*/
-    }
-
-    public void testCopyFileToOutputStream() throws Exception {
-        final ByteArrayOutputStream destination = new ByteArrayOutputStream();
-        FileUtils.copyFile(testFile1, destination);
-        assertEquals("Check Full copy size", testFile1Size, destination.size());
-        final byte[] expected = FileUtils.readFileToByteArray(testFile1);
-        Assert.assertArrayEquals("Check Full copy", expected, destination.toByteArray());
-    }
-
-    public void IGNOREtestCopyFileLarge() throws Exception {
-
-        final File largeFile = new File(getTestDirectory(), "large.txt");
-        final File destination = new File(getTestDirectory(), "copylarge.txt");
-
-        System.out.println("START:   " + new java.util.Date());
-        createFile(largeFile, FileUtils.ONE_GB);
-        System.out.println("CREATED: " + new java.util.Date());
-        FileUtils.copyFile(largeFile, destination);
-        System.out.println("COPIED:  " + new java.util.Date());
-
-        assertTrue("Check Exist", destination.exists());
-        assertEquals("Check Full copy", largeFile.length(), destination.length());
-    }
-
-    public void testCopyFile2() throws Exception {
-        final File destination = new File(getTestDirectory(), "copy2.txt");
-
-        //Thread.sleep(LAST_MODIFIED_DELAY);
-        //This is to slow things down so we can catch if
-        //the lastModified date is not ok
-
-        FileUtils.copyFile(testFile1, destination);
-        assertTrue("Check Exist", destination.exists());
-        assertEquals("Check Full copy", testFile2Size, destination.length());
-        /* disabled: Thread.sleep doesn't work reliably for this case
-        assertTrue("Check last modified date preserved",
-            testFile1.lastModified() == destination.lastModified());*/
-    }
-
-    public void testCopyToSelf() throws Exception {
-        final File destination = new File(getTestDirectory(), "copy3.txt");
-        //Prepare a test file
-        FileUtils.copyFile(testFile1, destination);
-
-        try {
-            FileUtils.copyFile(destination, destination);
-            fail("file copy to self should not be possible");
-        } catch (final IOException ioe) {
-            //we want the exception, copy to self should be illegal
-        }
-    }
-
-    public void testCopyFile2WithoutFileDatePreservation() throws Exception {
-        final File destination = new File(getTestDirectory(), "copy2.txt");
-
-        //Thread.sleep(LAST_MODIFIED_DELAY);
-        //This is to slow things down so we can catch if
-        //the lastModified date is not ok
-
-        FileUtils.copyFile(testFile1, destination, false);
-        assertTrue("Check Exist", destination.exists());
-        assertEquals("Check Full copy", testFile2Size, destination.length());
-        /* disabled: Thread.sleep doesn't work reliantly for this case
-        assertTrue("Check last modified date modified",
-            testFile1.lastModified() != destination.lastModified());*/
-    }
-
-    public void testCopyDirectoryToDirectory_NonExistingDest() throws Exception {
-        createFile(testFile1, 1234);
-        createFile(testFile2, 4321);
-        final File srcDir = getTestDirectory();
-        final File subDir = new File(srcDir, "sub");
-        subDir.mkdir();
-        final File subFile = new File(subDir, "A.txt");
-        FileUtils.writeStringToFile(subFile, "HELLO WORLD", "UTF8");
-        final File destDir = new File(System.getProperty("java.io.tmpdir"), "tmp-FileUtilsTestCase");
-        FileUtils.deleteDirectory(destDir);
-        final File actualDestDir = new File(destDir, srcDir.getName());
-
-        FileUtils.copyDirectoryToDirectory(srcDir, destDir);
-
-        assertTrue("Check exists", destDir.exists());
-        assertTrue("Check exists", actualDestDir.exists());
-        final long srcSize = FileUtils.sizeOfDirectory(srcDir);
-        assertTrue("Size > 0", srcSize > 0);
-        assertEquals("Check size", srcSize, FileUtils.sizeOfDirectory(actualDestDir));
-        assertTrue(new File(actualDestDir, "sub/A.txt").exists());
-        FileUtils.deleteDirectory(destDir);
-    }
-
-    public void testCopyDirectoryToNonExistingDest() throws Exception {
-        createFile(testFile1, 1234);
-        createFile(testFile2, 4321);
-        final File srcDir = getTestDirectory();
-        final File subDir = new File(srcDir, "sub");
-        subDir.mkdir();
-        final File subFile = new File(subDir, "A.txt");
-        FileUtils.writeStringToFile(subFile, "HELLO WORLD", "UTF8");
-        final File destDir = new File(System.getProperty("java.io.tmpdir"), "tmp-FileUtilsTestCase");
-        FileUtils.deleteDirectory(destDir);
-
-        FileUtils.copyDirectory(srcDir, destDir);
-
-        assertTrue("Check exists", destDir.exists());
-        final long sizeOfSrcDirectory = FileUtils.sizeOfDirectory(srcDir);
-        assertTrue("Size > 0", sizeOfSrcDirectory > 0);
-        assertEquals("Check size", sizeOfSrcDirectory, FileUtils.sizeOfDirectory(destDir));
-        assertTrue(new File(destDir, "sub/A.txt").exists());
-        FileUtils.deleteDirectory(destDir);
-    }
-
-    public void testCopyDirectoryToExistingDest() throws Exception {
-        createFile(testFile1, 1234);
-        createFile(testFile2, 4321);
-        final File srcDir = getTestDirectory();
-        final File subDir = new File(srcDir, "sub");
-        subDir.mkdir();
-        final File subFile = new File(subDir, "A.txt");
-        FileUtils.writeStringToFile(subFile, "HELLO WORLD", "UTF8");
-        final File destDir = new File(System.getProperty("java.io.tmpdir"), "tmp-FileUtilsTestCase");
-        FileUtils.deleteDirectory(destDir);
-        destDir.mkdirs();
-
-        FileUtils.copyDirectory(srcDir, destDir);
-
-        final long srcSize = FileUtils.sizeOfDirectory(srcDir);
-        assertTrue("Size > 0", srcSize > 0);
-        assertEquals(srcSize, FileUtils.sizeOfDirectory(destDir));
-        assertTrue(new File(destDir, "sub/A.txt").exists());
-    }
-
-    public void testCopyDirectoryFiltered() throws Exception {
-        final File grandParentDir = new File(getTestDirectory(), "grandparent");
-        final File parentDir = new File(grandParentDir, "parent");
-        final File childDir = new File(parentDir, "child");
-        createFilesForTestCopyDirectory(grandParentDir, parentDir, childDir);
-
-        final NameFileFilter filter = new NameFileFilter(new String[]{"parent", "child", "file3.txt"});
-        final File destDir = new File(getTestDirectory(), "copydest");
-
-        FileUtils.copyDirectory(grandParentDir, destDir, filter);
-        final List<File> files = LIST_WALKER.list(destDir);
-        assertEquals(3, files.size());
-        assertEquals("parent", files.get(0).getName());
-        assertEquals("child", files.get(1).getName());
-        assertEquals("file3.txt", files.get(2).getName());
-    }
-
-    public void testCopyDirectoryPreserveDates() throws Exception {
-        final File source = new File(getTestDirectory(), "source");
-        final File sourceDirectory = new File(source, "directory");
-        final File sourceFile = new File(sourceDirectory, "hello.txt");
-
-        // Prepare source data
-        source.mkdirs();
-        sourceDirectory.mkdir();
-        FileUtils.writeStringToFile(sourceFile, "HELLO WORLD", "UTF8");
-        // Set dates in reverse order to avoid overwriting previous values
-        // Also, use full seconds (arguments are in ms) close to today
-        // but still highly unlikely to occur in the real world
-        sourceFile.setLastModified(1000000002000L);
-        sourceDirectory.setLastModified(1000000001000L);
-        source.setLastModified(1000000000000L);
-
-        final File target = new File(getTestDirectory(), "target");
-        final File targetDirectory = new File(target, "directory");
-        final File targetFile = new File(targetDirectory, "hello.txt");
-
-        // Test with preserveFileDate disabled
-        FileUtils.copyDirectory(source, target, false);
-        assertTrue(1000000000000L != target.lastModified());
-        assertTrue(1000000001000L != targetDirectory.lastModified());
-        assertTrue(1000000002000L != targetFile.lastModified());
-        FileUtils.deleteDirectory(target);
-
-        // Test with preserveFileDate enabled
-        FileUtils.copyDirectory(source, target, true);
-        assertEquals(1000000000000L, target.lastModified());
-        assertEquals(1000000001000L, targetDirectory.lastModified());
-        assertEquals(1000000002000L, targetFile.lastModified());
-        FileUtils.deleteDirectory(target);
-
-        // also if the target directory already exists (IO-190)
-        target.mkdirs();
-        FileUtils.copyDirectory(source, target, true);
-        assertEquals(1000000000000L, target.lastModified());
-        assertEquals(1000000001000L, targetDirectory.lastModified());
-        assertEquals(1000000002000L, targetFile.lastModified());
-        FileUtils.deleteDirectory(target);
-
-        // also if the target subdirectory already exists (IO-190)
-        targetDirectory.mkdirs();
-        FileUtils.copyDirectory(source, target, true);
-        assertEquals(1000000000000L, target.lastModified());
-        assertEquals(1000000001000L, targetDirectory.lastModified());
-        assertEquals(1000000002000L, targetFile.lastModified());
-        FileUtils.deleteDirectory(target);
-    }
-
-    /* Test for IO-141 */
-    public void testCopyDirectoryToChild() throws Exception {
-        final File grandParentDir = new File(getTestDirectory(), "grandparent");
-        final File parentDir = new File(grandParentDir, "parent");
-        final File childDir = new File(parentDir, "child");
-        createFilesForTestCopyDirectory(grandParentDir, parentDir, childDir);
-
-        final long expectedCount = LIST_WALKER.list(grandParentDir).size() +
-                LIST_WALKER.list(parentDir).size();
-        final long expectedSize = FileUtils.sizeOfDirectory(grandParentDir) +
-                FileUtils.sizeOfDirectory(parentDir);
-        FileUtils.copyDirectory(parentDir, childDir);
-        assertEquals(expectedCount, LIST_WALKER.list(grandParentDir).size());
-        assertEquals(expectedSize, FileUtils.sizeOfDirectory(grandParentDir));
-        assertTrue("Count > 0", expectedCount > 0);
-        assertTrue("Size > 0", expectedSize > 0);
-    }
-
-    /* Test for IO-141 */
-    public void testCopyDirectoryToGrandChild() throws Exception {
-        final File grandParentDir = new File(getTestDirectory(), "grandparent");
-        final File parentDir = new File(grandParentDir, "parent");
-        final File childDir = new File(parentDir, "child");
-        createFilesForTestCopyDirectory(grandParentDir, parentDir, childDir);
-
-        final long expectedCount = LIST_WALKER.list(grandParentDir).size() * 2;
-        final long expectedSize = FileUtils.sizeOfDirectory(grandParentDir) * 2;
-        FileUtils.copyDirectory(grandParentDir, childDir);
-        assertEquals(expectedCount, LIST_WALKER.list(grandParentDir).size());
-        assertEquals(expectedSize, FileUtils.sizeOfDirectory(grandParentDir));
-        assertTrue("Size > 0", expectedSize > 0);
-    }
-
-    /* Test for IO-217 FileUtils.copyDirectoryToDirectory makes infinite loops */
-    public void testCopyDirectoryToItself() throws Exception {
-        final File dir = new File(getTestDirectory(), "itself");
-        dir.mkdirs();
-        FileUtils.copyDirectoryToDirectory(dir, dir);
-        assertEquals(1, LIST_WALKER.list(dir).size());
-    }
-
-    private void createFilesForTestCopyDirectory(final File grandParentDir, final File parentDir, final File childDir) throws Exception {
-        final File childDir2 = new File(parentDir, "child2");
-        final File grandChildDir = new File(childDir, "grandChild");
-        final File grandChild2Dir = new File(childDir2, "grandChild2");
-        final File file1 = new File(grandParentDir, "file1.txt");
-        final File file2 = new File(parentDir, "file2.txt");
-        final File file3 = new File(childDir, "file3.txt");
-        final File file4 = new File(childDir2, "file4.txt");
-        final File file5 = new File(grandChildDir, "file5.txt");
-        final File file6 = new File(grandChild2Dir, "file6.txt");
-        FileUtils.deleteDirectory(grandParentDir);
-        grandChildDir.mkdirs();
-        grandChild2Dir.mkdirs();
-        FileUtils.writeStringToFile(file1, "File 1 in grandparent", "UTF8");
-        FileUtils.writeStringToFile(file2, "File 2 in parent", "UTF8");
-        FileUtils.writeStringToFile(file3, "File 3 in child", "UTF8");
-        FileUtils.writeStringToFile(file4, "File 4 in child2", "UTF8");
-        FileUtils.writeStringToFile(file5, "File 5 in grandChild", "UTF8");
-        FileUtils.writeStringToFile(file6, "File 6 in grandChild2", "UTF8");
-    }
-
-    public void testCopyDirectoryErrors() throws Exception {
-        try {
-            FileUtils.copyDirectory(null, null);
-            fail();
-        } catch (final NullPointerException ex) {
-        }
-        try {
-            FileUtils.copyDirectory(new File("a"), null);
-            fail();
-        } catch (final NullPointerException ex) {
-        }
-        try {
-            FileUtils.copyDirectory(null, new File("a"));
-            fail();
-        } catch (final NullPointerException ex) {
-        }
-        try {
-            FileUtils.copyDirectory(new File("doesnt-exist"), new File("a"));
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            FileUtils.copyDirectory(testFile1, new File("a"));
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            FileUtils.copyDirectory(getTestDirectory(), testFile1);
-            fail();
-        } catch (final IOException ex) {
-        }
-        try {
-            FileUtils.copyDirectory(getTestDirectory(), getTestDirectory());
-            fail();
-        } catch (final IOException ex) {
-        }
-    }
-
-    // forceDelete
-
-    public void testForceDeleteAFile1() throws Exception {
-        final File destination = new File(getTestDirectory(), "copy1.txt");
-        destination.createNewFile();
-        assertTrue("Copy1.txt doesn't exist to delete", destination.exists());
-        FileUtils.forceDelete(destination);
-        assertTrue("Check No Exist", !destination.exists());
-    }
-
-    public void testForceDeleteAFile2() throws Exception {
-        final File destination = new File(getTestDirectory(), "copy2.txt");
-        destination.createNewFile();
-        assertTrue("Copy2.txt doesn't exist to delete", destination.exists());
-        FileUtils.forceDelete(destination);
-        assertTrue("Check No Exist", !destination.exists());
-    }
-
-    public void testForceDeleteAFile3() throws Exception {
-        final File destination = new File(getTestDirectory(), "no_such_file");
-        assertTrue("Check No Exist", !destination.exists());
-        try {
-            FileUtils.forceDelete(destination);
-            fail("Should generate FileNotFoundException");
-        } catch (final FileNotFoundException ignored) {
-        }
-    }
-
-    // copyFileToDirectory
-
-    public void testCopyFile1ToDir() throws Exception {
-        final File directory = new File(getTestDirectory(), "subdir");
-        if (!directory.exists()) {
-            directory.mkdirs();
-        }
-        final File destination = new File(directory, testFile1.getName());
-
-        //Thread.sleep(LAST_MODIFIED_DELAY);
-        //This is to slow things down so we can catch if
-        //the lastModified date is not ok
-
-        FileUtils.copyFileToDirectory(testFile1, directory);
-        assertTrue("Check Exist", destination.exists());
-        assertEquals("Check Full copy", testFile1Size, destination.length());
-        /* disabled: Thread.sleep doesn't work reliantly for this case
-        assertTrue("Check last modified date preserved",
-            testFile1.lastModified() == destination.lastModified());*/
-
-        try {
-            FileUtils.copyFileToDirectory(destination, directory);
-            fail("Should not be able to copy a file into the same directory as itself");
-        } catch (final IOException ioe) {
-            //we want that, cannot copy to the same directory as the original file
-        }
-    }
-
-    public void testCopyFile2ToDir() throws Exception {
-        final File directory = new File(getTestDirectory(), "subdir");
-        if (!directory.exists()) {
-            directory.mkdirs();
-        }
-        final File destination = new File(directory, testFile1.getName());
-
-        //Thread.sleep(LAST_MODIFIED_DELAY);
-        //This is to slow things down so we can catch if
-        //the lastModified date is not ok
-
-        FileUtils.copyFileToDirectory(testFile1, directory);
-        assertTrue("Check Exist", destination.exists());
-        assertEquals("Check Full copy", testFile2Size, destination.length());
-        /* disabled: Thread.sleep doesn't work reliantly for this case
-        assertTrue("Check last modified date preserved",
-            testFile1.lastModified() == destination.lastModified());*/
-    }
-
-    // forceDelete
-
-    public void testForceDeleteDir() throws Exception {
-        final File testDirectory = getTestDirectory();
-        FileUtils.forceDelete(testDirectory.getParentFile());
-        assertTrue(
-                "Check No Exist",
-                !testDirectory.getParentFile().exists());
-    }
-
-    /*
-     *  Test the FileUtils implementation.
-     */
-    public void testFileUtils() throws Exception {
-        // Loads file from classpath
-        final File file1 = new File(getTestDirectory(), "test.txt");
-        final String filename = file1.getAbsolutePath();
-
-        //Create test file on-the-fly (used to be in CVS)
-        final OutputStream out = new java.io.FileOutputStream(file1);
-        try {
-            out.write("This is a test".getBytes("UTF-8"));
-        } finally {
-            out.close();
-        }
-
-        final File file2 = new File(getTestDirectory(), "test2.txt");
-
-        FileUtils.writeStringToFile(file2, filename, "UTF-8");
-        assertTrue(file2.exists());
-        assertTrue(file2.length() > 0);
-
-        final String file2contents = FileUtils.readFileToString(file2, "UTF-8");
-        assertTrue(
-                "Second file's contents correct",
-                filename.equals(file2contents));
-
-        assertTrue(file2.delete());
-
-        final String contents = FileUtils.readFileToString(new File(filename), "UTF-8");
-        assertEquals("FileUtils.fileRead()", "This is a test", contents);
-
-    }
-
-    public void testTouch() throws IOException {
-        final File file = new File(getTestDirectory(), "touch.txt");
-        if (file.exists()) {
-            file.delete();
-        }
-        assertTrue("Bad test: test file still exists", !file.exists());
-        FileUtils.touch(file);
-        assertTrue("FileUtils.touch() created file", file.exists());
-        final FileOutputStream out = new FileOutputStream(file);
-        assertEquals("Created empty file.", 0, file.length());
-        out.write(0);
-        out.close();
-        assertEquals("Wrote one byte to file", 1, file.length());
-        final long y2k = new GregorianCalendar(2000, 0, 1).getTime().getTime();
-        final boolean res = file.setLastModified(y2k);  // 0L fails on Win98
-        assertEquals("Bad test: set lastModified failed", true, res);
-        assertEquals("Bad test: set lastModified set incorrect value", y2k, file.lastModified());
-        final long now = System.currentTimeMillis();
-        FileUtils.touch(file);
-        assertEquals("FileUtils.touch() didn't empty the file.", 1, file.length());
-        assertEquals("FileUtils.touch() changed lastModified", false, y2k == file.lastModified());
-        assertEquals("FileUtils.touch() changed lastModified to more than now-3s", true, file.lastModified() >= now - 3000);
-        assertEquals("FileUtils.touch() changed lastModified to less than now+3s", true, file.lastModified() <= now + 3000);
-    }
-
-    public void testListFiles() throws Exception {
-        final File srcDir = getTestDirectory();
-        final File subDir = new File(srcDir, "list_test");
-        subDir.mkdir();
-
-        final File subDir2 = new File(subDir, "subdir");
-        subDir2.mkdir();
-
-        final String[] fileNames = {"a.txt", "b.txt", "c.txt", "d.txt", "e.txt", "f.txt"};
-        final int[] fileSizes = {123, 234, 345, 456, 678, 789};
-
-        for (int i = 0; i < fileNames.length; ++i) {
-            final File theFile = new File(subDir, fileNames[i]);
-            createFile(theFile, fileSizes[i]);
-        }
-
-        final Collection<File> files = FileUtils.listFiles(subDir,
-                new WildcardFileFilter("*.*"),
-                new WildcardFileFilter("*"));
-
-        final int count = files.size();
-        final Object[] fileObjs = files.toArray();
-
-        assertEquals(fileNames.length, files.size());
-
-        final Map<String, String> foundFileNames = new HashMap<String, String>();
-
-        for (int i = 0; i < count; ++i) {
-            boolean found = false;
-            for (int j = 0; !found && j < fileNames.length; ++j) {
-                if (fileNames[j].equals(((File) fileObjs[i]).getName())) {
-                    foundFileNames.put(fileNames[j], fileNames[j]);
-                    found = true;
-                }
-            }
-        }
-
-        assertEquals(foundFileNames.size(), fileNames.length);
-
-        subDir.delete();
-    }
-
-    public void testListFilesWithDirs() throws IOException {
-        final File srcDir = getTestDirectory();
-
-        final File subDir1 = new File(srcDir, "subdir");
-        subDir1.mkdir();
-
-        final File subDir2 = new File(subDir1, "subdir2");
-        subDir2.mkdir();
-
-        final File someFile = new File(subDir2, "a.txt");
-        createFile(someFile, 100);
-
-        final File subDir3 = new File(subDir2, "subdir3");
-        subDir3.mkdir();
-
-        final Collection<File> files = FileUtils.listFilesAndDirs(subDir1,
-                new WildcardFileFilter("*.*"), new WildcardFileFilter("*"));
-
-        assertEquals(4, files.size());
-        assertTrue("Should contain the directory.", files.contains(subDir1));
-        assertTrue("Should contain the directory.", files.contains(subDir2));
-        assertTrue("Should contain the file.", files.contains(someFile));
-        assertTrue("Should contain the directory.", files.contains(subDir3));
-
-        subDir1.delete();
-    }
-
-    public void testIterateFiles() throws Exception {
-        final File srcDir = getTestDirectory();
-        final File subDir = new File(srcDir, "list_test");
-        subDir.mkdir();
-
-        final String[] fileNames = {"a.txt", "b.txt", "c.txt", "d.txt", "e.txt", "f.txt"};
-        final int[] fileSizes = {123, 234, 345, 456, 678, 789};
-
-        for (int i = 0; i < fileNames.length; ++i) {
-            final File theFile = new File(subDir, fileNames[i]);
-            createFile(theFile, fileSizes[i]);
-        }
-
-        final Iterator<File> files = FileUtils.iterateFiles(subDir,
-                new WildcardFileFilter("*.*"),
-                new WildcardFileFilter("*"));
-
-        final Map<String, String> foundFileNames = new HashMap<String, String>();
-
-        while (files.hasNext()) {
-            boolean found = false;
-            final String fileName = files.next().getName();
-
-            for (int j = 0; !found && j < fileNames.length; ++j) {
-                if (fileNames[j].equals(fileName)) {
-                    foundFileNames.put(fileNames[j], fileNames[j]);
-                    found = true;
-                }
-            }
-        }
-
-        assertEquals(foundFileNames.size(), fileNames.length);
-
-        subDir.delete();
-    }
-
-    public void testIterateFilesAndDirs() throws IOException {
-        final File srcDir = getTestDirectory();
-
-        final File subDir1 = new File(srcDir, "subdir");
-        subDir1.mkdir();
-
-        final File subDir2 = new File(subDir1, "subdir2");
-        subDir2.mkdir();
-
-        final File someFile = new File(subDir2, "a.txt");
-        createFile(someFile, 100);
-
-        final File subDir3 = new File(subDir2, "subdir3");
-        subDir3.mkdir();
-
-        final Collection<File> filesAndDirs = Arrays.asList(subDir1, subDir2, someFile, subDir3);
-
-        int filesCount = 0;
-        final Iterator<File> files = FileUtils.iterateFilesAndDirs(subDir1,
-                new WildcardFileFilter("*.*"),
-                new WildcardFileFilter("*"));
-        while (files.hasNext()) {
-            filesCount++;
-            final File file = files.next();
-            assertTrue("Should contain the directory/file", filesAndDirs.contains(file));
-        }
-
-        assertEquals(filesCount, filesAndDirs.size());
-    }
-
-    public void testReadFileToStringWithDefaultEncoding() throws Exception {
-        final File file = new File(getTestDirectory(), "read.obj");
-        final FileOutputStream out = new FileOutputStream(file);
-        final byte[] text = "Hello /u1234".getBytes();
-        out.write(text);
-        out.close();
-
-        final String data = FileUtils.readFileToString(file);
-        assertEquals("Hello /u1234", data);
-    }
-
-    public void testReadFileToStringWithEncoding() throws Exception {
-        final File file = new File(getTestDirectory(), "read.obj");
-        final FileOutputStream out = new FileOutputStream(file);
-        final byte[] text = "Hello /u1234".getBytes("UTF8");
-        out.write(text);
-        out.close();
-
-        final String data = FileUtils.readFileToString(file, "UTF8");
-        assertEquals("Hello /u1234", data);
-    }
-
-    public void testReadFileToByteArray() throws Exception {
-        final File file = new File(getTestDirectory(), "read.txt");
-        final FileOutputStream out = new FileOutputStream(file);
-        out.write(11);
-        out.write(21);
-        out.write(31);
-        out.close();
-
-        final byte[] data = FileUtils.readFileToByteArray(file);
-        assertEquals(3, data.length);
-        assertEquals(11, data[0]);
-        assertEquals(21, data[1]);
-        assertEquals(31, data[2]);
-    }
-
-    public void testReadLines() throws Exception {
-        final File file = newFile("lines.txt");
-        try {
-            final String[] data = new String[]{"hello", "/u1234", "", "this is", "some text"};
-            createLineBasedFile(file, data);
-
-            final List<String> lines = FileUtils.readLines(file, "UTF-8");
-            assertEquals(Arrays.asList(data), lines);
-        } finally {
-            deleteFile(file);
-        }
-    }
-
-    public void testWriteStringToFile1() throws Exception {
-        final File file = new File(getTestDirectory(), "write.txt");
-        FileUtils.writeStringToFile(file, "Hello /u1234", "UTF8");
-        final byte[] text = "Hello /u1234".getBytes("UTF8");
-        assertEqualContent(text, file);
-    }
-
-    public void testWriteStringToFile2() throws Exception {
-        final File file = new File(getTestDirectory(), "write.txt");
-        FileUtils.writeStringToFile(file, "Hello /u1234", (String) null);
-        final byte[] text = "Hello /u1234".getBytes();
-        assertEqualContent(text, file);
-    }
-
-    public void testWriteStringToFile3() throws Exception {
-        final File file = new File(getTestDirectory(), "write.txt");
-        FileUtils.writeStringToFile(file, "Hello /u1234", (Charset) null);
-        final byte[] text = "Hello /u1234".getBytes();
-        assertEqualContent(text, file);
-    }
-
-    public void testWriteCharSequence1() throws Exception {
-        final File file = new File(getTestDirectory(), "write.txt");
-        FileUtils.write(file, "Hello /u1234", "UTF8");
-        final byte[] text = "Hello /u1234".getBytes("UTF8");
-        assertEqualContent(text, file);
-    }
-
-    public void testWriteCharSequence2() throws Exception {
-        final File file = new File(getTestDirectory(), "write.txt");
-        FileUtils.write(file, "Hello /u1234", (String) null);
-        final byte[] text = "Hello /u1234".getBytes();
-        assertEqualContent(text, file);
-    }
-
-    public void testWriteByteArrayToFile() throws Exception {
-        final File file = new File(getTestDirectory(), "write.obj");
-        final byte[] data = new byte[]{11, 21, 31};
-        FileUtils.writeByteArrayToFile(file, data);
-        assertEqualContent(data, file);
-    }
-
-    public void testWriteByteArrayToFile_WithOffsetAndLength() throws Exception {
-        final File file = new File(getTestDirectory(), "write.obj");
-        final byte[] data = new byte[]{11, 21, 32, 41, 51};
-        final byte[] writtenData = new byte[3];
-        System.arraycopy(data, 1, writtenData, 0, 3);
-        FileUtils.writeByteArrayToFile(file, data, 1, 3);
-        assertEqualContent(writtenData, file);
-    }
-
-    public void testWriteLines_4arg() throws Exception {
-        final Object[] data = new Object[]{
-                "hello", new StringBuffer("world"), "", "this is", null, "some text"};
-        final List<Object> list = Arrays.asList(data);
-
-        final File file = newFile("lines.txt");
-        FileUtils.writeLines(file, "US-ASCII", list, "*");
-
-        final String expected = "hello*world**this is**some text*";
-        final String actual = FileUtils.readFileToString(file, "US-ASCII");
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_4arg_Writer_nullData() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeLines(file, "US-ASCII", null, "*");
-
-        assertEquals("Sizes differ", 0, file.length());
-    }
-
-    public void testWriteLines_4arg_nullSeparator() throws Exception {
-        final Object[] data = new Object[]{
-                "hello", new StringBuffer("world"), "", "this is", null, "some text"};
-        final List<Object> list = Arrays.asList(data);
-
-        final File file = newFile("lines.txt");
-        FileUtils.writeLines(file, "US-ASCII", list, null);
-
-        final String expected = "hello" + IOUtils.LINE_SEPARATOR + "world" + IOUtils.LINE_SEPARATOR +
-                IOUtils.LINE_SEPARATOR + "this is" + IOUtils.LINE_SEPARATOR +
-                IOUtils.LINE_SEPARATOR + "some text" + IOUtils.LINE_SEPARATOR;
-        final String actual = FileUtils.readFileToString(file, "US-ASCII");
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_3arg_nullSeparator() throws Exception {
-        final Object[] data = new Object[]{
-                "hello", new StringBuffer("world"), "", "this is", null, "some text"};
-        final List<Object> list = Arrays.asList(data);
-
-        final File file = newFile("lines.txt");
-        FileUtils.writeLines(file, "US-ASCII", list);
-
-        final String expected = "hello" + IOUtils.LINE_SEPARATOR + "world" + IOUtils.LINE_SEPARATOR +
-                IOUtils.LINE_SEPARATOR + "this is" + IOUtils.LINE_SEPARATOR +
-                IOUtils.LINE_SEPARATOR + "some text" + IOUtils.LINE_SEPARATOR;
-        final String actual = FileUtils.readFileToString(file, "US-ASCII");
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_5argsWithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        final List<String> linesToAppend = Arrays.asList("my first line", "The second Line");
-        FileUtils.writeLines(file, null, linesToAppend, null, true);
-
-        final String expected = "This line was there before you..."
-                + "my first line"
-                + IOUtils.LINE_SEPARATOR + "The second Line"
-                + IOUtils.LINE_SEPARATOR;
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_5argsWithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        final List<String> linesToAppend = Arrays.asList("my first line", "The second Line");
-        FileUtils.writeLines(file, null, linesToAppend, null, false);
-
-        final String expected = "my first line"
-                + IOUtils.LINE_SEPARATOR + "The second Line"
-                + IOUtils.LINE_SEPARATOR;
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_4argsWithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        final List<String> linesToAppend = Arrays.asList("my first line", "The second Line");
-        FileUtils.writeLines(file, linesToAppend, null, true);
-
-        final String expected = "This line was there before you..."
-                + "my first line"
-                + IOUtils.LINE_SEPARATOR + "The second Line"
-                + IOUtils.LINE_SEPARATOR;
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_4argsWithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        final List<String> linesToAppend = Arrays.asList("my first line", "The second Line");
-        FileUtils.writeLines(file, linesToAppend, null, false);
-
-        final String expected = "my first line"
-                + IOUtils.LINE_SEPARATOR + "The second Line"
-                + IOUtils.LINE_SEPARATOR;
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-
-    public void testWriteLinesEncoding_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        final List<String> linesToAppend = Arrays.asList("my first line", "The second Line");
-        FileUtils.writeLines(file, null, linesToAppend, true);
-
-        final String expected = "This line was there before you..."
-                + "my first line"
-                + IOUtils.LINE_SEPARATOR + "The second Line"
-                + IOUtils.LINE_SEPARATOR;
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLinesEncoding_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        final List<String> linesToAppend = Arrays.asList("my first line", "The second Line");
-        FileUtils.writeLines(file, null, linesToAppend, false);
-
-        final String expected = "my first line"
-                + IOUtils.LINE_SEPARATOR + "The second Line"
-                + IOUtils.LINE_SEPARATOR;
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_3argsWithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        final List<String> linesToAppend = Arrays.asList("my first line", "The second Line");
-        FileUtils.writeLines(file, linesToAppend, true);
-
-        final String expected = "This line was there before you..."
-                + "my first line"
-                + IOUtils.LINE_SEPARATOR + "The second Line"
-                + IOUtils.LINE_SEPARATOR;
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_3argsWithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        final List<String> linesToAppend = Arrays.asList("my first line", "The second Line");
-        FileUtils.writeLines(file, linesToAppend, false);
-
-        final String expected = "my first line"
-                + IOUtils.LINE_SEPARATOR + "The second Line"
-                + IOUtils.LINE_SEPARATOR;
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteStringToFileWithEncoding_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        FileUtils.writeStringToFile(file, "this is brand new data", (String) null, true);
-
-        final String expected = "This line was there before you..."
-                + "this is brand new data";
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteStringToFileWithEncoding_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        FileUtils.writeStringToFile(file, "this is brand new data", (String) null, false);
-
-        final String expected = "this is brand new data";
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteStringToFile_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        FileUtils.writeStringToFile(file, "this is brand new data", true);
-
-        final String expected = "This line was there before you..."
-                + "this is brand new data";
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteStringToFile_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        FileUtils.writeStringToFile(file, "this is brand new data", false);
-
-        final String expected = "this is brand new data";
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteWithEncoding_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        FileUtils.write(file, "this is brand new data", (String) null, true);
-
-        final String expected = "This line was there before you..."
-                + "this is brand new data";
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteWithEncoding_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        FileUtils.write(file, "this is brand new data", (String) null, false);
-
-        final String expected = "this is brand new data";
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWrite_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        FileUtils.write(file, "this is brand new data", true);
-
-        final String expected = "This line was there before you..."
-                + "this is brand new data";
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWrite_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        FileUtils.write(file, "this is brand new data", false);
-
-        final String expected = "this is brand new data";
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteByteArrayToFile_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        FileUtils.writeByteArrayToFile(file, "this is brand new data".getBytes(), true);
-
-        final String expected = "This line was there before you..."
-                + "this is brand new data";
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteByteArrayToFile_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        FileUtils.writeByteArrayToFile(file, "this is brand new data".getBytes(), false);
-
-        final String expected = "this is brand new data";
-        final String actual = FileUtils.readFileToString(file);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteByteArrayToFile_WithOffsetAndLength_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        final byte[] data = "SKIP_THIS_this is brand new data_AND_SKIP_THIS".getBytes(Charsets.UTF_8);
-        FileUtils.writeByteArrayToFile(file, data, 10, 22, true);
-
-        final String expected = "This line was there before you..." + "this is brand new data";
-        final String actual = FileUtils.readFileToString(file, Charsets.UTF_8);
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteByteArrayToFile_WithOffsetAndLength_WithAppendOptionTrue_ShouldDeletePreviousFileLines() throws Exception {
-        final File file = newFile("lines.txt");
-        FileUtils.writeStringToFile(file, "This line was there before you...");
-
-        final byte[] data = "SKIP_THIS_this is brand new data_AND_SKIP_THIS".getBytes(Charsets.UTF_8);
-        FileUtils.writeByteArrayToFile(file, data, 10, 22, false);
-
-        final String expected = "this is brand new data";
-        final String actual = FileUtils.readFileToString(file, Charsets.UTF_8);
-        assertEquals(expected, actual);
-    }
-
-    //-----------------------------------------------------------------------
-    public void testChecksumCRC32() throws Exception {
-        // create a test file
-        final String text = "Imagination is more important than knowledge - Einstein";
-        final File file = new File(getTestDirectory(), "checksum-test.txt");
-        FileUtils.writeStringToFile(file, text, "US-ASCII");
-
-        // compute the expected checksum
-        final Checksum expectedChecksum = new CRC32();
-        expectedChecksum.update(text.getBytes("US-ASCII"), 0, text.length());
-        final long expectedValue = expectedChecksum.getValue();
-
-        // compute the checksum of the file
-        final long resultValue = FileUtils.checksumCRC32(file);
-
-        assertEquals(expectedValue, resultValue);
-    }
-
-    public void testChecksum() throws Exception {
-        // create a test file
-        final String text = "Imagination is more important than knowledge - Einstein";
-        final File file = new File(getTestDirectory(), "checksum-test.txt");
-        FileUtils.writeStringToFile(file, text, "US-ASCII");
-
-        // compute the expected checksum
-        final Checksum expectedChecksum = new CRC32();
-        expectedChecksum.update(text.getBytes("US-ASCII"), 0, text.length());
-        final long expectedValue = expectedChecksum.getValue();
-
-        // compute the checksum of the file
-        final Checksum testChecksum = new CRC32();
-        final Checksum resultChecksum = FileUtils.checksum(file, testChecksum);
-        final long resultValue = resultChecksum.getValue();
-
-        assertSame(testChecksum, resultChecksum);
-        assertEquals(expectedValue, resultValue);
-    }
-
-    public void testChecksumOnNullFile() throws Exception {
-        try {
-            FileUtils.checksum(null, new CRC32());
-            fail();
-        } catch (final NullPointerException ex) {
-            // expected
-        }
-    }
-
-    public void testChecksumOnNullChecksum() throws Exception {
-        // create a test file
-        final String text = "Imagination is more important than knowledge - Einstein";
-        final File file = new File(getTestDirectory(), "checksum-test.txt");
-        FileUtils.writeStringToFile(file, text, "US-ASCII");
-        try {
-            FileUtils.checksum(file, null);
-            fail();
-        } catch (final NullPointerException ex) {
-            // expected
-        }
-    }
-
-    public void testChecksumOnDirectory() throws Exception {
-        try {
-            FileUtils.checksum(new File("."), new CRC32());
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            // expected
-        }
-    }
-
-    public void testChecksumDouble() throws Exception {
-        // create a test file
-        final String text1 = "Imagination is more important than knowledge - Einstein";
-        final File file1 = new File(getTestDirectory(), "checksum-test.txt");
-        FileUtils.writeStringToFile(file1, text1, "US-ASCII");
-
-        // create a second test file
-        final String text2 = "To be or not to be - Shakespeare";
-        final File file2 = new File(getTestDirectory(), "checksum-test2.txt");
-        FileUtils.writeStringToFile(file2, text2, "US-ASCII");
-
-        // compute the expected checksum
-        final Checksum expectedChecksum = new CRC32();
-        expectedChecksum.update(text1.getBytes("US-ASCII"), 0, text1.length());
-        expectedChecksum.update(text2.getBytes("US-ASCII"), 0, text2.length());
-        final long expectedValue = expectedChecksum.getValue();
-
-        // compute the checksum of the file
-        final Checksum testChecksum = new CRC32();
-        FileUtils.checksum(file1, testChecksum);
-        FileUtils.checksum(file2, testChecksum);
-        final long resultValue = testChecksum.getValue();
-
-        assertEquals(expectedValue, resultValue);
-    }
-
-    public void testDeleteDirectoryWithNonDirectory() throws Exception {
-        try {
-            FileUtils.deleteDirectory(testFile1);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            // expected
-        }
-    }
-
-    public void testDeleteQuietlyForNull() {
-        try {
-            FileUtils.deleteQuietly(null);
-        } catch (final Exception ex) {
-            fail(ex.getMessage());
-        }
-    }
-
-    public void testDeleteQuietlyDir() throws IOException {
-        final File testDirectory = new File(getTestDirectory(), "testDeleteQuietlyDir");
-        final File testFile = new File(testDirectory, "testDeleteQuietlyFile");
-        testDirectory.mkdirs();
-        createFile(testFile, 0);
-
-        assertTrue(testDirectory.exists());
-        assertTrue(testFile.exists());
-        FileUtils.deleteQuietly(testDirectory);
-        assertFalse("Check No Exist", testDirectory.exists());
-        assertFalse("Check No Exist", testFile.exists());
-    }
-
-    public void testDeleteQuietlyFile() throws IOException {
-        final File testFile = new File(getTestDirectory(), "testDeleteQuietlyFile");
-        createFile(testFile, 0);
-
-        assertTrue(testFile.exists());
-        FileUtils.deleteQuietly(testFile);
-        assertFalse("Check No Exist", testFile.exists());
-    }
-
-    public void testDeleteQuietlyNonExistent() {
-        final File testFile = new File("testDeleteQuietlyNonExistent");
-        assertFalse(testFile.exists());
-
-        try {
-            FileUtils.deleteQuietly(testFile);
-        } catch (final Exception ex) {
-            fail(ex.getMessage());
-        }
-    }
-
-    public void testMoveFile_Rename() throws Exception {
-        final File destination = new File(getTestDirectory(), "move1.txt");
-
-        FileUtils.moveFile(testFile1, destination);
-        assertTrue("Check Exist", destination.exists());
-        assertTrue("Original deleted", !testFile1.exists());
-    }
-
-    public void testMoveFile_CopyDelete() throws Exception {
-        final File destination = new File(getTestDirectory(), "move2.txt");
-        final File src = new File(testFile1.getAbsolutePath()) {
-            private static final long serialVersionUID = 1L;
-
-            // Force renameTo to fail, as if destination is on another
-            // filesystem
-            @Override
-            public boolean renameTo(final File f) {
-                return false;
-            }
-        };
-        FileUtils.moveFile(src, destination);
-        assertTrue("Check Exist", destination.exists());
-        assertTrue("Original deleted", !src.exists());
-    }
-
-
-    public void testMoveFile_CopyDelete_Failed() throws Exception {
-        final File destination = new File(getTestDirectory(), "move3.txt");
-        final File src = new File(testFile1.getAbsolutePath()) {
-            private static final long serialVersionUID = 1L;
-
-            // Force renameTo to fail, as if destination is on another
-            // filesystem
-            @Override
-            public boolean renameTo(final File f) {
-                return false;
-            }
-
-            // Force delete failure
-            @Override
-            public boolean delete() {
-                return false;
-            }
-
-        };
-        try {
-            FileUtils.moveFile(src, destination);
-            fail("move should have failed as src has not been deleted");
-        } catch (final IOException e) {
-            // exepected
-            assertTrue("Check Rollback", !destination.exists());
-            assertTrue("Original exists", src.exists());
-        }
-    }
-
-    public void testMoveFile_Errors() throws Exception {
-        try {
-            FileUtils.moveFile(null, new File("foo"));
-            fail("Expected NullPointerException when source is null");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-        try {
-            FileUtils.moveFile(new File("foo"), null);
-            fail("Expected NullPointerException when destination is null");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-        try {
-            FileUtils.moveFile(new File("nonexistant"), new File("foo"));
-            fail("Expected FileNotFoundException for source");
-        } catch (final FileNotFoundException e) {
-            // expected
-        }
-        try {
-            FileUtils.moveFile(getTestDirectory(), new File("foo"));
-            fail("Expected IOException when source is a directory");
-        } catch (final IOException e) {
-            // expected
-        }
-        final File testSourceFile = new File(getTestDirectory(), "testMoveFileSource");
-        final File testDestFile = new File(getTestDirectory(), "testMoveFileSource");
-        createFile(testSourceFile, 0);
-        createFile(testDestFile, 0);
-        try {
-            FileUtils.moveFile(testSourceFile, testDestFile);
-            fail("Expected FileExistsException when dest already exists");
-        } catch (final FileExistsException e) {
-            // expected
-        }
-
-    }
-
-    public void testMoveFileToDirectory() throws Exception {
-        final File destDir = new File(getTestDirectory(), "moveFileDestDir");
-        final File movedFile = new File(destDir, testFile1.getName());
-        assertFalse("Check Exist before", destDir.exists());
-        assertFalse("Check Exist before", movedFile.exists());
-
-        FileUtils.moveFileToDirectory(testFile1, destDir, true);
-        assertTrue("Check Exist after", movedFile.exists());
-        assertTrue("Original deleted", !testFile1.exists());
-    }
-
-    public void testMoveFileToDirectory_Errors() throws Exception {
-        try {
-            FileUtils.moveFileToDirectory(null, new File("foo"), true);
-            fail("Expected NullPointerException when source is null");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-        try {
-            FileUtils.moveFileToDirectory(new File("foo"), null, true);
-            fail("Expected NullPointerException when destination is null");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-        final File testFile1 = new File(getTestDirectory(), "testMoveFileFile1");
-        final File testFile2 = new File(getTestDirectory(), "testMoveFileFile2");
-        createFile(testFile1, 0);
-        createFile(testFile2, 0);
-        try {
-            FileUtils.moveFileToDirectory(testFile1, testFile2, true);
-            fail("Expected IOException when dest not a directory");
-        } catch (final IOException e) {
-            // expected
-        }
-
-        final File nonexistant = new File(getTestDirectory(), "testMoveFileNonExistant");
-        try {
-            FileUtils.moveFileToDirectory(testFile1, nonexistant, false);
-            fail("Expected IOException when dest does not exist and create=false");
-        } catch (final IOException e) {
-            // expected
-        }
-    }
-
-
-    public void testMoveDirectory_Rename() throws Exception {
-        final File dir = getTestDirectory();
-        final File src = new File(dir, "testMoveDirectory1Source");
-        final File testDir = new File(src, "foo");
-        final File testFile = new File(testDir, "bar");
-        testDir.mkdirs();
-        createFile(testFile, 0);
-        final File destination = new File(dir, "testMoveDirectory1Dest");
-        FileUtils.deleteDirectory(destination);
-
-        // Move the directory
-        FileUtils.moveDirectory(src, destination);
-
-        // Check results
-        assertTrue("Check Exist", destination.exists());
-        assertTrue("Original deleted", !src.exists());
-        final File movedDir = new File(destination, testDir.getName());
-        final File movedFile = new File(movedDir, testFile.getName());
-        assertTrue("Check dir moved", movedDir.exists());
-        assertTrue("Check file moved", movedFile.exists());
-    }
-
-    public void testMoveDirectory_CopyDelete() throws Exception {
-
-        final File dir = getTestDirectory();
-        final File src = new File(dir, "testMoveDirectory2Source") {
-            private static final long serialVersionUID = 1L;
-
-            // Force renameTo to fail
-            @Override
-            public boolean renameTo(final File dest) {
-                return false;
-            }
-        };
-        final File testDir = new File(src, "foo");
-        final File testFile = new File(testDir, "bar");
-        testDir.mkdirs();
-        createFile(testFile, 0);
-        final File destination = new File(dir, "testMoveDirectory1Dest");
-        FileUtils.deleteDirectory(destination);
-
-        // Move the directory
-        FileUtils.moveDirectory(src, destination);
-
-        // Check results
-        assertTrue("Check Exist", destination.exists());
-        assertTrue("Original deleted", !src.exists());
-        final File movedDir = new File(destination, testDir.getName());
-        final File movedFile = new File(movedDir, testFile.getName());
-        assertTrue("Check dir moved", movedDir.exists());
-        assertTrue("Check file moved", movedFile.exists());
-    }
-
-    public void testMoveDirectory_Errors() throws Exception {
-        try {
-            FileUtils.moveDirectory(null, new File("foo"));
-            fail("Expected NullPointerException when source is null");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-        try {
-            FileUtils.moveDirectory(new File("foo"), null);
-            fail("Expected NullPointerException when destination is null");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-        try {
-            FileUtils.moveDirectory(new File("nonexistant"), new File("foo"));
-            fail("Expected FileNotFoundException for source");
-        } catch (final FileNotFoundException e) {
-            // expected
-        }
-        final File testFile = new File(getTestDirectory(), "testMoveDirectoryFile");
-        createFile(testFile, 0);
-        try {
-            FileUtils.moveDirectory(testFile, new File("foo"));
-            fail("Expected IOException when source is not a directory");
-        } catch (final IOException e) {
-            // expected
-        }
-        final File testSrcFile = new File(getTestDirectory(), "testMoveDirectorySource");
-        final File testDestFile = new File(getTestDirectory(), "testMoveDirectoryDest");
-        testSrcFile.mkdir();
-        testDestFile.mkdir();
-        try {
-            FileUtils.moveDirectory(testSrcFile, testDestFile);
-            fail("Expected FileExistsException when dest already exists");
-        } catch (final FileExistsException e) {
-            // expected
-        }
-
-    }
-
-    public void testMoveDirectoryToDirectory() throws Exception {
-        final File dir = getTestDirectory();
-        final File src = new File(dir, "testMoveDirectory1Source");
-        final File testChildDir = new File(src, "foo");
-        final File testFile = new File(testChildDir, "bar");
-        testChildDir.mkdirs();
-        createFile(testFile, 0);
-        final File destDir = new File(dir, "testMoveDirectory1Dest");
-        FileUtils.deleteDirectory(destDir);
-        assertFalse("Check Exist before", destDir.exists());
-
-        // Move the directory
-        FileUtils.moveDirectoryToDirectory(src, destDir, true);
-
-        // Check results
-        assertTrue("Check Exist after", destDir.exists());
-        assertTrue("Original deleted", !src.exists());
-        final File movedDir = new File(destDir, src.getName());
-        final File movedChildDir = new File(movedDir, testChildDir.getName());
-        final File movedFile = new File(movedChildDir, testFile.getName());
-        assertTrue("Check dir moved", movedDir.exists());
-        assertTrue("Check child dir moved", movedChildDir.exists());
-        assertTrue("Check file moved", movedFile.exists());
-    }
-
-    public void testMoveDirectoryToDirectory_Errors() throws Exception {
-        try {
-            FileUtils.moveDirectoryToDirectory(null, new File("foo"), true);
-            fail("Expected NullPointerException when source is null");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-        try {
-            FileUtils.moveDirectoryToDirectory(new File("foo"), null, true);
-            fail("Expected NullPointerException when destination is null");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-        final File testFile1 = new File(getTestDirectory(), "testMoveFileFile1");
-        final File testFile2 = new File(getTestDirectory(), "testMoveFileFile2");
-        createFile(testFile1, 0);
-        createFile(testFile2, 0);
-        try {
-            FileUtils.moveDirectoryToDirectory(testFile1, testFile2, true);
-            fail("Expected IOException when dest not a directory");
-        } catch (final IOException e) {
-            // expected
-        }
-
-        final File nonexistant = new File(getTestDirectory(), "testMoveFileNonExistant");
-        try {
-            FileUtils.moveDirectoryToDirectory(testFile1, nonexistant, false);
-            fail("Expected IOException when dest does not exist and create=false");
-        } catch (final IOException e) {
-            // expected
-        }
-    }
-
-    public void testMoveToDirectory() throws Exception {
-        final File destDir = new File(getTestDirectory(), "testMoveToDirectoryDestDir");
-        final File testDir = new File(getTestDirectory(), "testMoveToDirectoryTestDir");
-        final File testFile = new File(getTestDirectory(), "testMoveToDirectoryTestFile");
-        testDir.mkdirs();
-        createFile(testFile, 0);
-        final File movedFile = new File(destDir, testFile.getName());
-        final File movedDir = new File(destDir, testFile.getName());
-
-        assertFalse("Check File Doesnt exist", movedFile.exists());
-        assertFalse("Check Dir Doesnt exist", movedDir.exists());
-
-        // Test moving a file
-        FileUtils.moveToDirectory(testFile, destDir, true);
-        assertTrue("Check File exists", movedFile.exists());
-        assertFalse("Check Original File doesn't exist", testFile.exists());
-
-        // Test moving a directory
-        FileUtils.moveToDirectory(testDir, destDir, true);
-        assertTrue("Check Dir exists", movedDir.exists());
-        assertFalse("Check Original Dir doesn't exist", testDir.exists());
-    }
-
-    public void testMoveToDirectory_Errors() throws Exception {
-        try {
-            FileUtils.moveDirectoryToDirectory(null, new File("foo"), true);
-            fail("Expected NullPointerException when source is null");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-        try {
-            FileUtils.moveDirectoryToDirectory(new File("foo"), null, true);
-            fail("Expected NullPointerException when destination is null");
-        } catch (final NullPointerException e) {
-            // expected
-        }
-        final File nonexistant = new File(getTestDirectory(), "nonexistant");
-        final File destDir = new File(getTestDirectory(), "MoveToDirectoryDestDir");
-        try {
-            FileUtils.moveToDirectory(nonexistant, destDir, true);
-            fail("Expected IOException when source does not exist");
-        } catch (final IOException e) {
-            // expected
-        }
-    }
-
-    public void testIO300() throws Exception {
-        final File testDirectory = getTestDirectory();
-        final File src = new File(testDirectory, "dir1");
-        final File dest = new File(src, "dir2");
-        assertTrue(dest.mkdirs());
-        assertTrue(src.exists());
-        try {
-            FileUtils.moveDirectoryToDirectory(src, dest, false);
-            fail("expected IOException");
-        } catch (final IOException ioe) {
-            // expected
-        }
-        assertTrue(src.exists());
-    }
-
-    public void testIO276() throws Exception {
-        final File dir = new File("target", "IO276");
-        assertTrue(dir + " should not be present", dir.mkdirs());
-        final File file = new File(dir, "IO276.txt");
-        assertTrue(file + " should not be present", file.createNewFile());
-        FileUtils.forceDeleteOnExit(dir);
-        // If this does not work, test will fail next time (assuming target is not cleaned)
-    }
-
-    // Test helper class to pretend a file is shorter than it is
-    private static class ShorterFile extends File {
-        private static final long serialVersionUID = 1L;
-
-        public ShorterFile(String pathname) {
-            super(pathname);
-        }
-
-        @Override
-        public long length() {
-            return super.length() - 1;
-        }
-    }
-
-    // This test relies on FileUtils.copyFile using File.length to check the output size
-    public void testIncorrectOutputSize() throws Exception {
-        File inFile = new File("pom.xml");
-        File outFile = new ShorterFile("target/pom.tmp"); // it will report a shorter file
-        try {
-            FileUtils.copyFile(inFile, outFile);
-            fail("Expected IOException");
-        } catch (Exception e) {
-            final String msg = e.toString();
-            assertTrue(msg, msg.contains("Failed to copy full contents"));
-        } finally {
-            outFile.delete(); // tidy up
-        }
-    }
-
-    /**
-     * DirectoryWalker implementation that recursively lists all files and directories.
-     */
-    static class ListDirectoryWalker extends DirectoryWalker<File> {
-        ListDirectoryWalker() {
-            super();
-        }
-
-        List<File> list(final File startDirectory) throws IOException {
-            final ArrayList<File> files = new ArrayList<File>();
-            walk(startDirectory, files);
-            return files;
-        }
-
-        @Override
-        protected void handleDirectoryStart(final File directory, final int depth, final Collection<File> results) throws IOException {
-            // Add all directories except the starting directory
-            if (depth > 0) {
-                results.add(directory);
-            }
-        }
-
-        @Override
-        protected void handleFile(final File file, final int depth, final Collection<File> results) throws IOException {
-            results.add(file);
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FileUtilsWaitForTestCase.java b/trunk/src/test/java/org/apache/commons/io/FileUtilsWaitForTestCase.java
deleted file mode 100644
index 1ddc07f..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FileUtilsWaitForTestCase.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * This is used to test FileUtils.waitFor() method for correctness.
- *
- * @version $Id$
- * @see FileUtils
- */
-public class FileUtilsWaitForTestCase extends FileBasedTestCase {
-    // This class has been broken out from FileUtilsTestCase
-    // to solve issues as per BZ 38927
-
-    public FileUtilsWaitForTestCase(final String name) {
-        super(name);
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        getTestDirectory().mkdirs();
-    }
-
-    /** @see junit.framework.TestCase#tearDown() */
-    @Override
-    protected void tearDown() throws Exception {
-        FileUtils.deleteDirectory(getTestDirectory());
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWaitFor() {
-        FileUtils.waitFor(new File(""), -1);
-        FileUtils.waitFor(new File(""), 2);
-    }
-
-    public void testWaitForInterrupted() throws InterruptedException {
-        final AtomicBoolean wasInterrupted = new AtomicBoolean(false);
-        final CountDownLatch started = new CountDownLatch(1);
-        Runnable thread = new Runnable() {
-            @Override
-            public void run() {
-                started.countDown();
-                FileUtils.waitFor(new File(""), 2);
-                wasInterrupted.set( Thread.currentThread().isInterrupted());
-            }
-        };
-        Thread thread1 = new Thread(thread);
-        thread1.start();
-        started.await();
-        thread1.interrupt();
-        thread1.join();
-        assertTrue( wasInterrupted.get() );
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FilenameUtilsTestCase.java b/trunk/src/test/java/org/apache/commons/io/FilenameUtilsTestCase.java
deleted file mode 100644
index 06fed64..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FilenameUtilsTestCase.java
+++ /dev/null
@@ -1,1023 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * This is used to test FilenameUtils for correctness.
- *
- * @version $Id$
- * @see FilenameUtils
- */
-public class FilenameUtilsTestCase extends FileBasedTestCase {
-
-    private static final String SEP = "" + File.separatorChar;
-    private static final boolean WINDOWS = File.separatorChar == '\\';
-
-    private final File testFile1;
-    private final File testFile2;
-
-    private final int testFile1Size;
-    private final int testFile2Size;
-
-    public FilenameUtilsTestCase(final String name) {
-        super(name);
-
-        testFile1 = new File(getTestDirectory(), "file1-test.txt");
-        testFile2 = new File(getTestDirectory(), "file1a-test.txt");
-
-        testFile1Size = (int)testFile1.length();
-        testFile2Size = (int)testFile2.length();
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        getTestDirectory().mkdirs();
-        createFile(testFile1, testFile1Size);
-        createFile(testFile2, testFile2Size);
-        FileUtils.deleteDirectory(getTestDirectory());
-        getTestDirectory().mkdirs();
-        createFile(testFile1, testFile1Size);
-        createFile(testFile2, testFile2Size);
-    }
-
-    /** @see junit.framework.TestCase#tearDown() */
-    @Override
-    protected void tearDown() throws Exception {
-        FileUtils.deleteDirectory(getTestDirectory());
-    }
-
-    //-----------------------------------------------------------------------
-    public void testNormalize() throws Exception {
-        assertEquals(null, FilenameUtils.normalize(null));
-        assertEquals(null, FilenameUtils.normalize(":"));
-        assertEquals(null, FilenameUtils.normalize("1:\\a\\b\\c.txt"));
-        assertEquals(null, FilenameUtils.normalize("1:"));
-        assertEquals(null, FilenameUtils.normalize("1:a"));
-        assertEquals(null, FilenameUtils.normalize("\\\\\\a\\b\\c.txt"));
-        assertEquals(null, FilenameUtils.normalize("\\\\a"));
-
-        assertEquals("a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalize("a\\b/c.txt"));
-        assertEquals("" + SEP + "a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalize("\\a\\b/c.txt"));
-        assertEquals("C:" + SEP + "a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalize("C:\\a\\b/c.txt"));
-        assertEquals("" + SEP + "" + SEP + "server" + SEP + "a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalize("\\\\server\\a\\b/c.txt"));
-        assertEquals("~" + SEP + "a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalize("~\\a\\b/c.txt"));
-        assertEquals("~user" + SEP + "a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalize("~user\\a\\b/c.txt"));
-
-        assertEquals("a" + SEP + "c", FilenameUtils.normalize("a/b/../c"));
-        assertEquals("c", FilenameUtils.normalize("a/b/../../c"));
-        assertEquals("c" + SEP, FilenameUtils.normalize("a/b/../../c/"));
-        assertEquals(null, FilenameUtils.normalize("a/b/../../../c"));
-        assertEquals("a" + SEP, FilenameUtils.normalize("a/b/.."));
-        assertEquals("a" + SEP, FilenameUtils.normalize("a/b/../"));
-        assertEquals("", FilenameUtils.normalize("a/b/../.."));
-        assertEquals("", FilenameUtils.normalize("a/b/../../"));
-        assertEquals(null, FilenameUtils.normalize("a/b/../../.."));
-        assertEquals("a" + SEP + "d", FilenameUtils.normalize("a/b/../c/../d"));
-        assertEquals("a" + SEP + "d" + SEP, FilenameUtils.normalize("a/b/../c/../d/"));
-        assertEquals("a" + SEP + "b" + SEP + "d", FilenameUtils.normalize("a/b//d"));
-        assertEquals("a" + SEP + "b" + SEP, FilenameUtils.normalize("a/b/././."));
-        assertEquals("a" + SEP + "b" + SEP, FilenameUtils.normalize("a/b/./././"));
-        assertEquals("a" + SEP, FilenameUtils.normalize("./a/"));
-        assertEquals("a", FilenameUtils.normalize("./a"));
-        assertEquals("", FilenameUtils.normalize("./"));
-        assertEquals("", FilenameUtils.normalize("."));
-        assertEquals(null, FilenameUtils.normalize("../a"));
-        assertEquals(null, FilenameUtils.normalize(".."));
-        assertEquals("", FilenameUtils.normalize(""));
-
-        assertEquals(SEP + "a", FilenameUtils.normalize("/a"));
-        assertEquals(SEP + "a" + SEP, FilenameUtils.normalize("/a/"));
-        assertEquals(SEP + "a" + SEP + "c", FilenameUtils.normalize("/a/b/../c"));
-        assertEquals(SEP + "c", FilenameUtils.normalize("/a/b/../../c"));
-        assertEquals(null, FilenameUtils.normalize("/a/b/../../../c"));
-        assertEquals(SEP + "a" + SEP, FilenameUtils.normalize("/a/b/.."));
-        assertEquals(SEP + "", FilenameUtils.normalize("/a/b/../.."));
-        assertEquals(null, FilenameUtils.normalize("/a/b/../../.."));
-        assertEquals(SEP + "a" + SEP + "d", FilenameUtils.normalize("/a/b/../c/../d"));
-        assertEquals(SEP + "a" + SEP + "b" + SEP + "d", FilenameUtils.normalize("/a/b//d"));
-        assertEquals(SEP + "a" + SEP + "b" + SEP, FilenameUtils.normalize("/a/b/././."));
-        assertEquals(SEP + "a", FilenameUtils.normalize("/./a"));
-        assertEquals(SEP + "", FilenameUtils.normalize("/./"));
-        assertEquals(SEP + "", FilenameUtils.normalize("/."));
-        assertEquals(null, FilenameUtils.normalize("/../a"));
-        assertEquals(null, FilenameUtils.normalize("/.."));
-        assertEquals(SEP + "", FilenameUtils.normalize("/"));
-
-        assertEquals("~" + SEP + "a", FilenameUtils.normalize("~/a"));
-        assertEquals("~" + SEP + "a" + SEP, FilenameUtils.normalize("~/a/"));
-        assertEquals("~" + SEP + "a" + SEP + "c", FilenameUtils.normalize("~/a/b/../c"));
-        assertEquals("~" + SEP + "c", FilenameUtils.normalize("~/a/b/../../c"));
-        assertEquals(null, FilenameUtils.normalize("~/a/b/../../../c"));
-        assertEquals("~" + SEP + "a" + SEP, FilenameUtils.normalize("~/a/b/.."));
-        assertEquals("~" + SEP + "", FilenameUtils.normalize("~/a/b/../.."));
-        assertEquals(null, FilenameUtils.normalize("~/a/b/../../.."));
-        assertEquals("~" + SEP + "a" + SEP + "d", FilenameUtils.normalize("~/a/b/../c/../d"));
-        assertEquals("~" + SEP + "a" + SEP + "b" + SEP + "d", FilenameUtils.normalize("~/a/b//d"));
-        assertEquals("~" + SEP + "a" + SEP + "b" + SEP, FilenameUtils.normalize("~/a/b/././."));
-        assertEquals("~" + SEP + "a", FilenameUtils.normalize("~/./a"));
-        assertEquals("~" + SEP, FilenameUtils.normalize("~/./"));
-        assertEquals("~" + SEP, FilenameUtils.normalize("~/."));
-        assertEquals(null, FilenameUtils.normalize("~/../a"));
-        assertEquals(null, FilenameUtils.normalize("~/.."));
-        assertEquals("~" + SEP, FilenameUtils.normalize("~/"));
-        assertEquals("~" + SEP, FilenameUtils.normalize("~"));
-
-        assertEquals("~user" + SEP + "a", FilenameUtils.normalize("~user/a"));
-        assertEquals("~user" + SEP + "a" + SEP, FilenameUtils.normalize("~user/a/"));
-        assertEquals("~user" + SEP + "a" + SEP + "c", FilenameUtils.normalize("~user/a/b/../c"));
-        assertEquals("~user" + SEP + "c", FilenameUtils.normalize("~user/a/b/../../c"));
-        assertEquals(null, FilenameUtils.normalize("~user/a/b/../../../c"));
-        assertEquals("~user" + SEP + "a" + SEP, FilenameUtils.normalize("~user/a/b/.."));
-        assertEquals("~user" + SEP + "", FilenameUtils.normalize("~user/a/b/../.."));
-        assertEquals(null, FilenameUtils.normalize("~user/a/b/../../.."));
-        assertEquals("~user" + SEP + "a" + SEP + "d", FilenameUtils.normalize("~user/a/b/../c/../d"));
-        assertEquals("~user" + SEP + "a" + SEP + "b" + SEP + "d", FilenameUtils.normalize("~user/a/b//d"));
-        assertEquals("~user" + SEP + "a" + SEP + "b" + SEP, FilenameUtils.normalize("~user/a/b/././."));
-        assertEquals("~user" + SEP + "a", FilenameUtils.normalize("~user/./a"));
-        assertEquals("~user" + SEP + "", FilenameUtils.normalize("~user/./"));
-        assertEquals("~user" + SEP + "", FilenameUtils.normalize("~user/."));
-        assertEquals(null, FilenameUtils.normalize("~user/../a"));
-        assertEquals(null, FilenameUtils.normalize("~user/.."));
-        assertEquals("~user" + SEP, FilenameUtils.normalize("~user/"));
-        assertEquals("~user" + SEP, FilenameUtils.normalize("~user"));
-
-        assertEquals("C:" + SEP + "a", FilenameUtils.normalize("C:/a"));
-        assertEquals("C:" + SEP + "a" + SEP, FilenameUtils.normalize("C:/a/"));
-        assertEquals("C:" + SEP + "a" + SEP + "c", FilenameUtils.normalize("C:/a/b/../c"));
-        assertEquals("C:" + SEP + "c", FilenameUtils.normalize("C:/a/b/../../c"));
-        assertEquals(null, FilenameUtils.normalize("C:/a/b/../../../c"));
-        assertEquals("C:" + SEP + "a" + SEP, FilenameUtils.normalize("C:/a/b/.."));
-        assertEquals("C:" + SEP + "", FilenameUtils.normalize("C:/a/b/../.."));
-        assertEquals(null, FilenameUtils.normalize("C:/a/b/../../.."));
-        assertEquals("C:" + SEP + "a" + SEP + "d", FilenameUtils.normalize("C:/a/b/../c/../d"));
-        assertEquals("C:" + SEP + "a" + SEP + "b" + SEP + "d", FilenameUtils.normalize("C:/a/b//d"));
-        assertEquals("C:" + SEP + "a" + SEP + "b" + SEP, FilenameUtils.normalize("C:/a/b/././."));
-        assertEquals("C:" + SEP + "a", FilenameUtils.normalize("C:/./a"));
-        assertEquals("C:" + SEP + "", FilenameUtils.normalize("C:/./"));
-        assertEquals("C:" + SEP + "", FilenameUtils.normalize("C:/."));
-        assertEquals(null, FilenameUtils.normalize("C:/../a"));
-        assertEquals(null, FilenameUtils.normalize("C:/.."));
-        assertEquals("C:" + SEP + "", FilenameUtils.normalize("C:/"));
-
-        assertEquals("C:" + "a", FilenameUtils.normalize("C:a"));
-        assertEquals("C:" + "a" + SEP, FilenameUtils.normalize("C:a/"));
-        assertEquals("C:" + "a" + SEP + "c", FilenameUtils.normalize("C:a/b/../c"));
-        assertEquals("C:" + "c", FilenameUtils.normalize("C:a/b/../../c"));
-        assertEquals(null, FilenameUtils.normalize("C:a/b/../../../c"));
-        assertEquals("C:" + "a" + SEP, FilenameUtils.normalize("C:a/b/.."));
-        assertEquals("C:" + "", FilenameUtils.normalize("C:a/b/../.."));
-        assertEquals(null, FilenameUtils.normalize("C:a/b/../../.."));
-        assertEquals("C:" + "a" + SEP + "d", FilenameUtils.normalize("C:a/b/../c/../d"));
-        assertEquals("C:" + "a" + SEP + "b" + SEP + "d", FilenameUtils.normalize("C:a/b//d"));
-        assertEquals("C:" + "a" + SEP + "b" + SEP, FilenameUtils.normalize("C:a/b/././."));
-        assertEquals("C:" + "a", FilenameUtils.normalize("C:./a"));
-        assertEquals("C:" + "", FilenameUtils.normalize("C:./"));
-        assertEquals("C:" + "", FilenameUtils.normalize("C:."));
-        assertEquals(null, FilenameUtils.normalize("C:../a"));
-        assertEquals(null, FilenameUtils.normalize("C:.."));
-        assertEquals("C:" + "", FilenameUtils.normalize("C:"));
-
-        assertEquals(SEP + SEP + "server" + SEP + "a", FilenameUtils.normalize("//server/a"));
-        assertEquals(SEP + SEP + "server" + SEP + "a" + SEP, FilenameUtils.normalize("//server/a/"));
-        assertEquals(SEP + SEP + "server" + SEP + "a" + SEP + "c", FilenameUtils.normalize("//server/a/b/../c"));
-        assertEquals(SEP + SEP + "server" + SEP + "c", FilenameUtils.normalize("//server/a/b/../../c"));
-        assertEquals(null, FilenameUtils.normalize("//server/a/b/../../../c"));
-        assertEquals(SEP + SEP + "server" + SEP + "a" + SEP, FilenameUtils.normalize("//server/a/b/.."));
-        assertEquals(SEP + SEP + "server" + SEP + "", FilenameUtils.normalize("//server/a/b/../.."));
-        assertEquals(null, FilenameUtils.normalize("//server/a/b/../../.."));
-        assertEquals(SEP + SEP + "server" + SEP + "a" + SEP + "d", FilenameUtils.normalize("//server/a/b/../c/../d"));
-        assertEquals(SEP + SEP + "server" + SEP + "a" + SEP + "b" + SEP + "d", FilenameUtils.normalize("//server/a/b//d"));
-        assertEquals(SEP + SEP + "server" + SEP + "a" + SEP + "b" + SEP, FilenameUtils.normalize("//server/a/b/././."));
-        assertEquals(SEP + SEP + "server" + SEP + "a", FilenameUtils.normalize("//server/./a"));
-        assertEquals(SEP + SEP + "server" + SEP + "", FilenameUtils.normalize("//server/./"));
-        assertEquals(SEP + SEP + "server" + SEP + "", FilenameUtils.normalize("//server/."));
-        assertEquals(null, FilenameUtils.normalize("//server/../a"));
-        assertEquals(null, FilenameUtils.normalize("//server/.."));
-        assertEquals(SEP + SEP + "server" + SEP + "", FilenameUtils.normalize("//server/"));
-    }
-
-    public void testNormalize_with_nullbytes() throws Exception {
-        try {
-            assertEquals("a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalize("a\\b/c\u0000.txt"));
-        } catch (IllegalArgumentException ignore) {
-        }
-
-        try {
-            assertEquals("a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalize("\u0000a\\b/c.txt"));
-        } catch (IllegalArgumentException ignore) {
-        }
-    }
-
-    public void testNormalizeUnixWin() throws Exception {
-
-        // Normalize (Unix Separator)
-        assertEquals("/a/c/",    FilenameUtils.normalize("/a/b/../c/", true));
-        assertEquals("/a/c/",    FilenameUtils.normalize("\\a\\b\\..\\c\\", true));
-
-        // Normalize (Windows Separator)
-        assertEquals("\\a\\c\\", FilenameUtils.normalize("/a/b/../c/", false));
-        assertEquals("\\a\\c\\", FilenameUtils.normalize("\\a\\b\\..\\c\\", false));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testNormalizeNoEndSeparator() throws Exception {
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator(null));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator(":"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("1:\\a\\b\\c.txt"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("1:"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("1:a"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("\\\\\\a\\b\\c.txt"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("\\\\a"));
-
-        assertEquals("a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalizeNoEndSeparator("a\\b/c.txt"));
-        assertEquals("" + SEP + "a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalizeNoEndSeparator("\\a\\b/c.txt"));
-        assertEquals("C:" + SEP + "a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalizeNoEndSeparator("C:\\a\\b/c.txt"));
-        assertEquals("" + SEP + "" + SEP + "server" + SEP + "a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalizeNoEndSeparator("\\\\server\\a\\b/c.txt"));
-        assertEquals("~" + SEP + "a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalizeNoEndSeparator("~\\a\\b/c.txt"));
-        assertEquals("~user" + SEP + "a" + SEP + "b" + SEP + "c.txt", FilenameUtils.normalizeNoEndSeparator("~user\\a\\b/c.txt"));
-
-        assertEquals("a" + SEP + "c", FilenameUtils.normalizeNoEndSeparator("a/b/../c"));
-        assertEquals("c", FilenameUtils.normalizeNoEndSeparator("a/b/../../c"));
-        assertEquals("c", FilenameUtils.normalizeNoEndSeparator("a/b/../../c/"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("a/b/../../../c"));
-        assertEquals("a", FilenameUtils.normalizeNoEndSeparator("a/b/.."));
-        assertEquals("a", FilenameUtils.normalizeNoEndSeparator("a/b/../"));
-        assertEquals("", FilenameUtils.normalizeNoEndSeparator("a/b/../.."));
-        assertEquals("", FilenameUtils.normalizeNoEndSeparator("a/b/../../"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("a/b/../../.."));
-        assertEquals("a" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("a/b/../c/../d"));
-        assertEquals("a" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("a/b/../c/../d/"));
-        assertEquals("a" + SEP + "b" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("a/b//d"));
-        assertEquals("a" + SEP + "b", FilenameUtils.normalizeNoEndSeparator("a/b/././."));
-        assertEquals("a" + SEP + "b", FilenameUtils.normalizeNoEndSeparator("a/b/./././"));
-        assertEquals("a", FilenameUtils.normalizeNoEndSeparator("./a/"));
-        assertEquals("a", FilenameUtils.normalizeNoEndSeparator("./a"));
-        assertEquals("", FilenameUtils.normalizeNoEndSeparator("./"));
-        assertEquals("", FilenameUtils.normalizeNoEndSeparator("."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("../a"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator(".."));
-        assertEquals("", FilenameUtils.normalizeNoEndSeparator(""));
-
-        assertEquals(SEP + "a", FilenameUtils.normalizeNoEndSeparator("/a"));
-        assertEquals(SEP + "a", FilenameUtils.normalizeNoEndSeparator("/a/"));
-        assertEquals(SEP + "a" + SEP + "c", FilenameUtils.normalizeNoEndSeparator("/a/b/../c"));
-        assertEquals(SEP + "c", FilenameUtils.normalizeNoEndSeparator("/a/b/../../c"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("/a/b/../../../c"));
-        assertEquals(SEP + "a", FilenameUtils.normalizeNoEndSeparator("/a/b/.."));
-        assertEquals(SEP + "", FilenameUtils.normalizeNoEndSeparator("/a/b/../.."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("/a/b/../../.."));
-        assertEquals(SEP + "a" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("/a/b/../c/../d"));
-        assertEquals(SEP + "a" + SEP + "b" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("/a/b//d"));
-        assertEquals(SEP + "a" + SEP + "b", FilenameUtils.normalizeNoEndSeparator("/a/b/././."));
-        assertEquals(SEP + "a", FilenameUtils.normalizeNoEndSeparator("/./a"));
-        assertEquals(SEP + "", FilenameUtils.normalizeNoEndSeparator("/./"));
-        assertEquals(SEP + "", FilenameUtils.normalizeNoEndSeparator("/."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("/../a"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("/.."));
-        assertEquals(SEP + "", FilenameUtils.normalizeNoEndSeparator("/"));
-
-        assertEquals("~" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("~/a"));
-        assertEquals("~" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("~/a/"));
-        assertEquals("~" + SEP + "a" + SEP + "c", FilenameUtils.normalizeNoEndSeparator("~/a/b/../c"));
-        assertEquals("~" + SEP + "c", FilenameUtils.normalizeNoEndSeparator("~/a/b/../../c"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("~/a/b/../../../c"));
-        assertEquals("~" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("~/a/b/.."));
-        assertEquals("~" + SEP + "", FilenameUtils.normalizeNoEndSeparator("~/a/b/../.."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("~/a/b/../../.."));
-        assertEquals("~" + SEP + "a" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("~/a/b/../c/../d"));
-        assertEquals("~" + SEP + "a" + SEP + "b" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("~/a/b//d"));
-        assertEquals("~" + SEP + "a" + SEP + "b", FilenameUtils.normalizeNoEndSeparator("~/a/b/././."));
-        assertEquals("~" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("~/./a"));
-        assertEquals("~" + SEP, FilenameUtils.normalizeNoEndSeparator("~/./"));
-        assertEquals("~" + SEP, FilenameUtils.normalizeNoEndSeparator("~/."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("~/../a"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("~/.."));
-        assertEquals("~" + SEP, FilenameUtils.normalizeNoEndSeparator("~/"));
-        assertEquals("~" + SEP, FilenameUtils.normalizeNoEndSeparator("~"));
-
-        assertEquals("~user" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("~user/a"));
-        assertEquals("~user" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("~user/a/"));
-        assertEquals("~user" + SEP + "a" + SEP + "c", FilenameUtils.normalizeNoEndSeparator("~user/a/b/../c"));
-        assertEquals("~user" + SEP + "c", FilenameUtils.normalizeNoEndSeparator("~user/a/b/../../c"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("~user/a/b/../../../c"));
-        assertEquals("~user" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("~user/a/b/.."));
-        assertEquals("~user" + SEP + "", FilenameUtils.normalizeNoEndSeparator("~user/a/b/../.."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("~user/a/b/../../.."));
-        assertEquals("~user" + SEP + "a" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("~user/a/b/../c/../d"));
-        assertEquals("~user" + SEP + "a" + SEP + "b" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("~user/a/b//d"));
-        assertEquals("~user" + SEP + "a" + SEP + "b", FilenameUtils.normalizeNoEndSeparator("~user/a/b/././."));
-        assertEquals("~user" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("~user/./a"));
-        assertEquals("~user" + SEP + "", FilenameUtils.normalizeNoEndSeparator("~user/./"));
-        assertEquals("~user" + SEP + "", FilenameUtils.normalizeNoEndSeparator("~user/."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("~user/../a"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("~user/.."));
-        assertEquals("~user" + SEP, FilenameUtils.normalizeNoEndSeparator("~user/"));
-        assertEquals("~user" + SEP, FilenameUtils.normalizeNoEndSeparator("~user"));
-
-        assertEquals("C:" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("C:/a"));
-        assertEquals("C:" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("C:/a/"));
-        assertEquals("C:" + SEP + "a" + SEP + "c", FilenameUtils.normalizeNoEndSeparator("C:/a/b/../c"));
-        assertEquals("C:" + SEP + "c", FilenameUtils.normalizeNoEndSeparator("C:/a/b/../../c"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("C:/a/b/../../../c"));
-        assertEquals("C:" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("C:/a/b/.."));
-        assertEquals("C:" + SEP + "", FilenameUtils.normalizeNoEndSeparator("C:/a/b/../.."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("C:/a/b/../../.."));
-        assertEquals("C:" + SEP + "a" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("C:/a/b/../c/../d"));
-        assertEquals("C:" + SEP + "a" + SEP + "b" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("C:/a/b//d"));
-        assertEquals("C:" + SEP + "a" + SEP + "b", FilenameUtils.normalizeNoEndSeparator("C:/a/b/././."));
-        assertEquals("C:" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("C:/./a"));
-        assertEquals("C:" + SEP + "", FilenameUtils.normalizeNoEndSeparator("C:/./"));
-        assertEquals("C:" + SEP + "", FilenameUtils.normalizeNoEndSeparator("C:/."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("C:/../a"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("C:/.."));
-        assertEquals("C:" + SEP + "", FilenameUtils.normalizeNoEndSeparator("C:/"));
-
-        assertEquals("C:" + "a", FilenameUtils.normalizeNoEndSeparator("C:a"));
-        assertEquals("C:" + "a", FilenameUtils.normalizeNoEndSeparator("C:a/"));
-        assertEquals("C:" + "a" + SEP + "c", FilenameUtils.normalizeNoEndSeparator("C:a/b/../c"));
-        assertEquals("C:" + "c", FilenameUtils.normalizeNoEndSeparator("C:a/b/../../c"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("C:a/b/../../../c"));
-        assertEquals("C:" + "a", FilenameUtils.normalizeNoEndSeparator("C:a/b/.."));
-        assertEquals("C:" + "", FilenameUtils.normalizeNoEndSeparator("C:a/b/../.."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("C:a/b/../../.."));
-        assertEquals("C:" + "a" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("C:a/b/../c/../d"));
-        assertEquals("C:" + "a" + SEP + "b" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("C:a/b//d"));
-        assertEquals("C:" + "a" + SEP + "b", FilenameUtils.normalizeNoEndSeparator("C:a/b/././."));
-        assertEquals("C:" + "a", FilenameUtils.normalizeNoEndSeparator("C:./a"));
-        assertEquals("C:" + "", FilenameUtils.normalizeNoEndSeparator("C:./"));
-        assertEquals("C:" + "", FilenameUtils.normalizeNoEndSeparator("C:."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("C:../a"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("C:.."));
-        assertEquals("C:" + "", FilenameUtils.normalizeNoEndSeparator("C:"));
-
-        assertEquals(SEP + SEP + "server" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("//server/a"));
-        assertEquals(SEP + SEP + "server" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("//server/a/"));
-        assertEquals(SEP + SEP + "server" + SEP + "a" + SEP + "c", FilenameUtils.normalizeNoEndSeparator("//server/a/b/../c"));
-        assertEquals(SEP + SEP + "server" + SEP + "c", FilenameUtils.normalizeNoEndSeparator("//server/a/b/../../c"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("//server/a/b/../../../c"));
-        assertEquals(SEP + SEP + "server" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("//server/a/b/.."));
-        assertEquals(SEP + SEP + "server" + SEP + "", FilenameUtils.normalizeNoEndSeparator("//server/a/b/../.."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("//server/a/b/../../.."));
-        assertEquals(SEP + SEP + "server" + SEP + "a" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("//server/a/b/../c/../d"));
-        assertEquals(SEP + SEP + "server" + SEP + "a" + SEP + "b" + SEP + "d", FilenameUtils.normalizeNoEndSeparator("//server/a/b//d"));
-        assertEquals(SEP + SEP + "server" + SEP + "a" + SEP + "b", FilenameUtils.normalizeNoEndSeparator("//server/a/b/././."));
-        assertEquals(SEP + SEP + "server" + SEP + "a", FilenameUtils.normalizeNoEndSeparator("//server/./a"));
-        assertEquals(SEP + SEP + "server" + SEP + "", FilenameUtils.normalizeNoEndSeparator("//server/./"));
-        assertEquals(SEP + SEP + "server" + SEP + "", FilenameUtils.normalizeNoEndSeparator("//server/."));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("//server/../a"));
-        assertEquals(null, FilenameUtils.normalizeNoEndSeparator("//server/.."));
-        assertEquals(SEP + SEP + "server" + SEP + "", FilenameUtils.normalizeNoEndSeparator("//server/"));
-    }
-
-    public void testNormalizeNoEndSeparatorUnixWin() throws Exception {
-
-        // Normalize (Unix Separator)
-        assertEquals("/a/c",   FilenameUtils.normalizeNoEndSeparator("/a/b/../c/", true));
-        assertEquals("/a/c",   FilenameUtils.normalizeNoEndSeparator("\\a\\b\\..\\c\\", true));
-
-        // Normalize (Windows Separator)
-        assertEquals("\\a\\c", FilenameUtils.normalizeNoEndSeparator("/a/b/../c/", false));
-        assertEquals("\\a\\c", FilenameUtils.normalizeNoEndSeparator("\\a\\b\\..\\c\\", false));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testConcat() {
-        assertEquals(null, FilenameUtils.concat("", null));
-        assertEquals(null, FilenameUtils.concat(null, null));
-        assertEquals(null, FilenameUtils.concat(null, ""));
-        assertEquals(null, FilenameUtils.concat(null, "a"));
-        assertEquals(SEP + "a", FilenameUtils.concat(null, "/a"));
-
-        assertEquals(null, FilenameUtils.concat("", ":")); // invalid prefix
-        assertEquals(null, FilenameUtils.concat(":", "")); // invalid prefix
-
-        assertEquals("f" + SEP, FilenameUtils.concat("", "f/"));
-        assertEquals("f", FilenameUtils.concat("", "f"));
-        assertEquals("a" + SEP + "f" + SEP, FilenameUtils.concat("a/", "f/"));
-        assertEquals("a" + SEP + "f", FilenameUtils.concat("a", "f"));
-        assertEquals("a" + SEP + "b" + SEP + "f" + SEP, FilenameUtils.concat("a/b/", "f/"));
-        assertEquals("a" + SEP + "b" + SEP + "f", FilenameUtils.concat("a/b", "f"));
-
-        assertEquals("a" + SEP + "f" + SEP, FilenameUtils.concat("a/b/", "../f/"));
-        assertEquals("a" + SEP + "f", FilenameUtils.concat("a/b", "../f"));
-        assertEquals("a" + SEP + "c" + SEP + "g" + SEP, FilenameUtils.concat("a/b/../c/", "f/../g/"));
-        assertEquals("a" + SEP + "c" + SEP + "g", FilenameUtils.concat("a/b/../c", "f/../g"));
-
-        assertEquals("a" + SEP + "c.txt" + SEP + "f", FilenameUtils.concat("a/c.txt", "f"));
-
-        assertEquals(SEP + "f" + SEP, FilenameUtils.concat("", "/f/"));
-        assertEquals(SEP + "f", FilenameUtils.concat("", "/f"));
-        assertEquals(SEP + "f" + SEP, FilenameUtils.concat("a/", "/f/"));
-        assertEquals(SEP + "f", FilenameUtils.concat("a", "/f"));
-
-        assertEquals(SEP + "c" + SEP + "d", FilenameUtils.concat("a/b/", "/c/d"));
-        assertEquals("C:c" + SEP + "d", FilenameUtils.concat("a/b/", "C:c/d"));
-        assertEquals("C:" + SEP + "c" + SEP + "d", FilenameUtils.concat("a/b/", "C:/c/d"));
-        assertEquals("~" + SEP + "c" + SEP + "d", FilenameUtils.concat("a/b/", "~/c/d"));
-        assertEquals("~user" + SEP + "c" + SEP + "d", FilenameUtils.concat("a/b/", "~user/c/d"));
-        assertEquals("~" + SEP, FilenameUtils.concat("a/b/", "~"));
-        assertEquals("~user" + SEP, FilenameUtils.concat("a/b/", "~user"));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testSeparatorsToUnix() {
-        assertEquals(null, FilenameUtils.separatorsToUnix(null));
-        assertEquals("/a/b/c", FilenameUtils.separatorsToUnix("/a/b/c"));
-        assertEquals("/a/b/c.txt", FilenameUtils.separatorsToUnix("/a/b/c.txt"));
-        assertEquals("/a/b/c", FilenameUtils.separatorsToUnix("/a/b\\c"));
-        assertEquals("/a/b/c", FilenameUtils.separatorsToUnix("\\a\\b\\c"));
-        assertEquals("D:/a/b/c", FilenameUtils.separatorsToUnix("D:\\a\\b\\c"));
-    }
-
-    public void testSeparatorsToWindows() {
-        assertEquals(null, FilenameUtils.separatorsToWindows(null));
-        assertEquals("\\a\\b\\c", FilenameUtils.separatorsToWindows("\\a\\b\\c"));
-        assertEquals("\\a\\b\\c.txt", FilenameUtils.separatorsToWindows("\\a\\b\\c.txt"));
-        assertEquals("\\a\\b\\c", FilenameUtils.separatorsToWindows("\\a\\b/c"));
-        assertEquals("\\a\\b\\c", FilenameUtils.separatorsToWindows("/a/b/c"));
-        assertEquals("D:\\a\\b\\c", FilenameUtils.separatorsToWindows("D:/a/b/c"));
-    }
-
-    public void testSeparatorsToSystem() {
-        if (WINDOWS) {
-            assertEquals(null, FilenameUtils.separatorsToSystem(null));
-            assertEquals("\\a\\b\\c", FilenameUtils.separatorsToSystem("\\a\\b\\c"));
-            assertEquals("\\a\\b\\c.txt", FilenameUtils.separatorsToSystem("\\a\\b\\c.txt"));
-            assertEquals("\\a\\b\\c", FilenameUtils.separatorsToSystem("\\a\\b/c"));
-            assertEquals("\\a\\b\\c", FilenameUtils.separatorsToSystem("/a/b/c"));
-            assertEquals("D:\\a\\b\\c", FilenameUtils.separatorsToSystem("D:/a/b/c"));
-        } else {
-            assertEquals(null, FilenameUtils.separatorsToSystem(null));
-            assertEquals("/a/b/c", FilenameUtils.separatorsToSystem("/a/b/c"));
-            assertEquals("/a/b/c.txt", FilenameUtils.separatorsToSystem("/a/b/c.txt"));
-            assertEquals("/a/b/c", FilenameUtils.separatorsToSystem("/a/b\\c"));
-            assertEquals("/a/b/c", FilenameUtils.separatorsToSystem("\\a\\b\\c"));
-            assertEquals("D:/a/b/c", FilenameUtils.separatorsToSystem("D:\\a\\b\\c"));
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    public void testGetPrefixLength() {
-        assertEquals(-1, FilenameUtils.getPrefixLength(null));
-        assertEquals(-1, FilenameUtils.getPrefixLength(":"));
-        assertEquals(-1, FilenameUtils.getPrefixLength("1:\\a\\b\\c.txt"));
-        assertEquals(-1, FilenameUtils.getPrefixLength("1:"));
-        assertEquals(-1, FilenameUtils.getPrefixLength("1:a"));
-        assertEquals(-1, FilenameUtils.getPrefixLength("\\\\\\a\\b\\c.txt"));
-        assertEquals(-1, FilenameUtils.getPrefixLength("\\\\a"));
-
-        assertEquals(0, FilenameUtils.getPrefixLength(""));
-        assertEquals(1, FilenameUtils.getPrefixLength("\\"));
-        assertEquals(2, FilenameUtils.getPrefixLength("C:"));
-        assertEquals(3, FilenameUtils.getPrefixLength("C:\\"));
-        assertEquals(9, FilenameUtils.getPrefixLength("//server/"));
-        assertEquals(2, FilenameUtils.getPrefixLength("~"));
-        assertEquals(2, FilenameUtils.getPrefixLength("~/"));
-        assertEquals(6, FilenameUtils.getPrefixLength("~user"));
-        assertEquals(6, FilenameUtils.getPrefixLength("~user/"));
-
-        assertEquals(0, FilenameUtils.getPrefixLength("a\\b\\c.txt"));
-        assertEquals(1, FilenameUtils.getPrefixLength("\\a\\b\\c.txt"));
-        assertEquals(2, FilenameUtils.getPrefixLength("C:a\\b\\c.txt"));
-        assertEquals(3, FilenameUtils.getPrefixLength("C:\\a\\b\\c.txt"));
-        assertEquals(9, FilenameUtils.getPrefixLength("\\\\server\\a\\b\\c.txt"));
-
-        assertEquals(0, FilenameUtils.getPrefixLength("a/b/c.txt"));
-        assertEquals(1, FilenameUtils.getPrefixLength("/a/b/c.txt"));
-        assertEquals(3, FilenameUtils.getPrefixLength("C:/a/b/c.txt"));
-        assertEquals(9, FilenameUtils.getPrefixLength("//server/a/b/c.txt"));
-        assertEquals(2, FilenameUtils.getPrefixLength("~/a/b/c.txt"));
-        assertEquals(6, FilenameUtils.getPrefixLength("~user/a/b/c.txt"));
-
-        assertEquals(0, FilenameUtils.getPrefixLength("a\\b\\c.txt"));
-        assertEquals(1, FilenameUtils.getPrefixLength("\\a\\b\\c.txt"));
-        assertEquals(2, FilenameUtils.getPrefixLength("~\\a\\b\\c.txt"));
-        assertEquals(6, FilenameUtils.getPrefixLength("~user\\a\\b\\c.txt"));
-
-        assertEquals(9, FilenameUtils.getPrefixLength("//server/a/b/c.txt"));
-        assertEquals(-1, FilenameUtils.getPrefixLength("\\\\\\a\\b\\c.txt"));
-        assertEquals(-1, FilenameUtils.getPrefixLength("///a/b/c.txt"));
-}
-
-    public void testIndexOfLastSeparator() {
-        assertEquals(-1, FilenameUtils.indexOfLastSeparator(null));
-        assertEquals(-1, FilenameUtils.indexOfLastSeparator("noseperator.inthispath"));
-        assertEquals(3, FilenameUtils.indexOfLastSeparator("a/b/c"));
-        assertEquals(3, FilenameUtils.indexOfLastSeparator("a\\b\\c"));
-    }
-
-    public void testIndexOfExtension() {
-        assertEquals(-1, FilenameUtils.indexOfExtension(null));
-        assertEquals(-1, FilenameUtils.indexOfExtension("file"));
-        assertEquals(4, FilenameUtils.indexOfExtension("file.txt"));
-        assertEquals(13, FilenameUtils.indexOfExtension("a.txt/b.txt/c.txt"));
-        assertEquals(-1, FilenameUtils.indexOfExtension("a/b/c"));
-        assertEquals(-1, FilenameUtils.indexOfExtension("a\\b\\c"));
-        assertEquals(-1, FilenameUtils.indexOfExtension("a/b.notextension/c"));
-        assertEquals(-1, FilenameUtils.indexOfExtension("a\\b.notextension\\c"));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testGetPrefix() {
-        assertEquals(null, FilenameUtils.getPrefix(null));
-        assertEquals(null, FilenameUtils.getPrefix(":"));
-        assertEquals(null, FilenameUtils.getPrefix("1:\\a\\b\\c.txt"));
-        assertEquals(null, FilenameUtils.getPrefix("1:"));
-        assertEquals(null, FilenameUtils.getPrefix("1:a"));
-        assertEquals(null, FilenameUtils.getPrefix("\\\\\\a\\b\\c.txt"));
-        assertEquals(null, FilenameUtils.getPrefix("\\\\a"));
-
-        assertEquals("", FilenameUtils.getPrefix(""));
-        assertEquals("\\", FilenameUtils.getPrefix("\\"));
-        assertEquals("C:", FilenameUtils.getPrefix("C:"));
-        assertEquals("C:\\", FilenameUtils.getPrefix("C:\\"));
-        assertEquals("//server/", FilenameUtils.getPrefix("//server/"));
-        assertEquals("~/", FilenameUtils.getPrefix("~"));
-        assertEquals("~/", FilenameUtils.getPrefix("~/"));
-        assertEquals("~user/", FilenameUtils.getPrefix("~user"));
-        assertEquals("~user/", FilenameUtils.getPrefix("~user/"));
-
-        assertEquals("", FilenameUtils.getPrefix("a\\b\\c.txt"));
-        assertEquals("\\", FilenameUtils.getPrefix("\\a\\b\\c.txt"));
-        assertEquals("C:\\", FilenameUtils.getPrefix("C:\\a\\b\\c.txt"));
-        assertEquals("\\\\server\\", FilenameUtils.getPrefix("\\\\server\\a\\b\\c.txt"));
-
-        assertEquals("", FilenameUtils.getPrefix("a/b/c.txt"));
-        assertEquals("/", FilenameUtils.getPrefix("/a/b/c.txt"));
-        assertEquals("C:/", FilenameUtils.getPrefix("C:/a/b/c.txt"));
-        assertEquals("//server/", FilenameUtils.getPrefix("//server/a/b/c.txt"));
-        assertEquals("~/", FilenameUtils.getPrefix("~/a/b/c.txt"));
-        assertEquals("~user/", FilenameUtils.getPrefix("~user/a/b/c.txt"));
-
-        assertEquals("", FilenameUtils.getPrefix("a\\b\\c.txt"));
-        assertEquals("\\", FilenameUtils.getPrefix("\\a\\b\\c.txt"));
-        assertEquals("~\\", FilenameUtils.getPrefix("~\\a\\b\\c.txt"));
-        assertEquals("~user\\", FilenameUtils.getPrefix("~user\\a\\b\\c.txt"));
-    }
-
-    public void testGetPrefix_with_nullbyte() {
-        try {
-            assertEquals("~user\\", FilenameUtils.getPrefix("~u\u0000ser\\a\\b\\c.txt"));
-        } catch (IllegalArgumentException ignore) {
-
-        }
-    }
-
-    public void testGetPath() {
-        assertEquals(null, FilenameUtils.getPath(null));
-        assertEquals("", FilenameUtils.getPath("noseperator.inthispath"));
-        assertEquals("", FilenameUtils.getPath("/noseperator.inthispath"));
-        assertEquals("", FilenameUtils.getPath("\\noseperator.inthispath"));
-        assertEquals("a/b/", FilenameUtils.getPath("a/b/c.txt"));
-        assertEquals("a/b/", FilenameUtils.getPath("a/b/c"));
-        assertEquals("a/b/c/", FilenameUtils.getPath("a/b/c/"));
-        assertEquals("a\\b\\", FilenameUtils.getPath("a\\b\\c"));
-
-        assertEquals(null, FilenameUtils.getPath(":"));
-        assertEquals(null, FilenameUtils.getPath("1:/a/b/c.txt"));
-        assertEquals(null, FilenameUtils.getPath("1:"));
-        assertEquals(null, FilenameUtils.getPath("1:a"));
-        assertEquals(null, FilenameUtils.getPath("///a/b/c.txt"));
-        assertEquals(null, FilenameUtils.getPath("//a"));
-
-        assertEquals("", FilenameUtils.getPath(""));
-        assertEquals("", FilenameUtils.getPath("C:"));
-        assertEquals("", FilenameUtils.getPath("C:/"));
-        assertEquals("", FilenameUtils.getPath("//server/"));
-        assertEquals("", FilenameUtils.getPath("~"));
-        assertEquals("", FilenameUtils.getPath("~/"));
-        assertEquals("", FilenameUtils.getPath("~user"));
-        assertEquals("", FilenameUtils.getPath("~user/"));
-
-        assertEquals("a/b/", FilenameUtils.getPath("a/b/c.txt"));
-        assertEquals("a/b/", FilenameUtils.getPath("/a/b/c.txt"));
-        assertEquals("", FilenameUtils.getPath("C:a"));
-        assertEquals("a/b/", FilenameUtils.getPath("C:a/b/c.txt"));
-        assertEquals("a/b/", FilenameUtils.getPath("C:/a/b/c.txt"));
-        assertEquals("a/b/", FilenameUtils.getPath("//server/a/b/c.txt"));
-        assertEquals("a/b/", FilenameUtils.getPath("~/a/b/c.txt"));
-        assertEquals("a/b/", FilenameUtils.getPath("~user/a/b/c.txt"));
-    }
-
-    public void testGetPath_with_nullbyte() {
-        try {
-            assertEquals("a/b/", FilenameUtils.getPath("~user/a/\u0000b/c.txt"));
-        } catch (IllegalArgumentException ignore) {
-
-        }
-        ;
-    }
-
-
-    public void testGetPathNoEndSeparator() {
-        assertEquals(null, FilenameUtils.getPath(null));
-        assertEquals("", FilenameUtils.getPath("noseperator.inthispath"));
-        assertEquals("", FilenameUtils.getPathNoEndSeparator("/noseperator.inthispath"));
-        assertEquals("", FilenameUtils.getPathNoEndSeparator("\\noseperator.inthispath"));
-        assertEquals("a/b", FilenameUtils.getPathNoEndSeparator("a/b/c.txt"));
-        assertEquals("a/b", FilenameUtils.getPathNoEndSeparator("a/b/c"));
-        assertEquals("a/b/c", FilenameUtils.getPathNoEndSeparator("a/b/c/"));
-        assertEquals("a\\b", FilenameUtils.getPathNoEndSeparator("a\\b\\c"));
-
-        assertEquals(null, FilenameUtils.getPathNoEndSeparator(":"));
-        assertEquals(null, FilenameUtils.getPathNoEndSeparator("1:/a/b/c.txt"));
-        assertEquals(null, FilenameUtils.getPathNoEndSeparator("1:"));
-        assertEquals(null, FilenameUtils.getPathNoEndSeparator("1:a"));
-        assertEquals(null, FilenameUtils.getPathNoEndSeparator("///a/b/c.txt"));
-        assertEquals(null, FilenameUtils.getPathNoEndSeparator("//a"));
-
-        assertEquals("", FilenameUtils.getPathNoEndSeparator(""));
-        assertEquals("", FilenameUtils.getPathNoEndSeparator("C:"));
-        assertEquals("", FilenameUtils.getPathNoEndSeparator("C:/"));
-        assertEquals("", FilenameUtils.getPathNoEndSeparator("//server/"));
-        assertEquals("", FilenameUtils.getPathNoEndSeparator("~"));
-        assertEquals("", FilenameUtils.getPathNoEndSeparator("~/"));
-        assertEquals("", FilenameUtils.getPathNoEndSeparator("~user"));
-        assertEquals("", FilenameUtils.getPathNoEndSeparator("~user/"));
-
-        assertEquals("a/b", FilenameUtils.getPathNoEndSeparator("a/b/c.txt"));
-        assertEquals("a/b", FilenameUtils.getPathNoEndSeparator("/a/b/c.txt"));
-        assertEquals("", FilenameUtils.getPathNoEndSeparator("C:a"));
-        assertEquals("a/b", FilenameUtils.getPathNoEndSeparator("C:a/b/c.txt"));
-        assertEquals("a/b", FilenameUtils.getPathNoEndSeparator("C:/a/b/c.txt"));
-        assertEquals("a/b", FilenameUtils.getPathNoEndSeparator("//server/a/b/c.txt"));
-        assertEquals("a/b", FilenameUtils.getPathNoEndSeparator("~/a/b/c.txt"));
-        assertEquals("a/b", FilenameUtils.getPathNoEndSeparator("~user/a/b/c.txt"));
-    }
-
-    public void testGetPathNoEndSeparator_with_null_byte() {
-        try {
-            assertEquals("a/b", FilenameUtils.getPathNoEndSeparator("~user/a\u0000/b/c.txt"));
-        } catch (IllegalArgumentException ignore) {
-
-        }
-    }
-
-    public void testGetFullPath() {
-        assertEquals(null, FilenameUtils.getFullPath(null));
-        assertEquals("", FilenameUtils.getFullPath("noseperator.inthispath"));
-        assertEquals("a/b/", FilenameUtils.getFullPath("a/b/c.txt"));
-        assertEquals("a/b/", FilenameUtils.getFullPath("a/b/c"));
-        assertEquals("a/b/c/", FilenameUtils.getFullPath("a/b/c/"));
-        assertEquals("a\\b\\", FilenameUtils.getFullPath("a\\b\\c"));
-
-        assertEquals(null, FilenameUtils.getFullPath(":"));
-        assertEquals(null, FilenameUtils.getFullPath("1:/a/b/c.txt"));
-        assertEquals(null, FilenameUtils.getFullPath("1:"));
-        assertEquals(null, FilenameUtils.getFullPath("1:a"));
-        assertEquals(null, FilenameUtils.getFullPath("///a/b/c.txt"));
-        assertEquals(null, FilenameUtils.getFullPath("//a"));
-
-        assertEquals("", FilenameUtils.getFullPath(""));
-        assertEquals("C:", FilenameUtils.getFullPath("C:"));
-        assertEquals("C:/", FilenameUtils.getFullPath("C:/"));
-        assertEquals("//server/", FilenameUtils.getFullPath("//server/"));
-        assertEquals("~/", FilenameUtils.getFullPath("~"));
-        assertEquals("~/", FilenameUtils.getFullPath("~/"));
-        assertEquals("~user/", FilenameUtils.getFullPath("~user"));
-        assertEquals("~user/", FilenameUtils.getFullPath("~user/"));
-
-        assertEquals("a/b/", FilenameUtils.getFullPath("a/b/c.txt"));
-        assertEquals("/a/b/", FilenameUtils.getFullPath("/a/b/c.txt"));
-        assertEquals("C:", FilenameUtils.getFullPath("C:a"));
-        assertEquals("C:a/b/", FilenameUtils.getFullPath("C:a/b/c.txt"));
-        assertEquals("C:/a/b/", FilenameUtils.getFullPath("C:/a/b/c.txt"));
-        assertEquals("//server/a/b/", FilenameUtils.getFullPath("//server/a/b/c.txt"));
-        assertEquals("~/a/b/", FilenameUtils.getFullPath("~/a/b/c.txt"));
-        assertEquals("~user/a/b/", FilenameUtils.getFullPath("~user/a/b/c.txt"));
-    }
-
-    public void testGetFullPathNoEndSeparator() {
-        assertEquals(null, FilenameUtils.getFullPathNoEndSeparator(null));
-        assertEquals("", FilenameUtils.getFullPathNoEndSeparator("noseperator.inthispath"));
-        assertEquals("a/b", FilenameUtils.getFullPathNoEndSeparator("a/b/c.txt"));
-        assertEquals("a/b", FilenameUtils.getFullPathNoEndSeparator("a/b/c"));
-        assertEquals("a/b/c", FilenameUtils.getFullPathNoEndSeparator("a/b/c/"));
-        assertEquals("a\\b", FilenameUtils.getFullPathNoEndSeparator("a\\b\\c"));
-
-        assertEquals(null, FilenameUtils.getFullPathNoEndSeparator(":"));
-        assertEquals(null, FilenameUtils.getFullPathNoEndSeparator("1:/a/b/c.txt"));
-        assertEquals(null, FilenameUtils.getFullPathNoEndSeparator("1:"));
-        assertEquals(null, FilenameUtils.getFullPathNoEndSeparator("1:a"));
-        assertEquals(null, FilenameUtils.getFullPathNoEndSeparator("///a/b/c.txt"));
-        assertEquals(null, FilenameUtils.getFullPathNoEndSeparator("//a"));
-
-        assertEquals("", FilenameUtils.getFullPathNoEndSeparator(""));
-        assertEquals("C:", FilenameUtils.getFullPathNoEndSeparator("C:"));
-        assertEquals("C:/", FilenameUtils.getFullPathNoEndSeparator("C:/"));
-        assertEquals("//server/", FilenameUtils.getFullPathNoEndSeparator("//server/"));
-        assertEquals("~", FilenameUtils.getFullPathNoEndSeparator("~"));
-        assertEquals("~/", FilenameUtils.getFullPathNoEndSeparator("~/"));
-        assertEquals("~user", FilenameUtils.getFullPathNoEndSeparator("~user"));
-        assertEquals("~user/", FilenameUtils.getFullPathNoEndSeparator("~user/"));
-
-        assertEquals("a/b", FilenameUtils.getFullPathNoEndSeparator("a/b/c.txt"));
-        assertEquals("/a/b", FilenameUtils.getFullPathNoEndSeparator("/a/b/c.txt"));
-        assertEquals("C:", FilenameUtils.getFullPathNoEndSeparator("C:a"));
-        assertEquals("C:a/b", FilenameUtils.getFullPathNoEndSeparator("C:a/b/c.txt"));
-        assertEquals("C:/a/b", FilenameUtils.getFullPathNoEndSeparator("C:/a/b/c.txt"));
-        assertEquals("//server/a/b", FilenameUtils.getFullPathNoEndSeparator("//server/a/b/c.txt"));
-        assertEquals("~/a/b", FilenameUtils.getFullPathNoEndSeparator("~/a/b/c.txt"));
-        assertEquals("~user/a/b", FilenameUtils.getFullPathNoEndSeparator("~user/a/b/c.txt"));
-    }
-
-    /**
-     * Test for https://issues.apache.org/jira/browse/IO-248
-     */
-    public void testGetFullPathNoEndSeparator_IO_248() {
-
-        // Test single separator
-        assertEquals("/",  FilenameUtils.getFullPathNoEndSeparator("/"));
-        assertEquals("\\", FilenameUtils.getFullPathNoEndSeparator("\\"));
-
-        // Test one level directory
-        assertEquals("/",  FilenameUtils.getFullPathNoEndSeparator("/abc"));
-        assertEquals("\\", FilenameUtils.getFullPathNoEndSeparator("\\abc"));
-
-        // Test one level directory
-        assertEquals("/abc",  FilenameUtils.getFullPathNoEndSeparator("/abc/xyz"));
-        assertEquals("\\abc", FilenameUtils.getFullPathNoEndSeparator("\\abc\\xyz"));
-    }
-
-    public void testGetName() {
-        assertEquals(null, FilenameUtils.getName(null));
-        assertEquals("noseperator.inthispath", FilenameUtils.getName("noseperator.inthispath"));
-        assertEquals("c.txt", FilenameUtils.getName("a/b/c.txt"));
-        assertEquals("c", FilenameUtils.getName("a/b/c"));
-        assertEquals("", FilenameUtils.getName("a/b/c/"));
-        assertEquals("c", FilenameUtils.getName("a\\b\\c"));
-    }
-
-    public void testInjectionFailure() {
-        try {
-            assertEquals("c", FilenameUtils.getName("a\\b\\\u0000c"));
-        } catch (IllegalArgumentException ignore) {
-
-        }
-    }
-
-    public void testGetBaseName() {
-        assertEquals(null, FilenameUtils.getBaseName(null));
-        assertEquals("noseperator", FilenameUtils.getBaseName("noseperator.inthispath"));
-        assertEquals("c", FilenameUtils.getBaseName("a/b/c.txt"));
-        assertEquals("c", FilenameUtils.getBaseName("a/b/c"));
-        assertEquals("", FilenameUtils.getBaseName("a/b/c/"));
-        assertEquals("c", FilenameUtils.getBaseName("a\\b\\c"));
-        assertEquals("file.txt", FilenameUtils.getBaseName("file.txt.bak"));
-    }
-
-    public void testGetBaseName_with_nullByte() {
-        try {
-            assertEquals("file.txt", FilenameUtils.getBaseName("fil\u0000e.txt.bak"));
-        } catch (IllegalArgumentException ignore) {
-
-        }
-    }
-
-    public void testGetExtension() {
-        assertEquals(null, FilenameUtils.getExtension(null));
-        assertEquals("ext", FilenameUtils.getExtension("file.ext"));
-        assertEquals("", FilenameUtils.getExtension("README"));
-        assertEquals("com", FilenameUtils.getExtension("domain.dot.com"));
-        assertEquals("jpeg", FilenameUtils.getExtension("image.jpeg"));
-        assertEquals("", FilenameUtils.getExtension("a.b/c"));
-        assertEquals("txt", FilenameUtils.getExtension("a.b/c.txt"));
-        assertEquals("", FilenameUtils.getExtension("a/b/c"));
-        assertEquals("", FilenameUtils.getExtension("a.b\\c"));
-        assertEquals("txt", FilenameUtils.getExtension("a.b\\c.txt"));
-        assertEquals("", FilenameUtils.getExtension("a\\b\\c"));
-        assertEquals("", FilenameUtils.getExtension("C:\\temp\\foo.bar\\README"));
-        assertEquals("ext", FilenameUtils.getExtension("../filename.ext"));
-    }
-
-    public void testRemoveExtension() {
-        assertEquals(null, FilenameUtils.removeExtension(null));
-        assertEquals("file", FilenameUtils.removeExtension("file.ext"));
-        assertEquals("README", FilenameUtils.removeExtension("README"));
-        assertEquals("domain.dot", FilenameUtils.removeExtension("domain.dot.com"));
-        assertEquals("image", FilenameUtils.removeExtension("image.jpeg"));
-        assertEquals("a.b/c", FilenameUtils.removeExtension("a.b/c"));
-        assertEquals("a.b/c", FilenameUtils.removeExtension("a.b/c.txt"));
-        assertEquals("a/b/c", FilenameUtils.removeExtension("a/b/c"));
-        assertEquals("a.b\\c", FilenameUtils.removeExtension("a.b\\c"));
-        assertEquals("a.b\\c", FilenameUtils.removeExtension("a.b\\c.txt"));
-        assertEquals("a\\b\\c", FilenameUtils.removeExtension("a\\b\\c"));
-        assertEquals("C:\\temp\\foo.bar\\README", FilenameUtils.removeExtension("C:\\temp\\foo.bar\\README"));
-        assertEquals("../filename", FilenameUtils.removeExtension("../filename.ext"));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testEquals() {
-        assertTrue(FilenameUtils.equals(null, null));
-        assertFalse(FilenameUtils.equals(null, ""));
-        assertFalse(FilenameUtils.equals("", null));
-        assertTrue(FilenameUtils.equals("", ""));
-        assertTrue(FilenameUtils.equals("file.txt", "file.txt"));
-        assertFalse(FilenameUtils.equals("file.txt", "FILE.TXT"));
-        assertFalse(FilenameUtils.equals("a\\b\\file.txt", "a/b/file.txt"));
-    }
-
-    public void testEqualsOnSystem() {
-        assertTrue(FilenameUtils.equalsOnSystem(null, null));
-        assertFalse(FilenameUtils.equalsOnSystem(null, ""));
-        assertFalse(FilenameUtils.equalsOnSystem("", null));
-        assertTrue(FilenameUtils.equalsOnSystem("", ""));
-        assertTrue(FilenameUtils.equalsOnSystem("file.txt", "file.txt"));
-        assertEquals(WINDOWS, FilenameUtils.equalsOnSystem("file.txt", "FILE.TXT"));
-        assertFalse(FilenameUtils.equalsOnSystem("a\\b\\file.txt", "a/b/file.txt"));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testEqualsNormalized() {
-        assertTrue(FilenameUtils.equalsNormalized(null, null));
-        assertFalse(FilenameUtils.equalsNormalized(null, ""));
-        assertFalse(FilenameUtils.equalsNormalized("", null));
-        assertTrue(FilenameUtils.equalsNormalized("", ""));
-        assertTrue(FilenameUtils.equalsNormalized("file.txt", "file.txt"));
-        assertFalse(FilenameUtils.equalsNormalized("file.txt", "FILE.TXT"));
-        assertTrue(FilenameUtils.equalsNormalized("a\\b\\file.txt", "a/b/file.txt"));
-        assertFalse(FilenameUtils.equalsNormalized("a/b/", "a/b"));
-    }
-
-    public void testEqualsNormalizedOnSystem() {
-        assertTrue(FilenameUtils.equalsNormalizedOnSystem(null, null));
-        assertFalse(FilenameUtils.equalsNormalizedOnSystem(null, ""));
-        assertFalse(FilenameUtils.equalsNormalizedOnSystem("", null));
-        assertTrue(FilenameUtils.equalsNormalizedOnSystem("", ""));
-        assertTrue(FilenameUtils.equalsNormalizedOnSystem("file.txt", "file.txt"));
-        assertEquals(WINDOWS, FilenameUtils.equalsNormalizedOnSystem("file.txt", "FILE.TXT"));
-        assertTrue(FilenameUtils.equalsNormalizedOnSystem("a\\b\\file.txt", "a/b/file.txt"));
-        assertFalse(FilenameUtils.equalsNormalizedOnSystem("a/b/", "a/b"));
-    }
-
-    /**
-     * Test for https://issues.apache.org/jira/browse/IO-128
-     */
-    public void testEqualsNormalizedError_IO_128() {
-        try {
-            FilenameUtils.equalsNormalizedOnSystem("//file.txt", "file.txt");
-            fail("Invalid normalized first file");
-        } catch(final NullPointerException e) {
-            // expected result
-        }
-        try {
-            FilenameUtils.equalsNormalizedOnSystem("file.txt", "//file.txt");
-            fail("Invalid normalized second file");
-        } catch(final NullPointerException e) {
-            // expected result
-        }
-        try {
-            FilenameUtils.equalsNormalizedOnSystem("//file.txt", "//file.txt");
-            fail("Invalid normalized both filse");
-        } catch(final NullPointerException e) {
-            // expected result
-        }
-    }
-
-    public void testEquals_fullControl() {
-        assertFalse(FilenameUtils.equals("file.txt", "FILE.TXT", true, IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.equals("file.txt", "FILE.TXT", true, IOCase.INSENSITIVE));
-        assertEquals(WINDOWS, FilenameUtils.equals("file.txt", "FILE.TXT", true, IOCase.SYSTEM));
-        assertFalse(FilenameUtils.equals("file.txt", "FILE.TXT", true, null));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testIsExtension() {
-        assertFalse(FilenameUtils.isExtension(null, (String) null));
-        assertFalse(FilenameUtils.isExtension("file.txt", (String) null));
-        assertTrue(FilenameUtils.isExtension("file", (String) null));
-        assertFalse(FilenameUtils.isExtension("file.txt", ""));
-        assertTrue(FilenameUtils.isExtension("file", ""));
-        assertTrue(FilenameUtils.isExtension("file.txt", "txt"));
-        assertFalse(FilenameUtils.isExtension("file.txt", "rtf"));
-
-        assertFalse(FilenameUtils.isExtension("a/b/file.txt", (String) null));
-        assertFalse(FilenameUtils.isExtension("a/b/file.txt", ""));
-        assertTrue(FilenameUtils.isExtension("a/b/file.txt", "txt"));
-        assertFalse(FilenameUtils.isExtension("a/b/file.txt", "rtf"));
-
-        assertFalse(FilenameUtils.isExtension("a.b/file.txt", (String) null));
-        assertFalse(FilenameUtils.isExtension("a.b/file.txt", ""));
-        assertTrue(FilenameUtils.isExtension("a.b/file.txt", "txt"));
-        assertFalse(FilenameUtils.isExtension("a.b/file.txt", "rtf"));
-
-        assertFalse(FilenameUtils.isExtension("a\\b\\file.txt", (String) null));
-        assertFalse(FilenameUtils.isExtension("a\\b\\file.txt", ""));
-        assertTrue(FilenameUtils.isExtension("a\\b\\file.txt", "txt"));
-        assertFalse(FilenameUtils.isExtension("a\\b\\file.txt", "rtf"));
-
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", (String) null));
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", ""));
-        assertTrue(FilenameUtils.isExtension("a.b\\file.txt", "txt"));
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", "rtf"));
-
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", "TXT"));
-    }
-
-    public void testIsExtension_injection() {
-        try {
-            FilenameUtils.isExtension("a.b\\fi\u0000le.txt", "TXT");
-            fail("Should throw IAE");
-        } catch (IllegalArgumentException ignore) {
-        }
-    }
-
-    public void testIsExtensionArray() {
-        assertFalse(FilenameUtils.isExtension(null, (String[]) null));
-        assertFalse(FilenameUtils.isExtension("file.txt", (String[]) null));
-        assertTrue(FilenameUtils.isExtension("file", (String[]) null));
-        assertFalse(FilenameUtils.isExtension("file.txt", new String[0]));
-        assertTrue(FilenameUtils.isExtension("file.txt", new String[] {"txt"}));
-        assertFalse(FilenameUtils.isExtension("file.txt", new String[] {"rtf"}));
-        assertTrue(FilenameUtils.isExtension("file", new String[] {"rtf", ""}));
-        assertTrue(FilenameUtils.isExtension("file.txt", new String[] {"rtf", "txt"}));
-
-        assertFalse(FilenameUtils.isExtension("a/b/file.txt", (String[]) null));
-        assertFalse(FilenameUtils.isExtension("a/b/file.txt", new String[0]));
-        assertTrue(FilenameUtils.isExtension("a/b/file.txt", new String[] {"txt"}));
-        assertFalse(FilenameUtils.isExtension("a/b/file.txt", new String[] {"rtf"}));
-        assertTrue(FilenameUtils.isExtension("a/b/file.txt", new String[] {"rtf", "txt"}));
-
-        assertFalse(FilenameUtils.isExtension("a.b/file.txt", (String[]) null));
-        assertFalse(FilenameUtils.isExtension("a.b/file.txt", new String[0]));
-        assertTrue(FilenameUtils.isExtension("a.b/file.txt", new String[] {"txt"}));
-        assertFalse(FilenameUtils.isExtension("a.b/file.txt", new String[] {"rtf"}));
-        assertTrue(FilenameUtils.isExtension("a.b/file.txt", new String[] {"rtf", "txt"}));
-
-        assertFalse(FilenameUtils.isExtension("a\\b\\file.txt", (String[]) null));
-        assertFalse(FilenameUtils.isExtension("a\\b\\file.txt", new String[0]));
-        assertTrue(FilenameUtils.isExtension("a\\b\\file.txt", new String[] {"txt"}));
-        assertFalse(FilenameUtils.isExtension("a\\b\\file.txt", new String[] {"rtf"}));
-        assertTrue(FilenameUtils.isExtension("a\\b\\file.txt", new String[] {"rtf", "txt"}));
-
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", (String[]) null));
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", new String[0]));
-        assertTrue(FilenameUtils.isExtension("a.b\\file.txt", new String[] {"txt"}));
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", new String[] {"rtf"}));
-        assertTrue(FilenameUtils.isExtension("a.b\\file.txt", new String[] {"rtf", "txt"}));
-
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", new String[] {"TXT"}));
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", new String[] {"TXT", "RTF"}));
-    }
-
-    public void testIsExtensionCollection() {
-        assertFalse(FilenameUtils.isExtension(null, (Collection<String>) null));
-        assertFalse(FilenameUtils.isExtension("file.txt", (Collection<String>) null));
-        assertTrue(FilenameUtils.isExtension("file", (Collection<String>) null));
-        assertFalse(FilenameUtils.isExtension("file.txt", new ArrayList<String>()));
-        assertTrue(FilenameUtils.isExtension("file.txt", new ArrayList<String>(Arrays.asList(new String[] {"txt"}))));
-        assertFalse(FilenameUtils.isExtension("file.txt", new ArrayList<String>(Arrays.asList(new String[] {"rtf"}))));
-        assertTrue(FilenameUtils.isExtension("file", new ArrayList<String>(Arrays.asList(new String[] {"rtf", ""}))));
-        assertTrue(FilenameUtils.isExtension("file.txt", new ArrayList<String>(Arrays.asList(new String[] {"rtf", "txt"}))));
-
-        assertFalse(FilenameUtils.isExtension("a/b/file.txt", (Collection<String>) null));
-        assertFalse(FilenameUtils.isExtension("a/b/file.txt", new ArrayList<String>()));
-        assertTrue(FilenameUtils.isExtension("a/b/file.txt", new ArrayList<String>(Arrays.asList(new String[] {"txt"}))));
-        assertFalse(FilenameUtils.isExtension("a/b/file.txt", new ArrayList<String>(Arrays.asList(new String[] {"rtf"}))));
-        assertTrue(FilenameUtils.isExtension("a/b/file.txt", new ArrayList<String>(Arrays.asList(new String[] {"rtf", "txt"}))));
-
-        assertFalse(FilenameUtils.isExtension("a.b/file.txt", (Collection<String>) null));
-        assertFalse(FilenameUtils.isExtension("a.b/file.txt", new ArrayList<String>()));
-        assertTrue(FilenameUtils.isExtension("a.b/file.txt", new ArrayList<String>(Arrays.asList(new String[] {"txt"}))));
-        assertFalse(FilenameUtils.isExtension("a.b/file.txt", new ArrayList<String>(Arrays.asList(new String[] {"rtf"}))));
-        assertTrue(FilenameUtils.isExtension("a.b/file.txt", new ArrayList<String>(Arrays.asList(new String[] {"rtf", "txt"}))));
-
-        assertFalse(FilenameUtils.isExtension("a\\b\\file.txt", (Collection<String>) null));
-        assertFalse(FilenameUtils.isExtension("a\\b\\file.txt", new ArrayList<String>()));
-        assertTrue(FilenameUtils.isExtension("a\\b\\file.txt", new ArrayList<String>(Arrays.asList(new String[] {"txt"}))));
-        assertFalse(FilenameUtils.isExtension("a\\b\\file.txt", new ArrayList<String>(Arrays.asList(new String[] {"rtf"}))));
-        assertTrue(FilenameUtils.isExtension("a\\b\\file.txt", new ArrayList<String>(Arrays.asList(new String[] {"rtf", "txt"}))));
-
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", (Collection<String>) null));
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", new ArrayList<String>()));
-        assertTrue(FilenameUtils.isExtension("a.b\\file.txt", new ArrayList<String>(Arrays.asList(new String[] {"txt"}))));
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", new ArrayList<String>(Arrays.asList(new String[] {"rtf"}))));
-        assertTrue(FilenameUtils.isExtension("a.b\\file.txt", new ArrayList<String>(Arrays.asList(new String[] {"rtf", "txt"}))));
-
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", new ArrayList<String>(Arrays.asList(new String[] {"TXT"}))));
-        assertFalse(FilenameUtils.isExtension("a.b\\file.txt", new ArrayList<String>(Arrays.asList(new String[] {"TXT", "RTF"}))));
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/FilenameUtilsWildcardTestCase.java b/trunk/src/test/java/org/apache/commons/io/FilenameUtilsWildcardTestCase.java
deleted file mode 100644
index ff94d8c..0000000
--- a/trunk/src/test/java/org/apache/commons/io/FilenameUtilsWildcardTestCase.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.File;
-import java.util.Locale;
-
-import junit.framework.TestCase;
-
-public class FilenameUtilsWildcardTestCase extends TestCase {
-
-    private static final boolean WINDOWS = File.separatorChar == '\\';
-
-    public FilenameUtilsWildcardTestCase(final String name) {
-        super(name);
-    }
-
-    //-----------------------------------------------------------------------
-    // Testing:
-    //   FilenameUtils.wildcardMatch(String,String)
-
-    public void testMatch() {
-        assertFalse(FilenameUtils.wildcardMatch(null, "Foo"));
-        assertFalse(FilenameUtils.wildcardMatch("Foo", null));
-        assertTrue(FilenameUtils.wildcardMatch(null, null));
-        assertTrue(FilenameUtils.wildcardMatch("Foo", "Foo"));
-        assertTrue(FilenameUtils.wildcardMatch("", ""));
-        assertTrue(FilenameUtils.wildcardMatch("", "*"));
-        assertFalse(FilenameUtils.wildcardMatch("", "?"));
-        assertTrue(FilenameUtils.wildcardMatch("Foo", "Fo*"));
-        assertTrue(FilenameUtils.wildcardMatch("Foo", "Fo?"));
-        assertTrue(FilenameUtils.wildcardMatch("Foo Bar and Catflap", "Fo*"));
-        assertTrue(FilenameUtils.wildcardMatch("New Bookmarks", "N?w ?o?k??r?s"));
-        assertFalse(FilenameUtils.wildcardMatch("Foo", "Bar"));
-        assertTrue(FilenameUtils.wildcardMatch("Foo Bar Foo", "F*o Bar*"));
-        assertTrue(FilenameUtils.wildcardMatch("Adobe Acrobat Installer", "Ad*er"));
-        assertTrue(FilenameUtils.wildcardMatch("Foo", "*Foo"));
-        assertTrue(FilenameUtils.wildcardMatch("BarFoo", "*Foo"));
-        assertTrue(FilenameUtils.wildcardMatch("Foo", "Foo*"));
-        assertTrue(FilenameUtils.wildcardMatch("FooBar", "Foo*"));
-        assertFalse(FilenameUtils.wildcardMatch("FOO", "*Foo"));
-        assertFalse(FilenameUtils.wildcardMatch("BARFOO", "*Foo"));
-        assertFalse(FilenameUtils.wildcardMatch("FOO", "Foo*"));
-        assertFalse(FilenameUtils.wildcardMatch("FOOBAR", "Foo*"));
-    }
-
-    public void testMatchOnSystem() {
-        assertFalse(FilenameUtils.wildcardMatchOnSystem(null, "Foo"));
-        assertFalse(FilenameUtils.wildcardMatchOnSystem("Foo", null));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem(null, null));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem("Foo", "Foo"));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem("", ""));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem("Foo", "Fo*"));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem("Foo", "Fo?"));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem("Foo Bar and Catflap", "Fo*"));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem("New Bookmarks", "N?w ?o?k??r?s"));
-        assertFalse(FilenameUtils.wildcardMatchOnSystem("Foo", "Bar"));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem("Foo Bar Foo", "F*o Bar*"));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem("Adobe Acrobat Installer", "Ad*er"));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem("Foo", "*Foo"));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem("BarFoo", "*Foo"));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem("Foo", "Foo*"));
-        assertTrue(FilenameUtils.wildcardMatchOnSystem("FooBar", "Foo*"));
-        assertEquals(WINDOWS, FilenameUtils.wildcardMatchOnSystem("FOO", "*Foo"));
-        assertEquals(WINDOWS, FilenameUtils.wildcardMatchOnSystem("BARFOO", "*Foo"));
-        assertEquals(WINDOWS, FilenameUtils.wildcardMatchOnSystem("FOO", "Foo*"));
-        assertEquals(WINDOWS, FilenameUtils.wildcardMatchOnSystem("FOOBAR", "Foo*"));
-    }
-
-    public void testMatchCaseSpecified() {
-        assertFalse(FilenameUtils.wildcardMatch(null, "Foo", IOCase.SENSITIVE));
-        assertFalse(FilenameUtils.wildcardMatch("Foo", null, IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch(null, null, IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("Foo", "Foo", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("", "", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("Foo", "Fo*", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("Foo", "Fo?", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("Foo Bar and Catflap", "Fo*", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("New Bookmarks", "N?w ?o?k??r?s", IOCase.SENSITIVE));
-        assertFalse(FilenameUtils.wildcardMatch("Foo", "Bar", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("Foo Bar Foo", "F*o Bar*", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("Adobe Acrobat Installer", "Ad*er", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("Foo", "*Foo", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("Foo", "Foo*", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("Foo", "*Foo", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("BarFoo", "*Foo", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("Foo", "Foo*", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("FooBar", "Foo*", IOCase.SENSITIVE));
-
-        assertFalse(FilenameUtils.wildcardMatch("FOO", "*Foo", IOCase.SENSITIVE));
-        assertFalse(FilenameUtils.wildcardMatch("BARFOO", "*Foo", IOCase.SENSITIVE));
-        assertFalse(FilenameUtils.wildcardMatch("FOO", "Foo*", IOCase.SENSITIVE));
-        assertFalse(FilenameUtils.wildcardMatch("FOOBAR", "Foo*", IOCase.SENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("FOO", "*Foo", IOCase.INSENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("BARFOO", "*Foo", IOCase.INSENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("FOO", "Foo*", IOCase.INSENSITIVE));
-        assertTrue(FilenameUtils.wildcardMatch("FOOBAR", "Foo*", IOCase.INSENSITIVE));
-        assertEquals(WINDOWS, FilenameUtils.wildcardMatch("FOO", "*Foo", IOCase.SYSTEM));
-        assertEquals(WINDOWS, FilenameUtils.wildcardMatch("BARFOO", "*Foo", IOCase.SYSTEM));
-        assertEquals(WINDOWS, FilenameUtils.wildcardMatch("FOO", "Foo*", IOCase.SYSTEM));
-        assertEquals(WINDOWS, FilenameUtils.wildcardMatch("FOOBAR", "Foo*", IOCase.SYSTEM));
-    }
-
-    public void testSplitOnTokens() {
-        assertArrayEquals( new String[] { "Ad", "*", "er" }, FilenameUtils.splitOnTokens("Ad*er") );
-        assertArrayEquals( new String[] { "Ad", "?", "er" }, FilenameUtils.splitOnTokens("Ad?er") );
-        assertArrayEquals( new String[] { "Test", "*", "?", "One" }, FilenameUtils.splitOnTokens("Test*?One") );
-        assertArrayEquals( new String[] { "Test", "?", "*", "One" }, FilenameUtils.splitOnTokens("Test?*One") );
-        assertArrayEquals( new String[] { "*" }, FilenameUtils.splitOnTokens("****") );
-        assertArrayEquals( new String[] { "*", "?", "?", "*" }, FilenameUtils.splitOnTokens("*??*") );
-        assertArrayEquals( new String[] { "*", "?", "*", "?", "*" }, FilenameUtils.splitOnTokens("*?**?*") );
-        assertArrayEquals( new String[] { "*", "?", "*", "?", "*" }, FilenameUtils.splitOnTokens("*?***?*") );
-        assertArrayEquals( new String[] { "h", "?", "?", "*" }, FilenameUtils.splitOnTokens("h??*") );
-        assertArrayEquals( new String[] { "" }, FilenameUtils.splitOnTokens("") );
-    }
-
-    private void assertArrayEquals(final Object[] a1, final Object[] a2) {
-        assertEquals(a1.length, a2.length);
-        for(int i=0; i<a1.length; i++) {
-            assertEquals(a1[i], a2[i]);
-        }
-    }
-
-    private void assertMatch(final String text, final String wildcard, final boolean expected) {
-        assertEquals(text + " " + wildcard, expected, FilenameUtils.wildcardMatch(text, wildcard));
-    }
-
-    // A separate set of tests, added to this batch
-    public void testMatch2() {
-        assertMatch("log.txt", "log.txt", true);
-        assertMatch("log.txt1", "log.txt", false);
-
-        assertMatch("log.txt", "log.txt*", true);
-        assertMatch("log.txt", "log.txt*1", false);
-        assertMatch("log.txt", "*log.txt*", true);
-
-        assertMatch("log.txt", "*.txt", true);
-        assertMatch("txt.log", "*.txt", false);
-        assertMatch("config.ini", "*.ini", true);
-
-        assertMatch("config.txt.bak", "con*.txt", false);
-
-        assertMatch("log.txt9", "*.txt?", true);
-        assertMatch("log.txt", "*.txt?", false);
-
-        assertMatch("progtestcase.java~5~", "*test*.java~*~", true);
-        assertMatch("progtestcase.java;5~", "*test*.java~*~", false);
-        assertMatch("progtestcase.java~5", "*test*.java~*~", false);
-
-        assertMatch("log.txt", "log.*", true);
-
-        assertMatch("log.txt", "log?*", true);
-
-        assertMatch("log.txt12", "log.txt??", true);
-
-        assertMatch("log.log", "log**log", true);
-        assertMatch("log.log", "log**", true);
-        assertMatch("log.log", "log.**", true);
-        assertMatch("log.log", "**.log", true);
-        assertMatch("log.log", "**log", true);
-
-        assertMatch("log.log", "log*log", true);
-        assertMatch("log.log", "log*", true);
-        assertMatch("log.log", "log.*", true);
-        assertMatch("log.log", "*.log", true);
-        assertMatch("log.log", "*log", true);
-
-        assertMatch("log.log", "*log?", false);
-        assertMatch("log.log", "*log?*", true);
-        assertMatch("log.log.abc", "*log?abc", true);
-        assertMatch("log.log.abc.log.abc", "*log?abc", true);
-        assertMatch("log.log.abc.log.abc.d", "*log?abc?d", true);
-    }
-
-    /**
-     * See https://issues.apache.org/jira/browse/IO-246
-     */
-    public void test_IO_246() {
-
-        // Tests for "*?"
-        assertMatch("aaa", "aa*?", true);
-        // these ought to work as well, but "*?" does not work properly at present
-//      assertMatch("aaa", "a*?", true);
-//      assertMatch("aaa", "*?", true);
-
-        // Tests for "?*"
-        assertMatch("",    "?*",   false);
-        assertMatch("a",   "a?*",  false);
-        assertMatch("aa",  "aa?*", false);
-        assertMatch("a",   "?*",   true);
-        assertMatch("aa",  "?*",   true);
-        assertMatch("aaa", "?*",   true);
-
-        // Test ending on "?"
-        assertMatch("",    "?", false);
-        assertMatch("a",   "a?", false);
-        assertMatch("aa",  "aa?", false);
-        assertMatch("aab", "aa?", true);
-        assertMatch("aaa", "*a", true);
-    }
-
-    public void testLocaleIndependence() {
-        final Locale orig = Locale.getDefault();
-
-        final Locale[] locales = Locale.getAvailableLocales();
-
-        final String[][] data = {
-            { "I", "i"},
-            { "i", "I"},
-            { "i", "\u0130"},
-            { "i", "\u0131"},
-            { "\u03A3", "\u03C2"},
-            { "\u03A3", "\u03C3"},
-            { "\u03C2", "\u03C3"},
-        };
-
-        try {
-            for (int i = 0; i < data.length; i++) {
-                for (final Locale locale : locales) {
-                    Locale.setDefault(locale);
-                    assertTrue("Test data corrupt: " + i, data[i][0].equalsIgnoreCase(data[i][1]));
-                    final boolean match = FilenameUtils.wildcardMatch(data[i][0], data[i][1], IOCase.INSENSITIVE);
-                    assertTrue(Locale.getDefault().toString() + ": " + i, match);
-                }
-            }
-        } finally {
-            Locale.setDefault(orig);
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/HexDumpTest.java b/trunk/src/test/java/org/apache/commons/io/HexDumpTest.java
deleted file mode 100644
index 0ed5999..0000000
--- a/trunk/src/test/java/org/apache/commons/io/HexDumpTest.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.io.output.ByteArrayOutputStream;
-
-
-/**
- * @version $Id$
- */
-public class HexDumpTest extends TestCase {
-
-    public HexDumpTest(final String name) {
-        super(name);
-    }
-
-    private char toHex(final int n) {
-        final char[] hexChars =
-                {
-                    '0', '1', '2', '3', '4', '5', '6', '7',
-                    '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
-                };
-
-        return hexChars[n % 16];
-    }
-
-    public void testDump()
-            throws IOException {
-        final byte[] testArray = new byte[256];
-
-        for (int j = 0; j < 256; j++) {
-            testArray[j] = (byte) j;
-        }
-        ByteArrayOutputStream stream = new ByteArrayOutputStream();
-
-        HexDump.dump(testArray, 0, stream, 0);
-        byte[] outputArray = new byte[16 * (73 + HexDump.EOL.length())];
-
-        for (int j = 0; j < 16; j++) {
-            int offset = (73 + HexDump.EOL.length()) * j;
-
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) toHex(j);
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) ' ';
-            for (int k = 0; k < 16; k++) {
-                outputArray[offset++] = (byte) toHex(j);
-                outputArray[offset++] = (byte) toHex(k);
-                outputArray[offset++] = (byte) ' ';
-            }
-            for (int k = 0; k < 16; k++) {
-                outputArray[offset++] = (byte) toAscii((j * 16) + k);
-            }
-            System.arraycopy(HexDump.EOL.getBytes(), 0, outputArray, offset,
-                    HexDump.EOL.getBytes().length);
-        }
-        byte[] actualOutput = stream.toByteArray();
-
-        assertEquals("array size mismatch", outputArray.length,
-                actualOutput.length);
-        for (int j = 0; j < outputArray.length; j++) {
-            assertEquals("array[ " + j + "] mismatch", outputArray[j],
-                    actualOutput[j]);
-        }
-
-        // verify proper behavior with non-zero offset
-        stream = new ByteArrayOutputStream();
-        HexDump.dump(testArray, 0x10000000, stream, 0);
-        outputArray = new byte[16 * (73 + HexDump.EOL.length())];
-        for (int j = 0; j < 16; j++) {
-            int offset = (73 + HexDump.EOL.length()) * j;
-
-            outputArray[offset++] = (byte) '1';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) toHex(j);
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) ' ';
-            for (int k = 0; k < 16; k++) {
-                outputArray[offset++] = (byte) toHex(j);
-                outputArray[offset++] = (byte) toHex(k);
-                outputArray[offset++] = (byte) ' ';
-            }
-            for (int k = 0; k < 16; k++) {
-                outputArray[offset++] = (byte) toAscii((j * 16) + k);
-            }
-            System.arraycopy(HexDump.EOL.getBytes(), 0, outputArray, offset,
-                    HexDump.EOL.getBytes().length);
-        }
-        actualOutput = stream.toByteArray();
-        assertEquals("array size mismatch", outputArray.length,
-                actualOutput.length);
-        for (int j = 0; j < outputArray.length; j++) {
-            assertEquals("array[ " + j + "] mismatch", outputArray[j],
-                    actualOutput[j]);
-        }
-
-        // verify proper behavior with negative offset
-        stream = new ByteArrayOutputStream();
-        HexDump.dump(testArray, 0xFF000000, stream, 0);
-        outputArray = new byte[16 * (73 + HexDump.EOL.length())];
-        for (int j = 0; j < 16; j++) {
-            int offset = (73 + HexDump.EOL.length()) * j;
-
-            outputArray[offset++] = (byte) 'F';
-            outputArray[offset++] = (byte) 'F';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) toHex(j);
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) ' ';
-            for (int k = 0; k < 16; k++) {
-                outputArray[offset++] = (byte) toHex(j);
-                outputArray[offset++] = (byte) toHex(k);
-                outputArray[offset++] = (byte) ' ';
-            }
-            for (int k = 0; k < 16; k++) {
-                outputArray[offset++] = (byte) toAscii((j * 16) + k);
-            }
-            System.arraycopy(HexDump.EOL.getBytes(), 0, outputArray, offset,
-                    HexDump.EOL.getBytes().length);
-        }
-        actualOutput = stream.toByteArray();
-        assertEquals("array size mismatch", outputArray.length,
-                actualOutput.length);
-        for (int j = 0; j < outputArray.length; j++) {
-            assertEquals("array[ " + j + "] mismatch", outputArray[j],
-                    actualOutput[j]);
-        }
-
-        // verify proper behavior with non-zero index
-        stream = new ByteArrayOutputStream();
-        HexDump.dump(testArray, 0x10000000, stream, 0x81);
-        outputArray = new byte[(8 * (73 + HexDump.EOL.length())) - 1];
-        for (int j = 0; j < 8; j++) {
-            int offset = (73 + HexDump.EOL.length()) * j;
-
-            outputArray[offset++] = (byte) '1';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) '0';
-            outputArray[offset++] = (byte) toHex(j + 8);
-            outputArray[offset++] = (byte) '1';
-            outputArray[offset++] = (byte) ' ';
-            for (int k = 0; k < 16; k++) {
-                final int index = 0x81 + (j * 16) + k;
-
-                if (index < 0x100) {
-                    outputArray[offset++] = (byte) toHex(index / 16);
-                    outputArray[offset++] = (byte) toHex(index);
-                } else {
-                    outputArray[offset++] = (byte) ' ';
-                    outputArray[offset++] = (byte) ' ';
-                }
-                outputArray[offset++] = (byte) ' ';
-            }
-            for (int k = 0; k < 16; k++) {
-                final int index = 0x81 + (j * 16) + k;
-
-                if (index < 0x100) {
-                    outputArray[offset++] = (byte) toAscii(index);
-                }
-            }
-            System.arraycopy(HexDump.EOL.getBytes(), 0, outputArray, offset,
-                    HexDump.EOL.getBytes().length);
-        }
-        actualOutput = stream.toByteArray();
-        assertEquals("array size mismatch", outputArray.length,
-                actualOutput.length);
-        for (int j = 0; j < outputArray.length; j++) {
-            assertEquals("array[ " + j + "] mismatch", outputArray[j],
-                    actualOutput[j]);
-        }
-
-        // verify proper behavior with negative index
-        try {
-            HexDump.dump(testArray, 0x10000000, new ByteArrayOutputStream(),
-                    -1);
-            fail("should have caught ArrayIndexOutOfBoundsException on negative index");
-        } catch (final ArrayIndexOutOfBoundsException ignored_exception) {
-
-            // as expected
-        }
-
-        // verify proper behavior with index that is too large
-        try {
-            HexDump.dump(testArray, 0x10000000, new ByteArrayOutputStream(),
-                    testArray.length);
-            fail("should have caught ArrayIndexOutOfBoundsException on large index");
-        } catch (final ArrayIndexOutOfBoundsException ignored_exception) {
-
-            // as expected
-        }
-
-        // verify proper behavior with null stream
-        try {
-            HexDump.dump(testArray, 0x10000000, null, 0);
-            fail("should have caught IllegalArgumentException on negative index");
-        } catch (final IllegalArgumentException ignored_exception) {
-
-            // as expected
-        }
-    }
-
-    private char toAscii(final int c) {
-        char rval = '.';
-
-        if ((c >= 32) && (c <= 126)) {
-            rval = (char) c;
-        }
-        return rval;
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/IOCaseTestCase.java b/trunk/src/test/java/org/apache/commons/io/IOCaseTestCase.java
deleted file mode 100644
index 3a41c49..0000000
--- a/trunk/src/test/java/org/apache/commons/io/IOCaseTestCase.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * This is used to test IOCase for correctness.
- *
- * @version $Id$
- */
-public class IOCaseTestCase extends FileBasedTestCase {
-
-    private static final boolean WINDOWS = File.separatorChar == '\\';
-
-    public IOCaseTestCase(final String name) {
-        super(name);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-    }
-
-    //-----------------------------------------------------------------------
-    public void test_forName() throws Exception {
-        assertEquals(IOCase.SENSITIVE, IOCase.forName("Sensitive"));
-        assertEquals(IOCase.INSENSITIVE, IOCase.forName("Insensitive"));
-        assertEquals(IOCase.SYSTEM, IOCase.forName("System"));
-        try {
-            IOCase.forName("Blah");
-            fail();
-        } catch (final IllegalArgumentException ex) {}
-        try {
-            IOCase.forName(null);
-            fail();
-        } catch (final IllegalArgumentException ex) {}
-    }
-
-    public void test_serialization() throws Exception {
-        assertSame(IOCase.SENSITIVE, serialize(IOCase.SENSITIVE));
-        assertSame(IOCase.INSENSITIVE, serialize(IOCase.INSENSITIVE));
-        assertSame(IOCase.SYSTEM, serialize(IOCase.SYSTEM));
-    }
-
-    public void test_getName() throws Exception {
-        assertEquals("Sensitive", IOCase.SENSITIVE.getName());
-        assertEquals("Insensitive", IOCase.INSENSITIVE.getName());
-        assertEquals("System", IOCase.SYSTEM.getName());
-    }
-
-    public void test_toString() throws Exception {
-        assertEquals("Sensitive", IOCase.SENSITIVE.toString());
-        assertEquals("Insensitive", IOCase.INSENSITIVE.toString());
-        assertEquals("System", IOCase.SYSTEM.toString());
-    }
-
-    public void test_isCaseSensitive() throws Exception {
-        assertTrue(IOCase.SENSITIVE.isCaseSensitive());
-        assertFalse(IOCase.INSENSITIVE.isCaseSensitive());
-        assertEquals(!WINDOWS, IOCase.SYSTEM.isCaseSensitive());
-    }
-    //-----------------------------------------------------------------------
-    public void test_checkCompare_functionality() throws Exception {
-        assertTrue(IOCase.SENSITIVE.checkCompareTo("ABC", "") > 0);
-        assertTrue(IOCase.SENSITIVE.checkCompareTo("", "ABC") < 0);
-        assertTrue(IOCase.SENSITIVE.checkCompareTo("ABC", "DEF") < 0);
-        assertTrue(IOCase.SENSITIVE.checkCompareTo("DEF", "ABC") > 0);
-        assertEquals(0, IOCase.SENSITIVE.checkCompareTo("ABC", "ABC"));
-        assertEquals(0, IOCase.SENSITIVE.checkCompareTo("", ""));
-
-        try {
-            IOCase.SENSITIVE.checkCompareTo("ABC", null);
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkCompareTo(null, "ABC");
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkCompareTo(null, null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void test_checkCompare_case() throws Exception {
-        assertEquals(0, IOCase.SENSITIVE.checkCompareTo("ABC", "ABC"));
-        assertTrue(IOCase.SENSITIVE.checkCompareTo("ABC", "abc") < 0);
-        assertTrue(IOCase.SENSITIVE.checkCompareTo("abc", "ABC") > 0);
-
-        assertEquals(0, IOCase.INSENSITIVE.checkCompareTo("ABC", "ABC"));
-        assertEquals(0, IOCase.INSENSITIVE.checkCompareTo("ABC", "abc"));
-        assertEquals(0, IOCase.INSENSITIVE.checkCompareTo("abc", "ABC"));
-
-        assertEquals(0, IOCase.SYSTEM.checkCompareTo("ABC", "ABC"));
-        assertEquals(WINDOWS, IOCase.SYSTEM.checkCompareTo("ABC", "abc") == 0);
-        assertEquals(WINDOWS, IOCase.SYSTEM.checkCompareTo("abc", "ABC") == 0);
-    }
-
-
-    //-----------------------------------------------------------------------
-    public void test_checkEquals_functionality() throws Exception {
-        assertFalse(IOCase.SENSITIVE.checkEquals("ABC", ""));
-        assertFalse(IOCase.SENSITIVE.checkEquals("ABC", "A"));
-        assertFalse(IOCase.SENSITIVE.checkEquals("ABC", "AB"));
-        assertTrue(IOCase.SENSITIVE.checkEquals("ABC", "ABC"));
-        assertFalse(IOCase.SENSITIVE.checkEquals("ABC", "BC"));
-        assertFalse(IOCase.SENSITIVE.checkEquals("ABC", "C"));
-        assertFalse(IOCase.SENSITIVE.checkEquals("ABC", "ABCD"));
-        assertFalse(IOCase.SENSITIVE.checkEquals("", "ABC"));
-        assertTrue(IOCase.SENSITIVE.checkEquals("", ""));
-
-        try {
-            IOCase.SENSITIVE.checkEquals("ABC", null);
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkEquals(null, "ABC");
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkEquals(null, null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void test_checkEquals_case() throws Exception {
-        assertTrue(IOCase.SENSITIVE.checkEquals("ABC", "ABC"));
-        assertFalse(IOCase.SENSITIVE.checkEquals("ABC", "Abc"));
-
-        assertTrue(IOCase.INSENSITIVE.checkEquals("ABC", "ABC"));
-        assertTrue(IOCase.INSENSITIVE.checkEquals("ABC", "Abc"));
-
-        assertTrue(IOCase.SYSTEM.checkEquals("ABC", "ABC"));
-        assertEquals(WINDOWS, IOCase.SYSTEM.checkEquals("ABC", "Abc"));
-    }
-
-    //-----------------------------------------------------------------------
-    public void test_checkStartsWith_functionality() throws Exception {
-        assertTrue(IOCase.SENSITIVE.checkStartsWith("ABC", ""));
-        assertTrue(IOCase.SENSITIVE.checkStartsWith("ABC", "A"));
-        assertTrue(IOCase.SENSITIVE.checkStartsWith("ABC", "AB"));
-        assertTrue(IOCase.SENSITIVE.checkStartsWith("ABC", "ABC"));
-        assertFalse(IOCase.SENSITIVE.checkStartsWith("ABC", "BC"));
-        assertFalse(IOCase.SENSITIVE.checkStartsWith("ABC", "C"));
-        assertFalse(IOCase.SENSITIVE.checkStartsWith("ABC", "ABCD"));
-        assertFalse(IOCase.SENSITIVE.checkStartsWith("", "ABC"));
-        assertTrue(IOCase.SENSITIVE.checkStartsWith("", ""));
-
-        try {
-            IOCase.SENSITIVE.checkStartsWith("ABC", null);
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkStartsWith(null, "ABC");
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkStartsWith(null, null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void test_checkStartsWith_case() throws Exception {
-        assertTrue(IOCase.SENSITIVE.checkStartsWith("ABC", "AB"));
-        assertFalse(IOCase.SENSITIVE.checkStartsWith("ABC", "Ab"));
-
-        assertTrue(IOCase.INSENSITIVE.checkStartsWith("ABC", "AB"));
-        assertTrue(IOCase.INSENSITIVE.checkStartsWith("ABC", "Ab"));
-
-        assertTrue(IOCase.SYSTEM.checkStartsWith("ABC", "AB"));
-        assertEquals(WINDOWS, IOCase.SYSTEM.checkStartsWith("ABC", "Ab"));
-    }
-
-    //-----------------------------------------------------------------------
-    public void test_checkEndsWith_functionality() throws Exception {
-        assertTrue(IOCase.SENSITIVE.checkEndsWith("ABC", ""));
-        assertFalse(IOCase.SENSITIVE.checkEndsWith("ABC", "A"));
-        assertFalse(IOCase.SENSITIVE.checkEndsWith("ABC", "AB"));
-        assertTrue(IOCase.SENSITIVE.checkEndsWith("ABC", "ABC"));
-        assertTrue(IOCase.SENSITIVE.checkEndsWith("ABC", "BC"));
-        assertTrue(IOCase.SENSITIVE.checkEndsWith("ABC", "C"));
-        assertFalse(IOCase.SENSITIVE.checkEndsWith("ABC", "ABCD"));
-        assertFalse(IOCase.SENSITIVE.checkEndsWith("", "ABC"));
-        assertTrue(IOCase.SENSITIVE.checkEndsWith("", ""));
-
-        try {
-            IOCase.SENSITIVE.checkEndsWith("ABC", null);
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkEndsWith(null, "ABC");
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkEndsWith(null, null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void test_checkEndsWith_case() throws Exception {
-        assertTrue(IOCase.SENSITIVE.checkEndsWith("ABC", "BC"));
-        assertFalse(IOCase.SENSITIVE.checkEndsWith("ABC", "Bc"));
-
-        assertTrue(IOCase.INSENSITIVE.checkEndsWith("ABC", "BC"));
-        assertTrue(IOCase.INSENSITIVE.checkEndsWith("ABC", "Bc"));
-
-        assertTrue(IOCase.SYSTEM.checkEndsWith("ABC", "BC"));
-        assertEquals(WINDOWS, IOCase.SYSTEM.checkEndsWith("ABC", "Bc"));
-    }
-
-    //-----------------------------------------------------------------------
-    public void test_checkIndexOf_functionality() throws Exception {
-
-        // start
-        assertEquals(0,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 0, "A"));
-        assertEquals(-1,  IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 1, "A"));
-        assertEquals(0,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 0, "AB"));
-        assertEquals(-1,  IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 1, "AB"));
-        assertEquals(0,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 0, "ABC"));
-        assertEquals(-1,  IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 1, "ABC"));
-
-        // middle
-        assertEquals(3,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 0, "D"));
-        assertEquals(3,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 3, "D"));
-        assertEquals(-1,  IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 4, "D"));
-        assertEquals(3,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 0, "DE"));
-        assertEquals(3,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 3, "DE"));
-        assertEquals(-1,  IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 4, "DE"));
-        assertEquals(3,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 0, "DEF"));
-        assertEquals(3,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 3, "DEF"));
-        assertEquals(-1,  IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 4, "DEF"));
-
-        // end
-        assertEquals(9,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 0, "J"));
-        assertEquals(9,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 8, "J"));
-        assertEquals(9,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 9, "J"));
-        assertEquals(8,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 0, "IJ"));
-        assertEquals(8,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 8, "IJ"));
-        assertEquals(-1,  IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 9, "IJ"));
-        assertEquals(7,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 6, "HIJ"));
-        assertEquals(7,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 7, "HIJ"));
-        assertEquals(-1,  IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 8, "HIJ"));
-
-        // not found
-        assertEquals(-1,   IOCase.SENSITIVE.checkIndexOf("ABCDEFGHIJ", 0, "DED"));
-
-        // too long
-        assertEquals(-1,   IOCase.SENSITIVE.checkIndexOf("DEF", 0, "ABCDEFGHIJ"));
-
-        try {
-            IOCase.SENSITIVE.checkIndexOf("ABC", 0, null);
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkIndexOf(null, 0, "ABC");
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkIndexOf(null, 0, null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void test_checkIndexOf_case() throws Exception {
-        assertEquals(1,  IOCase.SENSITIVE.checkIndexOf("ABC", 0, "BC"));
-        assertEquals(-1, IOCase.SENSITIVE.checkIndexOf("ABC", 0, "Bc"));
-
-        assertEquals(1, IOCase.INSENSITIVE.checkIndexOf("ABC", 0, "BC"));
-        assertEquals(1, IOCase.INSENSITIVE.checkIndexOf("ABC", 0, "Bc"));
-
-        assertEquals(1, IOCase.SYSTEM.checkIndexOf("ABC", 0, "BC"));
-        assertEquals(WINDOWS ? 1 : -1, IOCase.SYSTEM.checkIndexOf("ABC", 0, "Bc"));
-    }
-
-    //-----------------------------------------------------------------------
-    public void test_checkRegionMatches_functionality() throws Exception {
-        assertTrue(IOCase.SENSITIVE.checkRegionMatches("ABC", 0, ""));
-        assertTrue(IOCase.SENSITIVE.checkRegionMatches("ABC", 0, "A"));
-        assertTrue(IOCase.SENSITIVE.checkRegionMatches("ABC", 0, "AB"));
-        assertTrue(IOCase.SENSITIVE.checkRegionMatches("ABC", 0, "ABC"));
-        assertFalse(IOCase.SENSITIVE.checkRegionMatches("ABC", 0, "BC"));
-        assertFalse(IOCase.SENSITIVE.checkRegionMatches("ABC", 0, "C"));
-        assertFalse(IOCase.SENSITIVE.checkRegionMatches("ABC", 0, "ABCD"));
-        assertFalse(IOCase.SENSITIVE.checkRegionMatches("", 0, "ABC"));
-        assertTrue(IOCase.SENSITIVE.checkRegionMatches("", 0, ""));
-
-        assertTrue(IOCase.SENSITIVE.checkRegionMatches("ABC", 1, ""));
-        assertFalse(IOCase.SENSITIVE.checkRegionMatches("ABC", 1, "A"));
-        assertFalse(IOCase.SENSITIVE.checkRegionMatches("ABC", 1, "AB"));
-        assertFalse(IOCase.SENSITIVE.checkRegionMatches("ABC", 1, "ABC"));
-        assertTrue(IOCase.SENSITIVE.checkRegionMatches("ABC", 1, "BC"));
-        assertFalse(IOCase.SENSITIVE.checkRegionMatches("ABC", 1, "C"));
-        assertFalse(IOCase.SENSITIVE.checkRegionMatches("ABC", 1, "ABCD"));
-        assertFalse(IOCase.SENSITIVE.checkRegionMatches("", 1, "ABC"));
-        assertFalse(IOCase.SENSITIVE.checkRegionMatches("", 1, ""));
-
-        try {
-            IOCase.SENSITIVE.checkRegionMatches("ABC", 0, null);
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkRegionMatches(null, 0, "ABC");
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkRegionMatches(null, 0, null);
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkRegionMatches("ABC", 1, null);
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkRegionMatches(null, 1, "ABC");
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            IOCase.SENSITIVE.checkRegionMatches(null, 1, null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void test_checkRegionMatches_case() throws Exception {
-        assertTrue(IOCase.SENSITIVE.checkRegionMatches("ABC", 0, "AB"));
-        assertFalse(IOCase.SENSITIVE.checkRegionMatches("ABC", 0, "Ab"));
-
-        assertTrue(IOCase.INSENSITIVE.checkRegionMatches("ABC", 0, "AB"));
-        assertTrue(IOCase.INSENSITIVE.checkRegionMatches("ABC", 0, "Ab"));
-
-        assertTrue(IOCase.SYSTEM.checkRegionMatches("ABC", 0, "AB"));
-        assertEquals(WINDOWS, IOCase.SYSTEM.checkRegionMatches("ABC", 0, "Ab"));
-    }
-
-    //-----------------------------------------------------------------------
-    private IOCase serialize(final IOCase value) throws Exception {
-        final ByteArrayOutputStream buf = new ByteArrayOutputStream();
-        final ObjectOutputStream out = new ObjectOutputStream(buf);
-        out.writeObject(value);
-        out.flush();
-        out.close();
-
-        final ByteArrayInputStream bufin = new ByteArrayInputStream(buf.toByteArray());
-        final ObjectInputStream in = new ObjectInputStream(bufin);
-        return (IOCase) in.readObject();
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/IOExceptionWithCauseTestCase.java b/trunk/src/test/java/org/apache/commons/io/IOExceptionWithCauseTestCase.java
deleted file mode 100644
index 6103eba..0000000
--- a/trunk/src/test/java/org/apache/commons/io/IOExceptionWithCauseTestCase.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.io;
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-/**
- * Tests IOExceptionWithCause
- * 
- * @version $Id$
- */
-public class IOExceptionWithCauseTestCase extends TestCase {
-
-    /**
-     * Tests the {@link IOExceptionWithCause#IOExceptionWithCause(String,Throwable)} constructor.
-     */
-    public void testIOExceptionStringThrowable() {
-        final Throwable cause = new IllegalArgumentException("cause");
-        final IOException exception = new IOException("message", cause);
-        this.validate(exception, cause, "message");
-    }
-
-    /**
-     * Tests the {@link IOExceptionWithCause#IOExceptionWithCause(Throwable)} constructor.
-     */
-    public void testIOExceptionThrowable() {
-        final Throwable cause = new IllegalArgumentException("cause");
-        final IOException exception = new IOException(cause);
-        this.validate(exception, cause, "java.lang.IllegalArgumentException: cause");
-    }
-
-    void validate(final Throwable throwable, final Throwable expectedCause, final String expectedMessage) {
-        assertEquals(expectedMessage, throwable.getMessage());
-        assertEquals(expectedCause, throwable.getCause());
-        assertSame(expectedCause, throwable.getCause());
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/IOUtilsCopyTestCase.java b/trunk/src/test/java/org/apache/commons/io/IOUtilsCopyTestCase.java
deleted file mode 100644
index d5e9d47..0000000
--- a/trunk/src/test/java/org/apache/commons/io/IOUtilsCopyTestCase.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.Writer;
-import java.util.Arrays;
-
-import org.apache.commons.io.input.NullInputStream;
-import org.apache.commons.io.input.NullReader;
-import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.commons.io.output.NullOutputStream;
-import org.apache.commons.io.output.NullWriter;
-import org.apache.commons.io.testtools.FileBasedTestCase;
-import org.apache.commons.io.testtools.YellOnCloseInputStream;
-import org.apache.commons.io.testtools.YellOnFlushAndCloseOutputStream;
-
-/**
- * JUnit tests for IOUtils copy methods.
- *
- * @version $Id$
- * @see IOUtils
- */
-public class IOUtilsCopyTestCase extends FileBasedTestCase {
-
-    /*
-     * NOTE this is not particularly beautiful code. A better way to check for
-     * flush and close status would be to implement "trojan horse" wrapper
-     * implementations of the various stream classes, which set a flag when
-     * relevant methods are called. (JT)
-     */
-
-    private static final int FILE_SIZE = 1024 * 4 + 1;
-
-
-    private final byte[] inData = generateTestData(FILE_SIZE);
-
-    public IOUtilsCopyTestCase(final String testName) {
-        super(testName);
-    }
-
-    // ----------------------------------------------------------------
-    // Setup
-    // ----------------------------------------------------------------
-
-    @Override
-    public void setUp() throws Exception {
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-    }
-
-    //-----------------------------------------------------------------------
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    public void testCopy_inputStreamToOutputStream() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        final int count = IOUtils.copy(in, out);
-
-        assertEquals("Not all bytes were read", 0, in.available());
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-        assertEquals(inData.length,count);
-    }
-
-    public void testCopy_inputStreamToOutputStreamWithBufferSize() throws Exception {
-        testCopy_inputStreamToOutputStreamWithBufferSize(1);
-        testCopy_inputStreamToOutputStreamWithBufferSize(2);
-        testCopy_inputStreamToOutputStreamWithBufferSize(4);
-        testCopy_inputStreamToOutputStreamWithBufferSize(8);
-        testCopy_inputStreamToOutputStreamWithBufferSize(16);
-        testCopy_inputStreamToOutputStreamWithBufferSize(32);
-        testCopy_inputStreamToOutputStreamWithBufferSize(64);
-        testCopy_inputStreamToOutputStreamWithBufferSize(128);
-        testCopy_inputStreamToOutputStreamWithBufferSize(256);
-        testCopy_inputStreamToOutputStreamWithBufferSize(512);
-        testCopy_inputStreamToOutputStreamWithBufferSize(1024);
-        testCopy_inputStreamToOutputStreamWithBufferSize(2048);
-        testCopy_inputStreamToOutputStreamWithBufferSize(4096);
-        testCopy_inputStreamToOutputStreamWithBufferSize(8192);
-        testCopy_inputStreamToOutputStreamWithBufferSize(16384);
-    }
-
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    private void testCopy_inputStreamToOutputStreamWithBufferSize(final int bufferSize) throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        final long count = IOUtils.copy(in, out, bufferSize);
-
-        assertEquals("Not all bytes were read", 0, in.available());
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-        assertEquals(inData.length,count);
-    }
-
-    public void testCopy_inputStreamToOutputStream_nullIn() throws Exception {
-        final OutputStream out = new ByteArrayOutputStream();
-        try {
-            IOUtils.copy((InputStream) null, out);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void testCopy_inputStreamToOutputStream_nullOut() throws Exception {
-        final InputStream in = new ByteArrayInputStream(inData);
-        try {
-            IOUtils.copy(in, (OutputStream) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    /*
-     * Test Copying file > 2GB  - see issue# IO-84
-     */
-    public void testCopy_inputStreamToOutputStream_IO84() throws Exception {
-        final long size = (long)Integer.MAX_VALUE + (long)1;
-        final InputStream  in  = new NullInputStream(size);
-        final OutputStream out = new NullOutputStream();
-
-        // Test copy() method
-        assertEquals(-1, IOUtils.copy(in, out));
-
-        // reset the input
-        in.close();
-
-        // Test copyLarge() method
-        assertEquals("copyLarge()", size, IOUtils.copyLarge(in, out));
-    }
-
-    //-----------------------------------------------------------------------
-    @SuppressWarnings({ "resource", "deprecation" }) // 'in' is deliberately not closed
-    public void testCopy_inputStreamToWriter() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.copy(in, writer); // deliberately testing deprecated method
-        out.off();
-        writer.flush();
-
-        assertEquals("Not all bytes were read", 0, in.available());
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    @SuppressWarnings("deprecation") // deliberately testing deprecated method
-    public void testCopy_inputStreamToWriter_nullIn() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(out, "US-ASCII");
-        try {
-            IOUtils.copy((InputStream) null, writer);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    @SuppressWarnings("deprecation") // deliberately testing deprecated method
-    public void testCopy_inputStreamToWriter_nullOut() throws Exception {
-        final InputStream in = new ByteArrayInputStream(inData);
-        try {
-            IOUtils.copy(in, (Writer) null); // deliberately testing deprecated method
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    //-----------------------------------------------------------------------
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    public void testCopy_inputStreamToWriter_Encoding() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.copy(in, writer, "UTF8");
-        out.off();
-        writer.flush();
-
-        assertEquals("Not all bytes were read", 0, in.available());
-        byte[] bytes = baout.toByteArray();
-        bytes = new String(bytes, "UTF8").getBytes("US-ASCII");
-        assertTrue("Content differs", Arrays.equals(inData, bytes));
-    }
-
-    public void testCopy_inputStreamToWriter_Encoding_nullIn() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(out, "US-ASCII");
-        try {
-            IOUtils.copy(null, writer, "UTF8");
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void testCopy_inputStreamToWriter_Encoding_nullOut() throws Exception {
-        final InputStream in = new ByteArrayInputStream(inData);
-        try {
-            IOUtils.copy(in, null, "UTF8");
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    public void testCopy_inputStreamToWriter_Encoding_nullEncoding() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.copy(in, writer, (String) null);
-        out.off();
-        writer.flush();
-
-        assertEquals("Not all bytes were read", 0, in.available());
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    //-----------------------------------------------------------------------
-    @SuppressWarnings({ "resource", "deprecation" }) // 'in' is deliberately not closed
-    public void testCopy_readerToOutputStream() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-        final Reader reader = new InputStreamReader(in, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        IOUtils.copy(reader, out); // deliberately testing deprecated method
-        //Note: this method *does* flush. It is equivalent to:
-        //  OutputStreamWriter _out = new OutputStreamWriter(fout);
-        //  IOUtils.copy( fin, _out, 4096 ); // copy( Reader, Writer, int );
-        //  _out.flush();
-        //  out = fout;
-
-        // Note: rely on the method to flush
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    @SuppressWarnings("deprecation")
-    public void testCopy_readerToOutputStream_nullIn() throws Exception { // deliberately testing deprecated method
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        try {
-            IOUtils.copy((Reader) null, out);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    @SuppressWarnings({ "resource", "deprecation" }) // 'in' is deliberately not closed
-    public void testCopy_readerToOutputStream_nullOut() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-        final Reader reader = new InputStreamReader(in, "US-ASCII");
-        try {
-            IOUtils.copy(reader, (OutputStream) null); // deliberately testing deprecated method
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    //-----------------------------------------------------------------------
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    public void testCopy_readerToOutputStream_Encoding() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-        final Reader reader = new InputStreamReader(in, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        IOUtils.copy(reader, out, "UTF16");
-        // note: this method *does* flush.
-        // note: we don't flush here; this IOUtils method does it for us
-
-        byte[] bytes = baout.toByteArray();
-        bytes = new String(bytes, "UTF16").getBytes("US-ASCII");
-        assertTrue("Content differs", Arrays.equals(inData, bytes));
-    }
-
-    public void testCopy_readerToOutputStream_Encoding_nullIn() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        try {
-            IOUtils.copy(null, out, "UTF16");
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    public void testCopy_readerToOutputStream_Encoding_nullOut() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-        final Reader reader = new InputStreamReader(in, "US-ASCII");
-        try {
-            IOUtils.copy(reader, null, "UTF16");
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    public void testCopy_readerToOutputStream_Encoding_nullEncoding() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-        final Reader reader = new InputStreamReader(in, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        IOUtils.copy(reader, out, (String) null);
-        // note: this method *does* flush.
-        // note: we don't flush here; this IOUtils method does it for us
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    //-----------------------------------------------------------------------
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    public void testCopy_readerToWriter() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-        final Reader reader = new InputStreamReader(in, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        final int count = IOUtils.copy(reader, writer);
-        out.off();
-        writer.flush();
-        assertEquals("The number of characters returned by copy is wrong", inData.length, count);
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testCopy_readerToWriter_nullIn() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(out, "US-ASCII");
-        try {
-            IOUtils.copy((Reader) null, writer);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    @SuppressWarnings("resource") // 'in' is deliberately not closed
-    public void testCopy_readerToWriter_nullOut() throws Exception {
-        InputStream in = new ByteArrayInputStream(inData);
-        in = new YellOnCloseInputStream(in);
-        final Reader reader = new InputStreamReader(in, "US-ASCII");
-        try {
-            IOUtils.copy(reader, (Writer) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    /*
-     * Test Copying file > 2GB  - see issue# IO-84
-     */
-    public void testCopy_readerToWriter_IO84() throws Exception {
-        final long size = (long)Integer.MAX_VALUE + (long)1;
-        final Reader reader = new NullReader(size);
-        final Writer writer = new NullWriter();
-
-        // Test copy() method
-        assertEquals(-1, IOUtils.copy(reader, writer));
-
-        // reset the input
-        reader.close();
-
-        // Test copyLarge() method
-        assertEquals("copyLarge()", size, IOUtils.copyLarge(reader, writer));
-
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/IOUtilsTestCase.java b/trunk/src/test/java/org/apache/commons/io/IOUtilsTestCase.java
deleted file mode 100644
index 03abf8d..0000000
--- a/trunk/src/test/java/org/apache/commons/io/IOUtilsTestCase.java
+++ /dev/null
@@ -1,1384 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.CharArrayReader;
-import java.io.CharArrayWriter;
-import java.io.Closeable;
-import java.io.EOFException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.Writer;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLConnection;
-import java.nio.ByteBuffer;
-import java.nio.channels.FileChannel;
-import java.nio.channels.Selector;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-import org.junit.Assert;
-
-/**
- * This is used to test IOUtils for correctness. The following checks are performed:
- * <ul>
- * <li>The return must not be null, must be the same type and equals() to the method's second arg</li>
- * <li>All bytes must have been read from the source (available() == 0)</li>
- * <li>The source and destination content must be identical (byte-wise comparison check)</li>
- * <li>The output stream must not have been closed (a byte/char is written to test this, and subsequent size checked)</li>
- * </ul>
- * Due to interdependencies in IOUtils and IOUtilsTestlet, one bug may cause multiple tests to fail.
- */
-public class IOUtilsTestCase extends FileBasedTestCase {
-
-    private static final int FILE_SIZE = 1024 * 4 + 1;
-
-    /** Determine if this is windows. */
-    private static final boolean WINDOWS = File.separatorChar == '\\';
-    /*
-     * Note: this is not particularly beautiful code. A better way to check for flush and close status would be to
-     * implement "trojan horse" wrapper implementations of the various stream classes, which set a flag when relevant
-     * methods are called. (JT)
-     */
-
-    private char[] carr = null;
-
-    private byte[] iarr = null;
-
-    private File m_testFile;
-
-    public IOUtilsTestCase(final String name) {
-        super(name);
-    }
-
-    /** Assert that the contents of two byte arrays are the same. */
-    private void assertEqualContent(final byte[] b0, final byte[] b1) {
-        assertTrue("Content not equal according to java.util.Arrays#equals()", Arrays.equals(b0, b1));
-    }
-
-    @Override
-    public void setUp() {
-        try {
-            getTestDirectory().mkdirs();
-            m_testFile = new File(getTestDirectory(), "file2-test.txt");
-
-            createFile(m_testFile, FILE_SIZE);
-        } catch (final IOException ioe) {
-            throw new RuntimeException("Can't run this test because the environment could not be built: "
-                    + ioe.getMessage());
-        }
-        // Create and init a byte array as input data
-        iarr = new byte[200];
-        Arrays.fill( iarr, (byte)-1);
-        for( int i=0; i< 80; i++){
-            iarr[i] = (byte) i;
-        }
-        carr = new char[200];
-        Arrays.fill( carr, (char)-1);
-        for( int i=0; i< 80; i++){
-            carr[i] = (char) i;
-        }
-    }
-
-    @Override
-    public void tearDown() {
-        carr = null;
-        iarr = null;
-        try {
-            FileUtils.deleteDirectory(getTestDirectory());
-        } catch (final IOException e) {
-            throw new RuntimeException("Could not clear up " + getTestDirectory() + ": " + e);
-        }
-    }
-
-    public void testCloseQuietly_AllCloseableIOException() {
-        final Closeable closeable = new Closeable() {
-            public void close() throws IOException {
-                throw new IOException();
-            }
-        };
-        IOUtils.closeQuietly(closeable, null, closeable);
-    }
-
-    public void testCloseQuietly_CloseableIOException() {
-        IOUtils.closeQuietly(new Closeable() {
-            public void close() throws IOException {
-                throw new IOException();
-            }
-        });
-    }
-
-    public void testCloseQuietly_Selector() {
-        Selector selector = null;
-        try {
-            selector = Selector.open();
-        } catch (final IOException e) {
-        } finally {
-            IOUtils.closeQuietly(selector);
-        }
-    }
-
-    public void testCloseQuietly_SelectorIOException() {
-        final Selector selector = new SelectorAdapter() {
-            @Override
-            public void close() throws IOException {
-                throw new IOException();
-            }
-        };
-        IOUtils.closeQuietly(selector);
-    }
-
-    public void testCloseQuietly_SelectorNull() {
-        final Selector selector = null;
-        IOUtils.closeQuietly(selector);
-    }
-
-    public void testCloseQuietly_SelectorTwice() {
-        Selector selector = null;
-        try {
-            selector = Selector.open();
-        } catch (final IOException e) {
-        } finally {
-            IOUtils.closeQuietly(selector);
-            IOUtils.closeQuietly(selector);
-        }
-    }
-
-    public void testCloseQuietly_ServerSocket() throws IOException {
-        IOUtils.closeQuietly((ServerSocket) null);
-        IOUtils.closeQuietly(new ServerSocket());
-    }
-
-    public void testCloseQuietly_ServerSocketIOException() throws IOException {
-        IOUtils.closeQuietly(new ServerSocket() {
-            @Override
-            public void close() throws IOException {
-                throw new IOException();
-            }
-        });
-    }
-
-    public void testCloseQuietly_Socket() {
-        IOUtils.closeQuietly((Socket) null);
-        IOUtils.closeQuietly(new Socket());
-    }
-
-    public void testCloseQuietly_SocketIOException() {
-        IOUtils.closeQuietly(new Socket() {
-            @Override
-            public synchronized void close() throws IOException {
-                throw new IOException();
-            }
-        });
-    }
-
-    public void testConstants() throws Exception {
-        assertEquals('/', IOUtils.DIR_SEPARATOR_UNIX);
-        assertEquals('\\', IOUtils.DIR_SEPARATOR_WINDOWS);
-        assertEquals("\n", IOUtils.LINE_SEPARATOR_UNIX);
-        assertEquals("\r\n", IOUtils.LINE_SEPARATOR_WINDOWS);
-        if (WINDOWS) {
-            assertEquals('\\', IOUtils.DIR_SEPARATOR);
-            assertEquals("\r\n", IOUtils.LINE_SEPARATOR);
-        } else {
-            assertEquals('/', IOUtils.DIR_SEPARATOR);
-            assertEquals("\n", IOUtils.LINE_SEPARATOR);
-        }
-    }
-
-    @SuppressWarnings("deprecation") // unavoidable until Java 7
-    public void testContentEquals_InputStream_InputStream() throws Exception {
-        {
-            final ByteArrayInputStream input1 = new ByteArrayInputStream("".getBytes(Charsets.UTF_8));
-            assertTrue(IOUtils.contentEquals(input1, input1));
-        }
-        {
-            final ByteArrayInputStream input1 = new ByteArrayInputStream("ABC".getBytes(Charsets.UTF_8));
-            assertTrue(IOUtils.contentEquals(input1, input1));
-        }
-        assertTrue(IOUtils
-                .contentEquals(new ByteArrayInputStream("".getBytes(Charsets.UTF_8)), new ByteArrayInputStream("".getBytes(Charsets.UTF_8))));
-        assertTrue(IOUtils.contentEquals(new BufferedInputStream(new ByteArrayInputStream("".getBytes(Charsets.UTF_8))), new BufferedInputStream(
-                new ByteArrayInputStream("".getBytes(Charsets.UTF_8)))));
-        assertTrue(IOUtils.contentEquals(new ByteArrayInputStream("ABC".getBytes(Charsets.UTF_8)),
-                new ByteArrayInputStream("ABC".getBytes(Charsets.UTF_8))));
-        assertFalse(IOUtils.contentEquals(new ByteArrayInputStream("ABCD".getBytes(Charsets.UTF_8)),
-                new ByteArrayInputStream("ABC".getBytes(Charsets.UTF_8))));
-        assertFalse(IOUtils.contentEquals(new ByteArrayInputStream("ABC".getBytes(Charsets.UTF_8)),
-                new ByteArrayInputStream("ABCD".getBytes(Charsets.UTF_8))));
-    }
-
-    public void testContentEquals_Reader_Reader() throws Exception {
-        {
-            final StringReader input1 = new StringReader("");
-            assertTrue(IOUtils.contentEquals(input1, input1));
-        }
-        {
-            final StringReader input1 = new StringReader("ABC");
-            assertTrue(IOUtils.contentEquals(input1, input1));
-        }
-        assertTrue(IOUtils.contentEquals(new StringReader(""), new StringReader("")));
-        assertTrue(IOUtils.contentEquals(new BufferedReader(new StringReader("")), new BufferedReader(new StringReader(""))));
-        assertTrue(IOUtils.contentEquals(new StringReader("ABC"), new StringReader("ABC")));
-        assertFalse(IOUtils.contentEquals(new StringReader("ABCD"), new StringReader("ABC")));
-        assertFalse(IOUtils.contentEquals(new StringReader("ABC"), new StringReader("ABCD")));
-    }
-
-    public void testContentEqualsIgnoreEOL() throws Exception {
-        {
-            final Reader input1 = new CharArrayReader("".toCharArray());
-            assertTrue(IOUtils.contentEqualsIgnoreEOL(input1, input1));
-        }
-        {
-            final Reader input1 =  new CharArrayReader("321\r\n".toCharArray());
-            assertTrue(IOUtils.contentEqualsIgnoreEOL(input1, input1));
-        }
-
-        Reader r1;
-        Reader r2;
-
-        r1 = new CharArrayReader("".toCharArray());
-        r2 = new CharArrayReader("".toCharArray());
-        assertTrue(IOUtils.contentEqualsIgnoreEOL(r1, r2));
-
-        r1 = new CharArrayReader("1".toCharArray());
-        r2 = new CharArrayReader("1".toCharArray());
-        assertTrue(IOUtils.contentEqualsIgnoreEOL(r1, r2));
-
-        r1 = new CharArrayReader("1".toCharArray());
-        r2 = new CharArrayReader("2".toCharArray());
-        assertFalse(IOUtils.contentEqualsIgnoreEOL(r1, r2));
-
-        r1 = new CharArrayReader("123\rabc".toCharArray());
-        r2 = new CharArrayReader("123\nabc".toCharArray());
-        assertTrue(IOUtils.contentEqualsIgnoreEOL(r1, r2));
-
-        r1 = new CharArrayReader("321".toCharArray());
-        r2 = new CharArrayReader("321\r\n".toCharArray());
-        assertTrue(IOUtils.contentEqualsIgnoreEOL(r1, r2));
-    }
-
-    @SuppressWarnings("deprecation")
-    // testing deprecated method
-    public void testCopy_ByteArray_OutputStream() throws Exception {
-        final File destination = newFile("copy8.txt");
-        final FileInputStream fin = new FileInputStream(m_testFile);
-        byte[] in;
-        try {
-            // Create our byte[]. Rely on testInputStreamToByteArray() to make sure this is valid.
-            in = IOUtils.toByteArray(fin);
-        } finally {
-            fin.close();
-        }
-
-        final FileOutputStream fout = new FileOutputStream(destination);
-        try {
-            CopyUtils.copy(in, fout);
-
-            fout.flush();
-
-            checkFile(destination, m_testFile);
-            checkWrite(fout);
-        } finally {
-            fout.close();
-        }
-        deleteFile(destination);
-    }
-
-    @SuppressWarnings("deprecation")
-    // testing deprecated method
-    public void testCopy_ByteArray_Writer() throws Exception {
-        final File destination = newFile("copy7.txt");
-        final FileInputStream fin = new FileInputStream(m_testFile);
-        byte[] in;
-        try {
-            // Create our byte[]. Rely on testInputStreamToByteArray() to make sure this is valid.
-            in = IOUtils.toByteArray(fin);
-        } finally {
-            fin.close();
-        }
-
-        final FileWriter fout = new FileWriter(destination);
-        try {
-            CopyUtils.copy(in, fout);
-            fout.flush();
-            checkFile(destination, m_testFile);
-            checkWrite(fout);
-        } finally {
-            fout.close();
-        }
-        deleteFile(destination);
-    }
-
-    @SuppressWarnings("deprecation")
-    // testing deprecated method
-    public void testCopy_String_Writer() throws Exception {
-        final File destination = newFile("copy6.txt");
-        final FileReader fin = new FileReader(m_testFile);
-        String str;
-        try {
-            // Create our String. Rely on testReaderToString() to make sure this is valid.
-            str = IOUtils.toString(fin);
-        } finally {
-            fin.close();
-        }
-
-        final FileWriter fout = new FileWriter(destination);
-        try {
-            CopyUtils.copy(str, fout);
-            fout.flush();
-
-            checkFile(destination, m_testFile);
-            checkWrite(fout);
-        } finally {
-            fout.close();
-        }
-        deleteFile(destination);
-    }
-
-    public void testCopyLarge_CharExtraLength() throws IOException {
-        CharArrayReader is = null;
-        CharArrayWriter os = null;
-        try {
-            // Create streams
-            is = new CharArrayReader(carr);
-            os = new CharArrayWriter();
-
-            // Test our copy method
-            // for extra length, it reads till EOF
-            assertEquals(200, IOUtils.copyLarge(is, os, 0, 2000));
-            final char[] oarr = os.toCharArray();
-
-            // check that output length is correct
-            assertEquals(200, oarr.length);
-            // check that output data corresponds to input data
-            assertEquals(1, oarr[1]);
-            assertEquals(79, oarr[79]);
-            assertEquals((char) -1, oarr[80]);
-
-        } finally {
-            IOUtils.closeQuietly(is);
-            IOUtils.closeQuietly(os);
-        }
-    }
-
-    public void testCopyLarge_CharFullLength() throws IOException {
-        CharArrayReader is = null;
-        CharArrayWriter os = null;
-        try {
-            // Create streams
-            is = new CharArrayReader(carr);
-            os = new CharArrayWriter();
-
-            // Test our copy method
-            assertEquals(200, IOUtils.copyLarge(is, os, 0, -1));
-            final char[] oarr = os.toCharArray();
-
-            // check that output length is correct
-            assertEquals(200, oarr.length);
-            // check that output data corresponds to input data
-            assertEquals(1, oarr[1]);
-            assertEquals(79, oarr[79]);
-            assertEquals((char) -1, oarr[80]);
-
-        } finally {
-            IOUtils.closeQuietly(is);
-            IOUtils.closeQuietly(os);
-        }
-    }
-
-    public void testCopyLarge_CharNoSkip() throws IOException {
-        CharArrayReader is = null;
-        CharArrayWriter os = null;
-        try {
-            // Create streams
-            is = new CharArrayReader(carr);
-            os = new CharArrayWriter();
-
-            // Test our copy method
-            assertEquals(100, IOUtils.copyLarge(is, os, 0, 100));
-            final char[] oarr = os.toCharArray();
-
-            // check that output length is correct
-            assertEquals(100, oarr.length);
-            // check that output data corresponds to input data
-            assertEquals(1, oarr[1]);
-            assertEquals(79, oarr[79]);
-            assertEquals((char) -1, oarr[80]);
-
-        } finally {
-            IOUtils.closeQuietly(is);
-            IOUtils.closeQuietly(os);
-        }
-    }
-
-    public void testCopyLarge_CharSkip() throws IOException {
-        CharArrayReader is = null;
-        CharArrayWriter os = null;
-        try {
-            // Create streams
-            is = new CharArrayReader(carr);
-            os = new CharArrayWriter();
-
-            // Test our copy method
-            assertEquals(100, IOUtils.copyLarge(is, os, 10, 100));
-            final char[] oarr = os.toCharArray();
-
-            // check that output length is correct
-            assertEquals(100, oarr.length);
-            // check that output data corresponds to input data
-            assertEquals(11, oarr[1]);
-            assertEquals(79, oarr[69]);
-            assertEquals((char) -1, oarr[70]);
-
-        } finally {
-            IOUtils.closeQuietly(is);
-            IOUtils.closeQuietly(os);
-        }
-    }
-
-    public void testCopyLarge_CharSkipInvalid() throws IOException {
-        CharArrayReader is = null;
-        CharArrayWriter os = null;
-        try {
-            // Create streams
-            is = new CharArrayReader(carr);
-            os = new CharArrayWriter();
-
-            // Test our copy method
-            IOUtils.copyLarge(is, os, 1000, 100);
-            fail("Should have thrown EOFException");
-        } catch (final EOFException eofe) {
-        } finally {
-            IOUtils.closeQuietly(is);
-            IOUtils.closeQuietly(os);
-        }
-    }
-
-    public void testCopyLarge_ExtraLength() throws IOException {
-        ByteArrayInputStream is = null;
-        ByteArrayOutputStream os = null;
-        try {
-            // Create streams
-            is = new ByteArrayInputStream(iarr);
-            os = new ByteArrayOutputStream();
-
-            // Test our copy method
-            // for extra length, it reads till EOF
-            assertEquals(200, IOUtils.copyLarge(is, os, 0, 2000));
-            final byte[] oarr = os.toByteArray();
-
-            // check that output length is correct
-            assertEquals(200, oarr.length);
-            // check that output data corresponds to input data
-            assertEquals(1, oarr[1]);
-            assertEquals(79, oarr[79]);
-            assertEquals(-1, oarr[80]);
-
-        } finally {
-            IOUtils.closeQuietly(is);
-            IOUtils.closeQuietly(os);
-        }
-    }
-
-    public void testCopyLarge_FullLength() throws IOException {
-        ByteArrayInputStream is = null;
-        ByteArrayOutputStream os = null;
-        try {
-            // Create streams
-            is = new ByteArrayInputStream(iarr);
-            os = new ByteArrayOutputStream();
-
-            // Test our copy method
-            assertEquals(200, IOUtils.copyLarge(is, os, 0, -1));
-            final byte[] oarr = os.toByteArray();
-
-            // check that output length is correct
-            assertEquals(200, oarr.length);
-            // check that output data corresponds to input data
-            assertEquals(1, oarr[1]);
-            assertEquals(79, oarr[79]);
-            assertEquals(-1, oarr[80]);
-
-        } finally {
-            IOUtils.closeQuietly(is);
-            IOUtils.closeQuietly(os);
-        }
-    }
-
-    public void testCopyLarge_NoSkip() throws IOException {
-        ByteArrayInputStream is = null;
-        ByteArrayOutputStream os = null;
-        try {
-            // Create streams
-            is = new ByteArrayInputStream(iarr);
-            os = new ByteArrayOutputStream();
-
-            // Test our copy method
-            assertEquals(100, IOUtils.copyLarge(is, os, 0, 100));
-            final byte[] oarr = os.toByteArray();
-
-            // check that output length is correct
-            assertEquals(100, oarr.length);
-            // check that output data corresponds to input data
-            assertEquals(1, oarr[1]);
-            assertEquals(79, oarr[79]);
-            assertEquals(-1, oarr[80]);
-
-        } finally {
-            IOUtils.closeQuietly(is);
-            IOUtils.closeQuietly(os);
-        }
-    }
-
-    public void testCopyLarge_Skip() throws IOException {
-        ByteArrayInputStream is = null;
-        ByteArrayOutputStream os = null;
-        try {
-            // Create streams
-            is = new ByteArrayInputStream(iarr);
-            os = new ByteArrayOutputStream();
-
-            // Test our copy method
-            assertEquals(100, IOUtils.copyLarge(is, os, 10, 100));
-            final byte[] oarr = os.toByteArray();
-
-            // check that output length is correct
-            assertEquals(100, oarr.length);
-            // check that output data corresponds to input data
-            assertEquals(11, oarr[1]);
-            assertEquals(79, oarr[69]);
-            assertEquals(-1, oarr[70]);
-
-        } finally {
-            IOUtils.closeQuietly(is);
-            IOUtils.closeQuietly(os);
-        }
-    }
-
-    public void testCopyLarge_SkipInvalid() throws IOException {
-        ByteArrayInputStream is = null;
-        ByteArrayOutputStream os = null;
-        try {
-            // Create streams
-            is = new ByteArrayInputStream(iarr);
-            os = new ByteArrayOutputStream();
-
-            // Test our copy method
-            IOUtils.copyLarge(is, os, 1000, 100);
-            fail("Should have thrown EOFException");
-        } catch (final EOFException eofe) {
-        } finally {
-            IOUtils.closeQuietly(is);
-            IOUtils.closeQuietly(os);
-        }
-    }
-
-    public void testRead_ReadableByteChannel() throws Exception {
-        final ByteBuffer buffer = ByteBuffer.allocate(FILE_SIZE);
-        final FileInputStream fileInputStream = new FileInputStream(m_testFile);
-        final FileChannel input = fileInputStream.getChannel();
-        try {
-            assertEquals(FILE_SIZE, IOUtils.read(input, buffer));
-            assertEquals(0, IOUtils.read(input, buffer));
-            assertEquals(0, buffer.remaining());
-            assertEquals(0, input.read(buffer));
-            buffer.clear();
-            try {
-                IOUtils.readFully(input, buffer);
-                fail("Should have failed with EOFxception");
-            } catch (final EOFException expected) {
-                // expected
-            }
-        } finally {
-            IOUtils.closeQuietly(input, fileInputStream);
-        }}
-
-    public void testReadFully_InputStream_ByteArray() throws Exception {
-        final int size = 1027;
-
-        final byte[] buffer = new byte[size];
-
-        final InputStream input = new ByteArrayInputStream(new byte[size]);
-        try {
-            IOUtils.readFully(input, buffer, 0, -1);
-            fail("Should have failed with IllegalArgumentException");
-        } catch (final IllegalArgumentException expected) {
-            // expected
-        }
-        IOUtils.readFully(input, buffer, 0, 0);
-        IOUtils.readFully(input, buffer, 0, size - 1);
-        try {
-            IOUtils.readFully(input, buffer, 0, 2);
-            fail("Should have failed with EOFxception");
-        } catch (final EOFException expected) {
-            // expected
-        }
-        IOUtils.closeQuietly(input);
-
-    }
-
-    public void testReadFully_InputStream__ReturnByteArray() throws Exception {
-        final byte[] bytes = "abcd1234".getBytes("UTF-8");
-        final ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
-
-        final byte[] result = IOUtils.readFully(stream, bytes.length);
-
-        IOUtils.closeQuietly(stream);
-
-        assertEqualContent(result, bytes);
-    }
-
-    public void testReadFully_InputStream_Offset() throws Exception {
-        final byte[] bytes = "abcd1234".getBytes("UTF-8");
-        final ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
-        final byte[] buffer = "wx00000000".getBytes("UTF-8");
-        IOUtils.readFully(stream, buffer, 2, 8);
-        assertEquals("wxabcd1234", new String(buffer, 0, buffer.length, "UTF-8"));
-        IOUtils.closeQuietly(stream);
-    }
-
-    public void testReadFully_ReadableByteChannel() throws Exception {
-        final ByteBuffer buffer = ByteBuffer.allocate(FILE_SIZE);
-        final FileInputStream fileInputStream = new FileInputStream(m_testFile);
-        final FileChannel input = fileInputStream.getChannel();
-        try {
-            IOUtils.readFully(input, buffer);
-            assertEquals(FILE_SIZE, buffer.position());
-            assertEquals(0, buffer.remaining());
-            assertEquals(0, input.read(buffer));
-            IOUtils.readFully(input, buffer);
-            assertEquals(FILE_SIZE, buffer.position());
-            assertEquals(0, buffer.remaining());
-            assertEquals(0, input.read(buffer));
-            IOUtils.readFully(input, buffer);
-            buffer.clear();
-            try {
-                IOUtils.readFully(input, buffer);
-                fail("Should have failed with EOFxception");
-            } catch (final EOFException expected) {
-                // expected
-            }
-        } finally {
-            IOUtils.closeQuietly(input, fileInputStream);
-        }
-    }
-
-    public void testReadFully_Reader() throws Exception {
-        final int size = 1027;
-
-        final char[] buffer = new char[size];
-
-        final Reader input = new CharArrayReader(new char[size]);
-        IOUtils.readFully(input, buffer, 0, 0);
-        IOUtils.readFully(input, buffer, 0, size - 3);
-        try {
-            IOUtils.readFully(input, buffer, 0, -1);
-            fail("Should have failed with IllegalArgumentException");
-        } catch (final IllegalArgumentException expected) {
-            // expected
-        }
-        try {
-            IOUtils.readFully(input, buffer, 0, 5);
-            fail("Should have failed with EOFException");
-        } catch (final EOFException expected) {
-            // expected
-        }
-        IOUtils.closeQuietly(input);
-    }
-
-    public void testReadFully_Reader_Offset() throws Exception {
-        final Reader reader = new StringReader("abcd1234");
-        final char[] buffer = "wx00000000".toCharArray();
-        IOUtils.readFully(reader, buffer, 2, 8);
-        assertEquals("wxabcd1234", new String(buffer));
-        IOUtils.closeQuietly(reader);
-    }
-
-    @SuppressWarnings("deprecation") // deliberately testing deprecated method
-    public void testReadLines_InputStream() throws Exception {
-        final File file = newFile("lines.txt");
-        InputStream in = null;
-        try {
-            final String[] data = new String[] { "hello", "world", "", "this is", "some text" };
-            createLineBasedFile(file, data);
-
-            in = new FileInputStream(file);
-            final List<String> lines = IOUtils.readLines(in);
-            assertEquals(Arrays.asList(data), lines);
-            assertEquals(-1, in.read());
-        } finally {
-            IOUtils.closeQuietly(in);
-            deleteFile(file);
-        }
-    }
-
-    public void testReadLines_InputStream_String() throws Exception {
-        final File file = newFile("lines.txt");
-        InputStream in = null;
-        try {
-            final String[] data = new String[] { "hello", "/u1234", "", "this is", "some text" };
-            createLineBasedFile(file, data);
-
-            in = new FileInputStream(file);
-            final List<String> lines = IOUtils.readLines(in, "UTF-8");
-            assertEquals(Arrays.asList(data), lines);
-            assertEquals(-1, in.read());
-        } finally {
-            IOUtils.closeQuietly(in);
-            deleteFile(file);
-        }
-    }
-
-    public void testReadLines_Reader() throws Exception {
-        final File file = newFile("lines.txt");
-        Reader in = null;
-        try {
-            final String[] data = new String[] { "hello", "/u1234", "", "this is", "some text" };
-            createLineBasedFile(file, data);
-
-            in = new InputStreamReader(new FileInputStream(file));
-            final List<String> lines = IOUtils.readLines(in);
-            assertEquals(Arrays.asList(data), lines);
-            assertEquals(-1, in.read());
-        } finally {
-            IOUtils.closeQuietly(in);
-            deleteFile(file);
-        }
-    }
-
-    public void testSkip_FileReader() throws Exception {
-        final FileReader in = new FileReader(m_testFile);
-        try {
-            assertEquals(FILE_SIZE - 10, IOUtils.skip(in, FILE_SIZE - 10));
-            assertEquals(10, IOUtils.skip(in, 20));
-            assertEquals(0, IOUtils.skip(in, 10));
-        } finally {
-            in.close();
-        }
-    }
-
-    public void testSkip_InputStream() throws Exception {
-        final InputStream in = new FileInputStream(m_testFile);
-        try {
-            assertEquals(FILE_SIZE - 10, IOUtils.skip(in, FILE_SIZE - 10));
-            assertEquals(10, IOUtils.skip(in, 20));
-            assertEquals(0, IOUtils.skip(in, 10));
-        } finally {
-            in.close();
-        }
-    }
-
-    public void testSkip_ReadableByteChannel() throws Exception {
-        final FileInputStream fileInputStream = new FileInputStream(m_testFile);
-        final FileChannel fileChannel = fileInputStream.getChannel();
-        try {
-            assertEquals(FILE_SIZE - 10, IOUtils.skip(fileChannel, FILE_SIZE - 10));
-            assertEquals(10, IOUtils.skip(fileChannel, 20));
-            assertEquals(0, IOUtils.skip(fileChannel, 10));
-        } finally {
-            IOUtils.closeQuietly(fileChannel, fileInputStream);
-        }
-    }
-
-    public void testSkipFully_InputStream() throws Exception {
-        final int size = 1027;
-
-        final InputStream input = new ByteArrayInputStream(new byte[size]);
-        try {
-            IOUtils.skipFully(input, -1);
-            fail("Should have failed with IllegalArgumentException");
-        } catch (final IllegalArgumentException expected) {
-            // expected
-        }
-        IOUtils.skipFully(input, 0);
-        IOUtils.skipFully(input, size - 1);
-        try {
-            IOUtils.skipFully(input, 2);
-            fail("Should have failed with IOException");
-        } catch (final IOException expected) {
-            // expected
-        }
-        IOUtils.closeQuietly(input);
-
-    }
-
-    public void testSkipFully_ReadableByteChannel() throws Exception {
-        final FileInputStream fileInputStream = new FileInputStream(m_testFile);
-        final FileChannel fileChannel = fileInputStream.getChannel();
-        try {
-            try {
-                IOUtils.skipFully(fileChannel, -1);
-                fail("Should have failed with IllegalArgumentException");
-            } catch (final IllegalArgumentException expected) {
-                // expected
-            }
-            IOUtils.skipFully(fileChannel, 0);
-            IOUtils.skipFully(fileChannel, FILE_SIZE - 1);
-            try {
-                IOUtils.skipFully(fileChannel, 2);
-                fail("Should have failed with IOException");
-            } catch (final IOException expected) {
-                // expected
-            }
-        } finally {
-            IOUtils.closeQuietly(fileChannel, fileInputStream);
-        }
-    }
-
-    public void testSkipFully_Reader() throws Exception {
-        final int size = 1027;
-
-        final Reader input = new CharArrayReader(new char[size]);
-        IOUtils.skipFully(input, 0);
-        IOUtils.skipFully(input, size - 3);
-        try {
-            IOUtils.skipFully(input, -1);
-            fail("Should have failed with IllegalArgumentException");
-        } catch (final IllegalArgumentException expected) {
-            // expected
-        }
-        try {
-            IOUtils.skipFully(input, 5);
-            fail("Should have failed with IOException");
-        } catch (final IOException expected) {
-            // expected
-        }
-        IOUtils.closeQuietly(input);
-    }
-
-    @SuppressWarnings("deprecation")
-    // testing deprecated method
-    public void testStringToOutputStream() throws Exception {
-        final File destination = newFile("copy5.txt");
-        final FileReader fin = new FileReader(m_testFile);
-        String str;
-        try {
-            // Create our String. Rely on testReaderToString() to make sure this is valid.
-            str = IOUtils.toString(fin);
-        } finally {
-            fin.close();
-        }
-
-        final FileOutputStream fout = new FileOutputStream(destination);
-        try {
-            CopyUtils.copy(str, fout);
-            // Note: this method *does* flush. It is equivalent to:
-            // OutputStreamWriter _out = new OutputStreamWriter(fout);
-            // CopyUtils.copy( str, _out, 4096 ); // copy( Reader, Writer, int );
-            // _out.flush();
-            // out = fout;
-            // note: we don't flush here; this IOUtils method does it for us
-
-            checkFile(destination, m_testFile);
-            checkWrite(fout);
-        } finally {
-            fout.close();
-        }
-        deleteFile(destination);
-    }
-
-    public void testToBufferedInputStream_InputStream() throws Exception {
-        final FileInputStream fin = new FileInputStream(m_testFile);
-        try {
-            final InputStream in = IOUtils.toBufferedInputStream(fin);
-            final byte[] out = IOUtils.toByteArray(in);
-            assertNotNull(out);
-            assertEquals("Not all bytes were read", 0, fin.available());
-            assertEquals("Wrong output size", FILE_SIZE, out.length);
-            assertEqualContent(out, m_testFile);
-        } finally {
-            fin.close();
-        }
-    }
-
-    public void testToBufferedInputStreamWithBufferSize_InputStream() throws Exception {
-        final FileInputStream fin = new FileInputStream(m_testFile);
-        try {
-            final InputStream in = IOUtils.toBufferedInputStream(fin, 2048);
-            final byte[] out = IOUtils.toByteArray(in);
-            assertNotNull(out);
-            assertEquals("Not all bytes were read", 0, fin.available());
-            assertEquals("Wrong output size", FILE_SIZE, out.length);
-            assertEqualContent(out, m_testFile);
-        } finally {
-            fin.close();
-        }
-    }
-
-    public void testToByteArray_InputStream() throws Exception {
-        final FileInputStream fin = new FileInputStream(m_testFile);
-        try {
-            final byte[] out = IOUtils.toByteArray(fin);
-            assertNotNull(out);
-            assertEquals("Not all bytes were read", 0, fin.available());
-            assertEquals("Wrong output size", FILE_SIZE, out.length);
-            assertEqualContent(out, m_testFile);
-        } finally {
-            fin.close();
-        }
-    }
-
-    public void testToByteArray_InputStream_NegativeSize() throws Exception {
-        final FileInputStream fin = new FileInputStream(m_testFile);
-
-        try {
-            IOUtils.toByteArray(fin, -1);
-            fail("IllegalArgumentException excepted");
-        } catch (final IllegalArgumentException exc) {
-            assertTrue("Exception message does not start with \"Size must be equal or greater than zero\"", exc
-                    .getMessage().startsWith("Size must be equal or greater than zero"));
-        } finally {
-            fin.close();
-        }
-
-    }
-
-    public void testToByteArray_InputStream_Size() throws Exception {
-        final FileInputStream fin = new FileInputStream(m_testFile);
-        try {
-            final byte[] out = IOUtils.toByteArray(fin, m_testFile.length());
-            assertNotNull(out);
-            assertEquals("Not all bytes were read", 0, fin.available());
-            assertEquals("Wrong output size: out.length=" + out.length + "!=" + FILE_SIZE, FILE_SIZE, out.length);
-            assertEqualContent(out, m_testFile);
-        } finally {
-            fin.close();
-        }
-    }
-
-    public void testToByteArray_InputStream_SizeIllegal() throws Exception {
-        final FileInputStream fin = new FileInputStream(m_testFile);
-
-        try {
-            IOUtils.toByteArray(fin, m_testFile.length() + 1);
-            fail("IOException excepted");
-        } catch (final IOException exc) {
-            assertTrue("Exception message does not start with \"Unexpected readed size\"",
-                    exc.getMessage().startsWith("Unexpected readed size"));
-        } finally {
-            fin.close();
-        }
-
-    }
-
-    public void testToByteArray_InputStream_SizeLong() throws Exception {
-        final FileInputStream fin = new FileInputStream(m_testFile);
-
-        try {
-            IOUtils.toByteArray(fin, (long) Integer.MAX_VALUE + 1);
-            fail("IOException excepted");
-        } catch (final IllegalArgumentException exc) {
-            assertTrue("Exception message does not start with \"Size cannot be greater than Integer max value\"", exc
-                    .getMessage().startsWith("Size cannot be greater than Integer max value"));
-        } finally {
-            fin.close();
-        }
-
-    }
-
-    public void testToByteArray_InputStream_SizeZero() throws Exception {
-        final FileInputStream fin = new FileInputStream(m_testFile);
-
-        try {
-            final byte[] out = IOUtils.toByteArray(fin, 0);
-            assertNotNull("Out cannot be null", out);
-            assertEquals("Out length must be 0", 0, out.length);
-        } finally {
-            fin.close();
-        }
-    }
-
-    @SuppressWarnings("deprecation") // deliberately testing deprecated method
-    public void testToByteArray_Reader() throws IOException {
-        final String charsetName = "UTF-8";
-        final byte[] expecteds = charsetName.getBytes(charsetName);
-        byte[] actuals = IOUtils.toByteArray(new InputStreamReader(new ByteArrayInputStream(expecteds)));
-        Assert.assertArrayEquals(expecteds, actuals);
-        actuals = IOUtils.toByteArray(new InputStreamReader(new ByteArrayInputStream(expecteds)), charsetName);
-        Assert.assertArrayEquals(expecteds, actuals);
-    }
-
-    @SuppressWarnings("deprecation")
-    // testing deprecated method
-    public void testToByteArray_String() throws Exception {
-        final FileReader fin = new FileReader(m_testFile);
-        try {
-            // Create our String. Rely on testReaderToString() to make sure this is valid.
-            final String str = IOUtils.toString(fin);
-
-            final byte[] out = IOUtils.toByteArray(str);
-            assertEqualContent(str.getBytes(), out);
-        } finally {
-            fin.close();
-        }
-    }
-
-    public void testToByteArray_URI() throws Exception {
-        final URI url = m_testFile.toURI();
-        final byte[] actual = IOUtils.toByteArray(url);
-        Assert.assertEquals(FILE_SIZE, actual.length);
-    }
-
-    public void testToByteArray_URL() throws Exception {
-        final URL url = m_testFile.toURI().toURL();
-        final byte[] actual = IOUtils.toByteArray(url);
-        Assert.assertEquals(FILE_SIZE, actual.length);
-    }
-
-    public void testToByteArray_URLConnection() throws Exception {
-        final URLConnection urlConn = m_testFile.toURI().toURL().openConnection();
-        byte[] actual;
-        try {
-            actual = IOUtils.toByteArray(urlConn);
-        } finally {
-            IOUtils.close(urlConn);
-        }
-        Assert.assertEquals(FILE_SIZE, actual.length);
-    }
-
-    @SuppressWarnings("deprecation") // deliberately testing deprecated method
-    public void testToCharArray_InputStream() throws Exception {
-        final FileInputStream fin = new FileInputStream(m_testFile);
-        try {
-            final char[] out = IOUtils.toCharArray(fin);
-            assertNotNull(out);
-            assertEquals("Not all chars were read", 0, fin.available());
-            assertEquals("Wrong output size", FILE_SIZE, out.length);
-            assertEqualContent(out, m_testFile);
-        } finally {
-            fin.close();
-        }
-    }
-
-    public void testToCharArray_InputStream_CharsetName() throws Exception {
-        final FileInputStream fin = new FileInputStream(m_testFile);
-        try {
-            final char[] out = IOUtils.toCharArray(fin, "UTF-8");
-            assertNotNull(out);
-            assertEquals("Not all chars were read", 0, fin.available());
-            assertEquals("Wrong output size", FILE_SIZE, out.length);
-            assertEqualContent(out, m_testFile);
-        } finally {
-            fin.close();
-        }
-    }
-
-    public void testToCharArray_Reader() throws Exception {
-        final FileReader fr = new FileReader(m_testFile);
-        try {
-            final char[] out = IOUtils.toCharArray(fr);
-            assertNotNull(out);
-            assertEquals("Wrong output size", FILE_SIZE, out.length);
-            assertEqualContent(out, m_testFile);
-        } finally {
-            fr.close();
-        }
-    }
-
-    /**
-     * Test for {@link IOUtils#toInputStream(CharSequence)} and {@link IOUtils#toInputStream(CharSequence, String)}.
-     * Note, this test utilizes on {@link IOUtils#toByteArray(java.io.InputStream)} and so relies on
-     * {@link #testToByteArray_InputStream()} to ensure this method functions correctly.
-     *
-     * @throws Exception
-     *             on error
-     */
-    @SuppressWarnings("javadoc") // deliberately testing deprecated method
-    public void testToInputStream_CharSequence() throws Exception {
-        final CharSequence csq = new StringBuilder("Abc123Xyz!");
-        @SuppressWarnings("deprecation")
-        InputStream inStream = IOUtils.toInputStream(csq); // deliberately testing deprecated method
-        byte[] bytes = IOUtils.toByteArray(inStream);
-        assertEqualContent(csq.toString().getBytes(), bytes);
-        inStream = IOUtils.toInputStream(csq, (String) null);
-        bytes = IOUtils.toByteArray(inStream);
-        assertEqualContent(csq.toString().getBytes(), bytes);
-        inStream = IOUtils.toInputStream(csq, "UTF-8");
-        bytes = IOUtils.toByteArray(inStream);
-        assertEqualContent(csq.toString().getBytes("UTF-8"), bytes);
-    }
-
-    // Tests from IO-305
-
-    /**
-     * Test for {@link IOUtils#toInputStream(String)} and {@link IOUtils#toInputStream(String, String)}. Note, this test
-     * utilizes on {@link IOUtils#toByteArray(java.io.InputStream)} and so relies on
-     * {@link #testToByteArray_InputStream()} to ensure this method functions correctly.
-     *
-     * @throws Exception
-     *             on error
-     */
-    @SuppressWarnings("javadoc") // deliberately testing deprecated method
-    public void testToInputStream_String() throws Exception {
-        final String str = "Abc123Xyz!";
-        @SuppressWarnings("deprecation") // deliberately testing deprecated method
-        InputStream inStream = IOUtils.toInputStream(str);
-        byte[] bytes = IOUtils.toByteArray(inStream);
-        assertEqualContent(str.getBytes(), bytes);
-        inStream = IOUtils.toInputStream(str, (String) null);
-        bytes = IOUtils.toByteArray(inStream);
-        assertEqualContent(str.getBytes(), bytes);
-        inStream = IOUtils.toInputStream(str, "UTF-8");
-        bytes = IOUtils.toByteArray(inStream);
-        assertEqualContent(str.getBytes("UTF-8"), bytes);
-    }
-
-    @SuppressWarnings("deprecation")
-    // testing deprecated method
-    public void testToString_ByteArray() throws Exception {
-        final FileInputStream fin = new FileInputStream(m_testFile);
-        try {
-            final byte[] in = IOUtils.toByteArray(fin);
-            // Create our byte[]. Rely on testInputStreamToByteArray() to make sure this is valid.
-            final String str = IOUtils.toString(in);
-            assertEqualContent(in, str.getBytes());
-        } finally {
-            fin.close();
-        }
-    }
-
-    @SuppressWarnings("deprecation") // deliberately testing deprecated method
-    public void testToString_InputStream() throws Exception {
-        final FileInputStream fin = new FileInputStream(m_testFile);
-        try {
-            final String out = IOUtils.toString(fin);
-            assertNotNull(out);
-            assertEquals("Not all bytes were read", 0, fin.available());
-            assertEquals("Wrong output size", FILE_SIZE, out.length());
-        } finally {
-            fin.close();
-        }
-    }
-
-    public void testToString_Reader() throws Exception {
-        final FileReader fin = new FileReader(m_testFile);
-        try {
-            final String out = IOUtils.toString(fin);
-            assertNotNull(out);
-            assertEquals("Wrong output size", FILE_SIZE, out.length());
-        } finally {
-            fin.close();
-        }
-    }
-
-    @SuppressWarnings("deprecation") // deliberately testing deprecated method
-    public void testToString_URI() throws Exception {
-        final URI url = m_testFile.toURI();
-        final String out = IOUtils.toString(url);
-        assertNotNull(out);
-        assertEquals("Wrong output size", FILE_SIZE, out.length());
-    }
-
-    private void testToString_URI(final String encoding) throws Exception {
-        final URI uri = m_testFile.toURI();
-        final String out = IOUtils.toString(uri, encoding);
-        assertNotNull(out);
-        assertEquals("Wrong output size", FILE_SIZE, out.length());
-    }
-
-    public void testToString_URI_CharsetName() throws Exception {
-        testToString_URI("US-ASCII");
-    }
-
-    public void testToString_URI_CharsetNameNull() throws Exception {
-        testToString_URI(null);
-    }
-
-    @SuppressWarnings("deprecation") // deliberately testing deprecated method
-    public void testToString_URL() throws Exception {
-        final URL url = m_testFile.toURI().toURL();
-        final String out = IOUtils.toString(url);
-        assertNotNull(out);
-        assertEquals("Wrong output size", FILE_SIZE, out.length());
-    }
-
-    private void testToString_URL(final String encoding) throws Exception {
-        final URL url = m_testFile.toURI().toURL();
-        final String out = IOUtils.toString(url, encoding);
-        assertNotNull(out);
-        assertEquals("Wrong output size", FILE_SIZE, out.length());
-    }
-
-    public void testToString_URL_CharsetName() throws Exception {
-        testToString_URL("US-ASCII");
-    }
-
-    public void testToString_URL_CharsetNameNull() throws Exception {
-        testToString_URL(null);
-    }
-
-    public void testAsBufferedNull() {
-        try {
-            IOUtils.buffer((InputStream) null);
-            fail("Expected NullPointerException");
-        } catch (NullPointerException npe) {
-            // expected
-        }
-        try {
-            IOUtils.buffer((OutputStream) null);
-            fail("Expected NullPointerException");
-        } catch (NullPointerException npe) {
-            // expected
-        }
-        try {
-            IOUtils.buffer((Reader) null);
-            fail("Expected NullPointerException");
-        } catch (NullPointerException npe) {
-            // expected
-        }
-        try {
-            IOUtils.buffer((Writer) null);
-            fail("Expected NullPointerException");
-        } catch (NullPointerException npe) {
-            // expected
-        }
-    }
-
-    public void testAsBufferedInputStream() {
-        InputStream is = new InputStream() {
-            @Override
-            public int read() throws IOException {
-                return 0;
-            }
-        };
-        final BufferedInputStream bis = IOUtils.buffer(is);
-        assertNotSame(is, bis);
-        assertSame(bis, IOUtils.buffer(bis));
-    }
-
-    public void testAsBufferedInputStreamWithBufferSize() {
-        InputStream is = new InputStream() {
-            @Override
-            public int read() throws IOException {
-                return 0;
-            }
-        };
-        final BufferedInputStream bis = IOUtils.buffer(is, 2048);
-        assertNotSame(is, bis);
-        assertSame(bis, IOUtils.buffer(bis));
-        assertSame(bis, IOUtils.buffer(bis, 1024));
-    }
-
-    public void testAsBufferedOutputStream() {
-        OutputStream is = new OutputStream() {
-            @Override
-            public void write(int b) throws IOException { }
-        };
-        final BufferedOutputStream bis = IOUtils.buffer(is);
-        assertNotSame(is, bis);
-        assertSame(bis, IOUtils.buffer(bis));
-    }
-
-    public void testAsBufferedOutputStreamWithBufferSize() {
-        OutputStream os = new OutputStream() {
-            @Override
-            public void write(int b) throws IOException { }
-        };
-        final BufferedOutputStream bos = IOUtils.buffer(os, 2048);
-        assertNotSame(os, bos);
-        assertSame(bos, IOUtils.buffer(bos));
-        assertSame(bos, IOUtils.buffer(bos, 1024));
-    }
-
-    public void testAsBufferedReader() {
-        Reader is = new Reader() {
-            @Override
-            public int read(char[] cbuf, int off, int len) throws IOException {
-                return 0;
-            }
-            @Override
-            public void close() throws IOException { }
-        };
-        final BufferedReader bis = IOUtils.buffer(is);
-        assertNotSame(is, bis);
-        assertSame(bis, IOUtils.buffer(bis));
-    }
-
-    public void testAsBufferedReaderWithBufferSize() {
-        Reader r = new Reader() {
-            @Override
-            public int read(char[] cbuf, int off, int len) throws IOException {
-                return 0;
-            }
-            @Override
-            public void close() throws IOException { }
-        };
-        final BufferedReader br = IOUtils.buffer(r, 2048);
-        assertNotSame(r, br);
-        assertSame(br, IOUtils.buffer(br));
-        assertSame(br, IOUtils.buffer(br, 1024));
-    }
-
-    public void testAsBufferedWriter() {
-        Writer is = new Writer() {
-            @Override
-            public void write(int b) throws IOException { }
-
-            @Override
-            public void write(char[] cbuf, int off, int len) throws IOException { }
-
-            @Override
-            public void flush() throws IOException { }
-
-            @Override
-            public void close() throws IOException { }
-        };
-        final BufferedWriter bis = IOUtils.buffer(is);
-        assertNotSame(is, bis);
-        assertSame(bis, IOUtils.buffer(bis));
-    }
-
-    public void testAsBufferedWriterWithBufferSize() {
-        Writer w = new Writer() {
-            @Override
-            public void write(int b) throws IOException { }
-
-            @Override
-            public void write(char[] cbuf, int off, int len) throws IOException { }
-
-            @Override
-            public void flush() throws IOException { }
-
-            @Override
-            public void close() throws IOException { }
-        };
-        final BufferedWriter bw = IOUtils.buffer(w, 2024);
-        assertNotSame(w, bw);
-        assertSame(bw, IOUtils.buffer(bw));
-        assertSame(bw, IOUtils.buffer(bw, 1024));
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/IOUtilsWriteTestCase.java b/trunk/src/test/java/org/apache/commons/io/IOUtilsWriteTestCase.java
deleted file mode 100644
index 5529d55..0000000
--- a/trunk/src/test/java/org/apache/commons/io/IOUtilsWriteTestCase.java
+++ /dev/null
@@ -1,729 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.commons.io.testtools.FileBasedTestCase;
-import org.apache.commons.io.testtools.YellOnFlushAndCloseOutputStream;
-
-/**
- * JUnit tests for IOUtils write methods.
- *
- * @version $Id$
- * @see IOUtils
- */
-@SuppressWarnings("deprecation") // includes tests for deprecated methods
-public class IOUtilsWriteTestCase extends FileBasedTestCase {
-
-    private static final int FILE_SIZE = 1024 * 4 + 1;
-
-
-    private final byte[] inData = generateTestData(FILE_SIZE);
-
-    public IOUtilsWriteTestCase(final String testName) {
-        super(testName);
-    }
-
-    // ----------------------------------------------------------------
-    // Setup
-    // ----------------------------------------------------------------
-
-    @Override
-    public void setUp() throws Exception {
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-    }
-
-    // ----------------------------------------------------------------
-    // Tests
-    // ----------------------------------------------------------------
-
-    //-----------------------------------------------------------------------
-    public void testWrite_byteArrayToOutputStream() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write(inData, out);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testWrite_byteArrayToOutputStream_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write((byte[]) null, out);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWrite_byteArrayToOutputStream_nullStream() throws Exception {
-        try {
-            IOUtils.write(inData, (OutputStream) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWrite_byteArrayToWriter() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.write(inData, writer);
-        out.off();
-        writer.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testWrite_byteArrayToWriter_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.write((byte[]) null, writer);
-        out.off();
-        writer.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWrite_byteArrayToWriter_nullWriter() throws Exception {
-        try {
-            IOUtils.write(inData, (Writer) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWrite_byteArrayToWriter_Encoding() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.write(inData, writer, "UTF8");
-        out.off();
-        writer.flush();
-
-        byte[] bytes = baout.toByteArray();
-        bytes = new String(bytes, "UTF8").getBytes("US-ASCII");
-        assertTrue("Content differs", Arrays.equals(inData, bytes));
-    }
-
-    public void testWrite_byteArrayToWriter_Encoding_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.write(null, writer, "UTF8");
-        out.off();
-        writer.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWrite_byteArrayToWriter_Encoding_nullWriter() throws Exception {
-        try {
-            IOUtils.write(inData, null, "UTF8");
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void testWrite_byteArrayToWriter_Encoding_nullEncoding() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.write(inData, writer, (String) null);
-        out.off();
-        writer.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-    //-----------------------------------------------------------------------
-    public void testWrite_charSequenceToOutputStream() throws Exception {
-        final CharSequence csq = new StringBuilder(new String(inData, "US-ASCII"));
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write(csq, out);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testWrite_charSequenceToOutputStream_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write((CharSequence) null, out);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWrite_charSequenceToOutputStream_nullStream() throws Exception {
-        final CharSequence csq = new StringBuilder(new String(inData, "US-ASCII"));
-        try {
-            IOUtils.write(csq, (OutputStream) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWrite_charSequenceToOutputStream_Encoding() throws Exception {
-        final CharSequence csq = new StringBuilder(new String(inData, "US-ASCII"));
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write(csq, out, "UTF16");
-        out.off();
-        out.flush();
-
-        byte[] bytes = baout.toByteArray();
-        bytes = new String(bytes, "UTF16").getBytes("US-ASCII");
-        assertTrue("Content differs", Arrays.equals(inData, bytes));
-    }
-
-    public void testWrite_charSequenceToOutputStream_Encoding_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write((CharSequence) null, out);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWrite_charSequenceToOutputStream_Encoding_nullStream() throws Exception {
-        final CharSequence csq = new StringBuilder(new String(inData, "US-ASCII"));
-        try {
-            IOUtils.write(csq, (OutputStream) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void testWrite_charSequenceToOutputStream_nullEncoding() throws Exception {
-        final CharSequence csq = new StringBuilder(new String(inData, "US-ASCII"));
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write(csq, out, (String) null);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWrite_charSequenceToWriter() throws Exception {
-        final CharSequence csq = new StringBuilder(new String(inData, "US-ASCII"));
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.write(csq, writer);
-        out.off();
-        writer.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testWrite_charSequenceToWriter_Encoding_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.write((CharSequence) null, writer);
-        out.off();
-        writer.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWrite_charSequenceToWriter_Encoding_nullStream() throws Exception {
-        final CharSequence csq = new StringBuilder(new String(inData, "US-ASCII"));
-        try {
-            IOUtils.write(csq, (Writer) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-    //-----------------------------------------------------------------------
-    public void testWrite_stringToOutputStream() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write(str, out);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testWrite_stringToOutputStream_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write((String) null, out);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWrite_stringToOutputStream_nullStream() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-        try {
-            IOUtils.write(str, (OutputStream) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWrite_stringToOutputStream_Encoding() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write(str, out, "UTF16");
-        out.off();
-        out.flush();
-
-        byte[] bytes = baout.toByteArray();
-        bytes = new String(bytes, "UTF16").getBytes("US-ASCII");
-        assertTrue("Content differs", Arrays.equals(inData, bytes));
-    }
-
-    public void testWrite_stringToOutputStream_Encoding_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write((String) null, out);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWrite_stringToOutputStream_Encoding_nullStream() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-        try {
-            IOUtils.write(str, (OutputStream) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void testWrite_stringToOutputStream_nullEncoding() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write(str, out, (String) null);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWrite_stringToWriter() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.write(str, writer);
-        out.off();
-        writer.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testWrite_stringToWriter_Encoding_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.write((String) null, writer);
-        out.off();
-        writer.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWrite_stringToWriter_Encoding_nullStream() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-        try {
-            IOUtils.write(str, (Writer) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWrite_charArrayToOutputStream() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write(str.toCharArray(), out);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testWrite_charArrayToOutputStream_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write((char[]) null, out);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWrite_charArrayToOutputStream_nullStream() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-        try {
-            IOUtils.write(str.toCharArray(), (OutputStream) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWrite_charArrayToOutputStream_Encoding() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write(str.toCharArray(), out, "UTF16");
-        out.off();
-        out.flush();
-
-        byte[] bytes = baout.toByteArray();
-        bytes = new String(bytes, "UTF16").getBytes("US-ASCII");
-        assertTrue("Content differs", Arrays.equals(inData, bytes));
-    }
-
-    public void testWrite_charArrayToOutputStream_Encoding_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write((char[]) null, out);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWrite_charArrayToOutputStream_Encoding_nullStream() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-        try {
-            IOUtils.write(str.toCharArray(), (OutputStream) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void testWrite_charArrayToOutputStream_nullEncoding() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-
-        IOUtils.write(str.toCharArray(), out, (String) null);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWrite_charArrayToWriter() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.write(str.toCharArray(), writer);
-        out.off();
-        writer.flush();
-
-        assertEquals("Sizes differ", inData.length, baout.size());
-        assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
-    }
-
-    public void testWrite_charArrayToWriter_Encoding_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.write((char[]) null, writer);
-        out.off();
-        writer.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWrite_charArrayToWriter_Encoding_nullStream() throws Exception {
-        final String str = new String(inData, "US-ASCII");
-        try {
-            IOUtils.write(str.toCharArray(), (Writer) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWriteLines_OutputStream() throws Exception {
-        final Object[] data = new Object[] {
-            "hello", new StringBuffer("world"), "", "this is", null, "some text"};
-        final List<Object> list = Arrays.asList(data);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        IOUtils.writeLines(list, "*", out);
-
-        out.off();
-        out.flush();
-
-        final String expected = "hello*world**this is**some text*";
-        final String actual = baout.toString();
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_OutputStream_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        IOUtils.writeLines(null, "*", out);
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWriteLines_OutputStream_nullSeparator() throws Exception {
-        final Object[] data = new Object[] {"hello", "world"};
-        final List<Object> list = Arrays.asList(data);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        IOUtils.writeLines(list, null, out);
-        out.off();
-        out.flush();
-
-        final String expected = "hello" + IOUtils.LINE_SEPARATOR + "world" + IOUtils.LINE_SEPARATOR;
-        final String actual = baout.toString();
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_OutputStream_nullStream() throws Exception {
-        final Object[] data = new Object[] {"hello", "world"};
-        final List<Object> list = Arrays.asList(data);
-        try {
-            IOUtils.writeLines(list, "*", (OutputStream) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWriteLines_OutputStream_Encoding() throws Exception {
-        final Object[] data = new Object[] {
-            "hello\u8364", new StringBuffer("world"), "", "this is", null, "some text"};
-        final List<Object> list = Arrays.asList(data);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        IOUtils.writeLines(list, "*", out, "UTF-8");
-
-        out.off();
-        out.flush();
-
-        final String expected = "hello\u8364*world**this is**some text*";
-        final String actual = baout.toString("UTF-8");
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_OutputStream_Encoding_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        IOUtils.writeLines(null, "*", out, "US-ASCII");
-        out.off();
-        out.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWriteLines_OutputStream_Encoding_nullSeparator() throws Exception {
-        final Object[] data = new Object[] {"hello", "world"};
-        final List<Object> list = Arrays.asList(data);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        IOUtils.writeLines(list, null, out, "US-ASCII");
-        out.off();
-        out.flush();
-
-        final String expected = "hello" + IOUtils.LINE_SEPARATOR + "world" + IOUtils.LINE_SEPARATOR;
-        final String actual = baout.toString();
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_OutputStream_Encoding_nullStream() throws Exception {
-        final Object[] data = new Object[] {"hello", "world"};
-        final List<Object> list = Arrays.asList(data);
-        try {
-            IOUtils.writeLines(list, "*", null, "US-ASCII");
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-    public void testWriteLines_OutputStream_Encoding_nullEncoding() throws Exception {
-        final Object[] data = new Object[] {
-            "hello", new StringBuffer("world"), "", "this is", null, "some text"};
-        final List<Object> list = Arrays.asList(data);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
-
-        IOUtils.writeLines(list, "*", out, (String) null);
-
-        out.off();
-        out.flush();
-
-        final String expected = "hello*world**this is**some text*";
-        final String actual = baout.toString();
-        assertEquals(expected, actual);
-    }
-
-    //-----------------------------------------------------------------------
-    public void testWriteLines_Writer() throws Exception {
-        final Object[] data = new Object[] {
-            "hello", new StringBuffer("world"), "", "this is", null, "some text"};
-        final List<Object> list = Arrays.asList(data);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.writeLines(list, "*", writer);
-
-        out.off();
-        writer.flush();
-
-        final String expected = "hello*world**this is**some text*";
-        final String actual = baout.toString();
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_Writer_nullData() throws Exception {
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.writeLines(null, "*", writer);
-        out.off();
-        writer.flush();
-
-        assertEquals("Sizes differ", 0, baout.size());
-    }
-
-    public void testWriteLines_Writer_nullSeparator() throws Exception {
-        final Object[] data = new Object[] {"hello", "world"};
-        final List<Object> list = Arrays.asList(data);
-
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        @SuppressWarnings("resource") // deliberately not closed
-        final YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
-        final Writer writer = new OutputStreamWriter(baout, "US-ASCII");
-
-        IOUtils.writeLines(list, null, writer);
-        out.off();
-        writer.flush();
-
-        final String expected = "hello" + IOUtils.LINE_SEPARATOR + "world" + IOUtils.LINE_SEPARATOR;
-        final String actual = baout.toString();
-        assertEquals(expected, actual);
-    }
-
-    public void testWriteLines_Writer_nullStream() throws Exception {
-        final Object[] data = new Object[] {"hello", "world"};
-        final List<Object> list = Arrays.asList(data);
-        try {
-            IOUtils.writeLines(list, "*", (Writer) null);
-            fail();
-        } catch (final NullPointerException ex) {}
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/Java7SupportTest.java b/trunk/src/test/java/org/apache/commons/io/Java7SupportTest.java
deleted file mode 100644
index aea9c36..0000000
--- a/trunk/src/test/java/org/apache/commons/io/Java7SupportTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.apache.commons.io;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-
-import java.io.File;
-
-import org.junit.Test;
-
-public class Java7SupportTest {
-    @Test
-    public void testIsSymLink()
-            throws Exception {
-
-        File file = new File(".");
-        if (Java7Support.isAtLeastJava7()) {
-            assertFalse(Java7Support.isSymLink(file));
-        }
-    }
-
-    @Test
-    public void createAndReadSymlink()
-            throws Exception {
-
-        File file = new File("target/fzz");
-        if (Java7Support.isAtLeastJava7()) {
-            Java7Support.createSymbolicLink(file, new File("../target"));
-
-            final File file1 = Java7Support.readSymbolicLink(file);
-            assertEquals("target", file1.getName());
-            Java7Support.delete(file);
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/LineIteratorTestCase.java b/trunk/src/test/java/org/apache/commons/io/LineIteratorTestCase.java
deleted file mode 100644
index eac4f4f..0000000
--- a/trunk/src/test/java/org/apache/commons/io/LineIteratorTestCase.java
+++ /dev/null
@@ -1,443 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.nio.charset.UnsupportedCharsetException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-import org.apache.commons.io.testtools.FileBasedTestCase;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This is used to test LineIterator for correctness.
- *
- * @version $Id$
- */
-public class LineIteratorTestCase extends FileBasedTestCase {
-
-    public LineIteratorTestCase(final String name) {
-        super(name);
-    }
-
-    private void assertLines(final List<String> lines, final LineIterator iterator) {
-        try {
-            for (int i = 0; i < lines.size(); i++) {
-                final String line = iterator.nextLine();
-                assertEquals("nextLine() line " + i, lines.get(i), line);
-            }
-            assertFalse("No more expected", iterator.hasNext());
-        } finally {
-            LineIterator.closeQuietly(iterator);
-        }
-    }
-
-    /**
-     * Creates a test file with a specified number of lines.
-     *
-     * @param file target file
-     * @param lineCount number of lines to create
-     *
-     * @throws IOException If an I/O error occurs
-     */
-    private List<String> createLinesFile(final File file, final int lineCount) throws IOException {
-        final List<String> lines = createStringLines(lineCount);
-        FileUtils.writeLines(file, lines);
-        return lines;
-    }
-
-    /**
-     * Creates a test file with a specified number of lines.
-     *
-     * @param file target file
-     * @param encoding the encoding to use while writing the lines
-     * @param lineCount number of lines to create
-     *
-     * @throws IOException If an I/O error occurs
-     */
-    private List<String> createLinesFile(final File file, final String encoding, final int lineCount) throws IOException {
-        final List<String> lines = createStringLines(lineCount);
-        FileUtils.writeLines(file, encoding, lines);
-        return lines;
-    }
-
-    /**
-     * Creates String data lines.
-     *
-     * @param lineCount number of lines to create
-     * @return a new lines list.
-     */
-    private List<String> createStringLines(final int lineCount) {
-        final List<String> lines = new ArrayList<String>();
-        for (int i = 0; i < lineCount; i++) {
-            lines.add("LINE " + i);
-        }
-        return lines;
-    }
-
-    @Override
-    @Before
-    protected void setUp() throws Exception {
-        final File dir = getTestDirectory();
-        if (dir.exists()) {
-            FileUtils.deleteDirectory(dir);
-        }
-        dir.mkdirs();
-
-    }
-
-    @Override
-    @After
-    protected void tearDown() throws Exception {
-        FileUtils.deleteDirectory(getTestDirectory());
-    }
-
-    // -----------------------------------------------------------------------
-
-    @Test
-    public void testConstructor() throws Exception {
-        try {
-            new LineIterator(null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            // expected
-        }
-    }
-
-    @Test
-    public void testZeroLines() throws Exception {
-        doTestFileWithSpecifiedLines(0);
-    }
-
-    @Test
-    public void testOneLines() throws Exception {
-        doTestFileWithSpecifiedLines(1);
-    }
-
-    @Test
-    public void testTwoLines() throws Exception {
-        doTestFileWithSpecifiedLines(2);
-    }
-
-    @Test
-    public void testThreeLines() throws Exception {
-        doTestFileWithSpecifiedLines(3);
-    }
-
-    @Test
-    public void testMissingFile() throws Exception {
-        final File testFile = new File(getTestDirectory(), "dummy-missing-file.txt");
-
-        LineIterator iterator = null;
-        try {
-            iterator = FileUtils.lineIterator(testFile, "UTF-8");
-            fail("Expected FileNotFoundException");
-        } catch (final FileNotFoundException expected) {
-            // ignore, expected result
-        } finally {
-            LineIterator.closeQuietly(iterator);
-        }
-    }
-
-    @Test
-    public void testValidEncoding() throws Exception {
-        final String encoding = "UTF-8";
-
-        final File testFile = new File(getTestDirectory(), "LineIterator-validEncoding.txt");
-        createLinesFile(testFile, encoding, 3);
-
-        final LineIterator iterator = FileUtils.lineIterator(testFile, encoding);
-        try {
-            int count = 0;
-            while (iterator.hasNext()) {
-                assertNotNull(iterator.next());
-                count++;
-            }
-            assertEquals(3, count);
-        } finally {
-            LineIterator.closeQuietly(iterator);
-        }
-    }
-
-    @Test
-    public void testInvalidEncoding() throws Exception {
-        final String encoding = "XXXXXXXX";
-
-        final File testFile = new File(getTestDirectory(), "LineIterator-invalidEncoding.txt");
-        createLinesFile(testFile, "UTF-8", 3);
-
-        LineIterator iterator = null;
-        try {
-            iterator = FileUtils.lineIterator(testFile, encoding);
-            fail("Expected UnsupportedCharsetException");
-        } catch (final UnsupportedCharsetException expected) {
-            // ignore, expected result
-        } finally {
-            LineIterator.closeQuietly(iterator);
-        }
-    }
-
-    @Test
-    public void testNextLineOnlyDefaultEncoding() throws Exception {
-        final File testFile = new File(getTestDirectory(), "LineIterator-nextOnly.txt");
-        final List<String> lines = createLinesFile(testFile, 3);
-
-        final LineIterator iterator = FileUtils.lineIterator(testFile);
-        assertLines(lines, iterator);
-    }
-
-    @Test
-    public void testNextLineOnlyNullEncoding() throws Exception {
-        final String encoding = null;
-
-        final File testFile = new File(getTestDirectory(), "LineIterator-nextOnly.txt");
-        final List<String> lines = createLinesFile(testFile, encoding, 3);
-
-        final LineIterator iterator = FileUtils.lineIterator(testFile, encoding);
-        assertLines(lines, iterator);
-    }
-
-    @Test
-    public void testNextLineOnlyUtf8Encoding() throws Exception {
-        final String encoding = "UTF-8";
-
-        final File testFile = new File(getTestDirectory(), "LineIterator-nextOnly.txt");
-        final List<String> lines = createLinesFile(testFile, encoding, 3);
-
-        final LineIterator iterator = FileUtils.lineIterator(testFile, encoding);
-        assertLines(lines, iterator);
-    }
-
-    @Test
-    public void testNextOnly() throws Exception {
-        final String encoding = null;
-
-        final File testFile = new File(getTestDirectory(), "LineIterator-nextOnly.txt");
-        final List<String> lines = createLinesFile(testFile, encoding, 3);
-
-        final LineIterator iterator = FileUtils.lineIterator(testFile, encoding);
-        try {
-            for (int i = 0; i < lines.size(); i++) {
-                final String line = iterator.next();
-                assertEquals("next() line " + i, lines.get(i), line);
-            }
-            assertEquals("No more expected", false, iterator.hasNext());
-        } finally {
-            LineIterator.closeQuietly(iterator);
-        }
-    }
-
-    @Test
-    public void testNextWithException() throws Exception {
-        final Reader reader = new BufferedReader(new StringReader("")) {
-            @Override
-            public String readLine() throws IOException {
-                throw new IOException("hasNext");
-            }
-        };
-        try {
-            new LineIterator(reader).hasNext();
-            fail("Expected IllegalStateException");
-        } catch (final IllegalStateException e) {
-            // expected
-        }
-    }
-
-    @Test
-    public void testCloseEarly() throws Exception {
-        final String encoding = "UTF-8";
-
-        final File testFile = new File(getTestDirectory(), "LineIterator-closeEarly.txt");
-        createLinesFile(testFile, encoding, 3);
-
-        final LineIterator iterator = FileUtils.lineIterator(testFile, encoding);
-        try {
-            // get
-            assertNotNull("Line expected", iterator.next());
-            assertTrue("More expected", iterator.hasNext());
-
-            // close
-            iterator.close();
-            assertFalse("No more expected", iterator.hasNext());
-            try {
-                iterator.next();
-                fail();
-            } catch (final NoSuchElementException ex) {
-                // expected
-            }
-            try {
-                iterator.nextLine();
-                fail();
-            } catch (final NoSuchElementException ex) {
-                // expected
-            }
-
-            // try closing again
-            iterator.close();
-            try {
-                iterator.next();
-                fail();
-            } catch (final NoSuchElementException ex) {
-                // expected
-            }
-            try {
-                iterator.nextLine();
-                fail();
-            } catch (final NoSuchElementException ex) {
-                // expected
-            }
-        } finally {
-            LineIterator.closeQuietly(iterator);
-        }
-    }
-
-    /**
-     * Utility method to create and test a file with a specified number of lines.
-     *
-     * @param lineCount the lines to create in the test file
-     *
-     * @throws IOException If an I/O error occurs while creating the file 
-     */
-    private void doTestFileWithSpecifiedLines(final int lineCount) throws IOException {
-        final String encoding = "UTF-8";
-
-        final String fileName = "LineIterator-" + lineCount + "-test.txt";
-        final File testFile = new File(getTestDirectory(), fileName);
-        final List<String> lines = createLinesFile(testFile, encoding, lineCount);
-
-        final LineIterator iterator = FileUtils.lineIterator(testFile, encoding);
-        try {
-            try {
-                iterator.remove();
-                fail("Remove is unsupported");
-            } catch (final UnsupportedOperationException ex) {
-                // expected
-            }
-
-            int idx = 0;
-            while (iterator.hasNext()) {
-                final String line = iterator.next();
-                assertEquals("Comparing line " + idx, lines.get(idx), line);
-                assertTrue("Exceeded expected idx=" + idx + " size=" + lines.size(), idx < lines.size());
-                idx++;
-            }
-            assertEquals("Line Count doesn't match", idx, lines.size());
-
-            // try calling next() after file processed
-            try {
-                iterator.next();
-                fail("Expected NoSuchElementException");
-            } catch (final NoSuchElementException expected) {
-                // ignore, expected result
-            }
-            try {
-                iterator.nextLine();
-                fail("Expected NoSuchElementException");
-            } catch (final NoSuchElementException expected) {
-                // ignore, expected result
-            }
-        } finally {
-            LineIterator.closeQuietly(iterator);
-        }
-    }
-
-    // -----------------------------------------------------------------------
-    @Test
-    public void testFilteringFileReader() throws Exception {
-        final String encoding = "UTF-8";
-
-        final String fileName = "LineIterator-Filter-test.txt";
-        final File testFile = new File(getTestDirectory(), fileName);
-        final List<String> lines = createLinesFile(testFile, encoding, 9);
-
-        final Reader reader = new FileReader(testFile);
-        this.testFiltering(lines, reader);
-    }
-
-    @Test
-    public void testFilteringBufferedReader() throws Exception {
-        final String encoding = "UTF-8";
-
-        final String fileName = "LineIterator-Filter-test.txt";
-        final File testFile = new File(getTestDirectory(), fileName);
-        final List<String> lines = createLinesFile(testFile, encoding, 9);
-
-        final Reader reader = new BufferedReader(new FileReader(testFile));
-        this.testFiltering(lines, reader);
-    }
-
-    private void testFiltering(final List<String> lines, final Reader reader) {
-        final LineIterator iterator = new LineIterator(reader) {
-            @Override
-            protected boolean isValidLine(final String line) {
-                final char c = line.charAt(line.length() - 1);
-                return (c - 48) % 3 != 1;
-            }
-        };
-        try {
-            try {
-                iterator.remove();
-                fail("Remove is unsupported");
-            } catch (final UnsupportedOperationException ex) {
-                // expected
-            }
-
-            int idx = 0;
-            int actualLines = 0;
-            while (iterator.hasNext()) {
-                final String line = iterator.next();
-                actualLines++;
-                assertEquals("Comparing line " + idx, lines.get(idx), line);
-                assertTrue("Exceeded expected idx=" + idx + " size=" + lines.size(), idx < lines.size());
-                idx++;
-                if (idx % 3 == 1) {
-                    idx++;
-                }
-            }
-            assertEquals("Line Count doesn't match", 9, lines.size());
-            assertEquals("Line Count doesn't match", 9, idx);
-            assertEquals("Line Count doesn't match", 6, actualLines);
-
-            // try calling next() after file processed
-            try {
-                iterator.next();
-                fail("Expected NoSuchElementException");
-            } catch (final NoSuchElementException expected) {
-                // ignore, expected result
-            }
-            try {
-                iterator.nextLine();
-                fail("Expected NoSuchElementException");
-            } catch (final NoSuchElementException expected) {
-                // ignore, expected result
-            }
-        } finally {
-            LineIterator.closeQuietly(iterator);
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/SelectorAdapter.java b/trunk/src/test/java/org/apache/commons/io/SelectorAdapter.java
deleted file mode 100644
index 9271496..0000000
--- a/trunk/src/test/java/org/apache/commons/io/SelectorAdapter.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.IOException;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.Selector;
-import java.nio.channels.spi.SelectorProvider;
-import java.util.Set;
-
-/**
- * Extends {@link Selector} with no-ops for testing.
- *
- * @version $Id$
- */
-public class SelectorAdapter extends Selector {
-
-    @Override
-    public boolean isOpen() {
-        return false;
-    }
-
-    @Override
-    public SelectorProvider provider() {
-        return null;
-    }
-
-    @Override
-    public Set<SelectionKey> keys() {
-        return null;
-    }
-
-    @Override
-    public Set<SelectionKey> selectedKeys() {
-        return null;
-    }
-
-    @Override
-    public int selectNow() throws IOException {
-        return 0;
-    }
-
-    @Override
-    public int select(final long timeout) throws IOException {
-        return 0;
-    }
-
-    @Override
-    public int select() throws IOException {
-        return 0;
-    }
-
-    @Override
-    public Selector wakeup() {
-        return null;
-    }
-
-    @Override
-    public void close() throws IOException {
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/TaggedIOExceptionTest.java b/trunk/src/test/java/org/apache/commons/io/TaggedIOExceptionTest.java
deleted file mode 100644
index 0350425..0000000
--- a/trunk/src/test/java/org/apache/commons/io/TaggedIOExceptionTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.UUID;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit Test Case for {@link TaggedIOException}.
- */
-public class TaggedIOExceptionTest extends TestCase {
-
-    public void testTaggedIOException() {
-        final Serializable tag = UUID.randomUUID();
-        final IOException exception = new IOException("Test exception");
-        final TaggedIOException tagged = new TaggedIOException(exception, tag);
-        assertTrue(TaggedIOException.isTaggedWith(tagged, tag));
-        assertFalse(TaggedIOException.isTaggedWith(tagged, UUID.randomUUID()));
-        assertEquals(exception, tagged.getCause());
-        assertEquals(exception.getMessage(), tagged.getMessage());
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/ThreadMonitorTestCase.java b/trunk/src/test/java/org/apache/commons/io/ThreadMonitorTestCase.java
deleted file mode 100644
index 73b31b5..0000000
--- a/trunk/src/test/java/org/apache/commons/io/ThreadMonitorTestCase.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io;
-
-import junit.framework.TestCase;
-
-/**
- * Tests for {@link ThreadMonitor}.
- */
-public class ThreadMonitorTestCase extends TestCase {
-
-
-    public ThreadMonitorTestCase(final String name) {
-        super(name);
-    }
-
-    /**
-     * Test timeout.
-     */
-    public void testTimeout() {
-        try {
-            final Thread monitor = ThreadMonitor.start(100);
-            Thread.sleep(200);
-            ThreadMonitor.stop(monitor);
-            fail("Expected InterruptedException");
-        } catch (final InterruptedException e) {
-            // expected result - timeout
-        }
-    }
-
-    /**
-     * Test task completed before timeout.
-     */
-    public void testCompletedWithoutTimeout() {
-        try {
-            final Thread monitor = ThreadMonitor.start(200);
-            Thread.sleep(100);
-            ThreadMonitor.stop(monitor);
-        } catch (final InterruptedException e) {
-            fail("Timed Out");
-        }
-    }
-
-    /**
-     * Test No timeout.
-     */
-    public void testNoTimeout() {
-
-        // timeout = -1
-        try {
-            final Thread monitor = ThreadMonitor.start(-1);
-            assertNull("Timeout -1, Monitor should be null", monitor);
-            Thread.sleep(100);
-            ThreadMonitor.stop(monitor);
-        } catch (final Exception e) {
-            fail("Timeout -1, threw " + e);
-        }
-
-        // timeout = 0
-        try {
-            final Thread monitor = ThreadMonitor.start(0);
-            assertNull("Timeout 0, Monitor should be null", monitor);
-            Thread.sleep(100);
-            ThreadMonitor.stop(monitor);
-        } catch (final Exception e) {
-            fail("Timeout 0, threw " + e);
-        }
-    }
-}
-
diff --git a/trunk/src/test/java/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java b/trunk/src/test/java/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java
deleted file mode 100644
index f55405d..0000000
--- a/trunk/src/test/java/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * Base Test case for Comparator implementations.
- */
-public abstract class ComparatorAbstractTestCase extends FileBasedTestCase {
-
-    /** comparator instance */
-    protected AbstractFileComparator comparator;
-
-    /** reverse comparator instance */
-    protected Comparator<File> reverse;
-
-    /** File which compares equal to  "equalFile2" */
-    protected File equalFile1;
-
-    /** File which compares equal to  "equalFile1" */
-    protected File equalFile2;
-
-    /** File which is less than the "moreFile" */
-    protected File lessFile;
-
-    /** File which is more than the "lessFile" */
-    protected File moreFile;
-
-    /**
-     * Construct a new test case with the specified name
-     * @param name Name of the test
-     */
-    public ComparatorAbstractTestCase(final String name) {
-        super(name);
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        comparator = (AbstractFileComparator) DefaultFileComparator.DEFAULT_COMPARATOR;
-        reverse = DefaultFileComparator.DEFAULT_REVERSE;
-    }
-
-    /** @see junit.framework.TestCase#tearDown() */
-    @Override
-    protected void tearDown() throws Exception {
-        comparator = null;
-        reverse = null;
-        equalFile1 = null;
-        equalFile2 = null;
-        lessFile = null;
-        moreFile = null;
-        FileUtils.deleteDirectory(getTestDirectory());
-    }
-
-    /**
-     * Test the comparator.
-     */
-    public void testComparator() {
-        assertEquals("equal", 0, comparator.compare(equalFile1, equalFile2));
-        assertTrue("less",  comparator.compare(lessFile, moreFile) < 0);
-        assertTrue("more",  comparator.compare(moreFile, lessFile) > 0);
-    }
-
-    /**
-     * Test the comparator reversed.
-     */
-    public void testReverseComparator() {
-        assertEquals("equal", 0, reverse.compare(equalFile1, equalFile2));
-        assertTrue("less",  reverse.compare(moreFile, lessFile) < 0);
-        assertTrue("more",  reverse.compare(lessFile, moreFile) > 0);
-    }
-
-    /**
-     * Test comparator array sort is null safe.
-     */
-    public void testSortArrayNull() {
-        assertNull(comparator.sort((File[])null));
-    }
-
-    /**
-     * Test the comparator array sort.
-     */
-    public void testSortArray() {
-        final File[] files = new File[3];
-        files[0] = equalFile1;
-        files[1] = moreFile;
-        files[2] = lessFile;
-        comparator.sort(files);
-        assertSame("equal", lessFile, files[0]);
-        assertSame("less",  equalFile1, files[1]);
-        assertSame("more",  moreFile, files[2]);
-    }
-
-    /**
-     * Test the comparator array sort.
-     */
-    public void testSortList() {
-        final List<File> files = new ArrayList<File>();
-        files.add(equalFile1);
-        files.add(moreFile);
-        files.add(lessFile);
-        comparator.sort(files);
-        assertSame("equal", lessFile, files.get(0));
-        assertSame("less",  equalFile1, files.get(1));
-        assertSame("more",  moreFile, files.get(2));
-    }
-
-    /**
-     * Test comparator list sort is null safe.
-     */
-    public void testSortListNull() {
-        assertNull(comparator.sort((List<File>)null));
-    }
-
-    /**
-     * Test comparator toString.
-     */
-    public void testToString() {
-        assertNotNull("comparator", comparator.toString());
-        assertTrue("reverse", reverse.toString().startsWith("ReverseComparator["));
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/comparator/CompositeFileComparatorTest.java b/trunk/src/test/java/org/apache/commons/io/comparator/CompositeFileComparatorTest.java
deleted file mode 100644
index 84a61a5..0000000
--- a/trunk/src/test/java/org/apache/commons/io/comparator/CompositeFileComparatorTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-
-/**
- * Test case for {@link CompositeFileComparator}.
- */
-public class CompositeFileComparatorTest extends ComparatorAbstractTestCase {
-
-    /**
-     * Construct a new test case with the specified name.
-     *
-     * @param name Name of the test
-     */
-    public CompositeFileComparatorTest(final String name) {
-        super(name);
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        comparator = new CompositeFileComparator(
-                new AbstractFileComparator[] {
-                    (AbstractFileComparator) SizeFileComparator.SIZE_COMPARATOR,
-                    (AbstractFileComparator) ExtensionFileComparator.EXTENSION_COMPARATOR});
-        reverse = new ReverseComparator(comparator);
-        final File dir = getTestDirectory();
-        lessFile   = new File(dir, "xyz.txt");
-        equalFile1 = new File(dir, "foo.txt");
-        equalFile2 = new File(dir, "bar.txt");
-        moreFile   = new File(dir, "foo.xyz");
-        createFile(lessFile,   32);
-        createFile(equalFile1, 48);
-        createFile(equalFile2, 48);
-        createFile(moreFile,   48);
-    }
-
-    /**
-     * Test Constructor with null Iterable
-     */
-    public void testConstructorIterable() {
-        final List<Comparator<File>> list = new ArrayList<Comparator<File>>();
-        list.add(SizeFileComparator.SIZE_COMPARATOR);
-        list.add(ExtensionFileComparator.EXTENSION_COMPARATOR);
-        final Comparator<File> c = new CompositeFileComparator(list);
-
-        assertEquals("equal", 0, c.compare(equalFile1, equalFile2));
-        assertTrue("less",  c.compare(lessFile, moreFile) < 0);
-        assertTrue("more",  c.compare(moreFile, lessFile) > 0);
-    }
-
-    /**
-     * Test Constructor with null Iterable
-     */
-    public void testConstructorIterableNull() {
-        final Comparator<File> c = new CompositeFileComparator((Iterable<Comparator<File>>)null);
-        assertEquals("less,more", 0, c.compare(lessFile, moreFile));
-        assertEquals("more,less", 0, c.compare(moreFile, lessFile));
-        assertEquals("toString", "CompositeFileComparator{}", c.toString());
-    }
-
-    /**
-     * Test Constructor with null array
-     */
-    public void testConstructorArrayNull() {
-        final Comparator<File> c = new CompositeFileComparator((Comparator<File>[])null);
-        assertEquals("less,more", 0, c.compare(lessFile, moreFile));
-        assertEquals("more,less", 0, c.compare(moreFile, lessFile));
-        assertEquals("toString", "CompositeFileComparator{}", c.toString());
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/comparator/DefaultFileComparatorTest.java b/trunk/src/test/java/org/apache/commons/io/comparator/DefaultFileComparatorTest.java
deleted file mode 100644
index 7ae90b7..0000000
--- a/trunk/src/test/java/org/apache/commons/io/comparator/DefaultFileComparatorTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-
-/**
- * Test case for {@link DefaultFileComparator}.
- */
-public class DefaultFileComparatorTest extends ComparatorAbstractTestCase {
-
-    /**
-     * Construct a new test case with the specified name.
-     *
-     * @param name Name of the test
-     */
-    public DefaultFileComparatorTest(final String name) {
-        super(name);
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        comparator = (AbstractFileComparator) DefaultFileComparator.DEFAULT_COMPARATOR;
-        reverse = DefaultFileComparator.DEFAULT_REVERSE;
-        equalFile1 = new File("foo");
-        equalFile2 = new File("foo");
-        lessFile   = new File("abc");
-        moreFile   = new File("xyz");
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/comparator/DirectoryFileComparatorTest.java b/trunk/src/test/java/org/apache/commons/io/comparator/DirectoryFileComparatorTest.java
deleted file mode 100644
index d2f23d2..0000000
--- a/trunk/src/test/java/org/apache/commons/io/comparator/DirectoryFileComparatorTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-
-/**
- * Test case for {@link DirectoryFileComparator}.
- */
-public class DirectoryFileComparatorTest extends ComparatorAbstractTestCase {
-
-    /**
-     * Construct a new test case with the specified name.
-     *
-     * @param name Name of the test
-     */
-    public DirectoryFileComparatorTest(final String name) {
-        super(name);
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        comparator = (AbstractFileComparator) DirectoryFileComparator.DIRECTORY_COMPARATOR;
-        reverse = DirectoryFileComparator.DIRECTORY_REVERSE;
-        final File currentDir = new File(".");
-        equalFile1 = new File(currentDir, "src");
-        equalFile2 = new File(currentDir, "src/site/xdoc");
-        lessFile   = new File(currentDir, "src");
-        moreFile   = new File(currentDir, "pom.xml");
-    }
-
-    /**
-     * Test the comparator array sort.
-     */
-    @Override
-    public void testSortArray() {
-        // skip sort test
-    }
-
-    /**
-     * Test the comparator array sort.
-     */
-    @Override
-    public void testSortList() {
-        // skip sort test
-    }
-}
-
diff --git a/trunk/src/test/java/org/apache/commons/io/comparator/ExtensionFileComparatorTest.java b/trunk/src/test/java/org/apache/commons/io/comparator/ExtensionFileComparatorTest.java
deleted file mode 100644
index 07c7090..0000000
--- a/trunk/src/test/java/org/apache/commons/io/comparator/ExtensionFileComparatorTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.util.Comparator;
-
-/**
- * Test case for {@link ExtensionFileComparator}.
- */
-public class ExtensionFileComparatorTest extends ComparatorAbstractTestCase {
-
-    /**
-     * Construct a new test case with the specified name.
-     *
-     * @param name Name of the test
-     */
-    public ExtensionFileComparatorTest(final String name) {
-        super(name);
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        comparator = (AbstractFileComparator) ExtensionFileComparator.EXTENSION_COMPARATOR;
-        reverse = ExtensionFileComparator.EXTENSION_REVERSE;
-        equalFile1 = new File("abc.foo");
-        equalFile2 = new File("def.foo");
-        lessFile   = new File("abc.abc");
-        moreFile   = new File("abc.xyz");
-    }
-
-    /** Test case sensitivity */
-    public void testCaseSensitivity() {
-        final File file3 = new File("abc.FOO");
-        final Comparator<File> sensitive = new ExtensionFileComparator(null); /* test null as well */
-        assertTrue("sensitive file1 & file2 = 0", sensitive.compare(equalFile1, equalFile2) == 0);
-        assertTrue("sensitive file1 & file3 > 0", sensitive.compare(equalFile1, file3) > 0);
-        assertTrue("sensitive file1 & less  > 0", sensitive.compare(equalFile1, lessFile) > 0);
-
-        final Comparator<File> insensitive = ExtensionFileComparator.EXTENSION_INSENSITIVE_COMPARATOR;
-        assertTrue("insensitive file1 & file2 = 0", insensitive.compare(equalFile1, equalFile2) == 0);
-        assertTrue("insensitive file1 & file3 = 0", insensitive.compare(equalFile1, file3) == 0);
-        assertTrue("insensitive file1 & file4 > 0", insensitive.compare(equalFile1, lessFile) > 0);
-        assertTrue("insensitive file3 & less  > 0", insensitive.compare(file3, lessFile) > 0);
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/comparator/LastModifiedFileComparatorTest.java b/trunk/src/test/java/org/apache/commons/io/comparator/LastModifiedFileComparatorTest.java
deleted file mode 100644
index 661335c..0000000
--- a/trunk/src/test/java/org/apache/commons/io/comparator/LastModifiedFileComparatorTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-
-/**
- * Test case for {@link LastModifiedFileComparator}.
- */
-public class LastModifiedFileComparatorTest extends ComparatorAbstractTestCase {
-
-    /**
-     * Construct a new test case with the specified name.
-     *
-     * @param name Name of the test
-     */
-    public LastModifiedFileComparatorTest(final String name) {
-        super(name);
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        comparator = (AbstractFileComparator) LastModifiedFileComparator.LASTMODIFIED_COMPARATOR;
-        reverse = LastModifiedFileComparator.LASTMODIFIED_REVERSE;
-        final File dir = getTestDirectory();
-        final File olderFile = new File(dir, "older.txt");
-        createFile(olderFile, 0);
-
-        final File equalFile = new File(dir, "equal.txt");
-        createFile(equalFile, 0);
-        do {
-            try { 
-                Thread.sleep(300);
-            } catch(final InterruptedException ie) {
-                // ignore
-            }
-            equalFile.setLastModified(System.currentTimeMillis());
-        } while( olderFile.lastModified() == equalFile.lastModified() );
-
-        final File newerFile = new File(dir, "newer.txt");
-        createFile(newerFile, 0);
-        do {
-            try { 
-                Thread.sleep(300);
-            } catch(final InterruptedException ie) {
-                // ignore
-            }
-            newerFile.setLastModified(System.currentTimeMillis());
-        } while( equalFile.lastModified() == newerFile.lastModified() );
-        equalFile1 = equalFile;
-        equalFile2 = equalFile;
-        lessFile   = olderFile;
-        moreFile   = newerFile;
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/comparator/NameFileComparatorTest.java b/trunk/src/test/java/org/apache/commons/io/comparator/NameFileComparatorTest.java
deleted file mode 100644
index 602fbce..0000000
--- a/trunk/src/test/java/org/apache/commons/io/comparator/NameFileComparatorTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.util.Comparator;
-
-/**
- * Test case for {@link NameFileComparator}.
- */
-public class NameFileComparatorTest extends ComparatorAbstractTestCase {
-
-    /**
-     * Construct a new test case with the specified name.
-     *
-     * @param name Name of the test
-     */
-    public NameFileComparatorTest(final String name) {
-        super(name);
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        comparator = (AbstractFileComparator) NameFileComparator.NAME_INSENSITIVE_COMPARATOR;
-        reverse = NameFileComparator.NAME_REVERSE;
-        equalFile1 = new File("a/foo.txt");
-        equalFile2 = new File("b/foo.txt");
-        lessFile   = new File("c/ABC.txt");
-        moreFile   = new File("d/XYZ.txt");
-    }
-
-    /** Test case sensitivity */
-    public void testCaseSensitivity() {
-        final File file3 = new File("a/FOO.txt");
-        final Comparator<File> sensitive = new NameFileComparator(null); /* test null as well */
-        assertTrue("sensitive file1 & file2 = 0", sensitive.compare(equalFile1, equalFile2) == 0);
-        assertTrue("sensitive file1 & file3 > 0", sensitive.compare(equalFile1, file3) > 0);
-        assertTrue("sensitive file1 & less  > 0", sensitive.compare(equalFile1, lessFile) > 0);
-
-        final Comparator<File> insensitive = NameFileComparator.NAME_INSENSITIVE_COMPARATOR;
-        assertTrue("insensitive file1 & file2 = 0", insensitive.compare(equalFile1, equalFile2) == 0);
-        assertTrue("insensitive file1 & file3 = 0", insensitive.compare(equalFile1, file3) == 0);
-        assertTrue("insensitive file1 & file4 > 0", insensitive.compare(equalFile1, lessFile) > 0);
-        assertTrue("insensitive file3 & less  > 0", insensitive.compare(file3, lessFile) > 0);
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/comparator/PathFileComparatorTest.java b/trunk/src/test/java/org/apache/commons/io/comparator/PathFileComparatorTest.java
deleted file mode 100644
index 5165a82..0000000
--- a/trunk/src/test/java/org/apache/commons/io/comparator/PathFileComparatorTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-import java.util.Comparator;
-
-/**
- * Test case for {@link PathFileComparator}.
- */
-public class PathFileComparatorTest extends ComparatorAbstractTestCase {
-
-    /**
-     * Construct a new test case with the specified name.
-     *
-     * @param name Name of the test
-     */
-    public PathFileComparatorTest(final String name) {
-        super(name);
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        comparator = (AbstractFileComparator) PathFileComparator.PATH_COMPARATOR;
-        reverse = PathFileComparator.PATH_REVERSE;
-        equalFile1 = new File("foo/file.txt");
-        equalFile2 = new File("foo/file.txt");
-        lessFile   = new File("abc/file.txt");
-        moreFile   = new File("xyz/file.txt");
-    }
-
-    /** Test case sensitivity */
-    public void testCaseSensitivity() {
-        final File file3 = new File("FOO/file.txt");
-        final Comparator<File> sensitive = new PathFileComparator(null); /* test null as well */
-        assertTrue("sensitive file1 & file2 = 0", sensitive.compare(equalFile1, equalFile2) == 0);
-        assertTrue("sensitive file1 & file3 > 0", sensitive.compare(equalFile1, file3) > 0);
-        assertTrue("sensitive file1 & less  > 0", sensitive.compare(equalFile1, lessFile) > 0);
-
-        final Comparator<File> insensitive = PathFileComparator.PATH_INSENSITIVE_COMPARATOR;
-        assertTrue("insensitive file1 & file2 = 0", insensitive.compare(equalFile1, equalFile2) == 0);
-        assertTrue("insensitive file1 & file3 = 0", insensitive.compare(equalFile1, file3) == 0);
-        assertTrue("insensitive file1 & file4 > 0", insensitive.compare(equalFile1, lessFile) > 0);
-        assertTrue("insensitive file3 & less  > 0", insensitive.compare(file3, lessFile) > 0);
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/comparator/SizeFileComparatorTest.java b/trunk/src/test/java/org/apache/commons/io/comparator/SizeFileComparatorTest.java
deleted file mode 100644
index 9b98d95..0000000
--- a/trunk/src/test/java/org/apache/commons/io/comparator/SizeFileComparatorTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.comparator;
-
-import java.io.File;
-
-/**
- * Test case for {@link SizeFileComparator}.
- */
-public class SizeFileComparatorTest extends ComparatorAbstractTestCase {
-
-    private File smallerDir;
-    private File largerDir;
-    private File smallerFile;
-    private File largerFile;
-
-    /**
-     * Construct a new test case with the specified name.
-     *
-     * @param name Name of the test
-     */
-    public SizeFileComparatorTest(final String name) {
-        super(name);
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        comparator = (AbstractFileComparator) SizeFileComparator.SIZE_COMPARATOR;
-        reverse = SizeFileComparator.SIZE_REVERSE;
-        final File dir = getTestDirectory();
-        smallerDir = new File(dir, "smallerdir");
-        largerDir = new File(dir, "largerdir");
-        smallerFile = new File(smallerDir, "smaller.txt");
-        final File equalFile = new File(dir, "equal.txt");
-        largerFile = new File(largerDir, "larger.txt");
-        smallerDir.mkdir();
-        largerDir.mkdir();
-        createFile(smallerFile, 32);
-        createFile(equalFile, 48);
-        createFile(largerFile, 64);
-        equalFile1 = equalFile;
-        equalFile2 = equalFile;
-        lessFile   = smallerFile;
-        moreFile   = largerFile;
-    }
-
-    /**
-     * Test a file which doesn't exist.
-     */
-    public void testNonexistantFile() {
-        final File nonexistantFile = new File(new File("."), "nonexistant.txt");
-        assertFalse(nonexistantFile.exists());
-        assertTrue("less",  comparator.compare(nonexistantFile, moreFile) < 0);
-    }
-
-    /**
-     * Test a file which doesn't exist.
-     */
-    public void testCompareDirectorySizes() {
-        assertEquals("sumDirectoryContents=false", 0, comparator.compare(smallerDir, largerDir));
-        assertEquals("less", -1, SizeFileComparator.SIZE_SUMDIR_COMPARATOR.compare(smallerDir, largerDir));
-        assertEquals("less", 1,  SizeFileComparator.SIZE_SUMDIR_REVERSE.compare(smallerDir, largerDir));
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/filefilter/AndFileFilterTestCase.java b/trunk/src/test/java/org/apache/commons/io/filefilter/AndFileFilterTestCase.java
deleted file mode 100644
index 2bd6c5c..0000000
--- a/trunk/src/test/java/org/apache/commons/io/filefilter/AndFileFilterTestCase.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class AndFileFilterTestCase extends ConditionalFileFilterAbstractTestCase {
-
-  private static final String DEFAULT_WORKING_PATH = "./AndFileFilterTestCase/";
-  private static final String WORKING_PATH_NAME_PROPERTY_KEY = AndFileFilterTestCase.class.getName() + ".workingDirectory";
-
-  private List<List<IOFileFilter>> testFilters;
-  private List<boolean[]> testTrueResults;
-  private List<boolean[]> testFalseResults;
-  private List<Boolean> testFileResults;
-  private List<Boolean> testFilenameResults;
-
-  public AndFileFilterTestCase(final String name) {
-    super(name);
-  }
-
-  @Override
-  public void setUp() throws Exception {
-    super.setUp();
-    this.setUpTestFilters();
-  }
-
-  @Override
-  protected IOFileFilter buildFilterUsingAdd(final List<IOFileFilter> filters) {
-    final AndFileFilter filter = new AndFileFilter();
-    for (IOFileFilter filter1 : filters) {
-      filter.addFileFilter(filter1);
-    }
-    return filter;
-  }
-
-  @Override
-  protected IOFileFilter buildFilterUsingConstructor(final List<IOFileFilter> filters) {
-    return new AndFileFilter(filters);
-  }
-
-  @Override
-  protected ConditionalFileFilter getConditionalFileFilter() {
-    return new AndFileFilter();
-  }
-
-  @Override
-  protected String getDefaultWorkingPath() {
-    return DEFAULT_WORKING_PATH;
-  }
-
-  @Override
-  protected List<boolean[]> getFalseResults() {
-    return this.testFalseResults;
-  }
-
-  @Override
-  protected List<Boolean> getFileResults() {
-    return this.testFileResults;
-  }
-
-  @Override
-  protected List<Boolean> getFilenameResults() {
-    return this.testFilenameResults;
-  }
-
-  @Override
-  protected List<List<IOFileFilter>> getTestFilters() {
-    return this.testFilters;
-  }
-
-  @Override
-  protected List<boolean[]> getTrueResults() {
-    return this.testTrueResults;
-  }
-
-  @Override
-  protected String getWorkingPathNamePropertyKey() {
-    return WORKING_PATH_NAME_PROPERTY_KEY;
-  }
-
-  private void setUpTestFilters() {
-    // filters
-    //tests
-    this.testFilters = new ArrayList<List<IOFileFilter>>();
-    this.testTrueResults = new ArrayList<boolean[]>();
-    this.testFalseResults = new ArrayList<boolean[]>();
-    this.testFileResults = new ArrayList<Boolean>();
-    this.testFilenameResults = new ArrayList<Boolean>();
-
-    // test 0 - add empty elements
-    {
-      testFilters.add(0, null);
-      testTrueResults.add(0, null);
-      testFalseResults.add(0, null);
-      testFileResults.add(0, null);
-      testFilenameResults.add(0, null);
-    }
-
-    // test 1 - Test conditional and with all filters returning true
-    {
-      // test 1 filters
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(trueFilters[1]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      // test 1 true results
-      final boolean[] trueResults = new boolean[] {true, true, true};
-      // test 1 false results
-      final boolean[] falseResults = new boolean[] {false, false, false};
-
-      testFilters.add(1, filters);
-      testTrueResults.add(1, trueResults);
-      testFalseResults.add(1, falseResults);
-      testFileResults.add(1, Boolean.TRUE);
-      testFilenameResults.add(1, Boolean.TRUE);
-    }
-
-    // test 2 - Test conditional and with first filter returning false
-    {
-      // test 2 filters
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(falseFilters[1]);
-      filters.add(trueFilters[1]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      filters.add(falseFilters[2]);
-      filters.add(falseFilters[3]);
-      // test 2 true results
-      final boolean[] trueResults = new boolean[] {false, false, false};
-      // test 2 false results
-      final boolean[] falseResults = new boolean[] {true, false, false};
-
-      testFilters.add(2, filters);
-      testTrueResults.add(2, trueResults);
-      testFalseResults.add(2, falseResults);
-      testFileResults.add(2, Boolean.FALSE);
-      testFilenameResults.add(2, Boolean.FALSE);
-    }
-
-    // test 3 - Test conditional and with second filter returning false
-    {
-      // test 3 filters
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(trueFilters[1]);
-      filters.add(falseFilters[1]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      filters.add(falseFilters[2]);
-      filters.add(falseFilters[3]);
-      // test 3 true results
-      final boolean[] trueResults = new boolean[] {true, false, false};
-      // test 3 false results
-      final boolean[] falseResults = new boolean[] {true, false, false};
-
-      testFilters.add(3, filters);
-      testTrueResults.add(3, trueResults);
-      testFalseResults.add(3, falseResults);
-      testFileResults.add(3, Boolean.FALSE);
-      testFilenameResults.add(3, Boolean.FALSE);
-    }
-
-    // test 4 - Test conditional and with third filter returning false
-    {
-      // test 4 filters
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(trueFilters[1]);
-      filters.add(trueFilters[2]);
-      filters.add(falseFilters[1]);
-      filters.add(trueFilters[3]);
-      filters.add(falseFilters[2]);
-      filters.add(falseFilters[3]);
-      // test 4 true results
-      final boolean[] trueResults = new boolean[] {true, true, false};
-      // test 4 false results
-      final boolean[] falseResults = new boolean[] {true, false, false};
-
-      testFilters.add(4, filters);
-      testTrueResults.add(4, trueResults);
-      testFalseResults.add(4, falseResults);
-      testFileResults.add(4, Boolean.FALSE);
-      testFilenameResults.add(4, Boolean.FALSE);
-    }
-
-    // test 5 - Test conditional and with first and third filters returning false
-    {
-      // test 5 filters
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(falseFilters[1]);
-      filters.add(trueFilters[1]);
-      filters.add(falseFilters[2]);
-      filters.add(falseFilters[3]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      // test 5 true results
-      final boolean[] trueResults = new boolean[] {false, false, false};
-      // test 5 false results
-      final boolean[] falseResults = new boolean[] {true, false, false};
-
-      testFilters.add(5, filters);
-      testTrueResults.add(5, trueResults);
-      testFalseResults.add(5, falseResults);
-      testFileResults.add(5, Boolean.FALSE);
-      testFilenameResults.add(5, Boolean.FALSE);
-    }
-
-    // test 6 - Test conditional and with second and third filters returning false
-    {
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(trueFilters[1]);
-      filters.add(falseFilters[1]);
-      filters.add(falseFilters[2]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      filters.add(falseFilters[3]);
-      // test 6 true results
-      final boolean[] trueResults = new boolean[] {true, false, false};
-      // test 6 false results
-      final boolean[] falseResults = new boolean[] {true, false, false};
-
-      testFilters.add(6, filters);
-      testTrueResults.add(6, trueResults);
-      testFalseResults.add(6, falseResults);
-      testFileResults.add(6, Boolean.FALSE);
-      testFilenameResults.add(6, Boolean.FALSE);
-    }
-
-    // test 7 - Test conditional and with first and second filters returning false
-    {
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(falseFilters[1]);
-      filters.add(falseFilters[2]);
-      filters.add(trueFilters[3]);
-      filters.add(falseFilters[3]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      // test 7 true results
-      final boolean[] trueResults = new boolean[] {false, false, false};
-      // test 7 false results
-      final boolean[] falseResults = new boolean[] {true, false, false};
-
-      testFilters.add(7, filters);
-      testTrueResults.add(7, trueResults);
-      testFalseResults.add(7, falseResults);
-      testFileResults.add(7, Boolean.FALSE);
-      testFilenameResults.add(7, Boolean.FALSE);
-    }
-
-    // test 8 - Test conditional and with fourth filters returning false
-    {
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(trueFilters[1]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      filters.add(falseFilters[1]);
-      // test 8 true results
-      final boolean[] trueResults = new boolean[] {true, true, true};
-      // test 8 false results
-      final boolean[] falseResults = new boolean[] {true, false, false};
-
-      testFilters.add(8, filters);
-      testTrueResults.add(8, trueResults);
-      testFalseResults.add(8, falseResults);
-      testFileResults.add(8, Boolean.FALSE);
-      testFilenameResults.add(8, Boolean.FALSE);
-    }
-
-    // test 9 - Test conditional and with all filters returning false
-    {
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(falseFilters[1]);
-      filters.add(falseFilters[2]);
-      filters.add(falseFilters[3]);
-      // test 9 true results
-      final boolean[] trueResults = new boolean[] {false, false, false};
-      // test 9 false results
-      final boolean[] falseResults = new boolean[] {true, false, false};
-
-      testFilters.add(9, filters);
-      testTrueResults.add(9, trueResults);
-      testFalseResults.add(9, falseResults);
-      testFileResults.add(9, Boolean.FALSE);
-      testFilenameResults.add(9, Boolean.FALSE);
-    }
-  }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java b/trunk/src/test/java/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java
deleted file mode 100644
index 3b8548e..0000000
--- a/trunk/src/test/java/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-public abstract class ConditionalFileFilterAbstractTestCase extends IOFileFilterAbstractTestCase {
-
-    private static final String TEST_FILE_NAME_PREFIX = "TestFile";
-    private static final String TEST_FILE_TYPE = ".tst";
-
-    protected TesterTrueFileFilter[] trueFilters;
-    protected TesterFalseFileFilter[] falseFilters;
-
-    private File file;
-    private File workingPath;
-
-    public ConditionalFileFilterAbstractTestCase(final String name) {
-        super(name);
-    }
-
-    @Override
-    public void setUp() throws Exception {
-        this.workingPath = determineWorkingDirectoryPath(this.getWorkingPathNamePropertyKey(), this.getDefaultWorkingPath());
-        this.file = new File(this.workingPath, TEST_FILE_NAME_PREFIX + 1 + TEST_FILE_TYPE);
-        this.trueFilters = new TesterTrueFileFilter[4];
-        this.falseFilters = new TesterFalseFileFilter[4];
-        this.trueFilters[1] = new TesterTrueFileFilter();
-        this.trueFilters[2] = new TesterTrueFileFilter();
-        this.trueFilters[3] = new TesterTrueFileFilter();
-        this.falseFilters[1] = new TesterFalseFileFilter();
-        this.falseFilters[2] = new TesterFalseFileFilter();
-        this.falseFilters[3] = new TesterFalseFileFilter();
-    }
-
-    public void testAdd() {
-        final List<TesterTrueFileFilter> filters = new ArrayList<TesterTrueFileFilter>();
-        final ConditionalFileFilter fileFilter = this.getConditionalFileFilter();
-        filters.add(new TesterTrueFileFilter());
-        filters.add(new TesterTrueFileFilter());
-        filters.add(new TesterTrueFileFilter());
-        filters.add(new TesterTrueFileFilter());
-        for (int i = 0; i < filters.size(); i++) {
-            assertEquals("file filters count: ", i, fileFilter.getFileFilters().size());
-            fileFilter.addFileFilter(filters.get(i));
-            assertEquals("file filters count: ", i + 1, fileFilter.getFileFilters().size());
-        }
-        for (final IOFileFilter filter : fileFilter.getFileFilters()) {
-            assertTrue("found file filter", filters.contains(filter));
-        }
-        assertEquals("file filters count", filters.size(), fileFilter.getFileFilters().size());
-    }
-
-    public void testRemove() {
-        final List<TesterTrueFileFilter> filters = new ArrayList<TesterTrueFileFilter>();
-        final ConditionalFileFilter fileFilter = this.getConditionalFileFilter();
-        filters.add(new TesterTrueFileFilter());
-        filters.add(new TesterTrueFileFilter());
-        filters.add(new TesterTrueFileFilter());
-        filters.add(new TesterTrueFileFilter());
-        for (TesterTrueFileFilter filter : filters) {
-            fileFilter.removeFileFilter(filter);
-            assertTrue("file filter removed", !fileFilter.getFileFilters().contains(filter));
-        }
-        assertEquals("file filters count", 0, fileFilter.getFileFilters().size());
-    }
-
-    public void testNoFilters() throws Exception {
-        final ConditionalFileFilter fileFilter = this.getConditionalFileFilter();
-        final File file = new File(this.workingPath, TEST_FILE_NAME_PREFIX + 1 + TEST_FILE_TYPE);
-        assertFileFiltering(1, (IOFileFilter) fileFilter, file, false);
-        assertFilenameFiltering(1, (IOFileFilter) fileFilter, file, false);
-    }
-
-    public void testFilterBuiltUsingConstructor() throws Exception {
-        final List<List<IOFileFilter>> testFilters = this.getTestFilters();
-        final List<boolean[]> testTrueResults = this.getTrueResults();
-        final List<boolean[]> testFalseResults = this.getFalseResults();
-        final List<Boolean> testFileResults = this.getFileResults();
-        final List<Boolean> testFilenameResults = this.getFilenameResults();
-
-        for (int i = 1; i < testFilters.size(); i++) {
-            final List<IOFileFilter> filters = testFilters.get(i);
-            final boolean[] trueResults = testTrueResults.get(i);
-            final boolean[] falseResults = testFalseResults.get(i);
-            final boolean fileResults = testFileResults.get(i);
-            final boolean filenameResults = testFilenameResults.get(i);
-
-            // Test conditional AND filter created by passing filters to the constructor
-            final IOFileFilter filter = this.buildFilterUsingConstructor(filters);
-
-            // Test as a file filter
-            resetTrueFilters(this.trueFilters);
-            resetFalseFilters(this.falseFilters);
-            assertFileFiltering(i, filter, this.file, fileResults);
-            assertTrueFiltersInvoked(i, trueFilters, trueResults);
-            assertFalseFiltersInvoked(i, falseFilters, falseResults);
-
-            // Test as a filename filter
-            resetTrueFilters(this.trueFilters);
-            resetFalseFilters(this.falseFilters);
-            assertFilenameFiltering(i, filter, this.file, filenameResults);
-            assertTrueFiltersInvoked(i, trueFilters, trueResults);
-            assertFalseFiltersInvoked(i, falseFilters, falseResults);
-        }
-    }
-
-    public void testFilterBuiltUsingAdd() throws Exception {
-        final List<List<IOFileFilter>> testFilters = this.getTestFilters();
-        final List<boolean[]> testTrueResults = this.getTrueResults();
-        final List<boolean[]> testFalseResults = this.getFalseResults();
-        final List<Boolean> testFileResults = this.getFileResults();
-        final List<Boolean> testFilenameResults = this.getFilenameResults();
-
-        for (int i = 1; i < testFilters.size(); i++) {
-            final List<IOFileFilter> filters = testFilters.get(i);
-            final boolean[] trueResults = testTrueResults.get(i);
-            final boolean[] falseResults = testFalseResults.get(i);
-            final boolean fileResults = testFileResults.get(i);
-            final boolean filenameResults = testFilenameResults.get(i);
-
-            // Test conditional AND filter created by passing filters to the constructor
-            final IOFileFilter filter = this.buildFilterUsingAdd(filters);
-
-            // Test as a file filter
-            resetTrueFilters(this.trueFilters);
-            resetFalseFilters(this.falseFilters);
-            assertFileFiltering(i, filter, this.file, fileResults);
-            assertTrueFiltersInvoked(i, trueFilters, trueResults);
-            assertFalseFiltersInvoked(i, falseFilters, falseResults);
-
-            // Test as a filename filter
-            resetTrueFilters(this.trueFilters);
-            resetFalseFilters(this.falseFilters);
-            assertFilenameFiltering(i, filter, this.file, filenameResults);
-            assertTrueFiltersInvoked(i, trueFilters, trueResults);
-            assertFalseFiltersInvoked(i, falseFilters, falseResults);
-        }
-    }
-
-    protected abstract ConditionalFileFilter getConditionalFileFilter();
-
-    protected abstract IOFileFilter buildFilterUsingAdd(List<IOFileFilter> filters);
-
-    protected abstract IOFileFilter buildFilterUsingConstructor(List<IOFileFilter> filters);
-
-    protected abstract List<List<IOFileFilter>> getTestFilters();
-
-    protected abstract List<boolean[]> getTrueResults();
-
-    protected abstract List<boolean[]> getFalseResults();
-
-    protected abstract List<Boolean> getFileResults();
-
-    protected abstract List<Boolean> getFilenameResults();
-
-    protected abstract String getWorkingPathNamePropertyKey();
-
-    protected abstract String getDefaultWorkingPath();
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java b/trunk/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java
deleted file mode 100644
index 19888c8..0000000
--- a/trunk/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java
+++ /dev/null
@@ -1,1320 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FilenameFilter;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.io.Charsets;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOCase;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * Used to test FileFilterUtils.
- */
-public class FileFilterTestCase extends FileBasedTestCase {
-
-    /**
-     * The subversion directory name.
-     */
-    static final String SVN_DIR_NAME = ".svn";
-
-    private static final boolean WINDOWS = File.separatorChar == '\\';
-
-    public FileFilterTestCase(final String name) {
-        super(name);
-    }
-
-    @Override
-    public void setUp() {
-        getTestDirectory().mkdirs();
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-        FileUtils.deleteDirectory(getTestDirectory());
-    }
-
-    public void assertFiltering(final IOFileFilter filter, final File file, final boolean expected) throws Exception {
-        // Note. This only tests the (File, String) version if the parent of
-        //       the File passed in is not null
-        assertEquals(
-            "Filter(File) " + filter.getClass().getName() + " not " + expected + " for " + file,
-            expected, filter.accept(file));
-
-        if (file != null && file.getParentFile() != null) {
-            assertEquals(
-                "Filter(File, String) " + filter.getClass().getName() + " not " + expected + " for " + file,
-                expected, filter.accept(file.getParentFile(), file.getName()));
-        } else if (file == null) {
-            assertEquals(
-                "Filter(File, String) " + filter.getClass().getName() + " not " + expected + " for null",
-                expected, filter.accept(file));
-        }
-        assertNotNull(filter.toString());
-    }
-
-    public void testSuffix() throws Exception {
-        IOFileFilter filter = new SuffixFileFilter(new String[] { "tes", "est" });
-        final File testFile = new File( "test" );
-        final File fredFile = new File( "fred" );
-        assertFiltering(filter, new File("fred.tes"), true);
-        assertFiltering(filter, new File("fred.est"), true);
-        assertFiltering(filter, new File("fred.EST"), false); //case-sensitive
-        assertFiltering(filter, new File("fred.exe"), false);
-
-        filter = FileFilterUtils.or(
-                    FileFilterUtils.suffixFileFilter( "tes" ),
-                    FileFilterUtils.suffixFileFilter( "est" ) );
-        assertFiltering(filter, new File("fred"), false);
-        assertFiltering(filter, new File(".tes"), true);
-        assertFiltering(filter, new File("fred.test"), true);
-
-        filter = new SuffixFileFilter("est");
-        assertFiltering(filter, new File("test"), true);
-        assertFiltering(filter, new File("fred"), false);
-
-        assertTrue( filter.accept( testFile.getParentFile(), testFile.getName() ) );
-        assertTrue( !filter.accept( fredFile.getParentFile(), fredFile.getName() ) );
-
-        final List<String> prefixes = Arrays.asList("ood", "red");
-        final IOFileFilter listFilter = new SuffixFileFilter( prefixes );
-
-        assertTrue( !listFilter.accept( testFile.getParentFile(), testFile.getName() ) );
-        assertTrue( listFilter.accept( fredFile.getParentFile(), fredFile.getName() ) );
-
-        try {
-            new SuffixFileFilter((String) null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        try {
-            new SuffixFileFilter((String[]) null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        try {
-            new SuffixFileFilter((List<String>) null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-}
-
-    public void testSuffixCaseInsensitive() throws Exception {
-
-        IOFileFilter filter = new SuffixFileFilter(new String[] { "tes", "est" }, IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("foo.tes"), true);
-        assertFiltering(filter, new File("foo.est"), true);
-        assertFiltering(filter, new File("foo.EST"), true); //case-sensitive
-        assertFiltering(filter, new File("foo.TES"), true); //case-sensitive
-        assertFiltering(filter, new File("foo.exe"), false);
-
-        filter = new SuffixFileFilter("est", IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("test"), true);
-        assertFiltering(filter, new File("TEST"), true);
-
-        final List<String> suffixes = Arrays.asList("tes", "est");
-        filter = new SuffixFileFilter(suffixes, IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("bar.tes"), true);
-        assertFiltering(filter, new File("bar.est"), true);
-        assertFiltering(filter, new File("bar.EST"), true); //case-sensitive
-        assertFiltering(filter, new File("bar.TES"), true); //case-sensitive
-        assertFiltering(filter, new File("bar.exe"), false);
-
-        try {
-            new SuffixFileFilter((String) null, IOCase.INSENSITIVE);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        try {
-            new SuffixFileFilter((String[]) null, IOCase.INSENSITIVE);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        try {
-            new SuffixFileFilter((List<String>) null, IOCase.INSENSITIVE);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        // FileFilterUtils.suffixFileFilter(String, IOCase) tests
-        filter = FileFilterUtils.suffixFileFilter("est", IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("test"), true);
-        assertFiltering(filter, new File("TEST"), true);
-
-        try {
-            FileFilterUtils.suffixFileFilter(null, IOCase.INSENSITIVE);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-    }
-
-    public void testDirectory() throws Exception {
-        // XXX: This test presumes the current working dir is the base dir of the source checkout.
-        final IOFileFilter filter = new DirectoryFileFilter();
-
-        assertFiltering(filter, new File("src/"), true);
-        assertFiltering(filter, new File("src/main/java/"), true);
-
-        assertFiltering(filter, new File("pom.xml"), false);
-
-        assertFiltering(filter, new File("imaginary"), false);
-        assertFiltering(filter, new File("imaginary/"), false);
-
-        assertFiltering(filter, new File("LICENSE.txt"), false);
-
-        assertSame(DirectoryFileFilter.DIRECTORY, DirectoryFileFilter.INSTANCE);
-    }
-
-    public void testFiles() throws Exception {
-        // XXX: This test presumes the current working dir is the base dir of the source checkout.
-        final IOFileFilter filter = FileFileFilter.FILE;
-
-        assertFiltering(filter, new File("src/"), false);
-        assertFiltering(filter, new File("src/java/"), false);
-
-        assertFiltering(filter, new File("pom.xml"), true);
-
-        assertFiltering(filter, new File("imaginary"), false);
-        assertFiltering(filter, new File("imaginary/"), false);
-
-        assertFiltering(filter, new File("LICENSE.txt"), true);
-    }
-
-    public void testPrefix() throws Exception {
-        IOFileFilter filter = new PrefixFileFilter(new String[] { "foo", "bar" });
-        final File testFile = new File( "test" );
-        final File fredFile = new File( "fred" );
-
-        assertFiltering(filter, new File("foo.test"), true);
-        assertFiltering(filter, new File("FOO.test"), false);  //case-sensitive
-        assertFiltering(filter, new File("foo"), true);
-        assertFiltering(filter, new File("bar"), true);
-        assertFiltering(filter, new File("food/"), true);
-
-        filter = FileFilterUtils.prefixFileFilter( "bar" );
-        assertFiltering(filter, new File("barred\\"), true);
-        assertFiltering(filter, new File("test"), false);
-        assertFiltering(filter, new File("fo_o.test"), false);
-        assertFiltering(filter, new File("abar.exe"), false);
-
-        filter = new PrefixFileFilter("tes");
-        assertFiltering(filter, new File("test"), true);
-        assertFiltering(filter, new File("fred"), false);
-
-        assertTrue( filter.accept( testFile.getParentFile(), testFile.getName() ) );
-        assertTrue( !filter.accept( fredFile.getParentFile(), fredFile.getName() ) );
-
-        final List<String> prefixes = Arrays.asList("foo", "fre");
-        final IOFileFilter listFilter = new PrefixFileFilter( prefixes );
-
-        assertTrue( !listFilter.accept( testFile.getParentFile(), testFile.getName() ) );
-        assertTrue( listFilter.accept( fredFile.getParentFile(), fredFile.getName() ) );
-
-
-        try {
-            new PrefixFileFilter((String) null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        try {
-            new PrefixFileFilter((String[]) null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        try {
-            new PrefixFileFilter((List<String>) null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-    }
-
-    public void testPrefixCaseInsensitive() throws Exception {
-
-        IOFileFilter filter = new PrefixFileFilter(new String[] { "foo", "bar" }, IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("foo.test1"), true);
-        assertFiltering(filter, new File("bar.test1"), true);
-        assertFiltering(filter, new File("FOO.test1"), true);  //case-sensitive
-        assertFiltering(filter, new File("BAR.test1"), true);  //case-sensitive
-
-        filter = new PrefixFileFilter("bar", IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("foo.test2"), false);
-        assertFiltering(filter, new File("bar.test2"), true);
-        assertFiltering(filter, new File("FOO.test2"), false); //case-sensitive
-        assertFiltering(filter, new File("BAR.test2"), true);  //case-sensitive
-
-        final List<String> prefixes = Arrays.asList("foo", "bar");
-        filter = new PrefixFileFilter(prefixes, IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("foo.test3"), true);
-        assertFiltering(filter, new File("bar.test3"), true);
-        assertFiltering(filter, new File("FOO.test3"), true);  //case-sensitive
-        assertFiltering(filter, new File("BAR.test3"), true);  //case-sensitive
-
-        try {
-            new PrefixFileFilter((String) null, IOCase.INSENSITIVE);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        try {
-            new PrefixFileFilter((String[]) null, IOCase.INSENSITIVE);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        try {
-            new PrefixFileFilter((List<String>) null, IOCase.INSENSITIVE);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        // FileFilterUtils.prefixFileFilter(String, IOCase) tests
-        filter = FileFilterUtils.prefixFileFilter("bar", IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("foo.test2"), false);
-        assertFiltering(filter, new File("bar.test2"), true);
-        assertFiltering(filter, new File("FOO.test2"), false); //case-sensitive
-        assertFiltering(filter, new File("BAR.test2"), true);  //case-sensitive
-
-        try {
-            FileFilterUtils.prefixFileFilter(null, IOCase.INSENSITIVE);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-    }
-
-    public void testNameFilter() throws Exception {
-        IOFileFilter filter = new NameFileFilter(new String[] { "foo", "bar" });
-        assertFiltering(filter, new File("foo"), true);
-        assertFiltering(filter, new File("bar"), true);
-        assertFiltering(filter, new File("fred"), false);
-
-        filter = new NameFileFilter(new String[] { "foo", "bar" }, IOCase.SENSITIVE);
-        assertFiltering(filter, new File("foo"), true);
-        assertFiltering(filter, new File("bar"), true);
-        assertFiltering(filter, new File("FOO"), false);
-        assertFiltering(filter, new File("BAR"), false);
-
-        filter = new NameFileFilter(new String[] { "foo", "bar" }, IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("foo"), true);
-        assertFiltering(filter, new File("bar"), true);
-        assertFiltering(filter, new File("FOO"), true);
-        assertFiltering(filter, new File("BAR"), true);
-
-        filter = new NameFileFilter(new String[] { "foo", "bar" }, IOCase.SYSTEM);
-        assertFiltering(filter, new File("foo"), true);
-        assertFiltering(filter, new File("bar"), true);
-        assertFiltering(filter, new File("FOO"), WINDOWS);
-        assertFiltering(filter, new File("BAR"), WINDOWS);
-
-        filter = new NameFileFilter(new String[]{"foo", "bar"}, null);
-        assertFiltering(filter, new File("foo"), true);
-        assertFiltering(filter, new File("bar"), true);
-        assertFiltering(filter, new File("FOO"), false);
-        assertFiltering(filter, new File("BAR"), false);
-
-        // repeat for a List
-        final java.util.ArrayList<String> list = new java.util.ArrayList<String>();
-        list.add("foo");
-        list.add("bar");
-        filter = new NameFileFilter(list);
-        assertFiltering(filter, new File("foo"), true);
-        assertFiltering(filter, new File("bar"), true);
-        assertFiltering(filter, new File("fred"), false);
-
-        filter = new NameFileFilter("foo");
-        assertFiltering(filter, new File("foo"), true);
-        assertFiltering(filter, new File("FOO"), false); //case-sensitive
-        assertFiltering(filter, new File("barfoo"), false);
-        assertFiltering(filter, new File("foobar"), false);
-        assertFiltering(filter, new File("fred"), false);
-
-        // FileFilterUtils.nameFileFilter(String, IOCase) tests
-        filter = FileFilterUtils.nameFileFilter("foo", IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("foo"), true);
-        assertFiltering(filter, new File("FOO"), true); //case-insensitive
-        assertFiltering(filter, new File("barfoo"), false);
-        assertFiltering(filter, new File("foobar"), false);
-        assertFiltering(filter, new File("fred"), false);
-    }
-
-    public void testNameFilterNullArgument() throws Exception {
-        final String test = null;
-        try {
-            new NameFileFilter(test);
-            fail( "constructing a NameFileFilter with a null String argument should fail.");
-        } catch( final IllegalArgumentException iae ) {
-        }
-
-        try {
-            FileFilterUtils.nameFileFilter(test, IOCase.INSENSITIVE);
-            fail( "constructing a NameFileFilter with a null String argument should fail.");
-        } catch( final IllegalArgumentException iae ) {
-        }
-    }
-
-    public void testNameFilterNullArrayArgument() throws Exception {
-        final String[] test = null;
-        try {
-            new NameFileFilter(test);
-            fail( "constructing a NameFileFilter with a null String[] argument should fail.");
-        } catch( final IllegalArgumentException iae ) {
-        }
-    }
-
-    public void testNameFilterNullListArgument() throws Exception {
-        final List<String> test = null;
-        try {
-            new NameFileFilter(test);
-            fail( "constructing a NameFileFilter with a null List argument should fail.");
-        } catch( final IllegalArgumentException iae ) {
-        }
-    }
-
-    public void testTrue() throws Exception {
-        final IOFileFilter filter = FileFilterUtils.trueFileFilter();
-        assertFiltering(filter, new File("foo.test"), true);
-        assertFiltering(filter, new File("foo"), true);
-        assertFiltering(filter, null, true);
-        assertSame(TrueFileFilter.TRUE, TrueFileFilter.INSTANCE);
-    }
-
-    public void testFalse() throws Exception {
-        final IOFileFilter filter = FileFilterUtils.falseFileFilter();
-        assertFiltering(filter, new File("foo.test"), false);
-        assertFiltering(filter, new File("foo"), false);
-        assertFiltering(filter, null, false);
-        assertSame(FalseFileFilter.FALSE, FalseFileFilter.INSTANCE);
-    }
-
-    public void testNot() throws Exception {
-        final IOFileFilter filter = FileFilterUtils.notFileFilter(FileFilterUtils.trueFileFilter());
-        assertFiltering(filter, new File("foo.test"), false);
-        assertFiltering(filter, new File("foo"), false);
-        assertFiltering(filter, null, false);
-        try {
-            new NotFileFilter(null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-    }
-
-    public void testAnd() throws Exception {
-        final IOFileFilter trueFilter = TrueFileFilter.INSTANCE;
-        final IOFileFilter falseFilter = FalseFileFilter.INSTANCE;
-        assertFiltering(new AndFileFilter(trueFilter, trueFilter), new File("foo.test"), true);
-        assertFiltering(new AndFileFilter(trueFilter, falseFilter), new File("foo.test"), false);
-        assertFiltering(new AndFileFilter(falseFilter, trueFilter), new File("foo.test"), false);
-        assertFiltering(new AndFileFilter(falseFilter, falseFilter), new File("foo.test"), false);
-
-        final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-        assertFiltering( new AndFileFilter( filters ), new File( "test" ), false );
-        assertFiltering( new AndFileFilter(), new File( "test" ), false );
-
-        try {
-            new AndFileFilter(falseFilter, null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        try {
-            new AndFileFilter(null, falseFilter);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        final AndFileFilter f = new AndFileFilter(null);
-        assertTrue(f.getFileFilters().isEmpty());
-
-        assertNotNull(f.toString()); // TODO better tests
-    }
-
-    public void testOr() throws Exception {
-        final IOFileFilter trueFilter = TrueFileFilter.INSTANCE;
-        final IOFileFilter falseFilter = FalseFileFilter.INSTANCE;
-        final File testFile = new File( "foo.test" );
-        assertFiltering(new OrFileFilter(trueFilter, trueFilter), testFile, true);
-        assertFiltering(new OrFileFilter(trueFilter, falseFilter), testFile, true);
-        assertFiltering(new OrFileFilter(falseFilter, trueFilter), testFile, true);
-        assertFiltering(new OrFileFilter(falseFilter, falseFilter), testFile, false);
-        assertFiltering(new OrFileFilter(), testFile, false);
-
-        final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-        filters.add( trueFilter );
-        filters.add( falseFilter );
-
-        final OrFileFilter orFilter = new OrFileFilter( filters );
-
-        assertFiltering(orFilter, testFile, true);
-        assertEquals( orFilter.getFileFilters(), filters );
-        orFilter.removeFileFilter( trueFilter );
-        assertFiltering(orFilter, testFile, false);
-        orFilter.setFileFilters( filters );
-        assertFiltering(orFilter, testFile, true);
-
-        assertTrue( orFilter.accept( testFile.getParentFile(), testFile.getName() ) );
-        orFilter.removeFileFilter( trueFilter );
-        assertTrue( !orFilter.accept( testFile.getParentFile(), testFile.getName() ) );
-
-        try {
-            new OrFileFilter(falseFilter, null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-        }
-
-        final OrFileFilter f = new OrFileFilter(null);
-        assertTrue(f.getFileFilters().isEmpty());
-    }
-    public void testFileFilterUtils_and() throws Exception {
-        final IOFileFilter trueFilter = TrueFileFilter.INSTANCE;
-        final IOFileFilter falseFilter = FalseFileFilter.INSTANCE;
-        assertFiltering(FileFilterUtils.and(trueFilter, trueFilter, trueFilter), new File("foo.test"), true);
-        assertFiltering(FileFilterUtils.and(trueFilter, falseFilter, trueFilter), new File("foo.test"), false);
-        assertFiltering(FileFilterUtils.and(falseFilter, trueFilter), new File("foo.test"), false);
-        assertFiltering(FileFilterUtils.and(falseFilter, falseFilter), new File("foo.test"), false);
-    }
-
-    public void testFileFilterUtils_or() throws Exception {
-        final IOFileFilter trueFilter = TrueFileFilter.INSTANCE;
-        final IOFileFilter falseFilter = FalseFileFilter.INSTANCE;
-        final File testFile = new File( "foo.test" );
-        assertFiltering(FileFilterUtils.or(trueFilter, trueFilter), testFile, true);
-        assertFiltering(FileFilterUtils.or(trueFilter, trueFilter, falseFilter), testFile, true);
-        assertFiltering(FileFilterUtils.or(falseFilter, trueFilter), testFile, true);
-        assertFiltering(FileFilterUtils.or(falseFilter, falseFilter, falseFilter), testFile, false);
-    }
-
-    @SuppressWarnings("deprecation")
-    public void testDeprecatedWildcard() throws Exception {
-        IOFileFilter filter = new WildcardFilter("*.txt");
-        final List<String> patternList = Arrays.asList("*.txt", "*.xml", "*.gif");
-        final IOFileFilter listFilter = new WildcardFilter( patternList );
-        final File txtFile = new File( "test.txt" );
-        final File bmpFile = new File( "test.bmp" );
-        final File dir = new File( "src/java" );
-
-        assertFiltering(filter, new File("log.txt"), true);
-//        assertFiltering(filter, new File("log.txt.bak"), false);
-
-        filter = new WildcardFilter("log?.txt");
-        assertFiltering(filter, new File("log1.txt"), true);
-        assertFiltering(filter, new File("log12.txt"), false);
-
-        filter = new WildcardFilter("open??.????04");
-        assertFiltering(filter, new File("openAB.102504"), true);
-        assertFiltering(filter, new File("openA.102504"), false);
-        assertFiltering(filter, new File("openXY.123103"), false);
-//        assertFiltering(filter, new File("openAB.102504.old"), false);
-
-        filter = new WildcardFilter(new String[] {"*.java", "*.class"});
-        assertFiltering(filter, new File("Test.java"), true);
-        assertFiltering(filter, new File("Test.class"), true);
-        assertFiltering(filter, new File("Test.jsp"), false);
-
-        assertFiltering(listFilter, new File("Test.txt"), true);
-        assertFiltering(listFilter, new File("Test.xml"), true);
-        assertFiltering(listFilter, new File("Test.gif"), true);
-        assertFiltering(listFilter, new File("Test.bmp"), false);
-
-        assertTrue( listFilter.accept( txtFile ) );
-        assertTrue( !listFilter.accept( bmpFile ) );
-        assertTrue( !listFilter.accept( dir ) );
-
-        assertTrue( listFilter.accept( txtFile.getParentFile(), txtFile.getName() ) );
-        assertTrue( !listFilter.accept( bmpFile.getParentFile(), bmpFile.getName() ) );
-        assertTrue( !listFilter.accept( dir.getParentFile(), dir.getName() ) );
-
-        try {
-            new WildcardFilter((String) null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            // expected
-        }
-
-        try {
-            new WildcardFilter((String[]) null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            // expected
-        }
-
-        try {
-            new WildcardFilter((List<String>) null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            // expected
-        }
-    }
-
-    public void testWildcard() throws Exception {
-        IOFileFilter filter = new WildcardFileFilter("*.txt");
-        assertFiltering(filter, new File("log.txt"), true);
-        assertFiltering(filter, new File("log.TXT"), false);
-
-        filter = new WildcardFileFilter("*.txt", IOCase.SENSITIVE);
-        assertFiltering(filter, new File("log.txt"), true);
-        assertFiltering(filter, new File("log.TXT"), false);
-
-        filter = new WildcardFileFilter("*.txt", IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("log.txt"), true);
-        assertFiltering(filter, new File("log.TXT"), true);
-
-        filter = new WildcardFileFilter("*.txt", IOCase.SYSTEM);
-        assertFiltering(filter, new File("log.txt"), true);
-        assertFiltering(filter, new File("log.TXT"), WINDOWS);
-
-        filter = new WildcardFileFilter("*.txt", null);
-        assertFiltering(filter, new File("log.txt"), true);
-        assertFiltering(filter, new File("log.TXT"), false);
-
-        filter = new WildcardFileFilter(new String[] {"*.java", "*.class"});
-        assertFiltering(filter, new File("Test.java"), true);
-        assertFiltering(filter, new File("Test.class"), true);
-        assertFiltering(filter, new File("Test.jsp"), false);
-
-        filter = new WildcardFileFilter(new String[] {"*.java", "*.class"}, IOCase.SENSITIVE);
-        assertFiltering(filter, new File("Test.java"), true);
-        assertFiltering(filter, new File("Test.JAVA"), false);
-
-        filter = new WildcardFileFilter(new String[] {"*.java", "*.class"}, IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("Test.java"), true);
-        assertFiltering(filter, new File("Test.JAVA"), true);
-
-        filter = new WildcardFileFilter(new String[] {"*.java", "*.class"}, IOCase.SYSTEM);
-        assertFiltering(filter, new File("Test.java"), true);
-        assertFiltering(filter, new File("Test.JAVA"), WINDOWS);
-
-        filter = new WildcardFileFilter(new String[]{"*.java", "*.class"}, null);
-        assertFiltering(filter, new File("Test.java"), true);
-        assertFiltering(filter, new File("Test.JAVA"), false);
-
-        final List<String> patternList = Arrays.asList("*.txt", "*.xml", "*.gif");
-        final IOFileFilter listFilter = new WildcardFileFilter( patternList );
-        assertFiltering(listFilter, new File("Test.txt"), true);
-        assertFiltering(listFilter, new File("Test.xml"), true);
-        assertFiltering(listFilter, new File("Test.gif"), true);
-        assertFiltering(listFilter, new File("Test.bmp"), false);
-
-        final File txtFile = new File( "test.txt" );
-        final File bmpFile = new File( "test.bmp" );
-        final File dir = new File( "src/java" );
-        assertTrue( listFilter.accept( txtFile ) );
-        assertTrue( !listFilter.accept( bmpFile ) );
-        assertTrue( !listFilter.accept( dir ) );
-
-        assertTrue( listFilter.accept( txtFile.getParentFile(), txtFile.getName() ) );
-        assertTrue( !listFilter.accept( bmpFile.getParentFile(), bmpFile.getName() ) );
-        assertTrue( !listFilter.accept( dir.getParentFile(), dir.getName() ) );
-
-        try {
-            new WildcardFileFilter((String) null);
-            fail();
-        } catch (final IllegalArgumentException ex) {}
-        try {
-            new WildcardFileFilter((String[]) null);
-            fail();
-        } catch (final IllegalArgumentException ex) {}
-        try {
-            new WildcardFileFilter((List<String>) null);
-            fail();
-        } catch (final IllegalArgumentException ex) {}
-    }
-
-    public void testDelegateFileFilter() throws Exception {
-        final OrFileFilter orFilter = new OrFileFilter();
-        final File testFile = new File( "test.txt" );
-
-        IOFileFilter filter = new DelegateFileFilter((FileFilter) orFilter);
-        assertFiltering( filter, testFile, false );
-        assertNotNull(filter.toString()); // TODO better test
-
-        filter = new DelegateFileFilter((FilenameFilter) orFilter);
-        assertFiltering( filter, testFile, false );
-        assertNotNull(filter.toString()); // TODO better test
-
-        try {
-            new DelegateFileFilter((FileFilter) null);
-            fail();
-        } catch( final IllegalArgumentException iae ) {
-        }
-
-        try {
-            new DelegateFileFilter((FilenameFilter) null);
-            fail();
-        } catch( final IllegalArgumentException iae ) {
-        }
-
-    }
-
-    public void testMakeCVSAware() throws Exception {
-        final IOFileFilter filter1 = FileFilterUtils.makeCVSAware(null);
-        final IOFileFilter filter2 = FileFilterUtils.makeCVSAware(FileFilterUtils
-            .nameFileFilter("test-file1.txt"));
-
-        File file = new File(getTestDirectory(), "CVS");
-        file.mkdirs();
-        assertFiltering(filter1, file, false);
-        assertFiltering(filter2, file, false);
-        FileUtils.deleteDirectory(file);
-
-        file = new File(getTestDirectory(), "test-file1.txt");
-        createFile(file, 0);
-        assertFiltering(filter1, file, true);
-        assertFiltering(filter2, file, true);
-
-        file = new File(getTestDirectory(), "test-file2.log");
-        createFile(file, 0);
-        assertFiltering(filter1, file, true);
-        assertFiltering(filter2, file, false);
-
-        file = new File(getTestDirectory(), "CVS");
-        createFile(file, 0);
-        assertFiltering(filter1, file, true);
-        assertFiltering(filter2, file, false);
-    }
-
-    public void testMakeSVNAware() throws Exception {
-        final IOFileFilter filter1 = FileFilterUtils.makeSVNAware(null);
-        final IOFileFilter filter2 = FileFilterUtils.makeSVNAware(FileFilterUtils
-            .nameFileFilter("test-file1.txt"));
-
-        File file = new File(getTestDirectory(), SVN_DIR_NAME);
-        file.mkdirs();
-        assertFiltering(filter1, file, false);
-        assertFiltering(filter2, file, false);
-        FileUtils.deleteDirectory(file);
-
-        file = new File(getTestDirectory(), "test-file1.txt");
-        createFile(file, 0);
-        assertFiltering(filter1, file, true);
-        assertFiltering(filter2, file, true);
-
-        file = new File(getTestDirectory(), "test-file2.log");
-        createFile(file, 0);
-        assertFiltering(filter1, file, true);
-        assertFiltering(filter2, file, false);
-
-        file = new File(getTestDirectory(), SVN_DIR_NAME);
-        createFile(file, 0);
-        assertFiltering(filter1, file, true);
-        assertFiltering(filter2, file, false);
-    }
-
-    public void testAgeFilter() throws Exception {
-        final File oldFile = new File(getTestDirectory(), "old.txt");
-        final File reference = new File(getTestDirectory(), "reference.txt");
-        final File newFile = new File(getTestDirectory(), "new.txt");
-
-        createFile(oldFile, 0);
-
-        do {
-            try {
-                Thread.sleep(1000);
-            } catch(final InterruptedException ie) {
-                // ignore
-            }
-            createFile(reference, 0);
-        } while( oldFile.lastModified() == reference.lastModified() );
-
-        final Date date = new Date();
-        final long now = date.getTime();
-
-        do {
-            try {
-                Thread.sleep(1000);
-            } catch(final InterruptedException ie) {
-                // ignore
-            }
-            createFile(newFile, 0);
-        } while( reference.lastModified() == newFile.lastModified() );
-
-        final IOFileFilter filter1 = FileFilterUtils.ageFileFilter(now);
-        final IOFileFilter filter2 = FileFilterUtils.ageFileFilter(now, true);
-        final IOFileFilter filter3 = FileFilterUtils.ageFileFilter(now, false);
-        final IOFileFilter filter4 = FileFilterUtils.ageFileFilter(date);
-        final IOFileFilter filter5 = FileFilterUtils.ageFileFilter(date, true);
-        final IOFileFilter filter6 = FileFilterUtils.ageFileFilter(date, false);
-        final IOFileFilter filter7 = FileFilterUtils.ageFileFilter(reference);
-        final IOFileFilter filter8 = FileFilterUtils.ageFileFilter(reference, true);
-        final IOFileFilter filter9 = FileFilterUtils.ageFileFilter(reference, false);
-
-        assertFiltering(filter1, oldFile, true);
-        assertFiltering(filter2, oldFile, true);
-        assertFiltering(filter3, oldFile, false);
-        assertFiltering(filter4, oldFile, true);
-        assertFiltering(filter5, oldFile, true);
-        assertFiltering(filter6, oldFile, false);
-        assertFiltering(filter7, oldFile, true);
-        assertFiltering(filter8, oldFile, true);
-        assertFiltering(filter9, oldFile, false);
-        assertFiltering(filter1, newFile, false);
-        assertFiltering(filter2, newFile, false);
-        assertFiltering(filter3, newFile, true);
-        assertFiltering(filter4, newFile, false);
-        assertFiltering(filter5, newFile, false);
-        assertFiltering(filter6, newFile, true);
-        assertFiltering(filter7, newFile, false);
-        assertFiltering(filter8, newFile, false);
-        assertFiltering(filter9, newFile, true);
-    }
-
-    public void testSizeFilter() throws Exception {
-        final File smallFile = new File(getTestDirectory(), "small.txt");
-        createFile(smallFile, 32);
-        final File largeFile = new File(getTestDirectory(), "large.txt");
-        createFile(largeFile, 128);
-        final IOFileFilter filter1 = FileFilterUtils.sizeFileFilter(64);
-        final IOFileFilter filter2 = FileFilterUtils.sizeFileFilter(64, true);
-        final IOFileFilter filter3 = FileFilterUtils.sizeFileFilter(64, false);
-
-        assertFiltering(filter1, smallFile, false);
-        assertFiltering(filter2, smallFile, false);
-        assertFiltering(filter3, smallFile, true);
-        assertFiltering(filter1, largeFile, true);
-        assertFiltering(filter2, largeFile, true);
-        assertFiltering(filter3, largeFile, false);
-
-        // size range tests
-        final IOFileFilter filter4 = FileFilterUtils.sizeRangeFileFilter(33, 127);
-        final IOFileFilter filter5 = FileFilterUtils.sizeRangeFileFilter(32, 127);
-        final IOFileFilter filter6 = FileFilterUtils.sizeRangeFileFilter(33, 128);
-        final IOFileFilter filter7 = FileFilterUtils.sizeRangeFileFilter(31, 129);
-        final IOFileFilter filter8 = FileFilterUtils.sizeRangeFileFilter(128, 128);
-
-        assertFiltering(filter4, smallFile, false);
-        assertFiltering(filter4, largeFile, false);
-        assertFiltering(filter5, smallFile, true);
-        assertFiltering(filter5, largeFile, false);
-        assertFiltering(filter6, smallFile, false);
-        assertFiltering(filter6, largeFile, true);
-        assertFiltering(filter7, smallFile, true);
-        assertFiltering(filter7, largeFile, true);
-        assertFiltering(filter8, largeFile, true);
-
-        try {
-            FileFilterUtils.sizeFileFilter(-1);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            // expected
-        }
-    }
-
-    public void testHidden() throws Exception {
-        final File hiddenDir = new File(SVN_DIR_NAME);
-        if (hiddenDir.exists()) {
-            assertFiltering(HiddenFileFilter.HIDDEN,  hiddenDir, hiddenDir.isHidden());
-            assertFiltering(HiddenFileFilter.VISIBLE, hiddenDir, !hiddenDir.isHidden());
-        }
-        assertFiltering(HiddenFileFilter.HIDDEN,  getTestDirectory(), false);
-        assertFiltering(HiddenFileFilter.VISIBLE, getTestDirectory(), true);
-    }
-
-    public void testCanRead() throws Exception {
-        final File readOnlyFile = new File(getTestDirectory(), "read-only-file1.txt");
-        createFile(readOnlyFile, 32);
-        readOnlyFile.setReadOnly();
-        assertFiltering(CanReadFileFilter.CAN_READ,  readOnlyFile, true);
-        assertFiltering(CanReadFileFilter.CANNOT_READ,  readOnlyFile, false);
-        assertFiltering(CanReadFileFilter.READ_ONLY, readOnlyFile, true);
-        readOnlyFile.delete();
-    }
-
-    public void testCanWrite() throws Exception {
-        final File readOnlyFile = new File(getTestDirectory(), "read-only-file2.txt");
-        createFile(readOnlyFile, 32);
-        readOnlyFile.setReadOnly();
-        assertFiltering(CanWriteFileFilter.CAN_WRITE,    getTestDirectory(), true);
-        assertFiltering(CanWriteFileFilter.CANNOT_WRITE, getTestDirectory(), false);
-        assertFiltering(CanWriteFileFilter.CAN_WRITE,    readOnlyFile, false);
-        assertFiltering(CanWriteFileFilter.CANNOT_WRITE, readOnlyFile, true);
-        readOnlyFile.delete();
-    }
-
-    public void testEmpty() throws Exception {
-
-        // Empty Dir
-        final File emptyDir  = new File(getTestDirectory(), "empty-dir");
-        emptyDir.mkdirs();
-        assertFiltering(EmptyFileFilter.EMPTY, emptyDir, true);
-        assertFiltering(EmptyFileFilter.NOT_EMPTY, emptyDir, false);
-
-        // Empty File
-        final File emptyFile = new File(emptyDir, "empty-file.txt");
-        createFile(emptyFile, 0);
-        assertFiltering(EmptyFileFilter.EMPTY, emptyFile, true);
-        assertFiltering(EmptyFileFilter.NOT_EMPTY, emptyFile, false);
-
-        // Not Empty Dir
-        assertFiltering(EmptyFileFilter.EMPTY, emptyDir, false);
-        assertFiltering(EmptyFileFilter.NOT_EMPTY, emptyDir, true);
-
-        // Not Empty File
-        final File notEmptyFile = new File(emptyDir, "not-empty-file.txt");
-        createFile(notEmptyFile, 32);
-        assertFiltering(EmptyFileFilter.EMPTY, notEmptyFile, false);
-        assertFiltering(EmptyFileFilter.NOT_EMPTY, notEmptyFile, true);
-        FileUtils.forceDelete(emptyDir);
-    }
-
-    //-----------------------------------------------------------------------
-    public void testMakeDirectoryOnly() throws Exception {
-        assertSame(DirectoryFileFilter.DIRECTORY, FileFilterUtils.makeDirectoryOnly(null));
-
-        final IOFileFilter filter = FileFilterUtils.makeDirectoryOnly(
-                FileFilterUtils.nameFileFilter("B"));
-
-        final File fileA = new File(getTestDirectory(), "A");
-        final File fileB = new File(getTestDirectory(), "B");
-
-        fileA.mkdirs();
-        fileB.mkdirs();
-
-        assertFiltering(filter, fileA, false);
-        assertFiltering(filter, fileB, true);
-
-        FileUtils.deleteDirectory(fileA);
-        FileUtils.deleteDirectory(fileB);
-
-        createFile(fileA, 32);
-        createFile(fileB, 32);
-
-        assertFiltering(filter, fileA, false);
-        assertFiltering(filter, fileB, false);
-
-        fileA.delete();
-        fileB.delete();
-    }
-
-    //-----------------------------------------------------------------------
-    public void testMakeFileOnly() throws Exception {
-        assertSame(FileFileFilter.FILE, FileFilterUtils.makeFileOnly(null));
-
-        final IOFileFilter filter = FileFilterUtils.makeFileOnly(
-                FileFilterUtils.nameFileFilter("B"));
-
-        final File fileA = new File(getTestDirectory(), "A");
-        final File fileB = new File(getTestDirectory(), "B");
-
-        fileA.mkdirs();
-        fileB.mkdirs();
-
-        assertFiltering(filter, fileA, false);
-        assertFiltering(filter, fileB, false);
-
-        FileUtils.deleteDirectory(fileA);
-        FileUtils.deleteDirectory(fileB);
-
-        createFile(fileA, 32);
-        createFile(fileB, 32);
-
-        assertFiltering(filter, fileA, false);
-        assertFiltering(filter, fileB, true);
-
-        fileA.delete();
-        fileB.delete();
-    }
-
-    //-----------------------------------------------------------------------
-
-    @SuppressWarnings("deprecation") // unavoidable until Java 7
-    public void testMagicNumberFileFilterBytes() throws Exception {
-        final byte[] classFileMagicNumber =
-            new byte[] {(byte) 0xCA, (byte) 0xFE, (byte) 0xBA, (byte) 0xBE};
-        final String xmlFileContent = "<?xml version=\"1.0\" encoding=\"UTF-8\">\n" +
-            "<element>text</element>";
-
-        final File classFileA = new File(getTestDirectory(), "A.class");
-        final File xmlFileB = new File(getTestDirectory(), "B.xml");
-        final File emptyFile = new File(getTestDirectory(), "C.xml");
-        final File dir = new File(getTestDirectory(), "D");
-        dir.mkdirs();
-
-        final OutputStream classFileAStream = FileUtils.openOutputStream(classFileA);
-        IOUtils.write(classFileMagicNumber, classFileAStream);
-        generateTestData(classFileAStream, 32);
-        classFileAStream.close();
-
-        FileUtils.write(xmlFileB, xmlFileContent, Charsets.UTF_8);
-        FileUtils.touch(emptyFile);
-
-        IOFileFilter filter = new MagicNumberFileFilter(classFileMagicNumber);
-
-        assertFiltering(filter, classFileA, true);
-        assertFiltering(filter, xmlFileB, false);
-        assertFiltering(filter, emptyFile, false);
-        assertFiltering(filter, dir, false);
-
-
-        filter = FileFilterUtils.magicNumberFileFilter(classFileMagicNumber);
-
-        assertFiltering(filter, classFileA, true);
-        assertFiltering(filter, xmlFileB, false);
-        assertFiltering(filter, emptyFile, false);
-        assertFiltering(filter, dir, false);
-    }
-
-    public void testMagicNumberFileFilterBytesOffset() throws Exception {
-        final byte[] tarMagicNumber = new byte[] {0x75, 0x73, 0x74, 0x61, 0x72};
-        final long tarMagicNumberOffset = 257;
-
-        final File tarFileA = new File(getTestDirectory(), "A.tar");
-        final File randomFileB = new File(getTestDirectory(), "B.txt");
-        final File dir = new File(getTestDirectory(), "D");
-        dir.mkdirs();
-
-        final OutputStream tarFileAStream = FileUtils.openOutputStream(tarFileA);
-        generateTestData(tarFileAStream, tarMagicNumberOffset);
-        IOUtils.write(tarMagicNumber, tarFileAStream);
-        tarFileAStream.close();
-
-        createFile(randomFileB, 2 * tarMagicNumberOffset);
-
-        IOFileFilter filter =
-            new MagicNumberFileFilter(tarMagicNumber, tarMagicNumberOffset);
-
-        assertFiltering(filter, tarFileA, true);
-        assertFiltering(filter, randomFileB, false);
-        assertFiltering(filter, dir, false);
-
-        filter = FileFilterUtils.magicNumberFileFilter(tarMagicNumber,
-                tarMagicNumberOffset);
-
-        assertFiltering(filter, tarFileA, true);
-        assertFiltering(filter, randomFileB, false);
-        assertFiltering(filter, dir, false);
-    }
-
-    @SuppressWarnings("deprecation") // unavoidable until Java 7
-    public void testMagicNumberFileFilterString() throws Exception {
-        final byte[] classFileMagicNumber =
-            new byte[] {(byte) 0xCA, (byte) 0xFE, (byte) 0xBA, (byte) 0xBE};
-        final String xmlFileContent = "<?xml version=\"1.0\" encoding=\"UTF-8\">\n" +
-            "<element>text</element>";
-        final String xmlMagicNumber = "<?xml version=\"1.0\"";
-
-        final File classFileA = new File(getTestDirectory(), "A.class");
-        final File xmlFileB = new File(getTestDirectory(), "B.xml");
-        final File dir = new File(getTestDirectory(), "D");
-        dir.mkdirs();
-
-        final OutputStream classFileAStream = FileUtils.openOutputStream(classFileA);
-        IOUtils.write(classFileMagicNumber, classFileAStream);
-        generateTestData(classFileAStream, 32);
-        classFileAStream.close();
-
-        FileUtils.write(xmlFileB, xmlFileContent, Charsets.UTF_8);
-
-        IOFileFilter filter = new MagicNumberFileFilter(xmlMagicNumber);
-
-        assertFiltering(filter, classFileA, false);
-        assertFiltering(filter, xmlFileB, true);
-        assertFiltering(filter, dir, false);
-
-        filter = FileFilterUtils.magicNumberFileFilter(xmlMagicNumber);
-
-        assertFiltering(filter, classFileA, false);
-        assertFiltering(filter, xmlFileB, true);
-        assertFiltering(filter, dir, false);
-    }
-
-    @SuppressWarnings("deprecation") // unavoidable until Java 7
-    public void testMagicNumberFileFilterStringOffset() throws Exception {
-        final String tarMagicNumber = "ustar";
-        final long tarMagicNumberOffset = 257;
-
-        final File tarFileA = new File(getTestDirectory(), "A.tar");
-        final File randomFileB = new File(getTestDirectory(), "B.txt");
-        final File dir = new File(getTestDirectory(), "D");
-        dir.mkdirs();
-
-        final OutputStream tarFileAStream = FileUtils.openOutputStream(tarFileA);
-        generateTestData(tarFileAStream, tarMagicNumberOffset);
-        IOUtils.write(tarMagicNumber, tarFileAStream, Charsets.UTF_8);
-        tarFileAStream.close();
-
-        createFile(randomFileB, 2 * tarMagicNumberOffset);
-
-        IOFileFilter filter =
-            new MagicNumberFileFilter(tarMagicNumber, tarMagicNumberOffset);
-
-        assertFiltering(filter, tarFileA, true);
-        assertFiltering(filter, randomFileB, false);
-        assertFiltering(filter, dir, false);
-
-        filter = FileFilterUtils.magicNumberFileFilter(tarMagicNumber,
-                tarMagicNumberOffset);
-
-        assertFiltering(filter, tarFileA, true);
-        assertFiltering(filter, randomFileB, false);
-        assertFiltering(filter, dir, false);
-    }
-
-    public void testMagicNumberFileFilterValidation() {
-        try {
-            new MagicNumberFileFilter((String)null, 0);
-            fail();
-        } catch (final IllegalArgumentException iae) {
-            // expected
-        }
-        try {
-            new MagicNumberFileFilter("0", -1);
-            fail();
-        } catch (final IllegalArgumentException iae) {
-            // expected
-        }
-        try {
-            new MagicNumberFileFilter("", 0);
-            fail();
-        } catch (final IllegalArgumentException iae) {
-            // expected
-        }
-        try {
-            new MagicNumberFileFilter((byte[])null, 0);
-            fail();
-        } catch (final IllegalArgumentException iae) {
-            // expected
-        }
-        try {
-            new MagicNumberFileFilter(new byte[]{0}, -1);
-            fail();
-        } catch (final IllegalArgumentException iae) {
-            // expected
-        }
-        try {
-            new MagicNumberFileFilter(new byte[]{}, 0);
-            fail();
-        } catch (final IllegalArgumentException iae) {
-            // expected
-        }
-}
-
-    /*
-     * Test method for {@link FileFilterUtils#filter(IOFileFilter, File...)}
-     * that tests that the method properly filters files from the list.
-     */
-    public void testFilterArray() throws Exception {
-        final File fileA = newFile("A");
-        final File fileB = newFile("B");
-
-        final IOFileFilter filter = FileFilterUtils.nameFileFilter("A");
-
-        final File[] filtered = FileFilterUtils.filter(filter, fileA, fileB);
-
-        assertEquals(1, filtered.length);
-        assertEquals(fileA, filtered[0]);
-    }
-
-    /*
-     * Test method for {@link FileFilterUtils#filter(IOFileFilter, java.lang.Iterable)}
-     * that tests that the method properly filters files from the list.
-     */
-    public void testFilterArray_fromList() throws Exception {
-        final File fileA = newFile("A");
-        final File fileB = newFile("B");
-        final List<File> fileList = Arrays.asList(fileA, fileB);
-
-        final IOFileFilter filter = FileFilterUtils.nameFileFilter("A");
-
-        final File[] filtered = FileFilterUtils.filter(filter, fileList);
-
-        assertEquals(1, filtered.length);
-        assertEquals(fileA, filtered[0]);
-    }
-
-    /*
-     * Test method for {@link FileFilterUtils#filter(IOFileFilter, File...)}
-     * that tests {@code null} parameters and {@code null} elements
-     * in the provided list.
-     */
-    public void testFilterArrayNullParameters() throws Exception {
-        final File fileA = newFile("A");
-        final File fileB = newFile("B");
-        try {
-            FileFilterUtils.filter(null, fileA, fileB);
-            fail();
-        } catch (final IllegalArgumentException iae) {
-            // Test passes, exception thrown for null filter
-        }
-
-        final IOFileFilter filter = FileFilterUtils.trueFileFilter();
-        try {
-            FileFilterUtils.filter(filter, fileA, null);
-            fail();
-        } catch (final IllegalArgumentException iae) {
-            // Test passes, exception thrown for list containing null
-        }
-
-        final File[] filtered = FileFilterUtils.filter(filter, (File[])null);
-        assertEquals(0, filtered.length);
-    }
-
-    /*
-     * Test method for {@link FileFilterUtils#filterList(IOFileFilter, java.lang.Iterable)}
-     * that tests that the method properly filters files from the list.
-     */
-    public void testFilterList() throws Exception {
-        final File fileA = newFile("A");
-        final File fileB = newFile("B");
-        final List<File> fileList = Arrays.asList(fileA, fileB);
-
-        final IOFileFilter filter = FileFilterUtils.nameFileFilter("A");
-
-        final List<File> filteredList = FileFilterUtils.filterList(filter, fileList);
-
-        assertTrue(filteredList.contains(fileA));
-        assertFalse(filteredList.contains(fileB));
-    }
-
-    /*
-     * Test method for {@link FileFilterUtils#filterList(IOFileFilter, File...)}
-     * that tests that the method properly filters files from the list.
-     */
-    public void testFilterList_fromArray() throws Exception {
-        final File fileA = newFile("A");
-        final File fileB = newFile("B");
-
-        final IOFileFilter filter = FileFilterUtils.nameFileFilter("A");
-
-        final List<File> filteredList = FileFilterUtils.filterList(filter, fileA, fileB);
-
-        assertTrue(filteredList.contains(fileA));
-        assertFalse(filteredList.contains(fileB));
-    }
-
-    /*
-     * Test method for {@link FileFilterUtils#filterList(IOFileFilter, java.lang.Iterable)}
-     * that tests {@code null} parameters and {@code null} elements
-     * in the provided list.
-     */
-    public void testFilterListNullParameters() {
-        try {
-            FileFilterUtils.filterList(null, Collections.<File>emptyList());
-            fail();
-        } catch (final IllegalArgumentException iae) {
-            // Test passes, exception thrown for null filter
-        }
-
-        final IOFileFilter filter = FileFilterUtils.trueFileFilter();
-        try {
-            FileFilterUtils.filterList(filter, Arrays.asList((File) null));
-            fail();
-        } catch (final IllegalArgumentException iae) {
-            // Test passes, exception thrown for list containing null
-        }
-
-        final List<File> filteredList = FileFilterUtils.filterList(filter, (List<File>)null);
-        assertEquals(0, filteredList.size());
-    }
-
-    /*
-     * Test method for {@link FileFilterUtils#filterSet(IOFileFilter, java.lang.Iterable)}
-     * that tests that the method properly filters files from the set.
-     */
-    public void testFilterSet() throws Exception {
-        final File fileA = newFile("A");
-        final File fileB = newFile("B");
-        final Set<File> fileList = new HashSet<File>(Arrays.asList(fileA, fileB));
-
-        final IOFileFilter filter = FileFilterUtils.nameFileFilter("A");
-
-        final Set<File> filteredSet = FileFilterUtils.filterSet(filter, fileList);
-
-        assertTrue(filteredSet.contains(fileA));
-        assertFalse(filteredSet.contains(fileB));
-    }
-
-    /*
-     * Test method for {@link FileFilterUtils#filterSet(IOFileFilter, File...)}
-     * that tests that the method properly filters files from the set.
-     */
-    public void testFilterSet_fromArray() throws Exception {
-        final File fileA = newFile("A");
-        final File fileB = newFile("B");
-
-        final IOFileFilter filter = FileFilterUtils.nameFileFilter("A");
-
-        final Set<File> filteredSet = FileFilterUtils.filterSet(filter, fileA, fileB);
-
-        assertTrue(filteredSet.contains(fileA));
-        assertFalse(filteredSet.contains(fileB));
-    }
-
-    /*
-     * Test method for {@link FileFilterUtils#filterSet(IOFileFilter, java.lang.Iterable)}
-     * that tests {@code null} parameters and {@code null} elements
-     * in the provided set.
-     */
-   public void testFilterSetNullParameters() {
-        try {
-            FileFilterUtils.filterSet(null, Collections.<File>emptySet());
-            fail();
-        } catch (final IllegalArgumentException iae) {
-            // Test passes, exception thrown for null filter
-        }
-
-        final IOFileFilter filter = FileFilterUtils.trueFileFilter();
-        try {
-            FileFilterUtils.filterSet(filter, new HashSet<File>(Arrays.asList((File) null)));
-            fail();
-        } catch (final IllegalArgumentException iae) {
-            // Test passes, exception thrown for set containing null
-        }
-
-        final Set<File> filteredSet = FileFilterUtils.filterSet(filter, (Set<File>)null);
-        assertEquals(0, filteredSet.size());
-    }
-
-       public void testEnsureTestCoverage() {
-           assertNotNull(new FileFilterUtils()); // dummy for test coverage
-       }
-
-       public void testNullFilters() {
-           try {
-               FileFilterUtils.toList((IOFileFilter)null);
-               fail("Expected IllegalArgumentException");
-           } catch (final IllegalArgumentException expected) {
-               // expected
-           }
-           try {
-               FileFilterUtils.toList(new IOFileFilter[]{null});
-               fail("Expected IllegalArgumentException");
-           } catch (final IllegalArgumentException expected) {
-            // expected
-           }
-       }
-
-       public void testDelegation() { // TODO improve these tests
-           assertNotNull(FileFilterUtils.asFileFilter((FileFilter)FalseFileFilter.INSTANCE));
-           assertNotNull(FileFilterUtils.asFileFilter((FilenameFilter)FalseFileFilter.INSTANCE).toString());
-       }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/filefilter/IOFileFilterAbstractTestCase.java b/trunk/src/test/java/org/apache/commons/io/filefilter/IOFileFilterAbstractTestCase.java
deleted file mode 100644
index 7959983..0000000
--- a/trunk/src/test/java/org/apache/commons/io/filefilter/IOFileFilterAbstractTestCase.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-public abstract class IOFileFilterAbstractTestCase extends TestCase {
-
-    public IOFileFilterAbstractTestCase(final String name) {
-        super(name);
-    }
-
-    public static void assertFileFiltering(final int testNumber, final IOFileFilter filter, final File file, final boolean expected)
-            throws Exception {
-        assertEquals(
-                "test " + testNumber + " Filter(File) " + filter.getClass().getName() + " not " + expected + " for " + file,
-                expected, filter.accept(file));
-    }
-
-    public static void assertFilenameFiltering(final int testNumber, final IOFileFilter filter, final File file, final boolean expected)
-            throws Exception {
-        // Assumes file has parent and is not passed as null
-        assertEquals(
-                "test " + testNumber + " Filter(File, String) " + filter.getClass().getName() + " not " + expected + " for " + file,
-                expected, filter.accept(file.getParentFile(), file.getName()));
-    }
-
-    public static void assertFiltering(final int testNumber, final IOFileFilter filter, final File file, final boolean expected)
-            throws Exception {
-        // Note. This only tests the (File, String) version if the parent of
-        //       the File passed in is not null
-        assertEquals(
-                "test " + testNumber + " Filter(File) " + filter.getClass().getName() + " not " + expected + " for " + file,
-                expected, filter.accept(file));
-
-        if (file != null && file.getParentFile() != null) {
-            assertEquals(
-                    "test " + testNumber + " Filter(File, String) " + filter.getClass().getName() + " not " + expected + " for " + file,
-                    expected, filter.accept(file.getParentFile(), file.getName()));
-        } else if (file == null) {
-            assertEquals(
-                    "test " + testNumber + " Filter(File, String) " + filter.getClass().getName() + " not " + expected + " for null",
-                    expected, filter.accept(file));
-        }
-    }
-
-    public static void assertTrueFiltersInvoked(final int testNumber, final TesterTrueFileFilter[] filters, final boolean[] invoked) {
-        for (int i = 1; i < filters.length; i++) {
-            assertEquals("test " + testNumber + " filter " + i + " invoked", invoked[i - 1], filters[i].isInvoked());
-        }
-    }
-
-    public static void assertFalseFiltersInvoked(final int testNumber, final TesterFalseFileFilter[] filters, final boolean[] invoked) {
-        for (int i = 1; i < filters.length; i++) {
-            assertEquals("test " + testNumber + " filter " + i + " invoked", invoked[i - 1], filters[i].isInvoked());
-        }
-    }
-
-    public static File determineWorkingDirectoryPath(final String key, final String defaultPath) {
-        // Look for a system property to specify the working directory
-        final String workingPathName = System.getProperty(key, defaultPath);
-        return new File(workingPathName);
-    }
-
-    public static void resetFalseFilters(final TesterFalseFileFilter[] filters) {
-        for (final TesterFalseFileFilter filter : filters) {
-            if (filter != null) {
-                filter.reset();
-            }
-        }
-    }
-
-    public static void resetTrueFilters(final TesterTrueFileFilter[] filters) {
-        for (final TesterTrueFileFilter filter : filters) {
-            if (filter != null) {
-                filter.reset();
-            }
-        }
-    }
-
-    class TesterTrueFileFilter extends TrueFileFilter {
-
-        private static final long serialVersionUID = 1828930358172422914L;
-        private boolean invoked;
-
-        @Override
-        public boolean accept(final File file) {
-            setInvoked(true);
-            return super.accept(file);
-        }
-
-        @Override
-        public boolean accept(final File file, final String str) {
-            setInvoked(true);
-            return super.accept(file, str);
-        }
-
-        public boolean isInvoked() {
-            return this.invoked;
-        }
-
-        public void setInvoked(final boolean invoked) {
-            this.invoked = invoked;
-        }
-
-        public void reset() {
-            setInvoked(false);
-        }
-    }
-
-    class TesterFalseFileFilter extends FalseFileFilter {
-
-        private static final long serialVersionUID = -3603047664010401872L;
-        private boolean invoked;
-
-        @Override
-        public boolean accept(final File file) {
-            setInvoked(true);
-            return super.accept(file);
-        }
-
-        @Override
-        public boolean accept(final File file, final String str) {
-            setInvoked(true);
-            return super.accept(file, str);
-        }
-
-        public boolean isInvoked() {
-            return this.invoked;
-        }
-
-        public void setInvoked(final boolean invoked) {
-            this.invoked = invoked;
-        }
-
-        public void reset() {
-            setInvoked(false);
-        }
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/filefilter/OrFileFilterTestCase.java b/trunk/src/test/java/org/apache/commons/io/filefilter/OrFileFilterTestCase.java
deleted file mode 100644
index 543e355..0000000
--- a/trunk/src/test/java/org/apache/commons/io/filefilter/OrFileFilterTestCase.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class OrFileFilterTestCase extends ConditionalFileFilterAbstractTestCase {
-
-  private static final String DEFAULT_WORKING_PATH = "./OrFileFilterTestCase/";
-  private static final String WORKING_PATH_NAME_PROPERTY_KEY = OrFileFilterTestCase.class.getName() + ".workingDirectory";
-
-  private List<List<IOFileFilter>> testFilters;
-  private List<boolean[]> testTrueResults;
-  private List<boolean[]> testFalseResults;
-  private List<Boolean> testFileResults;
-  private List<Boolean> testFilenameResults;
-
-  public OrFileFilterTestCase(final String name) {
-    super(name);
-  }
-
-  @Override
-  public void setUp() throws Exception {
-    super.setUp();
-    this.setUpTestFilters();
-  }
-
-  @Override
-  protected IOFileFilter buildFilterUsingAdd(final List<IOFileFilter> filters) {
-    final OrFileFilter filter = new OrFileFilter();
-    for (IOFileFilter filter1 : filters) {
-      filter.addFileFilter(filter1);
-    }
-    return filter;
-  }
-
-  @Override
-  protected IOFileFilter buildFilterUsingConstructor(final List<IOFileFilter> filters) {
-    return new OrFileFilter(filters);
-  }
-
-  @Override
-  protected ConditionalFileFilter getConditionalFileFilter() {
-    return new OrFileFilter();
-  }
-
-  @Override
-  protected String getDefaultWorkingPath() {
-    return DEFAULT_WORKING_PATH;
-  }
-
-  @Override
-  protected List<boolean[]> getFalseResults() {
-    return this.testFalseResults;
-  }
-
-  @Override
-  protected List<Boolean> getFileResults() {
-    return this.testFileResults;
-  }
-
-  @Override
-  protected List<Boolean> getFilenameResults() {
-    return this.testFilenameResults;
-  }
-
-  @Override
-  protected List<List<IOFileFilter>>  getTestFilters() {
-    return this.testFilters;
-  }
-
-  @Override
-  protected List<boolean[]> getTrueResults() {
-    return this.testTrueResults;
-  }
-
-  @Override
-  protected String getWorkingPathNamePropertyKey() {
-    return WORKING_PATH_NAME_PROPERTY_KEY;
-  }
-
-  private void setUpTestFilters() {
-    // filters
-    //tests
-    this.testFilters = new ArrayList<List<IOFileFilter>>();
-    this.testTrueResults = new ArrayList<boolean[]>();
-    this.testFalseResults = new ArrayList<boolean[]>();
-    this.testFileResults = new ArrayList<Boolean>();
-    this.testFilenameResults = new ArrayList<Boolean>();
-
-    // test 0 - add empty elements
-    {
-      testFilters.add(0, null);
-      testTrueResults.add(0, null);
-      testFalseResults.add(0, null);
-      testFileResults.add(0, null);
-      testFilenameResults.add(0, null);
-    }
-
-    // test 1 - Test conditional or with all filters returning true
-    {
-      // test 1 filters
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(trueFilters[1]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      // test 1 true results
-      final boolean[] trueResults = new boolean[] {true, false, false};
-      // test 1 false results
-      final boolean[] falseResults = new boolean[] {false, false, false};
-
-      testFilters.add(1, filters);
-      testTrueResults.add(1, trueResults);
-      testFalseResults.add(1, falseResults);
-      testFileResults.add(1, Boolean.TRUE);
-      testFilenameResults.add(1, Boolean.TRUE);
-    }
-
-    // test 2 - Test conditional or with first filter returning false
-    {
-      // test 2 filters
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(falseFilters[1]);
-      filters.add(trueFilters[1]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      filters.add(falseFilters[2]);
-      filters.add(falseFilters[3]);
-      // test 2 true results
-      final boolean[] trueResults = new boolean[] {true, false, false};
-      // test 2 false results
-      final boolean[] falseResults = new boolean[] {true, false, false};
-
-      testFilters.add(2, filters);
-      testTrueResults.add(2, trueResults);
-      testFalseResults.add(2, falseResults);
-      testFileResults.add(2, Boolean.TRUE);
-      testFilenameResults.add(2, Boolean.TRUE);
-    }
-
-    // test 3 - Test conditional or with second filter returning false
-    {
-      // test 3 filters
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(trueFilters[1]);
-      filters.add(falseFilters[1]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      filters.add(falseFilters[2]);
-      filters.add(falseFilters[3]);
-      // test 3 true results
-      final boolean[] trueResults = new boolean[] {true, false, false};
-      // test 3 false results
-      final boolean[] falseResults = new boolean[] {false, false, false};
-
-      testFilters.add(3, filters);
-      testTrueResults.add(3, trueResults);
-      testFalseResults.add(3, falseResults);
-      testFileResults.add(3, Boolean.TRUE);
-      testFilenameResults.add(3, Boolean.TRUE);
-    }
-
-    // test 4 - Test conditional or with third filter returning false
-    {
-      // test 4 filters
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(trueFilters[1]);
-      filters.add(trueFilters[2]);
-      filters.add(falseFilters[1]);
-      filters.add(trueFilters[3]);
-      filters.add(falseFilters[2]);
-      filters.add(falseFilters[3]);
-      // test 4 true results
-      final boolean[] trueResults = new boolean[] {true, false, false};
-      // test 4 false results
-      final boolean[] falseResults = new boolean[] {false, false, false};
-
-      testFilters.add(4, filters);
-      testTrueResults.add(4, trueResults);
-      testFalseResults.add(4, falseResults);
-      testFileResults.add(4, Boolean.TRUE);
-      testFilenameResults.add(4, Boolean.TRUE);
-    }
-
-    // test 5 - Test conditional or with first and third filters returning false
-    {
-      // test 5 filters
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(falseFilters[1]);
-      filters.add(trueFilters[1]);
-      filters.add(falseFilters[2]);
-      filters.add(falseFilters[3]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      // test 5 true results
-      final boolean[] trueResults = new boolean[] {true, false, false};
-      // test 5 false results
-      final boolean[] falseResults = new boolean[] {true, false, false};
-
-      testFilters.add(5, filters);
-      testTrueResults.add(5, trueResults);
-      testFalseResults.add(5, falseResults);
-      testFileResults.add(5, Boolean.TRUE);
-      testFilenameResults.add(5, Boolean.TRUE);
-    }
-
-    // test 6 - Test conditional or with second and third filters returning false
-    {
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(trueFilters[1]);
-      filters.add(falseFilters[1]);
-      filters.add(falseFilters[2]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      filters.add(falseFilters[3]);
-      // test 6 true results
-      final boolean[] trueResults = new boolean[] {true, false, false};
-      // test 6 false results
-      final boolean[] falseResults = new boolean[] {false, false, false};
-
-      testFilters.add(6, filters);
-      testTrueResults.add(6, trueResults);
-      testFalseResults.add(6, falseResults);
-      testFileResults.add(6, Boolean.TRUE);
-      testFilenameResults.add(6, Boolean.TRUE);
-    }
-
-    // test 7 - Test conditional or with first and second filters returning false
-    {
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(falseFilters[1]);
-      filters.add(falseFilters[2]);
-      filters.add(trueFilters[1]);
-      filters.add(falseFilters[3]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      // test 7 true results
-      final boolean[] trueResults = new boolean[] {true, false, false};
-      // test 7 false results
-      final boolean[] falseResults = new boolean[] {true, true, false};
-
-      testFilters.add(7, filters);
-      testTrueResults.add(7, trueResults);
-      testFalseResults.add(7, falseResults);
-      testFileResults.add(7, Boolean.TRUE);
-      testFilenameResults.add(7, Boolean.TRUE);
-    }
-
-    // test 8 - Test conditional or with fourth filter returning false
-    {
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(trueFilters[1]);
-      filters.add(trueFilters[2]);
-      filters.add(trueFilters[3]);
-      filters.add(falseFilters[1]);
-      // test 8 true results
-      final boolean[] trueResults = new boolean[] {true, false, false};
-      // test 8 false results
-      final boolean[] falseResults = new boolean[] {false, false, false};
-
-      testFilters.add(8, filters);
-      testTrueResults.add(8, trueResults);
-      testFalseResults.add(8, falseResults);
-      testFileResults.add(8, Boolean.TRUE);
-      testFilenameResults.add(8, Boolean.TRUE);
-    }
-
-    // test 9 - Test conditional or with all filters returning false
-    {
-      final List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
-      filters.add(falseFilters[1]);
-      filters.add(falseFilters[2]);
-      filters.add(falseFilters[3]);
-      // test 9 true results
-      final boolean[] trueResults = new boolean[] {false, false, false};
-      // test 9 false results
-      final boolean[] falseResults = new boolean[] {true, true, true};
-
-      testFilters.add(9, filters);
-      testTrueResults.add(9, trueResults);
-      testFalseResults.add(9, falseResults);
-      testFileResults.add(9, Boolean.FALSE);
-      testFilenameResults.add(9, Boolean.FALSE);
-    }
-  }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/filefilter/RegexFileFilterTestCase.java b/trunk/src/test/java/org/apache/commons/io/filefilter/RegexFileFilterTestCase.java
deleted file mode 100644
index 0376b74..0000000
--- a/trunk/src/test/java/org/apache/commons/io/filefilter/RegexFileFilterTestCase.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.util.regex.Pattern;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOCase;
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * Used to test RegexFileFilterUtils.
- */
-public class RegexFileFilterTestCase extends FileBasedTestCase {
-
-    public RegexFileFilterTestCase(final String name) {
-        super(name);
-    }
-
-    @Override
-    public void setUp() {
-        getTestDirectory().mkdirs();
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-        FileUtils.deleteDirectory(getTestDirectory());
-    }
-
-    public void assertFiltering(final IOFileFilter filter, final File file, final boolean expected) throws Exception {
-        // Note. This only tests the (File, String) version if the parent of
-        //       the File passed in is not null
-        assertEquals(
-            "Filter(File) " + filter.getClass().getName() + " not " + expected + " for " + file,
-            expected, filter.accept(file));
-
-        if (file != null && file.getParentFile() != null) {
-            assertEquals(
-                "Filter(File, String) " + filter.getClass().getName() + " not " + expected + " for " + file,
-                expected, filter.accept(file.getParentFile(), file.getName()));
-        } else if (file == null) {
-            assertEquals(
-                "Filter(File, String) " + filter.getClass().getName() + " not " + expected + " for null",
-                expected, filter.accept(file));
-        }
-    }
-
-    public void testRegex() throws Exception {
-        IOFileFilter filter = new RegexFileFilter("^.*[tT]est(-\\d+)?\\.java$");
-        assertFiltering(filter, new File("Test.java"), true);
-        assertFiltering(filter, new File("test-10.java"), true);
-        assertFiltering(filter, new File("test-.java"), false);
-
-        filter = new RegexFileFilter("^[Tt]est.java$");
-        assertFiltering(filter, new File("Test.java"), true);
-        assertFiltering(filter, new File("test.java"), true);
-        assertFiltering(filter, new File("tEST.java"), false);
-
-        filter = new RegexFileFilter(Pattern.compile("^test.java$", Pattern.CASE_INSENSITIVE));
-        assertFiltering(filter, new File("Test.java"), true);
-        assertFiltering(filter, new File("test.java"), true);
-        assertFiltering(filter, new File("tEST.java"), true);
-
-        filter = new RegexFileFilter("^test.java$", Pattern.CASE_INSENSITIVE);
-        assertFiltering(filter, new File("Test.java"), true);
-        assertFiltering(filter, new File("test.java"), true);
-        assertFiltering(filter, new File("tEST.java"), true);
-
-        filter = new RegexFileFilter("^test.java$", IOCase.INSENSITIVE);
-        assertFiltering(filter, new File("Test.java"), true);
-        assertFiltering(filter, new File("test.java"), true);
-        assertFiltering(filter, new File("tEST.java"), true);
-
-        try {
-            new RegexFileFilter((String)null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            // expected
-        }
-
-        try {
-            new RegexFileFilter(null, Pattern.CASE_INSENSITIVE);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            // expected
-        }
-
-        try {
-            new RegexFileFilter(null, IOCase.INSENSITIVE);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            // expected
-        }
-
-        try {
-            new RegexFileFilter((java.util.regex.Pattern)null);
-            fail();
-        } catch (final IllegalArgumentException ex) {
-            // expected
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/AutoCloseInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/AutoCloseInputStreamTest.java
deleted file mode 100644
index 005be67..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/AutoCloseInputStreamTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit Test Case for {@link AutoCloseInputStream}.
- */
-public class AutoCloseInputStreamTest extends TestCase {
-
-    private byte[] data;
-
-    private InputStream stream;
-
-    private boolean closed;
-
-    @Override
-    protected void setUp() {
-        data = new byte[] { 'x', 'y', 'z' };
-        stream = new AutoCloseInputStream(new ByteArrayInputStream(data) {
-            @Override
-            public void close() {
-                closed = true;
-            }
-        });
-        closed = false;
-    }
-
-    public void testClose() throws IOException {
-        stream.close();
-        assertTrue("closed", closed);
-        assertEquals("read()", -1, stream.read());
-    }
-
-
-    public void testRead() throws IOException {
-        for (final byte element : data) {
-            assertEquals("read()", element, stream.read());
-            assertFalse("closed", closed);
-        }
-        assertEquals("read()", -1, stream.read());
-        assertTrue("closed", closed);
-    }
-
-    public void testReadBuffer() throws IOException {
-        final byte[] b = new byte[data.length * 2];
-        int total = 0;
-        for (int n = 0; n != -1; n = stream.read(b)) {
-            assertFalse("closed", closed);
-            for (int i = 0; i < n; i++) {
-                assertEquals("read(b)", data[total + i], b[i]);
-            }
-            total += n;
-        }
-        assertEquals("read(b)", data.length, total);
-        assertTrue("closed", closed);
-        assertEquals("read(b)", -1, stream.read(b));
-    }
-
-    public void testReadBufferOffsetLength() throws IOException {
-        final byte[] b = new byte[data.length * 2];
-        int total = 0;
-        for (int n = 0; n != -1; n = stream.read(b, total, b.length - total)) {
-            assertFalse("closed", closed);
-            total += n;
-        }
-        assertEquals("read(b, off, len)", data.length, total);
-        for (int i = 0; i < data.length; i++) {
-            assertEquals("read(b, off, len)", data[i], b[i]);
-        }
-        assertTrue("closed", closed);
-        assertEquals("read(b, off, len)", -1, stream.read(b, 0, b.length));
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java
deleted file mode 100644
index 06aa227..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java
+++ /dev/null
@@ -1,750 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.junit.Assert.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.nio.charset.Charset;
-
-import org.apache.commons.io.ByteOrderMark;
-import org.apache.commons.io.Charsets;
-import org.junit.Assert;
-import org.junit.Assume;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-/**
- * Test case for {@link BOMInputStream}.
- *
- * @version $Id$
- */
-public class BOMInputStreamTest {
-    //----------------------------------------------------------------------------
-    //  Support code
-    //----------------------------------------------------------------------------
-
-    /**
-     *  A mock InputStream that expects <code>close()</code> to be called.
-     */
-    private static class ExpectCloseInputStream extends InputStream {
-        private boolean _closeCalled;
-
-        public void assertCloseCalled() {
-            assertTrue(_closeCalled);
-        }
-
-        @Override
-        public void close() throws IOException {
-            _closeCalled = true;
-        }
-
-        @Override
-        public int read() throws IOException {
-            return -1;
-        }
-    }
-
-    private void assertData(final byte[] expected, final byte[] actual, final int len)
-        throws Exception {
-        assertEquals("length", expected.length, len);
-        for (int ii = 0; ii < expected.length; ii++) {
-            assertEquals("byte " + ii, expected[ii], actual[ii]);
-        }
-    }
-
-    /**
-     *  Creates the underlying data stream, with or without BOM.
-     */
-    private InputStream createUtf16BeDataStream(final byte[] baseData, final boolean addBOM) {
-        byte[] data = baseData;
-        if (addBOM) {
-            data = new byte[baseData.length + 2];
-            data[0] = (byte) 0xFE;
-            data[1] = (byte) 0xFF;
-            System.arraycopy(baseData, 0, data, 2, baseData.length);
-        }
-        return new ByteArrayInputStream(data);
-    }
-
-    /**
-     *  Creates the underlying data stream, with or without BOM.
-     */
-    private InputStream createUtf16LeDataStream(final byte[] baseData, final boolean addBOM) {
-        byte[] data = baseData;
-        if (addBOM) {
-            data = new byte[baseData.length + 2];
-            data[0] = (byte) 0xFF;
-            data[1] = (byte) 0xFE;
-            System.arraycopy(baseData, 0, data, 2, baseData.length);
-        }
-        return new ByteArrayInputStream(data);
-    }
-
-    /**
-     *  Creates the underlying data stream, with or without BOM.
-     */
-    private InputStream createUtf32BeDataStream(final byte[] baseData, final boolean addBOM) {
-        byte[] data = baseData;
-        if (addBOM) {
-            data = new byte[baseData.length + 4];
-            data[0] = 0;
-            data[1] = 0;
-            data[2] = (byte) 0xFE;
-            data[3] = (byte) 0xFF;
-            System.arraycopy(baseData, 0, data, 4, baseData.length);
-        }
-        return new ByteArrayInputStream(data);
-    }
-
-    /**
-     *  Creates the underlying data stream, with or without BOM.
-     */
-    private InputStream createUtf32LeDataStream(final byte[] baseData, final boolean addBOM) {
-        byte[] data = baseData;
-        if (addBOM) {
-            data = new byte[baseData.length + 4];
-            data[0] = (byte) 0xFF;
-            data[1] = (byte) 0xFE;
-            data[2] = 0;
-            data[3] = 0;
-            System.arraycopy(baseData, 0, data, 4, baseData.length);
-        }
-        return new ByteArrayInputStream(data);
-    }
-
-    /**
-     *  Creates the underlying data stream, with or without BOM.
-     */
-    private InputStream createUtf8DataStream(final byte[] baseData, final boolean addBOM) {
-        byte[] data = baseData;
-        if (addBOM) {
-            data = new byte[baseData.length + 3];
-            data[0] = (byte) 0xEF;
-            data[1] = (byte) 0xBB;
-            data[2] = (byte) 0xBF;
-            System.arraycopy(baseData, 0, data, 3, baseData.length);
-        }
-        return new ByteArrayInputStream(data);
-    }
-
-    //----------------------------------------------------------------------------
-    //  Test cases
-    //----------------------------------------------------------------------------
-
-    private void parseXml(final InputStream in) throws SAXException, IOException, ParserConfigurationException {
-        final Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(in));
-        assertNotNull(doc);
-        assertEquals("X", doc.getFirstChild().getNodeName());
-    }
-
-    private void parseXml(final Reader in) throws SAXException, IOException, ParserConfigurationException {
-        final Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(in));
-        assertNotNull(doc);
-        assertEquals("X", doc.getFirstChild().getNodeName());
-    }
-
-    private void readBOMInputStreamTwice(final String resource) throws Exception {
-        final InputStream inputStream = this.getClass().getResourceAsStream(resource);
-        Assert.assertNotNull(inputStream);
-        final BOMInputStream bomInputStream = new BOMInputStream(inputStream);
-        bomInputStream.mark(1000000);
-
-        this.readFile(bomInputStream);
-        bomInputStream.reset();
-        this.readFile(bomInputStream);
-        inputStream.close();
-        bomInputStream.close();
-    }
-
-    private void readFile(final BOMInputStream bomInputStream) throws Exception {
-        int bytes = 0;
-        final byte[] bytesFromStream = new byte[100];
-        do {
-            bytes = bomInputStream.read(bytesFromStream);
-        } while (bytes > 0);
-    }
-
-    @Test
-    public void testAvailableWithBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C', 'D' };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, true));
-        assertEquals(7, in.available());
-        in.close();
-    }
-
-    @Test
-    public void testAvailableWithoutBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C', 'D' };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, false));
-        assertEquals(4, in.available());
-        in.close();
-    }
-
-    @Test
-    // this is here for coverage
-    public void testClose() throws Exception {
-        final ExpectCloseInputStream del = new ExpectCloseInputStream();
-        final InputStream in = new BOMInputStream(del);
-
-        in.close();
-        del.assertCloseCalled();
-        del.close();
-    }
-
-    @Test
-    public void testEmptyBufferWithBOM() throws Exception {
-        final byte[] data = new byte[] {};
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, true));
-        final byte[] buf = new byte[1024];
-        assertEquals(-1, in.read(buf));
-        in.close();
-    }
-
-    @Test
-    public void testEmptyBufferWithoutBOM() throws Exception {
-        final byte[] data = new byte[] {};
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, false));
-        final byte[] buf = new byte[1024];
-        assertEquals(-1, in.read(buf));
-        in.close();
-    }
-
-    @Test
-    public void testGetBOMFirstThenRead() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C' };
-        final BOMInputStream in = new BOMInputStream(createUtf8DataStream(data, true));
-        assertEquals("getBOM", ByteOrderMark.UTF_8, in.getBOM());
-        assertTrue("hasBOM()", in.hasBOM());
-        assertTrue("hasBOM(UTF-8)", in.hasBOM(ByteOrderMark.UTF_8));
-        assertEquals('A', in.read());
-        assertEquals('B', in.read());
-        assertEquals('C', in.read());
-        assertEquals(-1, in.read());
-        in.close();
-    }
-
-    @Test
-    public void testGetBOMFirstThenReadInclude() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C' };
-        final BOMInputStream in = new BOMInputStream(createUtf8DataStream(data, true), true);
-        assertTrue("hasBOM()", in.hasBOM());
-        assertTrue("hasBOM(UTF-8)", in.hasBOM(ByteOrderMark.UTF_8));
-        assertEquals("getBOM", ByteOrderMark.UTF_8, in.getBOM());
-        assertEquals(0xEF, in.read());
-        assertEquals(0xBB, in.read());
-        assertEquals(0xBF, in.read());
-        assertEquals('A', in.read());
-        assertEquals('B', in.read());
-        assertEquals('C', in.read());
-        assertEquals(-1, in.read());
-        in.close();
-    }
-
-    @Test
-    public void testLargeBufferWithBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C' };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, true));
-        final byte[] buf = new byte[1024];
-        assertData(data, buf, in.read(buf));
-        in.close();
-    }
-
-    @Test
-    public void testLargeBufferWithoutBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C' };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, false));
-        final byte[] buf = new byte[1024];
-        assertData(data, buf, in.read(buf));
-        in.close();
-    }
-
-    @Test
-    public void testLeadingNonBOMBufferedRead() throws Exception {
-        final byte[] data = new byte[] { (byte) 0xEF, (byte) 0xAB, (byte) 0xCD };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, false));
-        final byte[] buf = new byte[1024];
-        assertData(data, buf, in.read(buf));
-        in.close();
-    }
-
-    @Test
-    public void testLeadingNonBOMSingleRead() throws Exception {
-        final byte[] data = new byte[] { (byte) 0xEF, (byte) 0xAB, (byte) 0xCD };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, false));
-        assertEquals(0xEF, in.read());
-        assertEquals(0xAB, in.read());
-        assertEquals(0xCD, in.read());
-        assertEquals(-1, in.read());
-        in.close();
-    }
-
-    @Test
-    public void testMarkResetAfterReadWithBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C', 'D' };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, true));
-        assertTrue(in.markSupported());
-
-        in.read();
-        in.mark(10);
-
-        in.read();
-        in.read();
-        in.reset();
-        assertEquals('B', in.read());
-        in.close();
-    }
-
-    @Test
-    public void testMarkResetAfterReadWithoutBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C', 'D' };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, false));
-        assertTrue(in.markSupported());
-
-        in.read();
-        in.mark(10);
-
-        in.read();
-        in.read();
-        in.reset();
-        assertEquals('B', in.read());
-        in.close();
-    }
-
-    @Test
-    public void testMarkResetBeforeReadWithBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C', 'D' };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, true));
-        assertTrue(in.markSupported());
-
-        in.mark(10);
-
-        in.read();
-        in.read();
-        in.reset();
-        assertEquals('A', in.read());
-        in.close();
-    }
-
-    @Test
-    public void testMarkResetBeforeReadWithoutBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C', 'D' };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, false));
-        assertTrue(in.markSupported());
-
-        in.mark(10);
-
-        in.read();
-        in.read();
-        in.reset();
-        assertEquals('A', in.read());
-        in.close();
-    }
-
-    @Test
-    public void testNoBoms() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C' };
-        try {
-            (new BOMInputStream(createUtf8DataStream(data, true), false, (ByteOrderMark[])null)).close();;
-            fail("Null BOMs, expected IllegalArgumentException");
-        } catch (final IllegalArgumentException e) {
-            // expected
-        }
-        try {
-            (new BOMInputStream(createUtf8DataStream(data, true), false, new ByteOrderMark[0])).close();;
-            fail("Null BOMs, expected IllegalArgumentException");
-        } catch (final IllegalArgumentException e) {
-            // expected
-        }
-    }
-
-
-
-
-
-    @Test
-    public void testReadEmpty() throws Exception {
-        final byte[] data = new byte[] {};
-        final BOMInputStream in = new BOMInputStream(createUtf8DataStream(data, false));
-        assertEquals(-1, in.read());
-        assertFalse("hasBOM()", in.hasBOM());
-        assertFalse("hasBOM(UTF-8)", in.hasBOM(ByteOrderMark.UTF_8));
-        assertNull("getBOM", in.getBOM());
-        in.close();
-    }
-
-    @Test
-    public void testReadSmall() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B' };
-        final BOMInputStream in = new BOMInputStream(createUtf8DataStream(data, false));
-        assertEquals('A', in.read());
-        assertEquals('B', in.read());
-        assertEquals(-1, in.read());
-        assertFalse("hasBOM()", in.hasBOM());
-        assertFalse("hasBOM(UTF-8)", in.hasBOM(ByteOrderMark.UTF_8));
-        assertNull("getBOM", in.getBOM());
-        in.close();
-    }
-
-    @Test
-    public void testReadTwiceWithBOM() throws Exception {
-        this.readBOMInputStreamTwice("/org/apache/commons/io/testfileBOM.xml");
-    }
-
-    @Test
-    public void testReadTwiceWithoutBOM() throws Exception {
-        this.readBOMInputStreamTwice("/org/apache/commons/io/testfileNoBOM.xml");
-    }
-
-    @Test
-    public void testReadWithBOMInclude() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C' };
-        final BOMInputStream in = new BOMInputStream(createUtf8DataStream(data, true), true);
-        assertEquals(0xEF, in.read());
-        assertEquals(0xBB, in.read());
-        assertEquals(0xBF, in.read());
-        assertEquals('A', in.read());
-        assertEquals('B', in.read());
-        assertEquals('C', in.read());
-        assertEquals(-1, in.read());
-        assertTrue("hasBOM()", in.hasBOM());
-        assertTrue("hasBOM(UTF-8)", in.hasBOM(ByteOrderMark.UTF_8));
-        assertEquals("getBOM", ByteOrderMark.UTF_8, in.getBOM());
-        in.close();
-    }
-
-    @Test
-    public void testReadWithBOMUtf16Be() throws Exception {
-        @SuppressWarnings("deprecation") // unavoidable until Java 7
-        final byte[] data = "ABC".getBytes(Charsets.UTF_16BE);
-        final BOMInputStream in = new BOMInputStream(createUtf16BeDataStream(data, true), ByteOrderMark.UTF_16BE);
-        assertEquals(0, in.read());
-        assertEquals('A', in.read());
-        assertEquals(0, in.read());
-        assertEquals('B', in.read());
-        assertEquals(0, in.read());
-        assertEquals('C', in.read());
-        assertEquals(-1, in.read());
-        assertTrue("hasBOM()", in.hasBOM());
-        assertTrue("hasBOM(UTF-16BE)", in.hasBOM(ByteOrderMark.UTF_16BE));
-        assertEquals("getBOM", ByteOrderMark.UTF_16BE, in.getBOM());
-        try {
-            in.hasBOM(ByteOrderMark.UTF_16LE);
-            fail("Expected IllegalArgumentException");
-        } catch (final IllegalArgumentException e) {
-            // expected - not configured for UTF-16LE
-        }
-        in.close();
-    }
-
-    @Test
-    public void testReadWithBOMUtf16Le() throws Exception {
-        @SuppressWarnings("deprecation") // unavoidable until Java 7
-        final byte[] data = "ABC".getBytes(Charsets.UTF_16LE);
-        final BOMInputStream in = new BOMInputStream(createUtf16LeDataStream(data, true), ByteOrderMark.UTF_16LE);
-        assertEquals('A', in.read());
-        assertEquals(0, in.read());
-        assertEquals('B', in.read());
-        assertEquals(0, in.read());
-        assertEquals('C', in.read());
-        assertEquals(0, in.read());
-        assertEquals(-1, in.read());
-        assertTrue("hasBOM()", in.hasBOM());
-        assertTrue("hasBOM(UTF-16LE)", in.hasBOM(ByteOrderMark.UTF_16LE));
-        assertEquals("getBOM", ByteOrderMark.UTF_16LE, in.getBOM());
-        try {
-            in.hasBOM(ByteOrderMark.UTF_16BE);
-            fail("Expected IllegalArgumentException");
-        } catch (final IllegalArgumentException e) {
-            // expected - not configured for UTF-16BE
-        }
-        in.close();
-    }
-
-    @Test
-    public void testReadWithBOMUtf32Be() throws Exception {
-        Assume.assumeTrue(Charset.isSupported("UTF_32BE"));
-        final byte[] data = "ABC".getBytes("UTF_32BE");
-        final BOMInputStream in = new BOMInputStream(createUtf32BeDataStream(data, true), ByteOrderMark.UTF_32BE);
-        assertEquals(0, in.read());
-        assertEquals(0, in.read());
-        assertEquals(0, in.read());
-        assertEquals('A', in.read());
-        assertEquals(0, in.read());
-        assertEquals(0, in.read());
-        assertEquals(0, in.read());
-        assertEquals('B', in.read());
-        assertEquals(0, in.read());
-        assertEquals(0, in.read());
-        assertEquals(0, in.read());
-        assertEquals('C', in.read());
-        assertEquals(-1, in.read());
-        assertTrue("hasBOM()", in.hasBOM());
-        assertTrue("hasBOM(UTF-32BE)", in.hasBOM(ByteOrderMark.UTF_32BE));
-        assertEquals("getBOM", ByteOrderMark.UTF_32BE, in.getBOM());
-        try {
-            in.hasBOM(ByteOrderMark.UTF_32LE);
-            fail("Expected IllegalArgumentException");
-        } catch (final IllegalArgumentException e) {
-            // expected - not configured for UTF-32LE
-        }
-        in.close();
-    }
-
-    @Test
-    public void testReadWithBOMUtf32Le() throws Exception {
-        Assume.assumeTrue(Charset.isSupported("UTF_32LE"));
-        final byte[] data = "ABC".getBytes("UTF_32LE");
-        final BOMInputStream in = new BOMInputStream(createUtf32LeDataStream(data, true), ByteOrderMark.UTF_32LE);
-        assertEquals('A', in.read());
-        assertEquals(0, in.read());
-        assertEquals(0, in.read());
-        assertEquals(0, in.read());
-        assertEquals('B', in.read());
-        assertEquals(0, in.read());
-        assertEquals(0, in.read());
-        assertEquals(0, in.read());
-        assertEquals('C', in.read());
-        assertEquals(0, in.read());
-        assertEquals(0, in.read());
-        assertEquals(0, in.read());
-        assertEquals(-1, in.read());
-        assertTrue("hasBOM()", in.hasBOM());
-        assertTrue("hasBOM(UTF-32LE)", in.hasBOM(ByteOrderMark.UTF_32LE));
-        assertEquals("getBOM", ByteOrderMark.UTF_32LE, in.getBOM());
-        try {
-            in.hasBOM(ByteOrderMark.UTF_32BE);
-            fail("Expected IllegalArgumentException");
-        } catch (final IllegalArgumentException e) {
-            // expected - not configured for UTF-32BE
-        }
-        in.close();
-    }
-
-    @Test
-    public void testReadWithBOMUtf8() throws Exception {
-        @SuppressWarnings("deprecation") // unavoidable until Java 7
-        final byte[] data = "ABC".getBytes(Charsets.UTF_8);
-        final BOMInputStream in = new BOMInputStream(createUtf8DataStream(data, true), ByteOrderMark.UTF_8);
-        assertEquals('A', in.read());
-        assertEquals('B', in.read());
-        assertEquals('C', in.read());
-        assertEquals(-1, in.read());
-        assertTrue("hasBOM()", in.hasBOM());
-        assertTrue("hasBOM(UTF-8)", in.hasBOM(ByteOrderMark.UTF_8));
-        assertEquals("getBOM", ByteOrderMark.UTF_8, in.getBOM());
-        try {
-            in.hasBOM(ByteOrderMark.UTF_16BE);
-            fail("Expected IllegalArgumentException");
-        } catch (final IllegalArgumentException e) {
-            // expected - not configured for UTF-16BE
-        }
-        in.close();
-    }
-
-    @Test
-    public void testReadWithMultipleBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C' };
-        final BOMInputStream in = new BOMInputStream(createUtf8DataStream(data, true),
-                                            ByteOrderMark.UTF_16BE, ByteOrderMark.UTF_8);
-        assertEquals('A', in.read());
-        assertEquals('B', in.read());
-        assertEquals('C', in.read());
-        assertEquals(-1, in.read());
-        assertTrue("hasBOM()", in.hasBOM());
-        assertTrue("hasBOM(UTF-8)", in.hasBOM(ByteOrderMark.UTF_8));
-        assertFalse("hasBOM(UTF-16BE)", in.hasBOM(ByteOrderMark.UTF_16BE));
-        assertEquals("getBOM", ByteOrderMark.UTF_8, in.getBOM());
-        in.close();
-    }
-
-    @Test
-    public void testReadWithoutBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C' };
-        final BOMInputStream in = new BOMInputStream(createUtf8DataStream(data, false));
-        assertEquals('A', in.read());
-        assertEquals('B', in.read());
-        assertEquals('C', in.read());
-        assertEquals(-1, in.read());
-        assertFalse("hasBOM()", in.hasBOM());
-        assertFalse("hasBOM(UTF-8)", in.hasBOM(ByteOrderMark.UTF_8));
-        assertNull("getBOM", in.getBOM());
-        in.close();
-    }
-
-    @Test
-    public void testReadXmlWithBOMUcs2() throws Exception {
-        // UCS-2 is BE.
-        Assume.assumeTrue(Charset.isSupported("ISO-10646-UCS-2"));
-        final byte[] data = "<?xml version=\"1.0\" encoding=\"ISO-10646-UCS-2\"?><X/>".getBytes("ISO-10646-UCS-2");
-        parseXml(new BOMInputStream(createUtf16BeDataStream(data, true), ByteOrderMark.UTF_16BE));
-        parseXml(createUtf16BeDataStream(data, true));
-    }
-
-    @Test
-    public void testReadXmlWithBOMUcs4() throws Exception {
-        // UCS-4 is BE or LE?
-        // Hm: ISO-10646-UCS-4 is not supported on Oracle 1.6.0_31
-        Assume.assumeTrue(Charset.isSupported("ISO-10646-UCS-4"));
-        final byte[] data = "<?xml version=\"1.0\" encoding=\"ISO-10646-UCS-4\"?><X/>".getBytes("ISO-10646-UCS-4");
-        // XML parser does not know what to do with UTF-32
-        parseXml(new BOMInputStream(createUtf32BeDataStream(data, true), ByteOrderMark.UTF_32BE));
-        // XML parser does not know what to do with UTF-32
-        parseXml(createUtf32BeDataStream(data, true));
-    }
-
-    @Test
-    @SuppressWarnings("deprecation") // unavoidable until Java 7
-    public void testReadXmlWithBOMUtf16Be() throws Exception {
-        final byte[] data = "<?xml version=\"1.0\" encoding=\"UTF-16BE\"?><X/>".getBytes(Charsets.UTF_16BE);
-        parseXml(new BOMInputStream(createUtf16BeDataStream(data, true), ByteOrderMark.UTF_16BE));
-        parseXml(createUtf16BeDataStream(data, true));
-    }
-
-    @Test
-    @SuppressWarnings("deprecation") // unavoidable until Java 7
-    public void testReadXmlWithBOMUtf16Le() throws Exception {
-        final byte[] data = "<?xml version=\"1.0\" encoding=\"UTF-16LE\"?><X/>".getBytes(Charsets.UTF_16LE);
-        parseXml(new BOMInputStream(createUtf16LeDataStream(data, true), ByteOrderMark.UTF_16LE));
-        parseXml(createUtf16LeDataStream(data, true));
-    }
-
-    @Test
-    public void testReadXmlWithBOMUtf32Be() throws Exception {
-        Assume.assumeTrue(Charset.isSupported("UTF_32BE"));
-        final byte[] data = "<?xml version=\"1.0\" encoding=\"UTF-32BE\"?><X/>".getBytes("UTF_32BE");
-        parseXml(new BOMInputStream(createUtf32BeDataStream(data, true), ByteOrderMark.UTF_32BE));
-        // XML parser does not know what to do with UTF-32, so we warp the input stream with a XmlStreamReader
-        parseXml(new XmlStreamReader(createUtf32BeDataStream(data, true)));
-    }
-
-    @Test
-    public void testReadXmlWithBOMUtf32Le() throws Exception {
-        Assume.assumeTrue(Charset.isSupported("UTF_32LE"));
-        final byte[] data = "<?xml version=\"1.0\" encoding=\"UTF-32LE\"?><X/>".getBytes("UTF_32LE");
-        parseXml(new BOMInputStream(createUtf32LeDataStream(data, true), ByteOrderMark.UTF_32LE));
-        // XML parser does not know what to do with UTF-32, so we warp the input stream with a XmlStreamReader
-        parseXml(new XmlStreamReader(createUtf32LeDataStream(data, true)));
-    }
-
-    @Test
-    public void testReadXmlWithBOMUtf8() throws Exception {
-        @SuppressWarnings("deprecation") // unavoidable until Java 7
-        final byte[] data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><X/>".getBytes(Charsets.UTF_8);
-        parseXml(new BOMInputStream(createUtf8DataStream(data, true)));
-        parseXml(createUtf8DataStream(data, true));
-    }
-
-    @Test
-    public void testReadXmlWithoutBOMUtf32Be() throws Exception {
-        Assume.assumeTrue(Charset.isSupported("UTF_32BE"));
-        final byte[] data = "<?xml version=\"1.0\" encoding=\"UTF-32BE\"?><X/>".getBytes("UTF_32BE");
-        parseXml(new BOMInputStream(createUtf32BeDataStream(data, false)));
-        parseXml(createUtf32BeDataStream(data, false));
-    }
-
-    @Test
-    public void testReadXmlWithoutBOMUtf32Le() throws Exception {
-        Assume.assumeTrue(Charset.isSupported("UTF_32LE"));
-        final byte[] data = "<?xml version=\"1.0\" encoding=\"UTF-32LE\"?><X/>".getBytes("UTF_32LE");
-        parseXml(new BOMInputStream(createUtf32LeDataStream(data, false)));
-        parseXml(createUtf32BeDataStream(data, false));
-    }
-
-    @Test
-    public void testSkipWithBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C', 'D' };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, true));
-        in.skip(2L);
-        assertEquals('C', in.read());
-        in.close();
-    }
-
-    @Test
-    public void testSkipWithoutBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C', 'D' };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, false));
-        in.skip(2L);
-        assertEquals('C', in.read());
-        in.close();
-    }
-
-
-    @Test
-    public void skipReturnValueWithBom() throws IOException {
-        byte[] baseData = new byte[]{(byte) 0x31, (byte) 0x32, (byte) 0x33};
-        BOMInputStream is1 = new BOMInputStream(createUtf8DataStream(baseData, true));
-        assertEquals(2, is1.skip(2));
-        assertEquals((byte) 0x33, is1.read());
-        is1.close();
-    }
-
-    @Test
-    public void skipReturnValueWithoutBom() throws IOException {
-        byte[] baseData = new byte[]{(byte) 0x31, (byte) 0x32, (byte) 0x33};
-        BOMInputStream is2 = new BOMInputStream(createUtf8DataStream(baseData, false));
-        assertEquals(2, is2.skip(2)); // IO-428
-        assertEquals((byte) 0x33, is2.read());
-        is2.close();
-    }
-
-    @Test
-    public void testSmallBufferWithBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C' };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, true));
-        final byte[] buf = new byte[1024];
-        assertData(new byte[] { 'A', 'B' }, buf, in.read(buf, 0, 2));
-        assertData(new byte[] { 'C' }, buf, in.read(buf, 0, 2));
-        in.close();
-    }
-
-    @Test
-    public void testSmallBufferWithoutBOM() throws Exception {
-        final byte[] data = new byte[] { 'A', 'B', 'C' };
-        final InputStream in = new BOMInputStream(createUtf8DataStream(data, false));
-        final byte[] buf = new byte[1024];
-        assertData(new byte[] { 'A', 'B' }, buf, in.read(buf, 0, 2));
-        assertData(new byte[] { 'C' }, buf, in.read(buf, 0, 2));
-        in.close();
-    }
-
-    @Test
-    // make sure that our support code works as expected
-    public void testSupportCode() throws Exception {
-        final InputStream in = createUtf8DataStream(new byte[] { 'A', 'B' }, true);
-        final byte[] buf = new byte[1024];
-        final int len = in.read(buf);
-        assertEquals(5, len);
-        assertEquals(0xEF, buf[0] & 0xFF);
-        assertEquals(0xBB, buf[1] & 0xFF);
-        assertEquals(0xBF, buf[2] & 0xFF);
-        assertEquals('A', buf[3] & 0xFF);
-        assertEquals('B', buf[4] & 0xFF);
-
-        assertData(
-                new byte[] { (byte) 0xEF, (byte) 0xBB, (byte) 0xBF, 'A', 'B' },
-                buf, len);
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/BoundedInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/BoundedInputStreamTest.java
deleted file mode 100644
index 1491108..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/BoundedInputStreamTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.ByteArrayInputStream;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.io.IOUtils;
-
-/**
- * Tests for {@link BoundedInputStream}.
- *
- * @version $Id$
- */
-public class BoundedInputStreamTest extends TestCase {
-
-    public BoundedInputStreamTest(final String name) {
-        super(name);
-    }
-
-    public void testReadSingle() throws Exception {
-        BoundedInputStream bounded = null;
-        final byte[] helloWorld = "Hello World".getBytes();
-        final byte[] hello      = "Hello".getBytes();
-
-        // limit = length
-        bounded = new BoundedInputStream(new ByteArrayInputStream(helloWorld), helloWorld.length);
-        for (int i = 0; i < helloWorld.length; i++) {
-            assertEquals("limit = length byte[" + i + "]", helloWorld[i], bounded.read());
-        }
-        assertEquals("limit = length end", -1, bounded.read());
-
-        // limit > length
-        bounded = new BoundedInputStream(new ByteArrayInputStream(helloWorld), helloWorld.length + 1);
-        for (int i = 0; i < helloWorld.length; i++) {
-            assertEquals("limit > length byte[" + i + "]", helloWorld[i], bounded.read());
-        }
-        assertEquals("limit > length end", -1, bounded.read());
-
-        // limit < length
-        bounded = new BoundedInputStream(new ByteArrayInputStream(helloWorld), hello.length);
-        for (int i = 0; i < hello.length; i++) {
-            assertEquals("limit < length byte[" + i + "]", hello[i], bounded.read());
-        }
-        assertEquals("limit < length end", -1, bounded.read());
-    }
-
-    public void testReadArray() throws Exception {
-
-        BoundedInputStream bounded = null;
-        final byte[] helloWorld = "Hello World".getBytes();
-        final byte[] hello      = "Hello".getBytes();
-
-        bounded = new BoundedInputStream(new ByteArrayInputStream(helloWorld));
-        compare("limit = -1", helloWorld, IOUtils.toByteArray(bounded));
-
-        bounded = new BoundedInputStream(new ByteArrayInputStream(helloWorld), 0);
-        compare("limit = 0", new byte[0], IOUtils.toByteArray(bounded));
-
-        bounded = new BoundedInputStream(new ByteArrayInputStream(helloWorld), helloWorld.length);
-        compare("limit = length", helloWorld, IOUtils.toByteArray(bounded));
-
-        bounded = new BoundedInputStream(new ByteArrayInputStream(helloWorld), helloWorld.length + 1);
-        compare("limit > length", helloWorld, IOUtils.toByteArray(bounded));
-
-        bounded = new BoundedInputStream(new ByteArrayInputStream(helloWorld), helloWorld.length - 6);
-        compare("limit < length", hello, IOUtils.toByteArray(bounded));
-    }
-
-    private void compare(final String msg, final byte[] expected, final byte[] actual) {
-        assertEquals(msg + " length", expected.length, actual.length);
-        for (int i = 0; i < expected.length; i++) {
-            assertEquals(msg + " byte[" + i + "]", expected[i], actual[i]);
-        }
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/BoundedReaderTest.java b/trunk/src/test/java/org/apache/commons/io/input/BoundedReaderTest.java
deleted file mode 100644
index 2f61ccc..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/BoundedReaderTest.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.commons.io.input;
-
-import org.junit.Test;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-public class BoundedReaderTest
-{
-    private final Reader sr = new BufferedReader( new StringReader( "01234567890" ) );
-
-    private final Reader shortReader = new BufferedReader( new StringReader( "01" ) );
-
-    @Test
-    public void readTillEnd() throws IOException {
-        BoundedReader mr = new BoundedReader( sr, 3 );
-        mr.read();
-        mr.read();
-        mr.read();
-        assertEquals( -1, mr.read() );
-        mr.close();
-    }
-
-    @Test
-    public void shortReader() throws IOException {
-        BoundedReader mr = new BoundedReader( shortReader, 3 );
-        mr.read();
-        mr.read();
-        assertEquals( -1, mr.read() );
-        mr.close();
-    }
-
-    @Test
-    public void readMulti() throws IOException {
-        BoundedReader mr = new BoundedReader( sr, 3 );
-        char[] cbuf = new char[4];
-        for ( int i = 0; i < cbuf.length; i++ )
-        {
-            cbuf[i] = 'X';
-        }
-        final int read = mr.read( cbuf, 0, 4 );
-        assertEquals( 3, read );
-        assertEquals( '0', cbuf[0] );
-        assertEquals( '1', cbuf[1] );
-        assertEquals( '2', cbuf[2] );
-        assertEquals( 'X', cbuf[3] );
-        mr.close();
-    }
-
-    @Test
-    public void readMultiWithOffset() throws IOException {
-        BoundedReader mr = new BoundedReader( sr, 3 );
-        char[] cbuf = new char[4];
-        for ( int i = 0; i < cbuf.length; i++ ) {
-            cbuf[i] = 'X';
-        }
-        final int read = mr.read( cbuf, 1, 2 );
-        assertEquals( 2, read );
-        assertEquals( 'X', cbuf[0] );
-        assertEquals( '0', cbuf[1] );
-        assertEquals( '1', cbuf[2] );
-        assertEquals( 'X', cbuf[3] );
-        mr.close();
-    }
-
-    @Test
-    public void markReset() throws IOException {
-        BoundedReader mr = new BoundedReader( sr, 3 );
-        mr.mark( 3 );
-        mr.read();
-        mr.read();
-        mr.read();
-        mr.reset();
-        mr.read();
-        mr.read();
-        mr.read();
-        assertEquals( -1, mr.read() );
-        mr.close();
-    }
-
-
-    @Test
-    public void markResetWithMarkOutsideBoundedReaderMax() throws IOException {
-        BoundedReader mr = new BoundedReader( sr, 3 );
-        mr.mark( 4 );
-        mr.read();
-        mr.read();
-        mr.read();
-        assertEquals( -1, mr.read() );
-        mr.close();
-    }
-
-    @Test
-    public void markResetWithMarkOutsideBoundedReaderMaxAndInitialOffset() throws IOException {
-        BoundedReader mr = new BoundedReader( sr, 3 );
-        mr.read();
-        mr.mark( 3 );
-        mr.read();
-        mr.read();
-        assertEquals( -1, mr.read() );
-        mr.close();
-    }
-
-    @Test
-    public void markResetFromOffset1() throws IOException {
-        BoundedReader mr = new BoundedReader( sr, 3 );
-        mr.mark( 3 );
-        mr.read();
-        mr.read();
-        mr.read();
-        assertEquals( -1, mr.read() );
-        mr.reset();
-        mr.mark( 1 );
-        mr.read();
-        assertEquals( -1, mr.read() );
-        mr.close();
-    }
-
-    @Test
-    public void markResetMarkMore() throws IOException {
-        BoundedReader mr = new BoundedReader( sr, 3 );
-        mr.mark( 4 );
-        mr.read();
-        mr.read();
-        mr.read();
-        mr.reset();
-        mr.read();
-        mr.read();
-        mr.read();
-        assertEquals( -1, mr.read() );
-        mr.close();
-    }
-
-    @Test
-    public void skipTest() throws IOException {
-        BoundedReader mr = new BoundedReader( sr, 3 );
-        mr.skip( 2 );
-        mr.read();
-        assertEquals( -1, mr.read() );
-        mr.close();
-    }
-
-    @Test
-    public void closeTest() throws IOException {
-        final AtomicBoolean closed = new AtomicBoolean( false );
-        final Reader sr = new BufferedReader( new StringReader( "01234567890" ) ) {
-            @Override
-            public void close()
-                throws IOException
-            {
-                closed.set( true );
-                super.close();
-            }
-        };
-
-        BoundedReader mr = new BoundedReader( sr, 3 );
-        mr.close();
-        assertTrue( closed.get() );
-    }
-}
\ No newline at end of file
diff --git a/trunk/src/test/java/org/apache/commons/io/input/BrokenInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/BrokenInputStreamTest.java
deleted file mode 100644
index 2636afb..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/BrokenInputStreamTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit Test Case for {@link BrokenInputStream}.
- */
-public class BrokenInputStreamTest extends TestCase {
-
-    private IOException exception;
-
-    private InputStream stream;
-
-    @Override
-    protected void setUp() {
-        exception = new IOException("test exception");
-        stream = new BrokenInputStream(exception);
-    }
-
-    public void testRead() {
-        try {
-            stream.read();
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertEquals(exception, e);
-        }
-
-        try {
-            stream.read(new byte[1]);
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertEquals(exception, e);
-        }
-
-        try {
-            stream.read(new byte[1], 0, 1);
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertEquals(exception, e);
-        }
-    }
-
-    public void testAvailable() {
-        try {
-            stream.available();
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertEquals(exception, e);
-        }
-    }
-
-    public void testSkip() {
-        try {
-            stream.skip(1);
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertEquals(exception, e);
-        }
-    }
-
-    public void testReset() {
-        try {
-            stream.reset();
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertEquals(exception, e);
-        }
-    }
-
-    public void testClose() {
-        try {
-            stream.close();
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertEquals(exception, e);
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java
deleted file mode 100644
index 9b78421..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.charset.Charset;
-import java.util.Random;
-import java.util.Set;
-
-import org.apache.commons.io.Charsets;
-import org.junit.Ignore;
-import org.junit.Test;
-
-public class CharSequenceInputStreamTest {
-
-    private static final String ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-    private static final String LARGE_TEST_STRING;
-
-    private static final String TEST_STRING = "\u00e0 peine arriv\u00e9s nous entr\u00e2mes dans sa chambre";
-
-    static {
-        final StringBuilder buffer = new StringBuilder();
-        for (int i = 0; i < 100; i++) {
-            buffer.append(TEST_STRING);
-        }
-        LARGE_TEST_STRING = buffer.toString();
-    }
-
-    private final Random random = new Random();
-
-    private Set<String> getRequiredCharsetNames() {
-        return Charsets.requiredCharsets().keySet();
-    }
-
-    private void testBufferedRead(final String testString, final String charsetName) throws IOException {
-        final byte[] expected = testString.getBytes(charsetName);
-        final InputStream in = new CharSequenceInputStream(testString, charsetName, 512);
-        try {
-            final byte[] buffer = new byte[128];
-            int offset = 0;
-            while (true) {
-                int bufferOffset = random.nextInt(64);
-                final int bufferLength = random.nextInt(64);
-                int read = in.read(buffer, bufferOffset, bufferLength);
-                if (read == -1) {
-                    assertEquals("EOF: offset should equal length", expected.length, offset);
-                    break;
-                } else {
-                    assertTrue("Read " + read + " <= " + bufferLength, read <= bufferLength);
-                    while (read > 0) {
-                        assertTrue("offset " + offset + " < " + expected.length, offset < expected.length);
-                        assertEquals("bytes should agree", expected[offset], buffer[bufferOffset]);
-                        offset++;
-                        bufferOffset++;
-                        read--;
-                    }
-                }
-            }
-        } finally {
-            in.close();
-        }
-    }
-
-//    Unfortunately checking canEncode does not seem to work for all charsets:
-//    testBufferedRead_AvailableCharset(org.apache.commons.io.input.CharSequenceInputStreamTest)  Time elapsed: 0.682 sec  <<< ERROR!
-//    java.lang.UnsupportedOperationException: null
-//        at java.nio.CharBuffer.array(CharBuffer.java:940)
-//        at sun.nio.cs.ext.COMPOUND_TEXT_Encoder.encodeLoop(COMPOUND_TEXT_Encoder.java:75)
-//        at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:544)
-//        at org.apache.commons.io.input.CharSequenceInputStream.fillBuffer(CharSequenceInputStream.java:111)
-    @Test
-    public void testBufferedRead_AvailableCharset() throws IOException {
-        for (final String csName : Charset.availableCharsets().keySet()) {
-            // prevent java.lang.UnsupportedOperationException at sun.nio.cs.ext.ISO2022_CN.newEncoder.
-            if (isAvailabilityTestableForCharset(csName)) {
-                testBufferedRead(TEST_STRING, csName);
-            }
-        }
-    }
-
-    @Test
-    public void testBufferedRead_RequiredCharset() throws IOException {
-        for (final String csName : getRequiredCharsetNames()) {
-            testBufferedRead(TEST_STRING, csName);
-        }
-    }
-
-    @Test
-    public void testBufferedRead_UTF8() throws IOException {
-        testBufferedRead(TEST_STRING, "UTF-8");
-    }
-
-    private void testCharsetMismatchInfiniteLoop(final String csName) throws IOException {
-        // Input is UTF-8 bytes: 0xE0 0xB2 0xA0
-        final char[] inputChars = new char[] { (char) 0xE0, (char) 0xB2, (char) 0xA0 };
-        final Charset charset = Charset.forName(csName); // infinite loop for US-ASCII, UTF-8 OK
-        final InputStream stream = new CharSequenceInputStream(new String(inputChars), charset, 512);
-        try {
-            while (stream.read() != -1) {
-            }
-        } finally {
-            stream.close();
-        }
-    }
-
-    @Test
-    public void testCharsetMismatchInfiniteLoop_RequiredCharsets() throws IOException {
-        for (final String csName : getRequiredCharsetNames()) {
-            testCharsetMismatchInfiniteLoop(csName);
-        }
-    }
-
-    // Test is broken if readFirst > 0
-    // This is because the initial read fills the buffer from the CharSequence
-    // so data1 gets the first buffer full; data2 will get the next buffer full
-    private void testIO_356(final int bufferSize, final int dataSize, final int readFirst, final String csName) throws Exception {
-        final CharSequenceInputStream is = new CharSequenceInputStream(ALPHABET, csName, bufferSize);
-
-        for (int i = 0; i < readFirst; i++) {
-            final int ch = is.read();
-            assertFalse(ch == -1);
-        }
-
-        is.mark(dataSize);
-
-        final byte[] data1 = new byte[dataSize];
-        final int readCount1 = is.read(data1);
-        assertEquals(dataSize, readCount1);
-
-        is.reset(); // should allow data to be re-read
-
-        final byte[] data2 = new byte[dataSize];
-        final int readCount2 = is.read(data2);
-        assertEquals(dataSize, readCount2);
-
-        is.close();
-
-        // data buffers should be identical
-        assertArrayEquals("bufferSize=" + bufferSize + " dataSize=" + dataSize, data1, data2);
-    }
-
-    @Test
-    public void testIO_356_B10_D10_S0_UTF16() throws Exception {
-        testIO_356(10, 10, 0, "UTF-16");
-    }
-
-    @Test
-    public void testIO_356_B10_D10_S0_UTF8() throws Exception {
-        testIO_356(10, 10, 0, "UTF-8");
-    }
-
-    @Test
-    public void testIO_356_B10_D10_S1_UTF8() throws Exception {
-        testIO_356(10, 10, 1, "UTF-8");
-    }
-
-    @Test
-    public void testIO_356_B10_D10_S2_UTF8() throws Exception {
-        testIO_356(10, 10, 2, "UTF-8");
-    }
-
-    @Test
-    public void testIO_356_B10_D13_S0_UTF8() throws Exception {
-        testIO_356(10, 13, 0, "UTF-8");
-    }
-
-    @Test
-    public void testIO_356_B10_D13_S1_UTF8() throws Exception {
-        testIO_356(10, 13, 1, "UTF-8");
-    }
-
-    @Test
-    public void testIO_356_B10_D20_S0_UTF8() throws Exception {
-        testIO_356(10, 20, 0, "UTF-8");
-    }
-
-    private void testIO_356_Loop(final String csName, final int maxBytesPerChar) throws Exception {
-        for (int bufferSize = maxBytesPerChar; bufferSize <= 10; bufferSize++) {
-            for (int dataSize = 1; dataSize <= 20; dataSize++) {
-                testIO_356(bufferSize, dataSize, 0, csName);
-            }
-        }
-    }
-
-    @Test
-    public void testIO_356_Loop_UTF16() throws Exception {
-        testIO_356_Loop("UTF-16", 4);
-    }
-
-    @Test
-    public void testIO_356_Loop_UTF8() throws Exception {
-        testIO_356_Loop("UTF-8", 4);
-    }
-
-    @Test
-    public void testLargeBufferedRead_RequiredCharsets() throws IOException {
-        for (final String csName : getRequiredCharsetNames()) {
-            testBufferedRead(LARGE_TEST_STRING, csName);
-        }
-    }
-
-    @Test
-    public void testLargeBufferedRead_UTF8() throws IOException {
-        testBufferedRead(LARGE_TEST_STRING, "UTF-8");
-    }
-
-    @Test
-    public void testLargeSingleByteRead_RequiredCharsets() throws IOException {
-        for (final String csName : getRequiredCharsetNames()) {
-            testSingleByteRead(LARGE_TEST_STRING, csName);
-        }
-    }
-
-    @Test
-    public void testLargeSingleByteRead_UTF8() throws IOException {
-        testSingleByteRead(LARGE_TEST_STRING, "UTF-8");
-    }
-
-    // This test is broken for charsets that don't create a single byte for each char
-    private void testMarkReset(final String csName) throws Exception {
-        final InputStream r = new CharSequenceInputStream("test", csName);
-        try {
-            assertEquals(2, r.skip(2));
-            r.mark(0);
-            assertEquals(csName, 's', r.read());
-            assertEquals(csName, 't', r.read());
-            assertEquals(csName, -1, r.read());
-            r.reset();
-            assertEquals(csName, 's', r.read());
-            assertEquals(csName, 't', r.read());
-            assertEquals(csName, -1, r.read());
-            r.reset();
-            r.reset();
-        } finally {
-            r.close();
-        }
-    }
-
-    @Test
-    @Ignore // Test broken for charsets that create multiple bytes for a single char
-    public void testMarkReset_RequiredCharsets() throws Exception {
-        for (final String csName : getRequiredCharsetNames()) {
-            testMarkReset(csName);
-        }
-    }
-
-    @Test
-    public void testMarkReset_USASCII() throws Exception {
-        testMarkReset("US-ASCII");
-    }
-
-    @Test
-    public void testMarkReset_UTF8() throws Exception {
-        testMarkReset("UTF-8");
-    }
-
-    @Test
-    public void testMarkSupported() throws Exception {
-        final InputStream r = new CharSequenceInputStream("test", "UTF-8");
-        try {
-            assertTrue(r.markSupported());
-        } finally {
-            r.close();
-        }
-    }
-
-    private void testReadZero(final String csName) throws Exception {
-        final InputStream r = new CharSequenceInputStream("test", csName);
-        try {
-            final byte[] bytes = new byte[30];
-            assertEquals(0, r.read(bytes, 0, 0));
-        } finally {
-            r.close();
-        }
-    }
-
-    @Test
-    public void testReadZero_EmptyString() throws Exception {
-        final InputStream r = new CharSequenceInputStream("", "UTF-8");
-        try {
-            final byte[] bytes = new byte[30];
-            assertEquals(0, r.read(bytes, 0, 0));
-        } finally {
-            r.close();
-        }
-    }
-
-    @Test
-    public void testReadZero_RequiredCharsets() throws Exception {
-        for (final String csName : getRequiredCharsetNames()) {
-            testReadZero(csName);
-        }
-    }
-
-    private void testSingleByteRead(final String testString, final String charsetName) throws IOException {
-        final byte[] bytes = testString.getBytes(charsetName);
-        final InputStream in = new CharSequenceInputStream(testString, charsetName, 512);
-        try {
-            for (final byte b : bytes) {
-                final int read = in.read();
-                assertTrue("read " + read + " >=0 ", read >= 0);
-                assertTrue("read " + read + " <= 255", read <= 255);
-                assertEquals("Should agree with input", b, (byte) read);
-            }
-            assertEquals(-1, in.read());
-        } finally {
-            in.close();
-        }
-    }
-
-    @Test
-    public void testSingleByteRead_RequiredCharsets() throws IOException {
-        for (final String csName : getRequiredCharsetNames()) {
-            testSingleByteRead(TEST_STRING, csName);
-        }
-    }
-
-    @Test
-    public void testSingleByteRead_UTF16() throws IOException {
-        testSingleByteRead(TEST_STRING, "UTF-16");
-    }
-
-    @Test
-    public void testSingleByteRead_UTF8() throws IOException {
-        testSingleByteRead(TEST_STRING, "UTF-8");
-    }
-
-    // This is broken for charsets that don't map each char to a byte
-    private void testSkip(final String csName) throws Exception {
-        final InputStream r = new CharSequenceInputStream("test", csName);
-        try {
-            assertEquals(1, r.skip(1));
-            assertEquals(2, r.skip(2));
-            assertEquals(csName, 't', r.read());
-            r.skip(100);
-            assertEquals(csName, -1, r.read());
-        } finally {
-            r.close();
-        }
-    }
-
-    @Test
-    @Ignore // test is broken for charsets that generate multiple bytes per char.
-    public void testSkip_RequiredCharsets() throws Exception {
-        for (final String csName : getRequiredCharsetNames()) {
-            testSkip(csName);
-        }
-    }
-
-    @Test
-    public void testSkip_USASCII() throws Exception {
-        testSkip("US-ASCII");
-    }
-
-    @Test
-    public void testSkip_UTF8() throws Exception {
-        testSkip("UTF-8");
-    }
-
-    private int checkAvail(InputStream is, int min) throws Exception {
-        int available = is.available();
-        assertTrue("avail should be >= " + min + ", but was " + available, available >= min);
-        return available;
-    }
-
-    private void testAvailableSkip(final String csName) throws Exception {
-        final String input = "test";
-        final InputStream r = new CharSequenceInputStream(input, csName);
-        try {
-            int available = checkAvail(r, input.length());
-            assertEquals(available - 1, r.skip(available-1)); // skip all but one
-            available = checkAvail(r, 1);
-            assertEquals(1, r.skip(1));
-            available = checkAvail(r, 0);
-        } finally {
-            r.close();
-        }
-    }
-
-    private void testAvailableRead(final String csName) throws Exception {
-        final String input = "test";
-        final InputStream r = new CharSequenceInputStream(input, csName);
-        try {
-            int available = checkAvail(r, input.length());
-            byte buff[] = new byte[available];
-            assertEquals(available - 1, r.skip(available-1)); // skip all but one
-            available = checkAvail(r, 1);
-            buff = new byte[available];
-            assertEquals(available, r.read(buff, 0, available));
-        } finally {
-            r.close();
-        }
-    }
-
-    @Test
-    public void testAvailable() throws Exception {
-        for (final String csName : Charset.availableCharsets().keySet()) {
-            // prevent java.lang.UnsupportedOperationException at sun.nio.cs.ext.ISO2022_CN.newEncoder.
-            // also try and avoid the following Effor on Continuum
-//            java.lang.UnsupportedOperationException: null
-//            at java.nio.CharBuffer.array(CharBuffer.java:940)
-//            at sun.nio.cs.ext.COMPOUND_TEXT_Encoder.encodeLoop(COMPOUND_TEXT_Encoder.java:75)
-//            at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:544)
-//            at org.apache.commons.io.input.CharSequenceInputStream.fillBuffer(CharSequenceInputStream.java:120)
-//            at org.apache.commons.io.input.CharSequenceInputStream.read(CharSequenceInputStream.java:151)
-//            at org.apache.commons.io.input.CharSequenceInputStreamTest.testAvailableRead(CharSequenceInputStreamTest.java:412)
-//            at org.apache.commons.io.input.CharSequenceInputStreamTest.testAvailable(CharSequenceInputStreamTest.java:424)
-
-            if (isAvailabilityTestableForCharset(csName)) {
-                testAvailableSkip(csName);
-                testAvailableRead(csName);
-            }
-        }
-    }
-
-    private boolean isAvailabilityTestableForCharset(final String csName) {
-        return Charset.forName(csName).canEncode() && ! "COMPOUND_TEXT".equalsIgnoreCase(csName) && ! "x-COMPOUND_TEXT".equalsIgnoreCase(csName);
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/CharSequenceReaderTest.java b/trunk/src/test/java/org/apache/commons/io/input/CharSequenceReaderTest.java
deleted file mode 100644
index afeadac..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/CharSequenceReaderTest.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.io.Reader;
-
-import org.junit.Test;
-
-/**
- * Test case for {@link CharSequenceReader}.
- *
- * @version $Id$
- */
-public class CharSequenceReaderTest {
-    private static final char NONE = (new char[1])[0];
-
-    @Test
-    public void testClose() throws IOException {
-        final Reader reader = new CharSequenceReader("FooBar");
-        checkRead(reader, "Foo");
-        reader.close();
-        checkRead(reader, "Foo");
-    }
-
-    @Test
-    public void testMarkSupported() throws Exception {
-        final Reader reader = new CharSequenceReader("FooBar");
-        assertTrue(reader.markSupported());
-        reader.close();
-    }
-
-    @Test
-    public void testMark() throws IOException {
-        final Reader reader = new CharSequenceReader("FooBar");
-        checkRead(reader, "Foo");
-        reader.mark(0);
-        checkRead(reader, "Bar");
-        reader.reset();
-        checkRead(reader, "Bar");
-        reader.close();
-        checkRead(reader, "Foo");
-        reader.reset();
-        checkRead(reader, "Foo");
-    }
-
-    @Test
-    public void testSkip() throws IOException {
-        final Reader reader = new CharSequenceReader("FooBar");
-        assertEquals(3, reader.skip(3));
-        checkRead(reader, "Bar");
-        assertEquals(-1, reader.skip(3));
-        reader.reset();
-        assertEquals(2, reader.skip(2));
-        assertEquals(4, reader.skip(10));
-        assertEquals(-1, reader.skip(1));
-        reader.close();
-        assertEquals(6, reader.skip(20));
-        assertEquals(-1, reader.read());
-    }
-
-    @Test
-    public void testRead() throws IOException {
-        final Reader reader = new CharSequenceReader("Foo");
-        assertEquals('F', reader.read());
-        assertEquals('o', reader.read());
-        assertEquals('o', reader.read());
-        assertEquals(-1, reader.read());
-        assertEquals(-1, reader.read());
-        reader.close();
-    }
-
-    @Test
-    public void testReadCharArray() throws IOException {
-        final Reader reader = new CharSequenceReader("FooBar");
-        char[] chars = new char[2];
-        assertEquals(2, reader.read(chars));
-        checkArray(new char[] {'F', 'o'}, chars);
-        chars = new char[3];
-        assertEquals(3, reader.read(chars));
-        checkArray(new char[] {'o', 'B', 'a'}, chars);
-        chars = new char[3];
-        assertEquals(1, reader.read(chars));
-        checkArray(new char[] {'r', NONE, NONE}, chars);
-        assertEquals(-1, reader.read(chars));
-        reader.close();
-    }
-
-    @Test
-    public void testReadCharArrayPortion() throws IOException {
-        final char[] chars = new char[10];
-        final Reader reader = new CharSequenceReader("FooBar");
-        assertEquals(3, reader.read(chars, 3, 3));
-        checkArray(new char[] {NONE, NONE, NONE, 'F', 'o', 'o'}, chars);
-        assertEquals(3, reader.read(chars, 0, 3));
-        checkArray(new char[] {'B', 'a', 'r', 'F', 'o', 'o', NONE}, chars);
-        assertEquals(-1, reader.read(chars));
-        reader.close();
-    }
-
-    private void checkRead(final Reader reader, final String expected) throws IOException {
-        for (int i = 0; i < expected.length(); i++) {
-            assertEquals("Read[" + i + "] of '" + expected + "'", 
-                    expected.charAt(i), (char)reader.read());
-        }
-    }
-
-    private void checkArray(final char[] expected, final char[] actual) {
-        for (int i = 0; i < expected.length; i++) {
-            assertEquals("Compare[" +i + "]", expected[i], actual[i]);
-        }
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java
deleted file mode 100644
index eda025a..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-
-import junit.framework.TestCase;
-
-/**
- * Tests the CountingInputStream.
- *
- * @version $Id$
- */
-public class ClassLoaderObjectInputStreamTest extends TestCase {
-
-    public ClassLoaderObjectInputStreamTest(final String name) {
-        super(name);
-    }
-
-    /* Note: This test case tests the simplest functionality of
-     * ObjectInputStream.  IF we really wanted to test ClassLoaderObjectInputStream
-     * we would probably need to create a transient Class Loader. -TO
-     */
-
-
-    public void testExpected() throws Exception {
-
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        final ObjectOutputStream oos = new ObjectOutputStream(baos);
-
-        final Object input = Boolean.FALSE;
-        oos.writeObject(input);
-
-        final InputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        final ClassLoaderObjectInputStream clois =
-                new ClassLoaderObjectInputStream(getClass().getClassLoader(), bais);
-        final Object result = clois.readObject();
-
-        assertEquals(input, result);
-        clois.close();
-    }
-
-    public void testLong() throws Exception {
-
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        final ObjectOutputStream oos = new ObjectOutputStream(baos);
-
-        final Object input = (long) 123;
-        oos.writeObject(input);
-
-        final InputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        final ClassLoaderObjectInputStream clois =
-                new ClassLoaderObjectInputStream(getClass().getClassLoader(), bais);
-        final Object result = clois.readObject();
-
-        assertEquals(input, result);
-        clois.close();
-    }
-
-    public void testPrimitiveLong() throws Exception {
-
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        final ObjectOutputStream oos = new ObjectOutputStream(baos);
-
-        final long input = 12345L;
-        oos.writeLong(input);
-        oos.close();
-
-        final InputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        final ClassLoaderObjectInputStream clois =
-                new ClassLoaderObjectInputStream(getClass().getClassLoader(), bais);
-        final long result = clois.readLong();
-
-        assertEquals(input, result);
-        clois.close();
-    }
-
-    private static enum E {A, B, C}
-
-    private static class Test implements Serializable {
-        private static final long serialVersionUID = 1L;
-        private int i;
-
-        private Object o;
-
-        private E e;
-
-        Test(int i, Object o) {
-            this.i = i;
-            this.e = E.A;
-            this.o = o;
-        }
-
-        @Override
-        public boolean equals(Object other) {
-            if (other instanceof Test) {
-                Test tother = (Test) other;
-                return (this.i == tother.i)
-                        & (this.e == tother.e)
-                        & equalObject(tother.o);
-            } else {
-                return false;
-            }
-        }
-
-        private boolean equalObject(Object other) {
-            if (this.o == null) {
-                return other == null;
-            }
-            return o.equals(other);
-        }
-
-        @Override
-        public int hashCode() {
-            return super.hashCode();
-        }
-    }
-
-    public void testObject1() throws Exception {
-
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        final ObjectOutputStream oos = new ObjectOutputStream(baos);
-
-        final Object input = new Test(123, null);
-        oos.writeObject(input);
-        oos.close();
-
-        final InputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        final ClassLoaderObjectInputStream clois =
-                new ClassLoaderObjectInputStream(getClass().getClassLoader(), bais);
-        final Object result = clois.readObject();
-
-        assertEquals(input, result);
-        clois.close();
-    }
-
-    public void testObject2() throws Exception {
-
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        final ObjectOutputStream oos = new ObjectOutputStream(baos);
-
-        final Object input = new Test(123, 0);
-        oos.writeObject(input);
-        oos.close();
-
-        final InputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        final ClassLoaderObjectInputStream clois =
-                new ClassLoaderObjectInputStream(getClass().getClassLoader(), bais);
-        final Object result = clois.readObject();
-
-        assertEquals(input, result);
-        clois.close();
-    }
-
-    public void testResolveProxyClass() throws Exception {
-
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        final ObjectOutputStream oos = new ObjectOutputStream(baos);
-        oos.writeObject(Boolean.FALSE);
-        final InputStream bais = new ByteArrayInputStream(baos.toByteArray());
-
-        final ClassLoaderObjectInputStream clois =
-                new ClassLoaderObjectInputStream(getClass().getClassLoader(), bais);
-        final String[] interfaces = new String[]{Comparable.class.getName()};
-        final Class<?> result = clois.resolveProxyClass(interfaces);
-        assertTrue("Assignable", Comparable.class.isAssignableFrom(result));
-        clois.close();
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/CloseShieldInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/CloseShieldInputStreamTest.java
deleted file mode 100644
index 872defd..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/CloseShieldInputStreamTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit Test Case for {@link CloseShieldInputStream}.
- */
-public class CloseShieldInputStreamTest extends TestCase {
-
-    private byte[] data;
-
-    private InputStream original;
-
-    private InputStream shielded;
-
-    private boolean closed;
-
-    @Override
-    protected void setUp() {
-        data = new byte[] { 'x', 'y', 'z' };
-        original = new ByteArrayInputStream(data) {
-            @Override
-            public void close() {
-                closed = true;
-            }
-        };
-        shielded = new CloseShieldInputStream(original);
-        closed = false;
-    }
-
-    public void testClose() throws IOException {
-        shielded.close();
-        assertFalse("closed", closed);
-        assertEquals("read()", -1, shielded.read());
-        assertEquals("read()", data[0], original.read());
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/ClosedInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/ClosedInputStreamTest.java
deleted file mode 100644
index 2084eec..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/ClosedInputStreamTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit Test Case for {@link ClosedInputStream}.
- */
-public class ClosedInputStreamTest extends TestCase {
-
-    public void testRead() throws Exception {
-        final ClosedInputStream cis = new ClosedInputStream();
-        assertEquals("read()", -1, cis.read());
-        cis.close();
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/CountingInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/CountingInputStreamTest.java
deleted file mode 100644
index 7f4efef..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/CountingInputStreamTest.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.output.NullOutputStream;
-
-/**
- * Tests the CountingInputStream.
- *
- * @version $Id$
- */
-public class CountingInputStreamTest extends TestCase {
-
-    public CountingInputStreamTest(final String name) {
-        super(name);
-    }
-
-    public void testCounting() throws Exception {
-        final String text = "A piece of text";
-        final byte[] bytes = text.getBytes();
-        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-        final CountingInputStream cis = new CountingInputStream(bais);
-
-        // have to declare this larger as we're going to read
-        // off the end of the stream and input stream seems
-        // to do bounds checking
-        final byte[] result = new byte[21];
-
-        final byte[] ba = new byte[5];
-        int found = cis.read(ba);
-        System.arraycopy(ba, 0, result, 0, 5);
-        assertEquals( found, cis.getCount() );
-
-        final int value = cis.read();
-        found++;
-        result[5] = (byte)value;
-        assertEquals( found, cis.getCount() );
-
-        found += cis.read(result, 6, 5);
-        assertEquals( found, cis.getCount() );
-
-        found += cis.read(result, 11, 10); // off the end
-        assertEquals( found, cis.getCount() );
-
-        // trim to get rid of the 6 empty values
-        final String textResult = new String(result).trim();
-        assertEquals(textResult, text);
-        cis.close();
-    }
-
-
-    /*
-     * Test for files > 2GB in size - see issue IO-84
-     */
-    public void testLargeFiles_IO84() throws Exception {
-        final long size = (long)Integer.MAX_VALUE + (long)1;
-        final NullInputStream mock    = new NullInputStream(size);
-        final CountingInputStream cis = new CountingInputStream(mock);
-        final OutputStream out        = new NullOutputStream();
-
-        // Test integer methods
-        IOUtils.copyLarge(cis, out);
-        try {
-            cis.getCount();
-            fail("Expected getCount() to throw an ArithmeticException");
-        } catch (final ArithmeticException ae) {
-            // expected result
-        }
-        try {
-            cis.resetCount();
-            fail("Expected resetCount() to throw an ArithmeticException");
-        } catch (final ArithmeticException ae) {
-            // expected result
-        }
-
-        mock.close();
-
-        // Test long methods
-        IOUtils.copyLarge(cis, out);
-        assertEquals("getByteCount()",   size, cis.getByteCount());
-        assertEquals("resetByteCount()", size, cis.resetByteCount());
-    }
-
-    public void testResetting() throws Exception {
-        final String text = "A piece of text";
-        final byte[] bytes = text.getBytes();
-        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-        final CountingInputStream cis = new CountingInputStream(bais);
-
-        final byte[] result = new byte[bytes.length];
-
-        int found = cis.read(result, 0, 5);
-        assertEquals( found, cis.getCount() );
-
-        final int count = cis.resetCount();
-        found = cis.read(result, 6, 5);
-        assertEquals( found, count );
-        cis.close();
-    }
-
-    public void testZeroLength1() throws Exception {
-        final ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]);
-        final CountingInputStream cis = new CountingInputStream(bais);
-
-        final int found = cis.read();
-        assertEquals(-1, found);
-        assertEquals(0, cis.getCount());
-        cis.close();
-    }
-
-    public void testZeroLength2() throws Exception {
-        final ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]);
-        final CountingInputStream cis = new CountingInputStream(bais);
-
-        final byte[] result = new byte[10];
-
-        final int found = cis.read(result);
-        assertEquals(-1, found);
-        assertEquals(0, cis.getCount());
-        cis.close();
-    }
-
-    public void testZeroLength3() throws Exception {
-        final ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]);
-        final CountingInputStream cis = new CountingInputStream(bais);
-
-        final byte[] result = new byte[10];
-
-        final int found = cis.read(result, 0, 5);
-        assertEquals(-1, found);
-        assertEquals(0, cis.getCount());
-        cis.close();
-    }
-
-    public void testEOF1() throws Exception {
-        final ByteArrayInputStream bais = new ByteArrayInputStream(new byte[2]);
-        final CountingInputStream cis = new CountingInputStream(bais);
-
-        int found = cis.read();
-        assertEquals(0, found);
-        assertEquals(1, cis.getCount());
-        found = cis.read();
-        assertEquals(0, found);
-        assertEquals(2, cis.getCount());
-        found = cis.read();
-        assertEquals(-1, found);
-        assertEquals(2, cis.getCount());
-        cis.close();
-    }
-
-    public void testEOF2() throws Exception {
-        final ByteArrayInputStream bais = new ByteArrayInputStream(new byte[2]);
-        final CountingInputStream cis = new CountingInputStream(bais);
-
-        final byte[] result = new byte[10];
-
-        final int found = cis.read(result);
-        assertEquals(2, found);
-        assertEquals(2, cis.getCount());
-        cis.close();
-    }
-
-    public void testEOF3() throws Exception {
-        final ByteArrayInputStream bais = new ByteArrayInputStream(new byte[2]);
-        final CountingInputStream cis = new CountingInputStream(bais);
-
-        final byte[] result = new byte[10];
-
-        final int found = cis.read(result, 0, 5);
-        assertEquals(2, found);
-        assertEquals(2, cis.getCount());
-        cis.close();
-    }
-
-    public void testSkipping() throws IOException {
-        final String text = "Hello World!";
-        final byte[] bytes = text.getBytes();
-        final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-        final CountingInputStream cis = new CountingInputStream(bais);
-
-        assertEquals(6,cis.skip(6));
-        assertEquals(6,cis.getCount());
-        final byte[] result = new byte[6];
-        cis.read(result);
-
-        assertEquals("World!",new String(result));
-        assertEquals(12,cis.getCount());
-        cis.close();
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/NullInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/NullInputStreamTest.java
deleted file mode 100644
index 2ea43d2..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/NullInputStreamTest.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit Test Case for {@link NullInputStream}.
- *
- * @version $Id$
- */
-public class NullInputStreamTest extends TestCase {
-
-    public NullInputStreamTest(final String name) {
-        super(name);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    public void testRead() throws Exception {
-        final int size = 5;
-        final InputStream input = new TestNullInputStream(size);
-        for (int i = 0; i < size; i++) {
-            assertEquals("Check Size [" + i + "]", size - i, input.available());
-            assertEquals("Check Value [" + i + "]", i, input.read());
-        }
-        assertEquals("Available after contents all read", 0, input.available());
-
-        // Check availbale is zero after End of file
-        assertEquals("End of File", -1, input.read());
-        assertEquals("Available after End of File", 0, input.available());
-
-        // Test reading after the end of file
-        try {
-            final int result = input.read();
-            fail("Should have thrown an IOException, byte=[" + result + "]");
-        } catch (final IOException e) {
-            assertEquals("Read after end of file", e.getMessage());
-        }
-
-        // Close - should reset
-        input.close();
-        assertEquals("Available after close", size, input.available());
-    }
-
-    public void testReadByteArray() throws Exception {
-        final byte[] bytes = new byte[10];
-        final InputStream input = new TestNullInputStream(15);
-
-        // Read into array
-        final int count1 = input.read(bytes);
-        assertEquals("Read 1", bytes.length, count1);
-        for (int i = 0; i < count1; i++) {
-            assertEquals("Check Bytes 1", i, bytes[i]);
-        }
-
-        // Read into array
-        final int count2 = input.read(bytes);
-        assertEquals("Read 2", 5, count2);
-        for (int i = 0; i < count2; i++) {
-            assertEquals("Check Bytes 2", count1 + i, bytes[i]);
-        }
-
-        // End of File
-        final int count3 = input.read(bytes);
-        assertEquals("Read 3 (EOF)", -1, count3);
-
-        // Test reading after the end of file
-        try {
-            final int count4 = input.read(bytes);
-            fail("Should have thrown an IOException, byte=[" + count4 + "]");
-        } catch (final IOException e) {
-            assertEquals("Read after end of file", e.getMessage());
-        }
-
-        // reset by closing
-        input.close();
-
-        // Read into array using offset & length
-        final int offset = 2;
-        final int lth    = 4;
-        final int count5 = input.read(bytes, offset, lth);
-        assertEquals("Read 5", lth, count5);
-        for (int i = offset; i < lth; i++) {
-            assertEquals("Check Bytes 2", i, bytes[i]);
-        }
-    }
-
-    public void testEOFException() throws Exception {
-        final InputStream input = new TestNullInputStream(2, false, true);
-        assertEquals("Read 1",  0, input.read());
-        assertEquals("Read 2",  1, input.read());
-        try {
-            final int result = input.read();
-            fail("Should have thrown an EOFException, byte=[" + result + "]");
-        } catch (final EOFException e) {
-            // expected
-        }
-        input.close();
-    }
-
-    public void testMarkAndReset() throws Exception {
-        int position = 0;
-        final int readlimit = 10;
-        final InputStream input = new TestNullInputStream(100, true, false);
-
-        assertTrue("Mark Should be Supported", input.markSupported());
-
-        // No Mark
-        try {
-            input.reset();
-            fail("Read limit exceeded, expected IOException ");
-        } catch (final IOException e) {
-            assertEquals("No Mark IOException message",
-                         "No position has been marked",
-                         e.getMessage());
-        }
-
-        for (; position < 3; position++) {
-            assertEquals("Read Before Mark [" + position +"]",  position, input.read());
-        }
-
-        // Mark
-        input.mark(readlimit);
-
-        // Read further
-        for (int i = 0; i < 3; i++) {
-            assertEquals("Read After Mark [" + i +"]",  position + i, input.read());
-        }
-
-        // Reset
-        input.reset();
-
-        // Read From marked position
-        for (int i = 0; i < readlimit + 1; i++) {
-            assertEquals("Read After Reset [" + i +"]",  position + i, input.read());
-        }
-
-        // Reset after read limit passed
-        try {
-            input.reset();
-            fail("Read limit exceeded, expected IOException ");
-        } catch (final IOException e) {
-            assertEquals("Read limit IOException message",
-                         "Marked position [" + position
-                         + "] is no longer valid - passed the read limit ["
-                         + readlimit + "]",
-                         e.getMessage());
-        }
-        input.close();
-    }
-
-    public void testMarkNotSupported() throws Exception {
-        final InputStream input = new TestNullInputStream(100, false, true);
-        assertFalse("Mark Should NOT be Supported", input.markSupported());
-
-        try {
-            input.mark(5);
-            fail("mark() should throw UnsupportedOperationException");
-        } catch (final UnsupportedOperationException e) {
-            assertEquals("mark() error message",  "Mark not supported", e.getMessage());
-        }
-
-        try {
-            input.reset();
-            fail("reset() should throw UnsupportedOperationException");
-        } catch (final UnsupportedOperationException e) {
-            assertEquals("reset() error message",  "Mark not supported", e.getMessage());
-        }
-        input.close();
-    }
-
-   public void testSkip() throws Exception {
-        final InputStream input = new TestNullInputStream(10, true, false);
-        assertEquals("Read 1", 0, input.read());
-        assertEquals("Read 2", 1, input.read());
-        assertEquals("Skip 1", 5, input.skip(5));
-        assertEquals("Read 3", 7, input.read());
-        assertEquals("Skip 2", 2, input.skip(5)); // only 2 left to skip
-        assertEquals("Skip 3 (EOF)", -1, input.skip(5)); // End of file
-        try {
-            input.skip(5); //
-            fail("Expected IOException for skipping after end of file");
-        } catch (final IOException e) {
-            assertEquals("Skip after EOF IOException message",
-                    "Skip after end of file",
-                    e.getMessage());
-        }
-        input.close();
-    }
-
-
-    // ------------- Test NullInputStream implementation -------------
-
-    private static final class TestNullInputStream extends NullInputStream {
-        public TestNullInputStream(final int size) {
-            super(size);
-        }
-        public TestNullInputStream(final int size, final boolean markSupported, final boolean throwEofException) {
-            super(size, markSupported, throwEofException);
-        }
-        @Override
-        protected int processByte() {
-            return (int)getPosition() - 1;
-        }
-        @Override
-        protected void processBytes(final byte[] bytes, final int offset, final int length) {
-            final int startPos = (int)getPosition() - length;
-            for (int i = offset; i < length; i++) {
-                bytes[i] = (byte)(startPos + i);
-            }
-        }
-
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/NullReaderTest.java b/trunk/src/test/java/org/apache/commons/io/input/NullReaderTest.java
deleted file mode 100644
index 4a740af..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/NullReaderTest.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.Reader;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit Test Case for {@link NullReader}.
- *
- * @version $Id$
- */
-public class NullReaderTest extends TestCase {
-
-    public NullReaderTest(final String name) {
-        super(name);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    public void testRead() throws Exception {
-        final int size = 5;
-        final TestNullReader reader = new TestNullReader(size);
-        for (int i = 0; i < size; i++) {
-            assertEquals("Check Value [" + i + "]", i, reader.read());
-        }
-
-        // Check End of File
-        assertEquals("End of File", -1, reader.read());
-
-        // Test reading after the end of file
-        try {
-            final int result = reader.read();
-            fail("Should have thrown an IOException, value=[" + result + "]");
-        } catch (final IOException e) {
-            assertEquals("Read after end of file", e.getMessage());
-        }
-
-        // Close - should reset
-        reader.close();
-        assertEquals("Available after close", 0, reader.getPosition());
-    }
-
-    public void testReadCharArray() throws Exception {
-        final char[] chars = new char[10];
-        final Reader reader = new TestNullReader(15);
-
-        // Read into array
-        final int count1 = reader.read(chars);
-        assertEquals("Read 1", chars.length, count1);
-        for (int i = 0; i < count1; i++) {
-            assertEquals("Check Chars 1", i, chars[i]);
-        }
-
-        // Read into array
-        final int count2 = reader.read(chars);
-        assertEquals("Read 2", 5, count2);
-        for (int i = 0; i < count2; i++) {
-            assertEquals("Check Chars 2", count1 + i, chars[i]);
-        }
-
-        // End of File
-        final int count3 = reader.read(chars);
-        assertEquals("Read 3 (EOF)", -1, count3);
-
-        // Test reading after the end of file
-        try {
-            final int count4 = reader.read(chars);
-            fail("Should have thrown an IOException, value=[" + count4 + "]");
-        } catch (final IOException e) {
-            assertEquals("Read after end of file", e.getMessage());
-        }
-
-        // reset by closing
-        reader.close();
-
-        // Read into array using offset & length
-        final int offset = 2;
-        final int lth    = 4;
-        final int count5 = reader.read(chars, offset, lth);
-        assertEquals("Read 5", lth, count5);
-        for (int i = offset; i < lth; i++) {
-            assertEquals("Check Chars 3", i, chars[i]);
-        }
-    }
-
-    public void testEOFException() throws Exception {
-        final Reader reader = new TestNullReader(2, false, true);
-        assertEquals("Read 1",  0, reader.read());
-        assertEquals("Read 2",  1, reader.read());
-        try {
-            final int result = reader.read();
-            fail("Should have thrown an EOFException, value=[" + result + "]");
-        } catch (final EOFException e) {
-            // expected
-        }
-        reader.close();
-    }
-
-    public void testMarkAndReset() throws Exception {
-        int position = 0;
-        final int readlimit = 10;
-        final Reader reader = new TestNullReader(100, true, false);
-
-        assertTrue("Mark Should be Supported", reader.markSupported());
-
-        // No Mark
-        try {
-            reader.reset();
-            fail("Read limit exceeded, expected IOException ");
-        } catch (final IOException e) {
-            assertEquals("No Mark IOException message",
-                         "No position has been marked",
-                         e.getMessage());
-        }
-
-        for (; position < 3; position++) {
-            assertEquals("Read Before Mark [" + position +"]",  position, reader.read());
-        }
-
-        // Mark
-        reader.mark(readlimit);
-
-        // Read further
-        for (int i = 0; i < 3; i++) {
-            assertEquals("Read After Mark [" + i +"]",  position + i, reader.read());
-        }
-
-        // Reset
-        reader.reset();
-
-        // Read From marked position
-        for (int i = 0; i < readlimit + 1; i++) {
-            assertEquals("Read After Reset [" + i +"]",  position + i, reader.read());
-        }
-
-        // Reset after read limit passed
-        try {
-            reader.reset();
-            fail("Read limit exceeded, expected IOException ");
-        } catch (final IOException e) {
-            assertEquals("Read limit IOException message",
-                         "Marked position [" + position
-                         + "] is no longer valid - passed the read limit ["
-                         + readlimit + "]",
-                         e.getMessage());
-        }
-        reader.close();
-    }
-
-    public void testMarkNotSupported() throws Exception {
-        final Reader reader = new TestNullReader(100, false, true);
-        assertFalse("Mark Should NOT be Supported", reader.markSupported());
-
-        try {
-            reader.mark(5);
-            fail("mark() should throw UnsupportedOperationException");
-        } catch (final UnsupportedOperationException e) {
-            assertEquals("mark() error message",  "Mark not supported", e.getMessage());
-        }
-
-        try {
-            reader.reset();
-            fail("reset() should throw UnsupportedOperationException");
-        } catch (final UnsupportedOperationException e) {
-            assertEquals("reset() error message",  "Mark not supported", e.getMessage());
-        }
-        reader.close();
-    }
-
-   public void testSkip() throws Exception {
-        final Reader reader = new TestNullReader(10, true, false);
-        assertEquals("Read 1", 0, reader.read());
-        assertEquals("Read 2", 1, reader.read());
-        assertEquals("Skip 1", 5, reader.skip(5));
-        assertEquals("Read 3", 7, reader.read());
-        assertEquals("Skip 2", 2, reader.skip(5)); // only 2 left to skip
-        assertEquals("Skip 3 (EOF)", -1, reader.skip(5)); // End of file
-        try {
-            reader.skip(5); //
-            fail("Expected IOException for skipping after end of file");
-        } catch (final IOException e) {
-            assertEquals("Skip after EOF IOException message",
-                    "Skip after end of file",
-                    e.getMessage());
-        }
-        reader.close();
-    }
-
-
-    // ------------- Test NullReader implementation -------------
-
-    private static final class TestNullReader extends NullReader {
-        public TestNullReader(final int size) {
-            super(size);
-        }
-        public TestNullReader(final int size, final boolean markSupported, final boolean throwEofException) {
-            super(size, markSupported, throwEofException);
-        }
-        @Override
-        protected int processChar() {
-            return (int)getPosition() - 1;
-        }
-        @Override
-        protected void processChars(final char[] chars, final int offset, final int length) {
-            final int startPos = (int)getPosition() - length;
-            for (int i = offset; i < length; i++) {
-                chars[i] = (char)(startPos + i);
-            }
-        }
-
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/ProxyReaderTest.java b/trunk/src/test/java/org/apache/commons/io/input/ProxyReaderTest.java
deleted file mode 100644
index a89fa27..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/ProxyReaderTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.nio.CharBuffer;
-
-import junit.framework.TestCase;
-
-/**
- * Test {@link ProxyReader}. 
- *
- * @version $Id$
- */
-public class ProxyReaderTest extends TestCase {
-
-    public ProxyReaderTest(final String name) {
-        super(name);
-    }
-
-    public void testNullCharArray() throws Exception {
-
-        final ProxyReader proxy = new ProxyReaderImpl(new CustomNullReader(0));
-
-        try {
-            proxy.read((char[])null);
-        } catch(final Exception e) {
-            fail("Writing null String threw " + e);
-        }
-
-        try {
-            proxy.read(null, 0, 0);
-        } catch(final Exception e) {
-            fail("Writing null String threw " + e);
-        }
-        proxy.close();
-    }
-
-    public void testNullCharBuffer() throws Exception {
-
-        final ProxyReader proxy = new ProxyReaderImpl(new CustomNullReader(0));
-
-        try {
-            proxy.read((CharBuffer)null);
-        } catch(final Exception e) {
-            fail("Writing null String threw " + e);
-        }
-        proxy.close();
-    }
-
-    /** ProxyReader implementation */
-    private static class ProxyReaderImpl extends ProxyReader {
-        ProxyReaderImpl(final Reader proxy) {
-            super(proxy);
-        }
-    }
-
-    /** Custom NullReader implementation */
-    private static class CustomNullReader extends NullReader {
-        CustomNullReader(final int len) {
-            super(len);
-        }
-        @Override
-        public int read(final char[] chars) throws IOException {
-            return chars == null ? 0 : super.read(chars);
-        }
-        @Override
-        public int read(final CharBuffer target) throws IOException {
-            return target == null ? 0 : super.read(target);
-        }
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java
deleted file mode 100644
index efe3bb4..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.CharArrayReader;
-import java.io.IOException;
-import java.io.StringReader;
-import java.nio.charset.Charset;
-import java.util.Random;
-
-import org.junit.Test;
-
-public class ReaderInputStreamTest {
-    private static final String TEST_STRING = "\u00e0 peine arriv\u00e9s nous entr\u00e2mes dans sa chambre";
-    private static final String LARGE_TEST_STRING;
-
-    static {
-        final StringBuilder buffer = new StringBuilder();
-        for (int i=0; i<100; i++) {
-            buffer.append(TEST_STRING);
-        }
-        LARGE_TEST_STRING = buffer.toString();
-    }
-
-    private final Random random = new Random();
-
-    private void testWithSingleByteRead(final String testString, final String charsetName) throws IOException {
-        final byte[] bytes = testString.getBytes(charsetName);
-        final ReaderInputStream in = new ReaderInputStream(new StringReader(testString), charsetName);
-        for (final byte b : bytes) {
-            final int read = in.read();
-            assertTrue(read >= 0);
-            assertTrue(read <= 255);
-            assertEquals(b, (byte)read);
-        }
-        assertEquals(-1, in.read());
-        in.close();
-    }
-
-    private void testWithBufferedRead(final String testString, final String charsetName) throws IOException {
-        final byte[] expected = testString.getBytes(charsetName);
-        final ReaderInputStream in = new ReaderInputStream(new StringReader(testString), charsetName);
-        final byte[] buffer = new byte[128];
-        int offset = 0;
-        while (true) {
-            int bufferOffset = random.nextInt(64);
-            final int bufferLength = random.nextInt(64);
-            int read = in.read(buffer, bufferOffset, bufferLength);
-            if (read == -1) {
-                assertEquals(offset, expected.length);
-                break;
-            } else {
-                assertTrue(read <= bufferLength);
-                while (read > 0) {
-                    assertTrue(offset < expected.length);
-                    assertEquals(expected[offset], buffer[bufferOffset]);
-                    offset++;
-                    bufferOffset++;
-                    read--;
-                }
-            }
-        }
-        in.close();
-    }
-
-    @Test
-    public void testUTF8WithSingleByteRead() throws IOException {
-        testWithSingleByteRead(TEST_STRING, "UTF-8");
-    }
-
-    @Test
-    public void testLargeUTF8WithSingleByteRead() throws IOException {
-        testWithSingleByteRead(LARGE_TEST_STRING, "UTF-8");
-    }
-
-    @Test
-    public void testUTF8WithBufferedRead() throws IOException {
-        testWithBufferedRead(TEST_STRING, "UTF-8");
-    }
-
-    @Test
-    public void testLargeUTF8WithBufferedRead() throws IOException {
-        testWithBufferedRead(LARGE_TEST_STRING, "UTF-8");
-    }
-
-    @Test
-    public void testUTF16WithSingleByteRead() throws IOException {
-        testWithSingleByteRead(TEST_STRING, "UTF-16");
-    }
-
-    @SuppressWarnings("deprecation")
-    @Test
-    public void testReadZero() throws Exception {
-        final String inStr = "test";
-        final ReaderInputStream r = new ReaderInputStream(new StringReader(inStr));
-        final byte[] bytes = new byte[30];
-        assertEquals(0, r.read(bytes, 0, 0));
-        assertEquals(inStr.length(), r.read(bytes, 0, inStr.length()+1));
-        // Should always return 0 for length == 0
-        assertEquals(0, r.read(bytes, 0, 0));
-        r.close();
-    }
-
-    @SuppressWarnings("deprecation")
-    @Test
-    public void testReadZeroEmptyString() throws Exception {
-        final ReaderInputStream r = new ReaderInputStream(new StringReader(""));
-        final byte[] bytes = new byte[30];
-        // Should always return 0 for length == 0
-        assertEquals(0, r.read(bytes, 0, 0));
-        assertEquals(-1, r.read(bytes, 0, 1));
-        assertEquals(0, r.read(bytes, 0, 0));
-        assertEquals(-1, r.read(bytes, 0, 1));
-        r.close();
-    }
-
-    /*
-     * Tests https://issues.apache.org/jira/browse/IO-277
-     */
-    @Test
-    public void testCharsetMismatchInfiniteLoop() throws IOException {
-        // Input is UTF-8 bytes: 0xE0 0xB2 0xA0
-        final char[] inputChars = new char[] { (char) 0xE0, (char) 0xB2, (char) 0xA0 };
-        // Charset charset = Charset.forName("UTF-8"); // works
-        final Charset charset = Charset.forName("ASCII"); // infinite loop
-        final ReaderInputStream stream = new ReaderInputStream(new CharArrayReader(inputChars), charset);
-        try {
-            while (stream.read() != -1) {
-            }
-        } finally {
-            stream.close();
-        }
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamBlockSize.java b/trunk/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamBlockSize.java
deleted file mode 100644
index 93d6fc4..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamBlockSize.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URISyntaxException;
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.junit.After;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-@RunWith(Parameterized.class)
-public class ReversedLinesFileReaderTestParamBlockSize {
-
-    private static final String UTF_8 = "UTF-8";
-    private static final String ISO_8859_1 = "ISO-8859-1";
-
-    @SuppressWarnings("boxing")
-    // small and uneven block sizes are not used in reality but are good to show that the algorithm is solid
-    @Parameters(name = "BlockSize={0}")
-    public static Collection<Integer[]> blockSizes() {
-        return Arrays.asList(new Integer[][]{{1}, {3}, {8}, {256}, {4096}});
-    }
-
-    private ReversedLinesFileReader reversedLinesFileReader;
-    private final int testParamBlockSize;
-
-    public ReversedLinesFileReaderTestParamBlockSize(final Integer testWithBlockSize) {
-        testParamBlockSize = testWithBlockSize;
-    }
-
-    // Strings are escaped in constants to avoid java source encoding issues (source file enc is UTF-8):
-
-    // "A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±²®"
-    private static final String TEST_LINE = "A Test Line. Special chars: \u00C4\u00E4\u00DC\u00FC\u00D6\u00F6\u00DF \u00C3\u00E1\u00E9\u00ED\u00EF\u00E7\u00F1\u00C2 \u00A9\u00B5\u00A5\u00A3\u00B1\u00B2\u00AE";
-    // Hiragana letters: �����
-    private static final String TEST_LINE_SHIFT_JIS1 = "Hiragana letters: \u3041\u3042\u3043\u3044\u3045";
-    // Kanji letters: 明輸�京
-    private static final String TEST_LINE_SHIFT_JIS2 = "Kanji letters: \u660E\u8F38\u5B50\u4EAC";
-    // windows-31j characters
-    private static final String TEST_LINE_WINDOWS_31J_1 = "\u3041\u3042\u3043\u3044\u3045";
-    private static final String TEST_LINE_WINDOWS_31J_2 = "\u660E\u8F38\u5B50\u4EAC";
-    // gbk characters (Simplified Chinese)
-    private static final String TEST_LINE_GBK_1 = "\u660E\u8F38\u5B50\u4EAC";
-    private static final String TEST_LINE_GBK_2 = "\u7B80\u4F53\u4E2D\u6587";
-    // x-windows-949 characters (Korean)
-    private static final String TEST_LINE_X_WINDOWS_949_1 = "\uD55C\uAD6D\uC5B4";
-    private static final String TEST_LINE_X_WINDOWS_949_2 = "\uB300\uD55C\uBBFC\uAD6D";
-    // x-windows-950 characters (Traditional Chinese)
-    private static final String TEST_LINE_X_WINDOWS_950_1 = "\u660E\u8F38\u5B50\u4EAC";
-    private static final String TEST_LINE_X_WINDOWS_950_2 = "\u7E41\u9AD4\u4E2D\u6587";
-
-
-    @After
-    public void closeReader() {
-        try {
-            reversedLinesFileReader.close();
-        } catch (final Exception e) {
-            // ignore
-        }
-    }
-
-    @Test
-    public void testIsoFileDefaults() throws URISyntaxException, IOException {
-        final File testFileIso = new File(this.getClass().getResource("/test-file-iso8859-1.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileIso, testParamBlockSize, ISO_8859_1);
-        assertFileWithShrinkingTestLines(reversedLinesFileReader);
-    }
-
-    @Test
-    public void testUTF8FileWindowsBreaks() throws URISyntaxException, IOException {
-        final File testFileIso = new File(this.getClass().getResource("/test-file-utf8-win-linebr.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileIso, testParamBlockSize, UTF_8);
-        assertFileWithShrinkingTestLines(reversedLinesFileReader);
-    }
-
-    @Test
-    public void testUTF8FileCRBreaks() throws URISyntaxException, IOException {
-        final File testFileIso = new File(this.getClass().getResource("/test-file-utf8-cr-only.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileIso, testParamBlockSize, UTF_8);
-        assertFileWithShrinkingTestLines(reversedLinesFileReader);
-    }
-
-    @Test
-    public void testUTF8File() throws URISyntaxException, IOException {
-        final File testFileIso = new File(this.getClass().getResource("/test-file-utf8.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileIso, testParamBlockSize, UTF_8);
-        assertFileWithShrinkingTestLines(reversedLinesFileReader);
-    }
-
-    @Test
-    public void testEmptyFile() throws URISyntaxException, IOException {
-        final File testFileEmpty = new File(this.getClass().getResource("/test-file-empty.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileEmpty, testParamBlockSize, UTF_8);
-        assertNull(reversedLinesFileReader.readLine());
-    }
-
-    @Test
-    public void testUTF16BEFile() throws URISyntaxException, IOException {
-        final File testFileUTF16BE = new File(this.getClass().getResource("/test-file-utf16be.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileUTF16BE, testParamBlockSize, "UTF-16BE");
-        assertFileWithShrinkingTestLines(reversedLinesFileReader);
-    }
-
-    @Test
-    public void testUTF16LEFile() throws URISyntaxException, IOException {
-        final File testFileUTF16LE = new File(this.getClass().getResource("/test-file-utf16le.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileUTF16LE, testParamBlockSize, "UTF-16LE");
-        assertFileWithShrinkingTestLines(reversedLinesFileReader);
-    }
-
-    @Test
-    public void testShiftJISFile() throws URISyntaxException, IOException {
-        final File testFileShiftJIS = new File(this.getClass().getResource("/test-file-shiftjis.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileShiftJIS, testParamBlockSize, "Shift_JIS");
-        assertEqualsAndNoLineBreaks(TEST_LINE_SHIFT_JIS2, reversedLinesFileReader.readLine());
-        assertEqualsAndNoLineBreaks(TEST_LINE_SHIFT_JIS1, reversedLinesFileReader.readLine());
-    }
-
-    @Test
-    public void testWindows31jFile() throws URISyntaxException, IOException {
-        final File testFileWindows31J = new File(this.getClass().getResource("/test-file-windows-31j.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileWindows31J, testParamBlockSize, "windows-31j");
-        assertEqualsAndNoLineBreaks(TEST_LINE_WINDOWS_31J_2, reversedLinesFileReader.readLine());
-        assertEqualsAndNoLineBreaks(TEST_LINE_WINDOWS_31J_1, reversedLinesFileReader.readLine());
-    }
-
-    @Test
-    public void testGBK() throws URISyntaxException, IOException {
-        final File testFileGBK = new File(this.getClass().getResource("/test-file-gbk.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileGBK, testParamBlockSize, "GBK");
-        assertEqualsAndNoLineBreaks(TEST_LINE_GBK_2, reversedLinesFileReader.readLine());
-        assertEqualsAndNoLineBreaks(TEST_LINE_GBK_1, reversedLinesFileReader.readLine());
-    }
-
-    @Test
-    public void testxWindows949File() throws URISyntaxException, IOException {
-        final File testFilexWindows949 = new File(this.getClass().getResource("/test-file-x-windows-949.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFilexWindows949, testParamBlockSize, "x-windows-949");
-        assertEqualsAndNoLineBreaks(TEST_LINE_X_WINDOWS_949_2, reversedLinesFileReader.readLine());
-        assertEqualsAndNoLineBreaks(TEST_LINE_X_WINDOWS_949_1, reversedLinesFileReader.readLine());
-    }
-
-    @Test
-    public void testxWindows950File() throws URISyntaxException, IOException {
-        final File testFilexWindows950 = new File(this.getClass().getResource("/test-file-x-windows-950.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFilexWindows950, testParamBlockSize, "x-windows-950");
-        assertEqualsAndNoLineBreaks(TEST_LINE_X_WINDOWS_950_2, reversedLinesFileReader.readLine());
-        assertEqualsAndNoLineBreaks(TEST_LINE_X_WINDOWS_950_1, reversedLinesFileReader.readLine());
-    }
-
-    @Test // this test is run 3x for same block size as we want to test with 10
-    public void testFileSizeIsExactMultipleOfBlockSize() throws URISyntaxException, IOException {
-        final int blockSize = 10;
-        final File testFile20Bytes = new File(this.getClass().getResource("/test-file-20byteslength.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFile20Bytes, blockSize, ISO_8859_1);
-        final String testLine = "123456789";
-        assertEqualsAndNoLineBreaks(testLine, reversedLinesFileReader.readLine());
-        assertEqualsAndNoLineBreaks(testLine, reversedLinesFileReader.readLine());
-    }
-
-    @Test
-    public void testUTF8FileWindowsBreaksSmallBlockSize2VerifyBlockSpanningNewLines() throws URISyntaxException, IOException {
-        final File testFileUtf8 = new File(this.getClass().getResource("/test-file-utf8-win-linebr.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileUtf8, testParamBlockSize, UTF_8);
-        assertFileWithShrinkingTestLines(reversedLinesFileReader);
-    }
-
-    @Test
-    public void testIsoFileManyWindowsBreaksSmallBlockSize2VerifyBlockSpanningNewLines() throws URISyntaxException, IOException {
-        final File testFileIso = new File(this.getClass().getResource("/test-file-iso8859-1-shortlines-win-linebr.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileIso, testParamBlockSize, ISO_8859_1);
-
-        for (int i = 3; i > 0; i--) {
-            for (int j = 1; j <= 3; j++) {
-                assertEqualsAndNoLineBreaks("", reversedLinesFileReader.readLine());
-            }
-            assertEqualsAndNoLineBreaks("" + i, reversedLinesFileReader.readLine());
-        }
-    }
-
-    @Test(expected = UnsupportedEncodingException.class)
-    public void testUnsupportedEncodingUTF16() throws URISyntaxException, IOException {
-        final File testFileEmpty = new File(this.getClass().getResource("/test-file-empty.bin").toURI());
-        new ReversedLinesFileReader(testFileEmpty, testParamBlockSize, "UTF-16").close();
-    }
-
-    @Test(expected = UnsupportedEncodingException.class)
-    public void testUnsupportedEncodingBig5() throws URISyntaxException, IOException {
-        final File testFileEncodingBig5 = new File(this.getClass().getResource("/test-file-empty.bin").toURI());
-        new ReversedLinesFileReader(testFileEncodingBig5, testParamBlockSize, "Big5").close();
-    }
-
-    private void assertFileWithShrinkingTestLines(final ReversedLinesFileReader reversedLinesFileReader) throws IOException {
-        String line = null;
-        int lineCount = 0;
-        while ((line = reversedLinesFileReader.readLine()) != null) {
-            lineCount++;
-            assertEqualsAndNoLineBreaks("Line " + lineCount + " is not matching", TEST_LINE.substring(0, lineCount), line);
-        }
-    }
-
-    static void assertEqualsAndNoLineBreaks(final String msg, final String expected, final String actual) {
-        if (actual != null) {
-            assertFalse("Line contains \\n: line=" + actual, actual.contains("\n"));
-            assertFalse("Line contains \\r: line=" + actual, actual.contains("\r"));
-        }
-        assertEquals(msg, expected, actual);
-    }
-
-    static void assertEqualsAndNoLineBreaks(final String expected, final String actual) {
-        assertEqualsAndNoLineBreaks(null, expected, actual);
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamFile.java b/trunk/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamFile.java
deleted file mode 100644
index 6950c47..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamFile.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URISyntaxException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Stack;
-
-import org.junit.After;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-/**
- * Test checks symmetric behaviour with  BufferedReader
- */
-@RunWith(Parameterized.class)
-public class ReversedLinesFileReaderTestParamFile {
-
-    @Parameters(name = "{0}, charset={1}")
-    public static Collection<Object[]> blockSizes() {
-        return Arrays.asList(new Object[][]{
-                {"test-file-20byteslength.bin", "ISO_8859_1", null},
-                {"test-file-iso8859-1-shortlines-win-linebr.bin", "ISO_8859_1", null},
-                {"test-file-iso8859-1.bin", "ISO_8859_1", null},
-                {"test-file-shiftjis.bin", "Shift_JIS", null},
-                {"test-file-utf16be.bin", "UTF-16BE", null},
-                {"test-file-utf16le.bin", "UTF-16LE", null},
-                {"test-file-utf8-cr-only.bin", "UTF-8", null},
-                {"test-file-utf8-win-linebr.bin", "UTF-8", null},
-                {"test-file-utf8-win-linebr.bin", "UTF-8", 1},
-                {"test-file-utf8-win-linebr.bin", "UTF-8", 2},
-                {"test-file-utf8-win-linebr.bin", "UTF-8", 3},
-                {"test-file-utf8-win-linebr.bin", "UTF-8", 4},
-                {"test-file-utf8.bin", "UTF-8", null},
-                {"test-file-windows-31j.bin", "windows-31j", null},
-                {"test-file-gbk.bin", "gbk", null},
-                {"test-file-x-windows-949.bin", "x-windows-949", null},
-                {"test-file-x-windows-950.bin", "x-windows-950", null},
-        });
-    }
-
-    private ReversedLinesFileReader reversedLinesFileReader;
-    private BufferedReader bufferedReader;
-
-    private final String fileName;
-    private final String encoding;
-    private final int buffSize;
-
-    public ReversedLinesFileReaderTestParamFile(final String fileName, final String encoding, final Integer buffsize) {
-        this.fileName = fileName;
-        this.encoding = encoding;
-        this.buffSize = buffsize == null ? 4096 : buffsize;
-    }
-
-    @Test
-    public void testDataIntegrityWithBufferedReader() throws URISyntaxException, IOException {
-        final File testFileIso = new File(this.getClass().getResource("/" + fileName).toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFileIso, buffSize, encoding);
-
-        final Stack<String> lineStack = new Stack<String>();
-
-        bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(testFileIso), encoding));
-        String line = null;
-
-        // read all lines in normal order
-        while ((line = bufferedReader.readLine()) != null) {
-            lineStack.push(line);
-        }
-
-        // read in reverse order and compare with lines from stack
-        while ((line = reversedLinesFileReader.readLine()) != null) {
-            final String lineFromBufferedReader = lineStack.pop();
-            assertEquals(lineFromBufferedReader, line);
-        }
-
-    }
-
-    @After
-    public void closeReader() {
-        try {
-            bufferedReader.close();
-        } catch (final Exception e) {
-            // ignore
-        }
-        try {
-            reversedLinesFileReader.close();
-        } catch (final Exception e) {
-            // ignore
-        }
-    }
-
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestSimple.java b/trunk/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestSimple.java
deleted file mode 100644
index 1ee222c..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestSimple.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.apache.commons.io.input.ReversedLinesFileReaderTestParamBlockSize.assertEqualsAndNoLineBreaks;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URISyntaxException;
-
-import org.junit.After;
-import org.junit.Test;
-
-
-public class ReversedLinesFileReaderTestSimple {
-
-    private ReversedLinesFileReader reversedLinesFileReader;
-
-    @After
-    public void closeReader() {
-        try {
-            reversedLinesFileReader.close();
-        } catch(final Exception e) {
-            // ignore
-        }
-    }
-
-    @Test
-    public void testFileSizeIsExactMultipleOfBlockSize() throws URISyntaxException, IOException {
-        final int blockSize = 10;
-        final File testFile20Bytes = new File(this.getClass().getResource("/test-file-20byteslength.bin").toURI());
-        reversedLinesFileReader = new ReversedLinesFileReader(testFile20Bytes, blockSize, "ISO-8859-1");
-        final String testLine = "123456789";
-        assertEqualsAndNoLineBreaks(testLine, reversedLinesFileReader.readLine());
-        assertEqualsAndNoLineBreaks(testLine, reversedLinesFileReader.readLine());
-    }
-
-    @Test(expected=UnsupportedEncodingException.class)
-    public void testUnsupportedEncodingUTF16() throws URISyntaxException, IOException {
-        final File testFileEmpty = new File(this.getClass().getResource("/test-file-empty.bin").toURI());
-        new ReversedLinesFileReader(testFileEmpty, 4096, "UTF-16").close();
-    }
-
-    @Test(expected=UnsupportedEncodingException.class)
-    public void testUnsupportedEncodingBig5() throws URISyntaxException, IOException {
-        final File testFileEncodingBig5 = new File(this.getClass().getResource("/test-file-empty.bin").toURI());
-        new ReversedLinesFileReader(testFileEncodingBig5, 4096, "Big5").close();
-    }
-
-
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/SwappedDataInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/SwappedDataInputStreamTest.java
deleted file mode 100644
index 5816dac..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/SwappedDataInputStreamTest.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-
-/**
- * Test for the SwappedDataInputStream. This also 
- * effectively tests the underlying EndianUtils Stream methods.
- *
- * @version $Id$
- */
-
-public class SwappedDataInputStreamTest extends TestCase {
-
-    private SwappedDataInputStream sdis;
-    private byte[] bytes;
-
-    public SwappedDataInputStreamTest(final String name) {
-        super(name);
-    }
-
-    @Override
-    public void setUp() {
-        bytes = new byte[] {
-            0x01,
-            0x02,
-            0x03,
-            0x04,
-            0x05,
-            0x06,
-            0x07,
-            0x08
-        };
-        final ByteArrayInputStream bais = new ByteArrayInputStream( bytes );
-        this.sdis = new SwappedDataInputStream( bais );
-    }
-
-    @Override
-    public void tearDown() {
-        this.sdis = null;
-    }
-
-    public void testReadBoolean() throws IOException {
-        bytes = new byte[] {
-            0x00,
-            0x01,
-            0x02,
-        };
-        final ByteArrayInputStream bais = new ByteArrayInputStream( bytes );
-        final SwappedDataInputStream sdis = new SwappedDataInputStream( bais );
-        assertEquals( false, sdis.readBoolean() );
-        assertEquals( true, sdis.readBoolean() );
-        assertEquals( true, sdis.readBoolean() );
-        sdis.close();
-    }
-
-    public void testReadByte() throws IOException {
-        assertEquals( 0x01, this.sdis.readByte() );
-    }
-
-    public void testReadChar() throws IOException {
-        assertEquals( (char) 0x0201, this.sdis.readChar() );
-    }
-
-    public void testReadDouble() throws IOException {
-        assertEquals( Double.longBitsToDouble(0x0807060504030201L), this.sdis.readDouble(), 0 );
-    }
-
-    public void testReadFloat() throws IOException {
-        assertEquals( Float.intBitsToFloat(0x04030201), this.sdis.readFloat(), 0 );
-    }
-
-    public void testReadFully() throws IOException {
-        final byte[] bytesIn = new byte[8];
-        this.sdis.readFully(bytesIn);
-        for( int i=0; i<8; i++) {
-            assertEquals( bytes[i], bytesIn[i] );
-        }
-    }
-
-    public void testReadInt() throws IOException {
-        assertEquals( 0x04030201, this.sdis.readInt() );
-    }
-
-    public void testReadLine() throws IOException {
-        try {
-            this.sdis.readLine();
-            fail("readLine should be unsupported. ");
-        } catch(final UnsupportedOperationException uoe) {
-        }
-    }
-
-    public void testReadLong() throws IOException {
-        assertEquals( 0x0807060504030201L, this.sdis.readLong() );
-    }
-
-    public void testReadShort() throws IOException {
-        assertEquals( (short) 0x0201, this.sdis.readShort() );
-    }
-
-    public void testReadUnsignedByte() throws IOException {
-        assertEquals( 0x01, this.sdis.readUnsignedByte() );
-    }
-
-    public void testReadUnsignedShort() throws IOException {
-        assertEquals( (short) 0x0201, this.sdis.readUnsignedShort() );
-    }
-
-    public void testReadUTF() throws IOException {
-        try {
-            this.sdis.readUTF();
-            fail("readUTF should be unsupported. ");
-        } catch(final UnsupportedOperationException uoe) {
-        }
-    }
-
-    public void testSkipBytes() throws IOException {
-        this.sdis.skipBytes(4);
-        assertEquals( 0x08070605, this.sdis.readInt() );
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/TaggedInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/TaggedInputStreamTest.java
deleted file mode 100644
index 9c7539d..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/TaggedInputStreamTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.UUID;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.io.TaggedIOException;
-
-/**
- * JUnit Test Case for {@link TaggedInputStream}.
- */
-public class TaggedInputStreamTest extends TestCase {
-
-    public void testEmptyStream() {
-        try {
-            final InputStream stream = new TaggedInputStream(new ClosedInputStream());
-            assertEquals(0, stream.available());
-            assertEquals(-1, stream.read());
-            assertEquals(-1, stream.read(new byte[1]));
-            assertEquals(-1, stream.read(new byte[1], 0, 1));
-            stream.close();
-        } catch (final IOException e) {
-            fail("Unexpected exception thrown");
-        }
-    }
-
-    public void testNormalStream() {
-        try {
-            final InputStream stream = new TaggedInputStream(
-                    new ByteArrayInputStream(new byte[] { 'a', 'b', 'c' }));
-            assertEquals(3, stream.available());
-            assertEquals('a', stream.read());
-            final byte[] buffer = new byte[1];
-            assertEquals(1, stream.read(buffer));
-            assertEquals('b', buffer[0]);
-            assertEquals(1, stream.read(buffer, 0, 1));
-            assertEquals('c', buffer[0]);
-            assertEquals(-1, stream.read());
-            stream.close();
-        } catch (final IOException e) {
-            fail("Unexpected exception thrown");
-        }
-    }
-
-    public void testBrokenStream() {
-        final IOException exception = new IOException("test exception");
-        final TaggedInputStream stream =
-            new TaggedInputStream(new BrokenInputStream(exception));
-
-        // Test the available() method
-        try {
-            stream.available();
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertTrue(stream.isCauseOf(e));
-            try {
-                stream.throwIfCauseOf(e);
-                fail("Expected exception not thrown.");
-            } catch (final IOException e2) {
-                assertEquals(exception, e2);
-            }
-        }
-
-        // Test the read() method
-        try {
-            stream.read();
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertTrue(stream.isCauseOf(e));
-            try {
-                stream.throwIfCauseOf(e);
-                fail("Expected exception not thrown.");
-            } catch (final IOException e2) {
-                assertEquals(exception, e2);
-            }
-        }
-
-        // Test the close() method
-        try {
-            stream.close();
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertTrue(stream.isCauseOf(e));
-            try {
-                stream.throwIfCauseOf(e);
-                fail("Expected exception not thrown.");
-            } catch (final IOException e2) {
-                assertEquals(exception, e2);
-            }
-        }
-    }
-
-    public void testOtherException() throws Exception {
-        final IOException exception = new IOException("test exception");
-        final InputStream closed = new ClosedInputStream();
-        final TaggedInputStream stream = new TaggedInputStream(closed);
-
-        assertFalse(stream.isCauseOf(exception));
-        assertFalse(stream.isCauseOf(
-                new TaggedIOException(exception, UUID.randomUUID())));
-
-        try {
-            stream.throwIfCauseOf(exception);
-        } catch (final IOException e) {
-            fail("Unexpected exception thrown");
-        }
-
-        try {
-            stream.throwIfCauseOf(
-                    new TaggedIOException(exception, UUID.randomUUID()));
-        } catch (final IOException e) {
-            fail("Unexpected exception thrown");
-        }
-        stream.close();
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java b/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java
deleted file mode 100644
index 7699565..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.RandomAccessFile;
-import java.io.Writer;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-
-import org.apache.commons.io.Charsets;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * Tests for {@link Tailer}.
- *
- * @version $Id$
- */
-public class TailerTest extends FileBasedTestCase {
-
-    private Tailer tailer;
-
-    public TailerTest(final String name) {
-        super(name);
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        if (tailer != null) {
-            tailer.stop();
-            Thread.sleep(1000);
-        }
-        FileUtils.deleteDirectory(getTestDirectory());
-        Thread.sleep(1000);
-    }
-
-    public void testLongFile() throws Exception {
-        final long delay = 50;
-
-        final File file = new File(getTestDirectory(), "testLongFile.txt");
-        createFile(file, 0);
-        final Writer writer = new FileWriter(file, true);
-        for (int i = 0; i < 100000; i++) {
-            writer.write("LineLineLineLineLineLineLineLineLineLine\n");
-        }
-        writer.write("SBTOURIST\n");
-        IOUtils.closeQuietly(writer);
-
-        final TestTailerListener listener = new TestTailerListener();
-        tailer = new Tailer(file, listener, delay, false);
-
-        final long start = System.currentTimeMillis();
-
-        final Thread thread = new Thread(tailer);
-        thread.start();
-
-        List<String> lines = listener.getLines();
-        while (lines.isEmpty() || !lines.get(lines.size() - 1).equals("SBTOURIST")) {
-            lines = listener.getLines();
-        }
-        System.out.println("Elapsed: " + (System.currentTimeMillis() - start));
-
-        listener.clear();
-    }
-
-    public void testBufferBreak() throws Exception {
-        final long delay = 50;
-
-        final File file = new File(getTestDirectory(), "testBufferBreak.txt");
-        createFile(file, 0);
-        writeString(file, "SBTOURIST\n");
-
-        final TestTailerListener listener = new TestTailerListener();
-        tailer = new Tailer(file, listener, delay, false, 1);
-
-        final Thread thread = new Thread(tailer);
-        thread.start();
-
-        List<String> lines = listener.getLines();
-        while (lines.isEmpty() || !lines.get(lines.size() - 1).equals("SBTOURIST")) {
-            lines = listener.getLines();
-        }
-
-        listener.clear();
-    }
-
-    @SuppressWarnings("deprecation") // unavoidable until Java 7
-    public void testMultiByteBreak() throws Exception {
-        System.out.println("testMultiByteBreak() Default charset: "+Charset.defaultCharset().displayName());
-        final long delay = 50;
-        final File origin = new File(this.getClass().getResource("/test-file-utf8.bin").toURI());
-        final File file = new File(getTestDirectory(), "testMultiByteBreak.txt");
-        createFile(file, 0);
-        final TestTailerListener listener = new TestTailerListener();
-        final String osname = System.getProperty("os.name");
-        final boolean isWindows = osname.startsWith("Windows");
-        // Need to use UTF-8 to read & write the file otherwise it can be corrupted (depending on the default charset)
-        final Charset charsetUTF8 = Charsets.UTF_8;
-        tailer = new Tailer(file, charsetUTF8, listener, delay, false, isWindows, 4096);
-        final Thread thread = new Thread(tailer);
-        thread.start();
-
-        Writer out = new OutputStreamWriter(new FileOutputStream(file), charsetUTF8);
-        BufferedReader reader = null;
-        try{
-            List<String> lines = new ArrayList<String>();
-            reader = new BufferedReader(new InputStreamReader(new FileInputStream(origin), charsetUTF8));
-            String line = null;
-            while((line = reader.readLine()) != null){
-                out.write(line);
-                out.write("\n");
-                lines.add(line);
-            }
-            out.close(); // ensure data is written
-
-           final long testDelayMillis = delay * 10;
-           Thread.sleep(testDelayMillis);
-           List<String> tailerlines = listener.getLines();
-           assertEquals("line count",lines.size(),tailerlines.size());
-           for(int i = 0,len = lines.size();i<len;i++){
-               final String expected = lines.get(i);
-               final String actual = tailerlines.get(i);
-               if (!expected.equals(actual)) {
-                   fail("Line: " + i 
-                           + "\nExp: (" + expected.length() + ") " + expected 
-                           + "\nAct: (" + actual.length() + ") "+ actual);
-               }
-           }
-        }finally{
-            tailer.stop();
-            IOUtils.closeQuietly(reader);
-            IOUtils.closeQuietly(out);
-        }
-    }
-
-    public void testTailerEof() throws Exception {
-        // Create & start the Tailer
-        final long delay = 50;
-        final File file = new File(getTestDirectory(), "tailer2-test.txt");
-        createFile(file, 0);
-        final TestTailerListener listener = new TestTailerListener();
-        final Tailer tailer = new Tailer(file, listener, delay, false);
-        final Thread thread = new Thread(tailer);
-        thread.start();
-
-        // Write some lines to the file
-        final FileWriter writer = null;
-        try {
-            writeString(file, "Line");
-
-            Thread.sleep(delay * 2);
-            List<String> lines = listener.getLines();
-            assertEquals("1 line count", 0, lines.size());
-
-            writeString(file, " one\n");
-            Thread.sleep(delay * 2);
-            lines = listener.getLines();
-
-            assertEquals("1 line count", 1, lines.size());
-            assertEquals("1 line 1", "Line one", lines.get(0));
-
-            listener.clear();
-        } finally {
-            tailer.stop();
-            Thread.sleep(delay * 2);
-            IOUtils.closeQuietly(writer);
-        }
-    }
-
-    public void testTailer() throws Exception {
-
-        // Create & start the Tailer
-        final long delayMillis = 50;
-        final File file = new File(getTestDirectory(), "tailer1-test.txt");
-        createFile(file, 0);
-        final TestTailerListener listener = new TestTailerListener();
-        final String osname = System.getProperty("os.name");
-        final boolean isWindows = osname.startsWith("Windows");
-        tailer = new Tailer(file, listener, delayMillis, false, isWindows);
-        final Thread thread = new Thread(tailer);
-        thread.start();
-
-        // Write some lines to the file
-        write(file, "Line one", "Line two");
-        final long testDelayMillis = delayMillis * 10;
-        Thread.sleep(testDelayMillis);
-        List<String> lines = listener.getLines();
-        assertEquals("1 line count", 2, lines.size());
-        assertEquals("1 line 1", "Line one", lines.get(0));
-        assertEquals("1 line 2", "Line two", lines.get(1));
-        listener.clear();
-
-        // Write another line to the file
-        write(file, "Line three");
-        Thread.sleep(testDelayMillis);
-        lines = listener.getLines();
-        assertEquals("2 line count", 1, lines.size());
-        assertEquals("2 line 3", "Line three", lines.get(0));
-        listener.clear();
-
-        // Check file does actually have all the lines
-        lines = FileUtils.readLines(file, "UTF-8");
-        assertEquals("3 line count", 3, lines.size());
-        assertEquals("3 line 1", "Line one", lines.get(0));
-        assertEquals("3 line 2", "Line two", lines.get(1));
-        assertEquals("3 line 3", "Line three", lines.get(2));
-
-        // Delete & re-create
-        file.delete();
-        final boolean exists = file.exists();
-        assertFalse("File should not exist", exists);
-        createFile(file, 0);
-        Thread.sleep(testDelayMillis);
-
-        // Write another line
-        write(file, "Line four");
-        Thread.sleep(testDelayMillis);
-        lines = listener.getLines();
-        assertEquals("4 line count", 1, lines.size());
-        assertEquals("4 line 3", "Line four", lines.get(0));
-        listener.clear();
-
-        // Stop
-        tailer.stop();
-        tailer=null;
-        thread.interrupt();
-        Thread.sleep(testDelayMillis * 4);
-        write(file, "Line five");
-        assertEquals("4 line count", 0, listener.getLines().size());
-        assertNotNull("Missing InterruptedException", listener.exception);
-        assertTrue("Unexpected Exception: " + listener.exception, listener.exception instanceof InterruptedException);
-        assertEquals("Expected init to be called", 1 , listener.initialised);
-        assertEquals("fileNotFound should not be called", 0 , listener.notFound);
-        assertEquals("fileRotated should be be called", 1 , listener.rotated);
-    }
-
-    public void testTailerEndOfFileReached() throws Exception {
-        // Create & start the Tailer
-        final long delayMillis = 50;
-        final long testDelayMillis = delayMillis * 10;
-        final File file = new File(getTestDirectory(), "tailer1-test.txt");
-        createFile(file, 0);
-        final TestTailerListener listener = new TestTailerListener();
-        final String osname = System.getProperty("os.name");
-        final boolean isWindows = osname.startsWith("Windows");
-        tailer = new Tailer(file, listener, delayMillis, false, isWindows);
-        final Thread thread = new Thread(tailer);
-        thread.start();
-
-        // write a few lines
-        write(file, "line1", "line2", "line3");
-        Thread.sleep(testDelayMillis);
-
-        // write a few lines
-        write(file, "line4", "line5", "line6");
-        Thread.sleep(testDelayMillis);
-
-        // write a few lines
-        write(file, "line7", "line8", "line9");
-        Thread.sleep(testDelayMillis);
-
-        assertEquals("end of file reached 3 times", 3, listener.reachedEndOfFile);
-    }
-
-    @Override
-    protected void createFile(final File file, final long size)
-        throws IOException {
-        super.createFile(file, size);
-
-        // try to make sure file is found
-        // (to stop continuum occasionally failing)
-        RandomAccessFile reader = null;
-        try {
-            while (reader == null) {
-                try {
-                    reader = new RandomAccessFile(file.getPath(), "r");
-                } catch (final FileNotFoundException e) {
-                }
-                try {
-                    Thread.sleep(200L);
-                } catch (final InterruptedException e) {
-                    // ignore
-                }
-            }
-        } finally {
-            IOUtils.closeQuietly(reader);
-        }
-    }
-
-    /** Append some lines to a file */
-    private void write(final File file, final String... lines) throws Exception {
-        FileWriter writer = null;
-        try {
-            writer = new FileWriter(file, true);
-            for (final String line : lines) {
-                writer.write(line + "\n");
-            }
-        } finally {
-            IOUtils.closeQuietly(writer);
-        }
-    }
-
-    /** Append a string to a file */
-    private void writeString(final File file, final String ... strings) throws Exception {
-        FileWriter writer = null;
-        try {
-            writer = new FileWriter(file, true);
-            for (final String string : strings) {
-                writer.write(string);
-            }
-        } finally {
-            IOUtils.closeQuietly(writer);
-        }
-    }
-
-    public void testStopWithNoFile() throws Exception {
-        final File file = new File(getTestDirectory(),"nosuchfile");
-        assertFalse("nosuchfile should not exist", file.exists());
-        final TestTailerListener listener = new TestTailerListener();
-        final int delay = 100;
-        final int idle = 50; // allow time for thread to work
-        tailer = Tailer.create(file, listener, delay, false);
-        Thread.sleep(idle);
-        tailer.stop();
-        tailer=null;
-        Thread.sleep(delay+idle);
-        assertNull("Should not generate Exception", listener.exception);
-        assertEquals("Expected init to be called", 1 , listener.initialised);
-        assertTrue("fileNotFound should be called", listener.notFound > 0);
-        assertEquals("fileRotated should be not be called", 0 , listener.rotated);
-        assertEquals("end of file never reached", 0, listener.reachedEndOfFile);
-    }
-
-    /*
-     * Tests [IO-357][Tailer] InterruptedException while the thead is sleeping is silently ignored.
-     */
-    public void testInterrupt() throws Exception {
-        final File file = new File(getTestDirectory(), "nosuchfile");
-        assertFalse("nosuchfile should not exist", file.exists());
-        final TestTailerListener listener = new TestTailerListener();
-        // Use a long delay to try to make sure the test thread calls interrupt() while the tailer thread is sleeping.
-        final int delay = 1000;
-        final int idle = 50; // allow time for thread to work
-        Tailer tailer = new Tailer(file, listener, delay, false, 4096);
-        final Thread thread = new Thread(tailer);
-        thread.setDaemon(true);
-        thread.start();
-        Thread.sleep(idle);
-        thread.interrupt();
-        tailer = null;
-        Thread.sleep(delay + idle);
-        assertNotNull("Missing InterruptedException", listener.exception);
-        assertTrue("Unexpected Exception: " + listener.exception, listener.exception instanceof InterruptedException);
-        assertEquals("Expected init to be called", 1, listener.initialised);
-        assertTrue("fileNotFound should be called", listener.notFound > 0);
-        assertEquals("fileRotated should be not be called", 0, listener.rotated);
-        assertEquals("end of file never reached", 0, listener.reachedEndOfFile);
-    }
-
-    public void testStopWithNoFileUsingExecutor() throws Exception {
-        final File file = new File(getTestDirectory(),"nosuchfile");
-        assertFalse("nosuchfile should not exist", file.exists());
-        final TestTailerListener listener = new TestTailerListener();
-        final int delay = 100;
-        final int idle = 50; // allow time for thread to work
-        tailer = new Tailer(file, listener, delay, false);
-        final Executor exec = new ScheduledThreadPoolExecutor(1);
-        exec.execute(tailer);
-        Thread.sleep(idle);
-        tailer.stop();
-        tailer=null;
-        Thread.sleep(delay+idle);
-        assertNull("Should not generate Exception", listener.exception);
-        assertEquals("Expected init to be called", 1 , listener.initialised);
-        assertTrue("fileNotFound should be called", listener.notFound > 0);
-        assertEquals("fileRotated should be not be called", 0 , listener.rotated);
-        assertEquals("end of file never reached", 0, listener.reachedEndOfFile);
-    }
-
-    public void testIO335() throws Exception { // test CR behaviour
-        // Create & start the Tailer
-        final long delayMillis = 50;
-        final File file = new File(getTestDirectory(), "tailer-testio334.txt");
-        createFile(file, 0);
-        final TestTailerListener listener = new TestTailerListener();
-        tailer = new Tailer(file, listener, delayMillis, false);
-        final Thread thread = new Thread(tailer);
-        thread.start();
-
-        // Write some lines to the file
-        writeString(file, "CRLF\r\n", "LF\n", "CR\r", "CRCR\r\r", "trail");
-        final long testDelayMillis = delayMillis * 10;
-        Thread.sleep(testDelayMillis);
-        final List<String> lines = listener.getLines();
-        assertEquals("line count", 4, lines.size());
-        assertEquals("line 1", "CRLF", lines.get(0));
-        assertEquals("line 2", "LF", lines.get(1));
-        assertEquals("line 3", "CR", lines.get(2));
-        assertEquals("line 4", "CRCR\r", lines.get(3));
-
-        // Stop
-        tailer.stop();
-        tailer=null;
-        thread.interrupt();
-        Thread.sleep(testDelayMillis);
-    }
-
-    /**
-     * Test {@link TailerListener} implementation.
-     */
-    private static class TestTailerListener extends TailerListenerAdapter {
-
-        // Must be synchronised because it is written by one thread and read by another
-        private final List<String> lines = Collections.synchronizedList(new ArrayList<String>());
-
-        volatile Exception exception = null;
-
-        volatile int notFound = 0;
-
-        volatile int rotated = 0;
-
-        volatile int initialised = 0;
-
-        volatile int reachedEndOfFile = 0;
-
-        public void handle(final String line) {
-            lines.add(line);
-        }
-
-        public List<String> getLines() {
-            return lines;
-        }
-
-        public void clear() {
-            lines.clear();
-        }
-
-        public void handle(final Exception e) {
-            exception = e;
-        }
-
-        public void init(final Tailer tailer) {
-            initialised++; // not atomic, but OK because only updated here.
-        }
-
-        public void fileNotFound() {
-            notFound++; // not atomic, but OK because only updated here.
-        }
-
-        public void fileRotated() {
-            rotated++; // not atomic, but OK because only updated here.
-        }
-
-        public void endOfFileReached() {
-            reachedEndOfFile++; // not atomic, but OK because only updated here.
-        }
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/TeeInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/TeeInputStreamTest.java
deleted file mode 100644
index 18d7b5e..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/TeeInputStreamTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit Test Case for {@link TeeInputStream}.
- */
-public class TeeInputStreamTest extends TestCase {
-
-    private final String ASCII = "US-ASCII";
-
-    private InputStream tee;
-
-    private ByteArrayOutputStream output;
-
-    @Override
-    protected void setUp() throws Exception {
-        final InputStream input = new ByteArrayInputStream("abc".getBytes(ASCII));
-        output = new ByteArrayOutputStream();
-        tee = new TeeInputStream(input, output);
-    }
-
-    public void testReadNothing() throws Exception {
-        assertEquals("", new String(output.toString(ASCII)));
-    }
-
-    public void testReadOneByte() throws Exception {
-        assertEquals('a', tee.read());
-        assertEquals("a", new String(output.toString(ASCII)));
-    }
-
-    public void testReadEverything() throws Exception {
-        assertEquals('a', tee.read());
-        assertEquals('b', tee.read());
-        assertEquals('c', tee.read());
-        assertEquals(-1, tee.read());
-        assertEquals("abc", new String(output.toString(ASCII)));
-    }
-
-    public void testReadToArray() throws Exception {
-        final byte[] buffer = new byte[8];
-        assertEquals(3, tee.read(buffer));
-        assertEquals('a', buffer[0]);
-        assertEquals('b', buffer[1]);
-        assertEquals('c', buffer[2]);
-        assertEquals(-1, tee.read(buffer));
-        assertEquals("abc", new String(output.toString(ASCII)));
-    }
-
-    public void testReadToArrayWithOffset() throws Exception {
-        final byte[] buffer = new byte[8];
-        assertEquals(3, tee.read(buffer, 4, 4));
-        assertEquals('a', buffer[4]);
-        assertEquals('b', buffer[5]);
-        assertEquals('c', buffer[6]);
-        assertEquals(-1, tee.read(buffer, 4, 4));
-        assertEquals("abc", new String(output.toString(ASCII)));
-    }
-
-    public void testSkip() throws Exception {
-        assertEquals('a', tee.read());
-        assertEquals(1, tee.skip(1));
-        assertEquals('c', tee.read());
-        assertEquals(-1, tee.read());
-        assertEquals("ac", new String(output.toString(ASCII)));
-    }
-
-    public void testMarkReset() throws Exception {
-        assertEquals('a', tee.read());
-        tee.mark(1);
-        assertEquals('b', tee.read());
-        tee.reset();
-        assertEquals('b', tee.read());
-        assertEquals('c', tee.read());
-        assertEquals(-1, tee.read());
-        assertEquals("abbc", new String(output.toString(ASCII)));
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/UnixLineEndingInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/UnixLineEndingInputStreamTest.java
deleted file mode 100644
index e3e0098..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/UnixLineEndingInputStreamTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import org.junit.Test;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-
-import static org.junit.Assert.assertEquals;
-
-public class UnixLineEndingInputStreamTest
-{
-
-    @Test
-    public void simpleString() throws Exception {
-        assertEquals( "abc\n", roundtrip( "abc" ) );
-    }
-
-    @Test
-    public void inTheMiddleOfTheLine() throws Exception {
-        assertEquals( "a\nbc\n", roundtrip( "a\r\nbc" ) );
-    }
-
-    @Test
-    public void multipleBlankLines() throws Exception {
-        assertEquals( "a\n\nbc\n", roundtrip( "a\r\n\r\nbc" ) );
-    }
-
-    @Test
-    public void twoLinesAtEnd() throws Exception {
-        assertEquals( "a\n\n", roundtrip( "a\r\n\r\n" ) );
-    }
-
-    @Test
-    public void crOnlyEnsureAtEof()
-        throws Exception
-    {
-        assertEquals( "a\nb\n", roundtrip( "a\rb" ) );
-    }
-
-    @Test
-    public void crOnlyNotAtEof()
-        throws Exception
-    {
-        assertEquals( "a\nb", roundtrip( "a\rb", false ) );
-    }
-
-    @Test
-    public void crAtEnd() throws Exception {
-        assertEquals( "a\n", roundtrip( "a\r" ) );
-    }
-
-
-    @Test
-    public void retainLineFeed() throws Exception {
-        assertEquals( "a\n\n", roundtrip( "a\r\n\r\n", false ) );
-        assertEquals( "a", roundtrip( "a", false ) );
-    }
-
-    private String roundtrip( String msg ) throws IOException {
-        return roundtrip( msg, true );
-    }
-
-    private String roundtrip( String msg, boolean ensure ) throws IOException {
-        ByteArrayInputStream baos = new ByteArrayInputStream( msg.getBytes( "UTF-8" ) );
-        UnixLineEndingInputStream lf = new UnixLineEndingInputStream( baos, ensure );
-        byte[] buf = new byte[100];
-        final int read = lf.read( buf );
-        lf.close();
-        return new String( buf, 0, read, "UTF-8" );
-    }
-
-}
\ No newline at end of file
diff --git a/trunk/src/test/java/org/apache/commons/io/input/WindowsLineEndingInputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/input/WindowsLineEndingInputStreamTest.java
deleted file mode 100644
index 52bd219..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/WindowsLineEndingInputStreamTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import org.junit.Test;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-
-import static org.junit.Assert.assertEquals;
-
-public class WindowsLineEndingInputStreamTest {
-    @Test
-    public void simpleString() throws Exception {
-        assertEquals( "abc\r\n", roundtrip( "abc" ) );
-    }
-
-    @Test
-    public void inTheMiddleOfTheLine() throws Exception {
-        assertEquals( "a\r\nbc\r\n", roundtrip( "a\r\nbc" ) );
-    }
-
-    @Test
-    public void multipleBlankLines() throws Exception {
-        assertEquals( "a\r\n\r\nbc\r\n", roundtrip( "a\r\n\r\nbc" ) );
-    }
-
-    @Test
-    public void twoLinesAtEnd() throws Exception {
-        assertEquals( "a\r\n\r\n", roundtrip( "a\r\n\r\n" ) );
-    }
-
-    @Test
-    public void linuxLinefeeds() throws Exception {
-        final String roundtrip = roundtrip( "ab\nc", false );
-        assertEquals( "ab\r\nc", roundtrip );
-    }
-
-
-    @Test
-    public void malformed() throws Exception {
-        assertEquals( "a\rbc", roundtrip( "a\rbc", false ) );
-    }
-
-    @Test
-    public void retainLineFeed() throws Exception {
-        assertEquals( "a\r\n\r\n", roundtrip( "a\r\n\r\n", false ) );
-        assertEquals( "a", roundtrip( "a", false ) );
-    }
-
-    private String roundtrip( String msg ) throws IOException {
-        return roundtrip( msg, true );
-    }
-
-    private String roundtrip( String msg, boolean ensure ) throws IOException {
-        ByteArrayInputStream baos = new ByteArrayInputStream( msg.getBytes( "UTF-8" ) );
-        WindowsLineEndingInputStream lf = new WindowsLineEndingInputStream( baos, ensure );
-        byte[] buf = new byte[100];
-        final int read = lf.read( buf );
-        lf.close();
-        return new String( buf, 0, read, "UTF-8" );
-    }
-}
\ No newline at end of file
diff --git a/trunk/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java b/trunk/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java
deleted file mode 100644
index 4bd6713..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java
+++ /dev/null
@@ -1,462 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.junit.Assert.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.text.MessageFormat;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.io.IOUtils;
-import org.junit.Test;
-
-public class XmlStreamReaderTest {
-    private static final String XML5 = "xml-prolog-encoding-spaced-single-quotes";
-    private static final String XML4 = "xml-prolog-encoding-single-quotes";
-    private static final String XML3 = "xml-prolog-encoding-double-quotes";
-    private static final String XML2 = "xml-prolog";
-    private static final String XML1 = "xml";
-
-    protected void _testRawNoBomValid(final String encoding) throws Exception {
-        InputStream is = getXmlStream("no-bom", XML1, encoding, encoding);
-        XmlStreamReader xmlReader = new XmlStreamReader(is, false);
-        assertEquals(xmlReader.getEncoding(), "UTF-8");
-        xmlReader.close();
-
-        is = getXmlStream("no-bom", XML2, encoding, encoding);
-        xmlReader = new XmlStreamReader(is);
-        assertEquals(xmlReader.getEncoding(), "UTF-8");
-        xmlReader.close();
-
-        is = getXmlStream("no-bom", XML3, encoding, encoding);
-        xmlReader = new XmlStreamReader(is);
-        assertEquals(xmlReader.getEncoding(), encoding);
-        xmlReader.close();
-
-        is = getXmlStream("no-bom", XML4, encoding, encoding);
-        xmlReader = new XmlStreamReader(is);
-        assertEquals(xmlReader.getEncoding(), encoding);
-        xmlReader.close();
-
-        is = getXmlStream("no-bom", XML5, encoding, encoding);
-        xmlReader = new XmlStreamReader(is);
-        assertEquals(xmlReader.getEncoding(), encoding);
-        xmlReader.close();
-    }
-
-    protected void _testRawNoBomInvalid(final String encoding) throws Exception {
-        final InputStream is = getXmlStream("no-bom", XML3, encoding, encoding);
-        try {
-            (new XmlStreamReader(is, false)).close();;
-            fail("It should have failed");
-        } catch (final IOException ex) {
-            assertTrue(ex.getMessage().contains("Invalid encoding,"));
-        }
-    }
-
-    @Test
-    public void testRawNoBomUsAscii() throws Exception {
-        _testRawNoBomValid("US-ASCII");
-    }
-
-    @Test
-    public void testRawNoBomUtf8() throws Exception {
-        _testRawNoBomValid("UTF-8");
-    }
-
-    @Test
-    public void testRawNoBomUtf16BE() throws Exception {
-        _testRawNoBomValid("UTF-16BE");
-    }
-
-    @Test
-    public void testRawNoBomUtf16LE() throws Exception {
-        _testRawNoBomValid("UTF-16LE");
-    }
-
-    @Test
-    public void testRawNoBomUtf32BE() throws Exception {
-        _testRawNoBomValid("UTF-32BE");
-    }
-
-    @Test
-    public void testRawNoBomUtf32LE() throws Exception {
-        _testRawNoBomValid("UTF-32LE");
-    }
-
-    @Test
-    public void testRawNoBomIso8859_1() throws Exception {
-        _testRawNoBomValid("ISO-8859-1");
-    }
-
-    @Test
-    public void testRawNoBomCp1047() throws Exception {
-        _testRawNoBomValid("CP1047");
-    }
-
-    protected void _testRawBomValid(final String encoding) throws Exception {
-        final InputStream is = getXmlStream(encoding + "-bom", XML3, encoding,
-                encoding);
-        final XmlStreamReader xmlReader = new XmlStreamReader(is, false);
-        if (!encoding.equals("UTF-16") && !encoding.equals("UTF-32")) {
-            assertEquals(xmlReader.getEncoding(), encoding);
-        } else {
-            assertEquals(xmlReader.getEncoding()
-                    .substring(0, encoding.length()), encoding);
-        }
-        xmlReader.close();
-    }
-
-    protected void _testRawBomInvalid(final String bomEnc, final String streamEnc,
-                                      final String prologEnc) throws Exception {
-        final InputStream is = getXmlStream(bomEnc, XML3, streamEnc, prologEnc);
-        XmlStreamReader xmlReader = null;
-        try {
-            xmlReader = new XmlStreamReader(is, false);
-            final String foundEnc = xmlReader.getEncoding();
-            fail("Expected IOException for BOM " + bomEnc + ", streamEnc "
-                    + streamEnc + " and prologEnc " + prologEnc + ": found "
-                    + foundEnc);
-        } catch (final IOException ex) {
-            assertTrue(ex.getMessage().contains("Invalid encoding,"));
-        }
-        if (xmlReader != null) {
-            xmlReader.close();
-        }
-    }
-
-    @Test
-    public void testRawBomUtf8() throws Exception {
-        _testRawBomValid("UTF-8");
-        _testRawBomInvalid("UTF-8-bom", "US-ASCII", "US-ASCII");
-        _testRawBomInvalid("UTF-8-bom", "ISO-8859-1", "ISO-8859-1");
-        _testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16");
-        _testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16BE");
-        _testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16LE");
-        _testRawBomInvalid("UTF-16BE-bom", "UTF-16BE", "UTF-16LE");
-        _testRawBomInvalid("UTF-16LE-bom", "UTF-16LE", "UTF-16BE");
-        _testRawBomInvalid("UTF-16LE-bom", "UTF-16LE", "UTF-8");
-        _testRawBomInvalid("UTF-32BE-bom", "UTF-32BE", "UTF-32LE");
-        _testRawBomInvalid("UTF-32LE-bom", "UTF-32LE", "UTF-32BE");
-        _testRawBomInvalid("UTF-32LE-bom", "UTF-32LE", "UTF-8");
-    }
-
-    @Test
-    public void testRawBomUtf16() throws Exception {
-        _testRawBomValid("UTF-16BE");
-        _testRawBomValid("UTF-16LE");
-        _testRawBomValid("UTF-16");
-
-        _testRawBomInvalid("UTF-16BE-bom", "UTF-16BE", "UTF-16LE");
-        _testRawBomInvalid("UTF-16LE-bom", "UTF-16LE", "UTF-16BE");
-        _testRawBomInvalid("UTF-16LE-bom", "UTF-16LE", "UTF-8");
-    }
-
-    @Test
-    public void testRawBomUtf32() throws Exception {
-        _testRawBomValid("UTF-32BE");
-        _testRawBomValid("UTF-32LE");
-        _testRawBomValid("UTF-32");
-
-        _testRawBomInvalid("UTF-32BE-bom", "UTF-32BE", "UTF-32LE");
-        _testRawBomInvalid("UTF-32LE-bom", "UTF-32LE", "UTF-32BE");
-        _testRawBomInvalid("UTF-32LE-bom", "UTF-32LE", "UTF-8");
-    }
-
-
-    @Test
-    public void testHttp() throws Exception {
-        // niallp 2010-10-06 - remove following 2 tests - I reinstated
-        // checks for non-UTF-16 encodings (18 tests) and these failed
-        // _testHttpValid("application/xml", "no-bom", "US-ASCII", null);
-        // _testHttpValid("application/xml", "UTF-8-bom", "US-ASCII", null);
-        _testHttpValid("application/xml", "UTF-8-bom", "UTF-8", null);
-        _testHttpValid("application/xml", "UTF-8-bom", "UTF-8", "UTF-8");
-        _testHttpValid("application/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null);
-        _testHttpValid("application/xml;charset=\"UTF-8\"", "UTF-8-bom", "UTF-8", null);
-        _testHttpValid("application/xml;charset='UTF-8'", "UTF-8-bom", "UTF-8", null);
-        _testHttpValid("application/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8");
-        _testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null);
-        _testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16");
-        _testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE");
-
-        _testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null);
-        _testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16");
-        _testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE");
-
-        _testHttpInvalid("application/xml;charset=UTF-32BE", "UTF-32BE-bom", "UTF-32BE", null);
-        _testHttpInvalid("application/xml;charset=UTF-32BE", "UTF-32BE-bom", "UTF-32BE", "UTF-32");
-        _testHttpInvalid("application/xml;charset=UTF-32BE", "UTF-32BE-bom", "UTF-32BE", "UTF-32BE");
-
-        _testHttpInvalid("application/xml", "UTF-8-bom", "US-ASCII", "US-ASCII");
-        _testHttpInvalid("application/xml;charset=UTF-16", "UTF-16LE", "UTF-8", "UTF-8");
-        _testHttpInvalid("application/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE");
-        _testHttpInvalid("application/xml;charset=UTF-32", "UTF-32LE", "UTF-8", "UTF-8");
-        _testHttpInvalid("application/xml;charset=UTF-32", "no-bom", "UTF-32BE", "UTF-32BE");
-
-        _testHttpValid("text/xml", "no-bom", "US-ASCII", null);
-        _testHttpValid("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8");
-        _testHttpValid("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null);
-        _testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null);
-        _testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16");
-        _testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE");
-        _testHttpValid("text/xml;charset=UTF-32", "UTF-32BE-bom", "UTF-32BE", null);
-        _testHttpValid("text/xml;charset=UTF-32", "UTF-32BE-bom", "UTF-32BE", "UTF-32");
-        _testHttpValid("text/xml;charset=UTF-32", "UTF-32BE-bom", "UTF-32BE", "UTF-32BE");
-        _testHttpValid("text/xml", "UTF-8-bom", "US-ASCII", null);
-
-        _testAlternateDefaultEncoding("application/xml", "UTF-8-bom", "UTF-8", null, null);
-        _testAlternateDefaultEncoding("application/xml", "no-bom", "US-ASCII", null, "US-ASCII");
-        _testAlternateDefaultEncoding("application/xml", "UTF-8-bom", "UTF-8", null, "UTF-8");
-        _testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, null);
-        _testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, "US-ASCII");
-        _testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, "UTF-8");
-
-        _testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null);
-        _testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16");
-        _testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE");
-        _testHttpInvalid("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE");
-        _testHttpInvalid("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", null);
-
-        _testHttpInvalid("text/xml;charset=UTF-32BE", "UTF-32BE-bom", "UTF-32BE", null);
-        _testHttpInvalid("text/xml;charset=UTF-32BE", "UTF-32BE-bom", "UTF-32BE", "UTF-32");
-        _testHttpInvalid("text/xml;charset=UTF-32BE", "UTF-32BE-bom", "UTF-32BE", "UTF-32BE");
-        _testHttpInvalid("text/xml;charset=UTF-32", "no-bom", "UTF-32BE", "UTF-32BE");
-        _testHttpInvalid("text/xml;charset=UTF-32", "no-bom", "UTF-32BE", null);
-
-        _testHttpLenient("text/xml", "no-bom", "US-ASCII", null, "US-ASCII");
-        _testHttpLenient("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8", "UTF-8");
-        _testHttpLenient("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null, "UTF-8");
-        _testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null, "UTF-16BE");
-        _testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16", "UTF-16");
-        _testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE");
-        _testHttpLenient("text/xml;charset=UTF-32", "UTF-32BE-bom", "UTF-32BE", null, "UTF-32BE");
-        _testHttpLenient("text/xml;charset=UTF-32", "UTF-32BE-bom", "UTF-32BE", "UTF-32", "UTF-32");
-        _testHttpLenient("text/xml;charset=UTF-32", "UTF-32BE-bom", "UTF-32BE", "UTF-32BE", "UTF-32BE");
-        _testHttpLenient("text/xml", "UTF-8-bom", "US-ASCII", null, "US-ASCII");
-
-        _testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null, "UTF-16BE");
-        _testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16", "UTF-16");
-        _testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE");
-        _testHttpLenient("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE");
-        _testHttpLenient("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", null, "UTF-16");
-
-        _testHttpLenient("text/xml;charset=UTF-32BE", "UTF-32BE-bom", "UTF-32BE", null, "UTF-32BE");
-        _testHttpLenient("text/xml;charset=UTF-32BE", "UTF-32BE-bom", "UTF-32BE", "UTF-32", "UTF-32");
-        _testHttpLenient("text/xml;charset=UTF-32BE", "UTF-32BE-bom", "UTF-32BE", "UTF-32BE", "UTF-32BE");
-        _testHttpLenient("text/xml;charset=UTF-32", "no-bom", "UTF-32BE", "UTF-32BE", "UTF-32BE");
-        _testHttpLenient("text/xml;charset=UTF-32", "no-bom", "UTF-32BE", null, "UTF-32");
-
-        _testHttpLenient("text/html", "no-bom", "US-ASCII", "US-ASCII", "US-ASCII");
-        _testHttpLenient("text/html", "no-bom", "US-ASCII", null, "US-ASCII");
-        _testHttpLenient("text/html;charset=UTF-8", "no-bom", "US-ASCII", "UTF-8", "UTF-8");
-        _testHttpLenient("text/html;charset=UTF-16BE", "no-bom", "US-ASCII", "UTF-8", "UTF-8");
-        _testHttpLenient("text/html;charset=UTF-32BE", "no-bom", "US-ASCII", "UTF-8", "UTF-8");
-    }
-
-    @Test
-    public void testRawContent() throws Exception {
-        final String encoding = "UTF-8";
-        final String xml = getXML("no-bom", XML3, encoding, encoding);
-        final ByteArrayInputStream is = new ByteArrayInputStream(xml.getBytes(encoding));
-        final XmlStreamReader xmlReader = new XmlStreamReader(is);
-        assertEquals("Check encoding", xmlReader.getEncoding(), encoding);
-        assertEquals("Check content", xml, IOUtils.toString(xmlReader));
-    }
-
-    @Test
-    public void testHttpContent() throws Exception {
-        final String encoding = "UTF-8";
-        final String xml = getXML("no-bom", XML3, encoding, encoding);
-        final ByteArrayInputStream is = new ByteArrayInputStream(xml.getBytes(encoding));
-        final XmlStreamReader xmlReader = new XmlStreamReader(is, encoding);
-        assertEquals("Check encoding", xmlReader.getEncoding(), encoding);
-        assertEquals("Check content", xml, IOUtils.toString(xmlReader));
-    }
-
-    public void _testAlternateDefaultEncoding(final String cT, final String bomEnc,
-                                              final String streamEnc, final String prologEnc, final String alternateEnc)
-            throws Exception {
-        final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML1
-                : XML3, streamEnc, prologEnc);
-        final XmlStreamReader xmlReader = new XmlStreamReader(is, cT, false, alternateEnc);
-        if (!streamEnc.equals("UTF-16")) {
-            // we can not assert things here because UTF-8, US-ASCII and
-            // ISO-8859-1 look alike for the chars used for detection
-            // (niallp 2010-10-06 - I re-instated the check below - the tests(6) passed)
-            final String enc = alternateEnc != null ? alternateEnc : streamEnc;
-            assertEquals(xmlReader.getEncoding(), enc);
-        } else {
-            //String enc = (alternateEnc != null) ? alternateEnc : streamEnc;
-            assertEquals(xmlReader.getEncoding().substring(0,
-                    streamEnc.length()), streamEnc);
-        }
-        xmlReader.close();
-    }
-
-    public void _testHttpValid(final String cT, final String bomEnc, final String streamEnc,
-                               final String prologEnc) throws Exception {
-        final InputStream is = getXmlStream(bomEnc,
-                prologEnc == null ? XML1 : XML3, streamEnc, prologEnc);
-        final XmlStreamReader xmlReader = new XmlStreamReader(is, cT, false);
-        if (!streamEnc.equals("UTF-16")) {
-            // we can not assert things here because UTF-8, US-ASCII and
-            // ISO-8859-1 look alike for the chars used for detection
-            // (niallp 2010-10-06 - I re-instated the check below and removed the 2 tests that failed)
-            assertEquals(xmlReader.getEncoding(), streamEnc);
-        } else {
-            assertEquals(xmlReader.getEncoding().substring(0,
-                    streamEnc.length()), streamEnc);
-        }
-        xmlReader.close();
-    }
-
-    protected void _testHttpInvalid(final String cT, final String bomEnc, final String streamEnc,
-                                    final String prologEnc) throws Exception {
-        final InputStream is = getXmlStream(bomEnc,
-                prologEnc == null ? XML2 : XML3, streamEnc, prologEnc);
-        try {
-            (new XmlStreamReader(is, cT, false)).close();;
-            fail("It should have failed for HTTP Content-type " + cT + ", BOM "
-                    + bomEnc + ", streamEnc " + streamEnc + " and prologEnc "
-                    + prologEnc);
-        } catch (final IOException ex) {
-            assertTrue(ex.getMessage().contains("Invalid encoding,"));
-        }
-    }
-
-    protected void _testHttpLenient(final String cT, final String bomEnc, final String streamEnc,
-                                    final String prologEnc, final String shouldbe) throws Exception {
-        final InputStream is = getXmlStream(bomEnc,
-                prologEnc == null ? XML2 : XML3, streamEnc, prologEnc);
-        final XmlStreamReader xmlReader = new XmlStreamReader(is, cT, true);
-        assertEquals(xmlReader.getEncoding(), shouldbe);
-        xmlReader.close();
-    }
-
-    private static final String ENCODING_ATTRIBUTE_XML = "<?xml version=\"1.0\" ?> \n"
-            + "<atom:feed xmlns:atom=\"http://www.w3.org/2005/Atom\">\n"
-            + "\n"
-            + "  <atom:entry>\n"
-            + "    <atom:title encoding='base64'><![CDATA\n"
-            + "aW5nTGluZSIgLz4";
-
-    @Test
-    public void testEncodingAttributeXML() throws Exception {
-        final InputStream is = new ByteArrayInputStream(ENCODING_ATTRIBUTE_XML
-                .getBytes("UTF-8"));
-        final XmlStreamReader xmlReader = new XmlStreamReader(is, "", true);
-        assertEquals(xmlReader.getEncoding(), "UTF-8");
-        xmlReader.close();
-    }
-
-    // XML Stream generator
-
-    private static final int[] NO_BOM_BYTES = {};
-    private static final int[] UTF_16BE_BOM_BYTES = {0xFE, 0xFF};
-    private static final int[] UTF_16LE_BOM_BYTES = {0xFF, 0XFE};
-    private static final int[] UTF_32BE_BOM_BYTES = {0x00, 0x00, 0xFE, 0xFF};
-    private static final int[] UTF_32LE_BOM_BYTES = {0xFF, 0XFE, 0x00, 0x00};
-    private static final int[] UTF_8_BOM_BYTES = {0xEF, 0xBB, 0xBF};
-
-    private static final Map<String, int[]> BOMs = new HashMap<String, int[]>();
-
-    static {
-        BOMs.put("no-bom", NO_BOM_BYTES);
-        BOMs.put("UTF-16BE-bom", UTF_16BE_BOM_BYTES);
-        BOMs.put("UTF-16LE-bom", UTF_16LE_BOM_BYTES);
-        BOMs.put("UTF-32BE-bom", UTF_32BE_BOM_BYTES);
-        BOMs.put("UTF-32LE-bom", UTF_32LE_BOM_BYTES);
-        BOMs.put("UTF-16-bom", NO_BOM_BYTES); // it's added by the writer
-        BOMs.put("UTF-8-bom", UTF_8_BOM_BYTES);
-    }
-
-    private static final MessageFormat XML = new MessageFormat(
-            "<root>{2}</root>");
-    private static final MessageFormat XML_WITH_PROLOG = new MessageFormat(
-            "<?xml version=\"1.0\"?>\n<root>{2}</root>");
-    private static final MessageFormat XML_WITH_PROLOG_AND_ENCODING_DOUBLE_QUOTES = new MessageFormat(
-            "<?xml version=\"1.0\" encoding=\"{1}\"?>\n<root>{2}</root>");
-    private static final MessageFormat XML_WITH_PROLOG_AND_ENCODING_SINGLE_QUOTES = new MessageFormat(
-            "<?xml version=\"1.0\" encoding=''{1}''?>\n<root>{2}</root>");
-    private static final MessageFormat XML_WITH_PROLOG_AND_ENCODING_SPACED_SINGLE_QUOTES = new MessageFormat(
-            "<?xml version=\"1.0\" encoding =  \t \n \r''{1}''?>\n<root>{2}</root>");
-
-    private static final MessageFormat INFO = new MessageFormat(
-            "\nBOM : {0}\nDoc : {1}\nStream Enc : {2}\nProlog Enc : {3}\n");
-
-    private static final Map<String, MessageFormat> XMLs = new HashMap<String, MessageFormat>();
-
-    static {
-        XMLs.put(XML1, XML);
-        XMLs.put(XML2, XML_WITH_PROLOG);
-        XMLs.put(XML3, XML_WITH_PROLOG_AND_ENCODING_DOUBLE_QUOTES);
-        XMLs.put(XML4, XML_WITH_PROLOG_AND_ENCODING_SINGLE_QUOTES);
-        XMLs.put(XML5, XML_WITH_PROLOG_AND_ENCODING_SPACED_SINGLE_QUOTES);
-    }
-
-    /**
-     * @param bomType   no-bom, UTF-16BE-bom, UTF-16LE-bom, UTF-8-bom
-     * @param xmlType   xml, xml-prolog, xml-prolog-charset
-     * @param streamEnc encoding of the stream
-     * @param prologEnc encoding of the prolog
-     * @return XML stream
-     * @throws IOException If an I/O error occurs
-     */
-    protected InputStream getXmlStream(final String bomType, final String xmlType,
-                                       final String streamEnc, final String prologEnc) throws IOException {
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
-        int[] bom = BOMs.get(bomType);
-        if (bom == null) {
-            bom = new int[0];
-        }
-        for (final int element : bom) {
-            baos.write(element);
-        }
-        final Writer writer = new OutputStreamWriter(baos, streamEnc);
-        final String xmlDoc = getXML(bomType, xmlType, streamEnc, prologEnc);
-        writer.write(xmlDoc);
-
-        // PADDDING TO TEST THINGS WORK BEYOND PUSHBACK_SIZE
-        writer.write("<da>\n");
-        for (int i = 0; i < 10000; i++) {
-            writer.write("<do/>\n");
-        }
-        writer.write("</da>\n");
-
-        writer.close();
-        return new ByteArrayInputStream(baos.toByteArray());
-    }
-
-    /**
-     * Create the XML.
-     */
-    private String getXML(final String bomType, final String xmlType,
-                          final String streamEnc, final String prologEnc) {
-        final MessageFormat xml = XMLs.get(xmlType);
-        final String info = INFO.format(new Object[]{bomType, xmlType, prologEnc});
-        final String xmlDoc = xml.format(new Object[]{streamEnc, prologEnc, info});
-        return xmlDoc;
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/XmlStreamReaderUtilitiesTest.java b/trunk/src/test/java/org/apache/commons/io/input/XmlStreamReaderUtilitiesTest.java
deleted file mode 100644
index 4f9ed47..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/XmlStreamReaderUtilitiesTest.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-
-import org.junit.Test;
-
-/**
- * Test the Encoding Utilities part of {@link XmlStreamReader}.
- */
-public class XmlStreamReaderUtilitiesTest {
-
-    private static String RAWMGS1 = "encoding mismatch";
-    private static String RAWMGS2 = "unknown BOM";
-    private static String HTTPMGS1 = "BOM must be NULL";
-    private static String HTTPMGS2 = "encoding mismatch";
-    private static String HTTPMGS3 = "Invalid MIME";
-
-    private static String APPXML         = "application/xml";
-    private static String APPXML_UTF8    = "application/xml;charset=UTF-8";
-    private static String APPXML_UTF16   = "application/xml;charset=UTF-16";
-    private static String APPXML_UTF32   = "application/xml;charset=UTF-32";
-    private static String APPXML_UTF16BE = "application/xml;charset=UTF-16BE";
-    private static String APPXML_UTF16LE = "application/xml;charset=UTF-16LE";
-    private static String APPXML_UTF32BE = "application/xml;charset=UTF-32BE";
-    private static String APPXML_UTF32LE = "application/xml;charset=UTF-32LE";
-    private static String TXTXML = "text/xml";
-
-    @Test
-    public void testContentTypeEncoding() {
-        checkContentTypeEncoding(null, null);
-        checkContentTypeEncoding(null, "");
-        checkContentTypeEncoding(null, "application/xml");
-        checkContentTypeEncoding(null, "application/xml;");
-        checkContentTypeEncoding(null, "multipart/mixed;boundary=frontier");
-        checkContentTypeEncoding(null, "multipart/mixed;boundary='frontier'");
-        checkContentTypeEncoding(null, "multipart/mixed;boundary=\"frontier\"");
-        checkContentTypeEncoding("UTF-16", "application/xml;charset=utf-16");
-        checkContentTypeEncoding("UTF-16", "application/xml;charset=UTF-16");
-        checkContentTypeEncoding("UTF-16", "application/xml;charset='UTF-16'");
-        checkContentTypeEncoding("UTF-16", "application/xml;charset=\"UTF-16\"");
-        checkContentTypeEncoding("UTF-32", "application/xml;charset=utf-32");
-        checkContentTypeEncoding("UTF-32", "application/xml;charset=UTF-32");
-        checkContentTypeEncoding("UTF-32", "application/xml;charset='UTF-32'");
-        checkContentTypeEncoding("UTF-32", "application/xml;charset=\"UTF-32\"");
-    }
-
-    private void checkContentTypeEncoding(final String expected, final String httpContentType) {
-        assertEquals("ContentTypeEncoding=[" + httpContentType + "]", expected, XmlStreamReader.getContentTypeEncoding(httpContentType));
-    }
-
-    @Test
-    public void testContentTypeMime() {
-        checkContentTypeMime(null, null);
-        checkContentTypeMime("", "");
-        checkContentTypeMime("application/xml", "application/xml");
-        checkContentTypeMime("application/xml", "application/xml;");
-        checkContentTypeMime("application/xml", "application/xml;charset=utf-16");
-        checkContentTypeMime("application/xml", "application/xml;charset=utf-32");
-    }
-
-    private void checkContentTypeMime(final String expected, final String httpContentType) {
-        assertEquals("ContentTypeMime=[" + httpContentType + "]", expected, XmlStreamReader.getContentTypeMime(httpContentType));
-    }
-
-    @Test
-    public void testAppXml() {
-        checkAppXml(false, null);
-        checkAppXml(false, "");
-        checkAppXml(true,  "application/xml");
-        checkAppXml(true,  "application/xml-dtd");
-        checkAppXml(true,  "application/xml-external-parsed-entity");
-        checkAppXml(true,  "application/soap+xml");
-        checkAppXml(true,  "application/atom+xml");
-        checkAppXml(false, "application/atomxml");
-        checkAppXml(false, "text/xml");
-        checkAppXml(false, "text/atom+xml");
-        checkAppXml(true,  "application/xml-dtd");
-        checkAppXml(true,  "application/xml-external-parsed-entity");
-    }
-
-    @SuppressWarnings("boxing")
-    private void checkAppXml(final boolean expected, final String mime) {
-        assertEquals("Mime=[" + mime + "]", expected, XmlStreamReader.isAppXml(mime));
-    }
-
-    @Test
-    public void testTextXml() {
-        checkTextXml(false, null);
-        checkTextXml(false, "");
-        checkTextXml(true,  "text/xml");
-        checkTextXml(true,  "text/xml-external-parsed-entity");
-        checkTextXml(true,  "text/soap+xml");
-        checkTextXml(true,  "text/atom+xml");
-        checkTextXml(false, "text/atomxml");
-        checkTextXml(false, "application/xml");
-        checkTextXml(false, "application/atom+xml");
-    }
-
-    @SuppressWarnings("boxing")
-    private void checkTextXml(final boolean expected, final String mime) {
-        assertEquals("Mime=[" + mime + "]", expected, XmlStreamReader.isTextXml(mime));
-    }
-
-    @Test
-    public void testCalculateRawEncodingNoBOM() throws IOException {
-        // No BOM        Expected    BOM         Guess       XML         Default
-        checkRawError(RAWMGS2,       "UTF-32",   null,       null,       null);
-        //
-        checkRawEncoding("UTF-8",    null,       null,       null,       null);
-        checkRawEncoding("UTF-8",    null,       "UTF-16BE", null,       null); /* why default & not Guess? */
-        checkRawEncoding("UTF-8",    null,       null,       "UTF-16BE", null); /* why default & not XMLEnc? */
-        checkRawEncoding("UTF-8",    null,       "UTF-8",    "UTF-8",    "UTF-16BE");
-        //
-        checkRawEncoding("UTF-16BE", null,       "UTF-16BE", "UTF-16BE", null);
-        checkRawEncoding("UTF-16BE", null,       null,       null,       "UTF-16BE");
-        checkRawEncoding("UTF-16BE", null,       "UTF-8",    null,       "UTF-16BE"); /* why default & not Guess? */
-        checkRawEncoding("UTF-16BE", null,       null,       "UTF-8",    "UTF-16BE"); /* why default & not Guess? */
-        checkRawEncoding("UTF-16BE", null,       "UTF-16BE", "UTF-16",   null);
-        checkRawEncoding("UTF-16LE", null,       "UTF-16LE", "UTF-16",   null);
-    }
-
-    @Test
-    public void testCalculateRawEncodingStandard() throws IOException {
-        // Standard BOM Checks           BOM         Other       Default
-        testCalculateRawEncodingStandard("UTF-8",    "UTF-16BE", "UTF-16LE");
-        testCalculateRawEncodingStandard("UTF-16BE", "UTF-8",    "UTF-16LE");
-        testCalculateRawEncodingStandard("UTF-16LE", "UTF-8",    "UTF-16BE");
-    }
-
-    @Test
-    //@Ignore
-    public void testCalculateRawEncodingStandardUtf32() throws IOException {
-        // Standard BOM Checks           BOM         Other       Default
-        testCalculateRawEncodingStandard("UTF-8",    "UTF-32BE", "UTF-32LE");
-        testCalculateRawEncodingStandard("UTF-32BE", "UTF-8",    "UTF-32LE");
-        testCalculateRawEncodingStandard("UTF-32LE", "UTF-8",    "UTF-32BE");
-}
-
-    private void testCalculateRawEncodingStandard(final String bomEnc, final String otherEnc, final String defaultEnc) throws IOException {
-        //               Expected   BOM        Guess     XMLEnc    Default
-        checkRawEncoding(bomEnc,    bomEnc,    null,     null,     defaultEnc);
-        checkRawEncoding(bomEnc,    bomEnc,    bomEnc,   null,     defaultEnc);
-        checkRawError(RAWMGS1,      bomEnc,    otherEnc, null,     defaultEnc);
-        checkRawEncoding(bomEnc,    bomEnc,    null,     bomEnc,   defaultEnc);
-        checkRawError(RAWMGS1,      bomEnc,    null,     otherEnc, defaultEnc);
-        checkRawEncoding(bomEnc,    bomEnc,    bomEnc,   bomEnc,   defaultEnc);
-        checkRawError(RAWMGS1,      bomEnc,    bomEnc,   otherEnc, defaultEnc);
-        checkRawError(RAWMGS1,      bomEnc,    otherEnc, bomEnc,   defaultEnc);
-
-    }
-
-    @Test
-    public void testCalculateRawEncodingAdditonalUTF16() throws IOException {
-        //                           BOM         Guess       XML         Default
-        checkRawError(RAWMGS1,       "UTF-16BE", "UTF-16",   null,       null);
-        checkRawEncoding("UTF-16BE", "UTF-16BE", null,       "UTF-16",   null);
-        checkRawEncoding("UTF-16BE", "UTF-16BE", "UTF-16BE", "UTF-16",   null);
-        checkRawError(RAWMGS1,       "UTF-16BE", null,       "UTF-16LE", null);
-        checkRawError(RAWMGS1,       "UTF-16BE", "UTF-16BE", "UTF-16LE", null);
-        checkRawError(RAWMGS1,       "UTF-16LE", "UTF-16",   null,       null);
-        checkRawEncoding("UTF-16LE", "UTF-16LE", null,       "UTF-16",   null);
-        checkRawEncoding("UTF-16LE", "UTF-16LE", "UTF-16LE", "UTF-16",   null);
-        checkRawError(RAWMGS1,       "UTF-16LE", null,       "UTF-16BE", null);
-        checkRawError(RAWMGS1,       "UTF-16LE", "UTF-16LE", "UTF-16BE", null);
-    }
-
-    @Test
-    public void testCalculateRawEncodingAdditonalUTF32() throws IOException {
-        //                           BOM         Guess       XML         Default
-        checkRawError(RAWMGS1,       "UTF-32BE", "UTF-32",   null,       null);
-        checkRawEncoding("UTF-32BE", "UTF-32BE", null,       "UTF-32",   null);
-        checkRawEncoding("UTF-32BE", "UTF-32BE", "UTF-32BE", "UTF-32",   null);
-        checkRawError(RAWMGS1,       "UTF-32BE", null,       "UTF-32LE", null);
-        checkRawError(RAWMGS1,       "UTF-32BE", "UTF-32BE", "UTF-32LE", null);
-        checkRawError(RAWMGS1,       "UTF-32LE", "UTF-32",   null,       null);
-        checkRawEncoding("UTF-32LE", "UTF-32LE", null,       "UTF-32",   null);
-        checkRawEncoding("UTF-32LE", "UTF-32LE", "UTF-32LE", "UTF-32",   null);
-        checkRawError(RAWMGS1,       "UTF-32LE", null,       "UTF-32BE", null);
-        checkRawError(RAWMGS1,       "UTF-32LE", "UTF-32LE", "UTF-32BE", null);
-    }
-
-    private void checkRawEncoding(final String expected,
-            final String bomEnc, final String xmlGuessEnc, final String xmlEnc, final String defaultEncoding) throws IOException {
-        final StringBuilder builder = new StringBuilder();
-        builder.append("RawEncoding: ").append(bomEnc).append("], ");
-        builder.append("bomEnc=[").append(bomEnc).append("], ");
-        builder.append("xmlGuessEnc=[").append(xmlGuessEnc).append("], ");
-        builder.append("xmlEnc=[").append(xmlEnc).append("], ");
-        builder.append("defaultEncoding=[").append(defaultEncoding).append("],");
-        final String encoding = calculateRawEncoding(bomEnc,xmlGuessEnc,xmlEnc, defaultEncoding);
-        assertEquals(builder.toString(), expected, encoding);
-    }
-
-    protected String calculateRawEncoding(final String bomEnc, final String xmlGuessEnc, final String xmlEnc,
-            final String defaultEncoding) throws IOException {
-        final MockXmlStreamReader mock = new MockXmlStreamReader(defaultEncoding);
-        final String enc = mock.calculateRawEncoding(bomEnc, xmlGuessEnc, xmlEnc);
-        mock.close();
-        return enc;
-    }
-
-    private void checkRawError(final String msgSuffix,
-            final String bomEnc, final String xmlGuessEnc, final String xmlEnc, final String defaultEncoding) {
-        try {
-            checkRawEncoding("XmlStreamReaderException", bomEnc, xmlGuessEnc, xmlEnc, defaultEncoding);
-            fail("Expected XmlStreamReaderException");
-        } catch (final XmlStreamReaderException e) {
-            assertTrue("Msg Start: " + e.getMessage(), e.getMessage().startsWith("Invalid encoding"));
-            assertTrue("Msg End: "   + e.getMessage(), e.getMessage().endsWith(msgSuffix));
-            assertEquals("bomEnc",      bomEnc,      e.getBomEncoding());
-            assertEquals("xmlGuessEnc", xmlGuessEnc, e.getXmlGuessEncoding());
-            assertEquals("xmlEnc",      xmlEnc,      e.getXmlEncoding());
-            assertNull("ContentTypeEncoding", e.getContentTypeEncoding());
-            assertNull("ContentTypeMime",     e.getContentTypeMime());
-        } catch (final Exception e) {
-            fail("Expected XmlStreamReaderException, but threw " + e);
-        }
-    }
-
-    @Test
-    public void testCalculateHttpEncoding() throws IOException {
-        // No BOM        Expected     Lenient cType           BOM         Guess       XML         Default
-        checkHttpError(HTTPMGS3,      true,   null,           null,       null,       null,       null);
-        checkHttpError(HTTPMGS3,      false,  null,           null,       null,       "UTF-8",    null);
-        checkHttpEncoding("UTF-8",    true,   null,           null,       null,       "UTF-8",    null);
-        checkHttpEncoding("UTF-16LE", true,   null,           null,       null,       "UTF-16LE", null);
-        checkHttpError(HTTPMGS3,      false,  "text/css",     null,       null,       null,       null);
-        checkHttpEncoding("US-ASCII", false,  TXTXML,         null,       null,       null,       null);
-        checkHttpEncoding("UTF-16BE", false,  TXTXML,         null,       null,       null,       "UTF-16BE");
-        checkHttpEncoding("UTF-8",    false,  APPXML,         null,       null,       null,       null);
-        checkHttpEncoding("UTF-16BE", false,  APPXML,         null,       null,       null,       "UTF-16BE");
-        checkHttpEncoding("UTF-8",    false,  APPXML,         "UTF-8",    null,       null,       "UTF-16BE");
-        checkHttpEncoding("UTF-16LE", false,  APPXML_UTF16LE, null,       null,       null,       null);
-        checkHttpEncoding("UTF-16BE", false,  APPXML_UTF16BE, null,       null,       null,       null);
-        checkHttpError(HTTPMGS1,      false,  APPXML_UTF16LE, "UTF-16LE", null,       null,       null);
-        checkHttpError(HTTPMGS1,      false,  APPXML_UTF16BE, "UTF-16BE", null,       null,       null);
-        checkHttpError(HTTPMGS2,      false,  APPXML_UTF16,   null,       null,       null,       null);
-        checkHttpError(HTTPMGS2,      false,  APPXML_UTF16,   "UTF-8",    null,       null,       null);
-        checkHttpEncoding("UTF-16LE", false,  APPXML_UTF16,   "UTF-16LE", null,       null,       null);
-        checkHttpEncoding("UTF-16BE", false,  APPXML_UTF16,   "UTF-16BE", null,       null,       null);
-        checkHttpEncoding("UTF-8",    false,  APPXML_UTF8,    null,       null,       null,       null);
-        checkHttpEncoding("UTF-8",    false,  APPXML_UTF8,    "UTF-16BE", "UTF-16BE", "UTF-16BE", "UTF-16BE");
-    }
-
-    @Test
-    public void testCalculateHttpEncodingUtf32() throws IOException {
-        // No BOM        Expected     Lenient cType           BOM         Guess       XML         Default
-        checkHttpEncoding("UTF-32LE", true,   null,           null,       null,       "UTF-32LE", null);
-        checkHttpEncoding("UTF-32BE", false,  TXTXML,         null,       null,       null,       "UTF-32BE");
-        checkHttpEncoding("UTF-32BE", false,  APPXML,         null,       null,       null,       "UTF-32BE");
-        checkHttpEncoding("UTF-32LE", false,  APPXML_UTF32LE, null,       null,       null,       null);
-        checkHttpEncoding("UTF-32BE", false,  APPXML_UTF32BE, null,       null,       null,       null);
-        checkHttpError(HTTPMGS1,      false,  APPXML_UTF32LE, "UTF-32LE", null,       null,       null);
-        checkHttpError(HTTPMGS1,      false,  APPXML_UTF32BE, "UTF-32BE", null,       null,       null);
-        checkHttpError(HTTPMGS2,      false,  APPXML_UTF32,   null,       null,       null,       null);
-        checkHttpError(HTTPMGS2,      false,  APPXML_UTF32,   "UTF-8",    null,       null,       null);
-        checkHttpEncoding("UTF-32LE", false,  APPXML_UTF32,   "UTF-32LE", null,       null,       null);
-        checkHttpEncoding("UTF-32BE", false,  APPXML_UTF32,   "UTF-32BE", null,       null,       null);
-        checkHttpEncoding("UTF-8",    false,  APPXML_UTF8,    "UTF-32BE", "UTF-32BE", "UTF-32BE", "UTF-32BE");
-    }
-
-    private void checkHttpEncoding(final String expected, final boolean lenient, final String httpContentType,
-            final String bomEnc, final String xmlGuessEnc, final String xmlEnc, final String defaultEncoding) throws IOException {
-        final StringBuilder builder = new StringBuilder();
-        builder.append("HttpEncoding=[").append(bomEnc).append("], ");
-        builder.append("lenient=[").append(lenient).append("], ");
-        builder.append("httpContentType=[").append(httpContentType).append("], ");
-        builder.append("bomEnc=[").append(bomEnc).append("], ");
-        builder.append("xmlGuessEnc=[").append(xmlGuessEnc).append("], ");
-        builder.append("xmlEnc=[").append(xmlEnc).append("], ");
-        builder.append("defaultEncoding=[").append(defaultEncoding).append("],");
-        final String encoding = calculateHttpEncoding(httpContentType, bomEnc, xmlGuessEnc, xmlEnc, lenient, defaultEncoding);
-        assertEquals(builder.toString(), expected, encoding);
-    }
-
-    protected String calculateHttpEncoding(final String httpContentType, final String bomEnc, final String xmlGuessEnc,
-            final String xmlEnc, final boolean lenient, final String defaultEncoding) throws IOException {
-        final MockXmlStreamReader mock = new MockXmlStreamReader(defaultEncoding);
-        final String enc = mock.calculateHttpEncoding(httpContentType, bomEnc, xmlGuessEnc, xmlEnc, lenient);
-        mock.close();
-        return enc;
-    }
-
-    private void checkHttpError(final String msgSuffix, final boolean lenient, final String httpContentType,
-            final String bomEnc, final String xmlGuessEnc, final String xmlEnc, final String defaultEncoding) {
-        try {
-            checkHttpEncoding("XmlStreamReaderException", lenient, httpContentType, bomEnc, xmlGuessEnc, xmlEnc, defaultEncoding);
-            fail("Expected XmlStreamReaderException");
-        } catch (final XmlStreamReaderException e) {
-            assertTrue("Msg Start: " + e.getMessage(), e.getMessage().startsWith("Invalid encoding"));
-            assertTrue("Msg End: "   + e.getMessage(), e.getMessage().endsWith(msgSuffix));
-            assertEquals("bomEnc",      bomEnc,      e.getBomEncoding());
-            assertEquals("xmlGuessEnc", xmlGuessEnc, e.getXmlGuessEncoding());
-            assertEquals("xmlEnc",      xmlEnc,      e.getXmlEncoding());
-            assertEquals("ContentTypeEncoding", XmlStreamReader.getContentTypeEncoding(httpContentType),
-                                                e.getContentTypeEncoding());
-            assertEquals("ContentTypeMime", XmlStreamReader.getContentTypeMime(httpContentType),
-                                            e.getContentTypeMime());
-        } catch (final Exception e) {
-            fail("Expected XmlStreamReaderException, but threw " + e);
-        }
-    }
-
-    /** Mock {@link XmlStreamReader} implementation */
-    private static class MockXmlStreamReader extends XmlStreamReader {
-        MockXmlStreamReader(final String defaultEncoding) throws IOException {
-            super(new ByteArrayInputStream("".getBytes()), null, true, defaultEncoding);
-        }
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java b/trunk/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java
deleted file mode 100644
index 9e62e5c..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java
+++ /dev/null
@@ -1,744 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input.compatibility;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.StringReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLConnection;
-import java.text.MessageFormat;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.io.output.XmlStreamWriter;
-
-/**
- * Character stream that handles all the necessary Voodo to figure out the
- * charset encoding of the XML document within the stream.
- * <p>
- * IMPORTANT: This class is not related in any way to the org.xml.sax.XMLReader.
- * This one IS a character stream.
- * <p>
- * All this has to be done without consuming characters from the stream, if not
- * the XML parser will not recognized the document as a valid XML. This is not
- * 100% true, but it's close enough (UTF-8 BOM is not handled by all parsers
- * right now, XmlStreamReader handles it and things work in all parsers).
- * <p>
- * The XmlStreamReader class handles the charset encoding of XML documents in
- * Files, raw streams and HTTP streams by offering a wide set of constructors.
- * <p>
- * By default the charset encoding detection is lenient, the constructor with
- * the lenient flag can be used for an script (following HTTP MIME and XML
- * specifications). All this is nicely explained by Mark Pilgrim in his blog, <a
- * href="http://diveintomark.org/archives/2004/02/13/xml-media-types">
- * Determining the character encoding of a feed</a>.
- * <p>
- * Originally developed for <a href="http://rome.dev.java.net">ROME</a> under
- * Apache License 2.0.
- *
- * @version $Id$
- * @see XmlStreamWriter
- */
-public class XmlStreamReader extends Reader {
-    private static final int BUFFER_SIZE = 4096;
-
-    private static final String UTF_8 = "UTF-8";
-
-    private static final String US_ASCII = "US-ASCII";
-
-    private static final String UTF_16BE = "UTF-16BE";
-
-    private static final String UTF_16LE = "UTF-16LE";
-
-    private static final String UTF_16 = "UTF-16";
-
-    private static final String UTF_32BE = "UTF-32BE";
-
-    private static final String UTF_32LE = "UTF-32LE";
-
-    private static final String UTF_32 = "UTF-32";
-
-    private static final String EBCDIC = "CP1047";
-
-    private static String staticDefaultEncoding = null;
-
-    private Reader reader;
-
-    private String encoding;
-
-    private final String defaultEncoding;
-
-    /**
-     * Sets the default encoding to use if none is set in HTTP content-type, XML
-     * prolog and the rules based on content-type are not adequate.
-     * <p>
-     * If it is set to NULL the content-type based rules are used.
-     * <p>
-     * By default it is NULL.
-     *
-     * @param encoding charset encoding to default to.
-     */
-    public static void setDefaultEncoding(final String encoding) {
-        staticDefaultEncoding = encoding;
-    }
-
-    /**
-     * Returns the default encoding to use if none is set in HTTP content-type,
-     * XML prolog and the rules based on content-type are not adequate.
-     * <p>
-     * If it is NULL the content-type based rules are used.
-     *
-     * @return the default encoding to use.
-     */
-    public static String getDefaultEncoding() {
-        return staticDefaultEncoding;
-    }
-
-    /**
-     * Creates a Reader for a File.
-     * <p>
-     * It looks for the UTF-8 BOM first, if none sniffs the XML prolog charset,
-     * if this is also missing defaults to UTF-8.
-     * <p>
-     * It does a lenient charset encoding detection, check the constructor with
-     * the lenient parameter for details.
-     *
-     * @param file File to create a Reader from.
-     * @throws IOException thrown if there is a problem reading the file.
-     */
-    public XmlStreamReader(final File file) throws IOException {
-        this(new FileInputStream(file));
-    }
-
-    /**
-     * Creates a Reader for a raw InputStream.
-     * <p>
-     * It follows the same logic used for files.
-     * <p>
-     * It does a lenient charset encoding detection, check the constructor with
-     * the lenient parameter for details.
-     *
-     * @param is InputStream to create a Reader from.
-     * @throws IOException thrown if there is a problem reading the stream.
-     */
-    public XmlStreamReader(final InputStream is) throws IOException {
-        this(is, true);
-    }
-
-    /**
-     * Creates a Reader for a raw InputStream.
-     * <p>
-     * It follows the same logic used for files.
-     * <p>
-     * If lenient detection is indicated and the detection above fails as per
-     * specifications it then attempts the following:
-     * <p>
-     * If the content type was 'text/html' it replaces it with 'text/xml' and
-     * tries the detection again.
-     * <p>
-     * Else if the XML prolog had a charset encoding that encoding is used.
-     * <p>
-     * Else if the content type had a charset encoding that encoding is used.
-     * <p>
-     * Else 'UTF-8' is used.
-     * <p>
-     * If lenient detection is indicated an XmlStreamReaderException is never
-     * thrown.
-     *
-     * @param is InputStream to create a Reader from.
-     * @param lenient indicates if the charset encoding detection should be
-     *        relaxed.
-     * @throws IOException thrown if there is a problem reading the stream.
-     * @throws XmlStreamReaderException thrown if the charset encoding could not
-     *         be determined according to the specs.
-     */
-    public XmlStreamReader(final InputStream is, final boolean lenient) throws IOException,
-            XmlStreamReaderException {
-        defaultEncoding = staticDefaultEncoding;
-        try {
-            doRawStream(is);
-        } catch (final XmlStreamReaderException ex) {
-            if (!lenient) {
-                throw ex;
-            } else {
-                doLenientDetection(null, ex);
-            }
-        }
-    }
-
-    /**
-     * Creates a Reader using the InputStream of a URL.
-     * <p>
-     * If the URL is not of type HTTP and there is not 'content-type' header in
-     * the fetched data it uses the same logic used for Files.
-     * <p>
-     * If the URL is a HTTP Url or there is a 'content-type' header in the
-     * fetched data it uses the same logic used for an InputStream with
-     * content-type.
-     * <p>
-     * It does a lenient charset encoding detection, check the constructor with
-     * the lenient parameter for details.
-     *
-     * @param url URL to create a Reader from.
-     * @throws IOException thrown if there is a problem reading the stream of
-     *         the URL.
-     */
-    public XmlStreamReader(final URL url) throws IOException {
-        this(url.openConnection());
-    }
-
-    /**
-     * Creates a Reader using the InputStream of a URLConnection.
-     * <p>
-     * If the URLConnection is not of type HttpURLConnection and there is not
-     * 'content-type' header in the fetched data it uses the same logic used for
-     * files.
-     * <p>
-     * If the URLConnection is a HTTP Url or there is a 'content-type' header in
-     * the fetched data it uses the same logic used for an InputStream with
-     * content-type.
-     * <p>
-     * It does a lenient charset encoding detection, check the constructor with
-     * the lenient parameter for details.
-     *
-     * @param conn URLConnection to create a Reader from.
-     * @throws IOException thrown if there is a problem reading the stream of
-     *         the URLConnection.
-     */
-    public XmlStreamReader(final URLConnection conn) throws IOException {
-        defaultEncoding = staticDefaultEncoding;
-        final boolean lenient = true;
-        if (conn instanceof HttpURLConnection) {
-            try {
-                doHttpStream(conn.getInputStream(), conn.getContentType(),
-                        lenient);
-            } catch (final XmlStreamReaderException ex) {
-                doLenientDetection(conn.getContentType(), ex);
-            }
-        } else if (conn.getContentType() != null) {
-            try {
-                doHttpStream(conn.getInputStream(), conn.getContentType(),
-                        lenient);
-            } catch (final XmlStreamReaderException ex) {
-                doLenientDetection(conn.getContentType(), ex);
-            }
-        } else {
-            try {
-                doRawStream(conn.getInputStream());
-            } catch (final XmlStreamReaderException ex) {
-                doLenientDetection(null, ex);
-            }
-        }
-    }
-
-    /**
-     * Creates a Reader using an InputStream an the associated content-type
-     * header.
-     * <p>
-     * First it checks if the stream has BOM. If there is not BOM checks the
-     * content-type encoding. If there is not content-type encoding checks the
-     * XML prolog encoding. If there is not XML prolog encoding uses the default
-     * encoding mandated by the content-type MIME type.
-     * <p>
-     * It does a lenient charset encoding detection, check the constructor with
-     * the lenient parameter for details.
-     *
-     * @param is InputStream to create the reader from.
-     * @param httpContentType content-type header to use for the resolution of
-     *        the charset encoding.
-     * @throws IOException thrown if there is a problem reading the file.
-     */
-    public XmlStreamReader(final InputStream is, final String httpContentType)
-            throws IOException {
-        this(is, httpContentType, true);
-    }
-
-    /**
-     * Creates a Reader using an InputStream an the associated content-type
-     * header. This constructor is lenient regarding the encoding detection.
-     * <p>
-     * First it checks if the stream has BOM. If there is not BOM checks the
-     * content-type encoding. If there is not content-type encoding checks the
-     * XML prolog encoding. If there is not XML prolog encoding uses the default
-     * encoding mandated by the content-type MIME type.
-     * <p>
-     * If lenient detection is indicated and the detection above fails as per
-     * specifications it then attempts the following:
-     * <p>
-     * If the content type was 'text/html' it replaces it with 'text/xml' and
-     * tries the detection again.
-     * <p>
-     * Else if the XML prolog had a charset encoding that encoding is used.
-     * <p>
-     * Else if the content type had a charset encoding that encoding is used.
-     * <p>
-     * Else 'UTF-8' is used.
-     * <p>
-     * If lenient detection is indicated an XmlStreamReaderException is never
-     * thrown.
-     *
-     * @param is InputStream to create the reader from.
-     * @param httpContentType content-type header to use for the resolution of
-     *        the charset encoding.
-     * @param lenient indicates if the charset encoding detection should be
-     *        relaxed.
-     * @param defaultEncoding the default encoding to use
-     * @throws IOException thrown if there is a problem reading the file.
-     * @throws XmlStreamReaderException thrown if the charset encoding could not
-     *         be determined according to the specs.
-     */
-    public XmlStreamReader(final InputStream is, final String httpContentType,
-            final boolean lenient, final String defaultEncoding) throws IOException,
-            XmlStreamReaderException {
-        this.defaultEncoding = defaultEncoding == null ? staticDefaultEncoding
-                : defaultEncoding;
-        try {
-            doHttpStream(is, httpContentType, lenient);
-        } catch (final XmlStreamReaderException ex) {
-            if (!lenient) {
-                throw ex;
-            } else {
-                doLenientDetection(httpContentType, ex);
-            }
-        }
-    }
-
-    /**
-     * Creates a Reader using an InputStream an the associated content-type
-     * header. This constructor is lenient regarding the encoding detection.
-     * <p>
-     * First it checks if the stream has BOM. If there is not BOM checks the
-     * content-type encoding. If there is not content-type encoding checks the
-     * XML prolog encoding. If there is not XML prolog encoding uses the default
-     * encoding mandated by the content-type MIME type.
-     * <p>
-     * If lenient detection is indicated and the detection above fails as per
-     * specifications it then attempts the following:
-     * <p>
-     * If the content type was 'text/html' it replaces it with 'text/xml' and
-     * tries the detection again.
-     * <p>
-     * Else if the XML prolog had a charset encoding that encoding is used.
-     * <p>
-     * Else if the content type had a charset encoding that encoding is used.
-     * <p>
-     * Else 'UTF-8' is used.
-     * <p>
-     * If lenient detection is indicated an XmlStreamReaderException is never
-     * thrown.
-     *
-     * @param is InputStream to create the reader from.
-     * @param httpContentType content-type header to use for the resolution of
-     *        the charset encoding.
-     * @param lenient indicates if the charset encoding detection should be
-     *        relaxed.
-     * @throws IOException thrown if there is a problem reading the file.
-     * @throws XmlStreamReaderException thrown if the charset encoding could not
-     *         be determined according to the specs.
-     */
-    public XmlStreamReader(final InputStream is, final String httpContentType,
-            final boolean lenient) throws IOException, XmlStreamReaderException {
-        this(is, httpContentType, lenient, null);
-    }
-
-    private void doLenientDetection(String httpContentType,
-            XmlStreamReaderException ex) throws IOException {
-        if (httpContentType != null) {
-            if (httpContentType.startsWith("text/html")) {
-                httpContentType = httpContentType.substring("text/html"
-                        .length());
-                httpContentType = "text/xml" + httpContentType;
-                try {
-                    doHttpStream(ex.getInputStream(), httpContentType, true);
-                    ex = null;
-                } catch (final XmlStreamReaderException ex2) {
-                    ex = ex2;
-                }
-            }
-        }
-        if (ex != null) {
-            String encoding = ex.getXmlEncoding();
-            if (encoding == null) {
-                encoding = ex.getContentTypeEncoding();
-            }
-            if (encoding == null) {
-                encoding = defaultEncoding == null ? UTF_8 : defaultEncoding;
-            }
-            prepareReader(ex.getInputStream(), encoding);
-        }
-    }
-
-    /**
-     * Returns the charset encoding of the XmlStreamReader.
-     *
-     * @return charset encoding.
-     */
-    public String getEncoding() {
-        return encoding;
-    }
-
-    @Override
-    public int read(final char[] buf, final int offset, final int len) throws IOException {
-        return reader.read(buf, offset, len);
-    }
-
-    /**
-     * Closes the XmlStreamReader stream.
-     *
-     * @throws IOException thrown if there was a problem closing the stream.
-     */
-    @Override
-    public void close() throws IOException {
-        reader.close();
-    }
-
-    private void doRawStream(final InputStream is)
-            throws IOException {
-        final BufferedInputStream pis = new BufferedInputStream(is, BUFFER_SIZE);
-        final String bomEnc = getBOMEncoding(pis);
-        final String xmlGuessEnc = getXMLGuessEncoding(pis);
-        final String xmlEnc = getXmlProlog(pis, xmlGuessEnc);
-        final String encoding = calculateRawEncoding(bomEnc, xmlGuessEnc, xmlEnc, pis);
-        prepareReader(pis, encoding);
-    }
-
-    private void doHttpStream(final InputStream is, final String httpContentType,
-            final boolean lenient) throws IOException {
-        final BufferedInputStream pis = new BufferedInputStream(is, BUFFER_SIZE);
-        final String cTMime = getContentTypeMime(httpContentType);
-        final String cTEnc = getContentTypeEncoding(httpContentType);
-        final String bomEnc = getBOMEncoding(pis);
-        final String xmlGuessEnc = getXMLGuessEncoding(pis);
-        final String xmlEnc = getXmlProlog(pis, xmlGuessEnc);
-        final String encoding = calculateHttpEncoding(cTMime, cTEnc, bomEnc,
-                xmlGuessEnc, xmlEnc, pis, lenient);
-        prepareReader(pis, encoding);
-    }
-
-    private void prepareReader(final InputStream is, final String encoding)
-            throws IOException {
-        reader = new InputStreamReader(is, encoding);
-        this.encoding = encoding;
-    }
-
-    // InputStream is passed for XmlStreamReaderException creation only
-    String calculateRawEncoding(final String bomEnc, final String xmlGuessEnc,
-            final String xmlEnc, final InputStream is) throws IOException {
-        String encoding;
-        if (bomEnc == null) {
-            if (xmlGuessEnc == null || xmlEnc == null) {
-                encoding = defaultEncoding == null ? UTF_8 : defaultEncoding;
-            } else if (xmlEnc.equals(UTF_16)
-                    && (xmlGuessEnc.equals(UTF_16BE) || xmlGuessEnc
-                            .equals(UTF_16LE))) {
-                encoding = xmlGuessEnc;
-            } else if (xmlEnc.equals(UTF_32)
-                    && (xmlGuessEnc.equals(UTF_32BE) || xmlGuessEnc
-                            .equals(UTF_32LE))) {
-                encoding = xmlGuessEnc;
-            } else {
-                encoding = xmlEnc;
-            }
-        } else if (bomEnc.equals(UTF_8)) {
-            if (xmlGuessEnc != null && !xmlGuessEnc.equals(UTF_8)) {
-                throw new XmlStreamReaderException(RAW_EX_1
-                        .format(new Object[] { bomEnc, xmlGuessEnc, xmlEnc }),
-                        bomEnc, xmlGuessEnc, xmlEnc, is);
-            }
-            if (xmlEnc != null && !xmlEnc.equals(UTF_8)) {
-                throw new XmlStreamReaderException(RAW_EX_1
-                        .format(new Object[] { bomEnc, xmlGuessEnc, xmlEnc }),
-                        bomEnc, xmlGuessEnc, xmlEnc, is);
-            }
-            encoding = UTF_8;
-        } else if (bomEnc.equals(UTF_16BE) || bomEnc.equals(UTF_16LE)) {
-            if (xmlGuessEnc != null && !xmlGuessEnc.equals(bomEnc)) {
-                throw new XmlStreamReaderException(RAW_EX_1.format(new Object[] { bomEnc,
-                        xmlGuessEnc, xmlEnc }), bomEnc, xmlGuessEnc, xmlEnc, is);
-            }
-            if (xmlEnc != null && !xmlEnc.equals(UTF_16)
-                    && !xmlEnc.equals(bomEnc)) {
-                throw new XmlStreamReaderException(RAW_EX_1
-                        .format(new Object[] { bomEnc, xmlGuessEnc, xmlEnc }),
-                        bomEnc, xmlGuessEnc, xmlEnc, is);
-            }
-            encoding = bomEnc;
-        } else if (bomEnc.equals(UTF_32BE) || bomEnc.equals(UTF_32LE)) {
-            if (xmlGuessEnc != null && !xmlGuessEnc.equals(bomEnc)) {
-                throw new XmlStreamReaderException(RAW_EX_1.format(new Object[] { bomEnc,
-                        xmlGuessEnc, xmlEnc }), bomEnc, xmlGuessEnc, xmlEnc, is);
-            }
-            if (xmlEnc != null && !xmlEnc.equals(UTF_32)
-                    && !xmlEnc.equals(bomEnc)) {
-                throw new XmlStreamReaderException(RAW_EX_1
-                        .format(new Object[] { bomEnc, xmlGuessEnc, xmlEnc }),
-                        bomEnc, xmlGuessEnc, xmlEnc, is);
-            }
-            encoding = bomEnc;
-        } else {
-            throw new XmlStreamReaderException(RAW_EX_2.format(new Object[] {
-                    bomEnc, xmlGuessEnc, xmlEnc }), bomEnc, xmlGuessEnc,
-                    xmlEnc, is);
-        }
-        return encoding;
-    }
-
-    // InputStream is passed for XmlStreamReaderException creation only
-    String calculateHttpEncoding(final String cTMime, final String cTEnc,
-            final String bomEnc, final String xmlGuessEnc, final String xmlEnc, final InputStream is,
-            final boolean lenient) throws IOException {
-        String encoding;
-        if (lenient & xmlEnc != null) {
-            encoding = xmlEnc;
-        } else {
-            final boolean appXml = isAppXml(cTMime);
-            final boolean textXml = isTextXml(cTMime);
-            if (appXml || textXml) {
-                if (cTEnc == null) {
-                    if (appXml) {
-                        encoding = calculateRawEncoding(bomEnc, xmlGuessEnc,
-                                xmlEnc, is);
-                    } else {
-                        encoding = defaultEncoding == null ? US_ASCII
-                                : defaultEncoding;
-                    }
-                } else if (bomEnc != null
-                        && (cTEnc.equals(UTF_16BE) || cTEnc.equals(UTF_16LE))) {
-                    throw new XmlStreamReaderException(HTTP_EX_1
-                            .format(new Object[] { cTMime, cTEnc, bomEnc,
-                                    xmlGuessEnc, xmlEnc }), cTMime, cTEnc,
-                            bomEnc, xmlGuessEnc, xmlEnc, is);
-                } else if (cTEnc.equals(UTF_16)) {
-                    if (bomEnc != null && bomEnc.startsWith(UTF_16)) {
-                        encoding = bomEnc;
-                    } else {
-                        throw new XmlStreamReaderException(HTTP_EX_2
-                                .format(new Object[] { cTMime, cTEnc, bomEnc,
-                                        xmlGuessEnc, xmlEnc }), cTMime, cTEnc,
-                                bomEnc, xmlGuessEnc, xmlEnc, is);
-                    }
-                } else if (bomEnc != null
-                        && (cTEnc.equals(UTF_32BE) || cTEnc.equals(UTF_32LE))) {
-                    throw new XmlStreamReaderException(HTTP_EX_1
-                            .format(new Object[] { cTMime, cTEnc, bomEnc,
-                                    xmlGuessEnc, xmlEnc }), cTMime, cTEnc,
-                            bomEnc, xmlGuessEnc, xmlEnc, is);
-                } else if (cTEnc.equals(UTF_32)) {
-                    if (bomEnc != null && bomEnc.startsWith(UTF_32)) {
-                        encoding = bomEnc;
-                    } else {
-                        throw new XmlStreamReaderException(HTTP_EX_2
-                                .format(new Object[] { cTMime, cTEnc, bomEnc,
-                                        xmlGuessEnc, xmlEnc }), cTMime, cTEnc,
-                                bomEnc, xmlGuessEnc, xmlEnc, is);
-                    }
-                } else {
-                    encoding = cTEnc;
-                }
-            } else {
-                throw new XmlStreamReaderException(HTTP_EX_3
-                        .format(new Object[] { cTMime, cTEnc, bomEnc,
-                                xmlGuessEnc, xmlEnc }), cTMime, cTEnc, bomEnc,
-                        xmlGuessEnc, xmlEnc, is);
-            }
-        }
-        return encoding;
-    }
-
-    // returns MIME type or NULL if httpContentType is NULL
-    static String getContentTypeMime(final String httpContentType) {
-        String mime = null;
-        if (httpContentType != null) {
-            final int i = httpContentType.indexOf(";");
-            mime = (i == -1 ? httpContentType : httpContentType.substring(0,
-                    i)).trim();
-        }
-        return mime;
-    }
-
-    private static final Pattern CHARSET_PATTERN = Pattern
-            .compile("charset=[\"']?([.[^; \"']]*)[\"']?");
-
-    // returns charset parameter value, NULL if not present, NULL if
-    // httpContentType is NULL
-    static String getContentTypeEncoding(final String httpContentType) {
-        String encoding = null;
-        if (httpContentType != null) {
-            final int i = httpContentType.indexOf(";");
-            if (i > -1) {
-                final String postMime = httpContentType.substring(i + 1);
-                final Matcher m = CHARSET_PATTERN.matcher(postMime);
-                encoding = m.find() ? m.group(1) : null;
-                encoding = encoding != null ? encoding.toUpperCase() : null;
-            }
-        }
-        return encoding;
-    }
-
-    // returns the BOM in the stream, NULL if not present,
-    // if there was BOM the in the stream it is consumed
-    static String getBOMEncoding(final BufferedInputStream is)
-            throws IOException {
-        String encoding = null;
-        final int[] bytes = new int[3];
-        is.mark(3);
-        bytes[0] = is.read();
-        bytes[1] = is.read();
-        bytes[2] = is.read();
-
-        if (bytes[0] == 0xFE && bytes[1] == 0xFF) {
-            encoding = UTF_16BE;
-            is.reset();
-            is.read();
-            is.read();
-        } else if (bytes[0] == 0xFF && bytes[1] == 0xFE) {
-            encoding = UTF_16LE;
-            is.reset();
-            is.read();
-            is.read();
-        } else if (bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) {
-            encoding = UTF_8;
-        } else {
-            is.reset();
-        }
-        return encoding;
-    }
-
-    // returns the best guess for the encoding by looking the first bytes of the
-    // stream, '<?'
-    private static String getXMLGuessEncoding(final BufferedInputStream is)
-            throws IOException {
-        String encoding = null;
-        final int[] bytes = new int[4];
-        is.mark(4);
-        bytes[0] = is.read();
-        bytes[1] = is.read();
-        bytes[2] = is.read();
-        bytes[3] = is.read();
-        is.reset();
-
-        if (bytes[0] == 0x00 && bytes[1] == 0x3C && bytes[2] == 0x00
-                && bytes[3] == 0x3F) {
-            encoding = UTF_16BE;
-        } else if (bytes[0] == 0x3C && bytes[1] == 0x00 && bytes[2] == 0x3F
-                && bytes[3] == 0x00) {
-            encoding = UTF_16LE;
-        } else if (bytes[0] == 0x3C && bytes[1] == 0x3F && bytes[2] == 0x78
-                && bytes[3] == 0x6D) {
-            encoding = UTF_8;
-        } else if (bytes[0] == 0x4C && bytes[1] == 0x6F && bytes[2] == 0xA7
-                && bytes[3] == 0x94) {
-            encoding = EBCDIC;
-        }
-        return encoding;
-    }
-
-    public static final Pattern ENCODING_PATTERN = Pattern.compile(
-            "<\\?xml.*encoding[\\s]*=[\\s]*((?:\".[^\"]*\")|(?:'.[^']*'))",
-            Pattern.MULTILINE);
-
-    // returns the encoding declared in the <?xml encoding=...?>, NULL if none
-    private static String getXmlProlog(final BufferedInputStream is, final String guessedEnc)
-            throws IOException {
-        String encoding = null;
-        if (guessedEnc != null) {
-            final byte[] bytes = new byte[BUFFER_SIZE];
-            is.mark(BUFFER_SIZE);
-            int offset = 0;
-            int max = BUFFER_SIZE;
-            int c = is.read(bytes, offset, max);
-            int firstGT = -1;
-            String xmlProlog = ""; // avoid possible NPE warning (cannot happen; this just silences the warning)
-            while (c != -1 && firstGT == -1 && offset < BUFFER_SIZE) {
-                offset += c;
-                max -= c;
-                c = is.read(bytes, offset, max);
-                xmlProlog = new String(bytes, 0, offset, guessedEnc);
-                firstGT = xmlProlog.indexOf('>');
-            }
-            if (firstGT == -1) {
-                if (c == -1) {
-                    throw new IOException("Unexpected end of XML stream");
-                } else {
-                    throw new IOException(
-                            "XML prolog or ROOT element not found on first "
-                                    + offset + " bytes");
-                }
-            }
-            final int bytesRead = offset;
-            if (bytesRead > 0) {
-                is.reset();
-                final BufferedReader bReader = new BufferedReader(new StringReader(
-                        xmlProlog.substring(0, firstGT + 1)));
-                final StringBuffer prolog = new StringBuffer();
-                String line = bReader.readLine();
-                while (line != null) {
-                    prolog.append(line);
-                    line = bReader.readLine();
-                }
-                final Matcher m = ENCODING_PATTERN.matcher(prolog);
-                if (m.find()) {
-                    encoding = m.group(1).toUpperCase();
-                    encoding = encoding.substring(1, encoding.length() - 1);
-                }
-            }
-        }
-        return encoding;
-    }
-
-    // indicates if the MIME type belongs to the APPLICATION XML family
-    static boolean isAppXml(final String mime) {
-        return mime != null
-                && (mime.equals("application/xml")
-                        || mime.equals("application/xml-dtd")
-                        || mime
-                                .equals("application/xml-external-parsed-entity") || mime
-                        .startsWith("application/") && mime.endsWith("+xml"));
-    }
-
-    // indicates if the MIME type belongs to the TEXT XML family
-    static boolean isTextXml(final String mime) {
-        return mime != null
-                && (mime.equals("text/xml")
-                        || mime.equals("text/xml-external-parsed-entity") || mime
-                        .startsWith("text/") && mime.endsWith("+xml"));
-    }
-
-    private static final MessageFormat RAW_EX_1 = new MessageFormat(
-            "Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] encoding mismatch");
-
-    private static final MessageFormat RAW_EX_2 = new MessageFormat(
-            "Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] unknown BOM");
-
-    private static final MessageFormat HTTP_EX_1 = new MessageFormat(
-            "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], BOM must be NULL");
-
-    private static final MessageFormat HTTP_EX_2 = new MessageFormat(
-            "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], encoding mismatch");
-
-    private static final MessageFormat HTTP_EX_3 = new MessageFormat(
-            "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], Invalid MIME");
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReaderException.java b/trunk/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReaderException.java
deleted file mode 100644
index e834284..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReaderException.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input.compatibility;
-
-import java.io.InputStream;
-
-/**
- * The XmlStreamReaderException is thrown by the XmlStreamReader constructors if
- * the charset encoding can not be determined according to the XML 1.0
- * specification and RFC 3023.
- * <p>
- * The exception returns the unconsumed InputStream to allow the application to
- * do an alternate processing with the stream. Note that the original
- * InputStream given to the XmlStreamReader cannot be used as that one has been
- * already read.
- *
- * @version $Id$
- */
-public class XmlStreamReaderException extends org.apache.commons.io.input.XmlStreamReaderException {
-
-    private static final long serialVersionUID = 1L;
-
-    private final InputStream is;
-
-    /**
-     * Creates an exception instance if the charset encoding could not be
-     * determined.
-     * <p>
-     * Instances of this exception are thrown by the XmlStreamReader.
-     *
-     * @param msg message describing the reason for the exception.
-     * @param bomEnc BOM encoding.
-     * @param xmlGuessEnc XML guess encoding.
-     * @param xmlEnc XML prolog encoding.
-     * @param is the unconsumed InputStream.
-     */
-    public XmlStreamReaderException(final String msg, final String bomEnc,
-            final String xmlGuessEnc, final String xmlEnc, final InputStream is) {
-        this(msg, null, null, bomEnc, xmlGuessEnc, xmlEnc, is);
-    }
-
-    /**
-     * Creates an exception instance if the charset encoding could not be
-     * determined.
-     * <p>
-     * Instances of this exception are thrown by the XmlStreamReader.
-     *
-     * @param msg message describing the reason for the exception.
-     * @param ctMime MIME type in the content-type.
-     * @param ctEnc encoding in the content-type.
-     * @param bomEnc BOM encoding.
-     * @param xmlGuessEnc XML guess encoding.
-     * @param xmlEnc XML prolog encoding.
-     * @param is the unconsumed InputStream.
-     */
-    public XmlStreamReaderException(final String msg, final String ctMime, final String ctEnc,
-            final String bomEnc, final String xmlGuessEnc, final String xmlEnc, final InputStream is) {
-        super(msg, ctMime, ctEnc, bomEnc, xmlGuessEnc, xmlEnc);
-        this.is = is;
-    }
-
-    /**
-     * Returns the unconsumed InputStream to allow the application to do an
-     * alternate encoding detection on the InputStream.
-     *
-     * @return the unconsumed InputStream.
-     */
-    public InputStream getInputStream() {
-        return is;
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReaderUtilitiesCompatibilityTest.java b/trunk/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReaderUtilitiesCompatibilityTest.java
deleted file mode 100644
index d1c7d10..0000000
--- a/trunk/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReaderUtilitiesCompatibilityTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input.compatibility;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-
-import org.apache.commons.io.input.XmlStreamReaderUtilitiesTest;
-
-/**
- * Test compatibility of the original XmlStreamReader (before all the refactoring).
- */
-public class XmlStreamReaderUtilitiesCompatibilityTest extends XmlStreamReaderUtilitiesTest {
-
-    @Override
-    protected String calculateRawEncoding(final String bomEnc, final String xmlGuessEnc, final String xmlEnc,
-            final String defaultEncoding) throws IOException {
-        final MockXmlStreamReader mock = new MockXmlStreamReader(defaultEncoding);
-        final String enc = mock.calculateRawEncoding(bomEnc, xmlGuessEnc, xmlEnc, null);
-        mock.close();
-        return enc;
-    }
-    @Override
-    protected String calculateHttpEncoding(final String httpContentType, final String bomEnc, final String xmlGuessEnc,
-            final String xmlEnc, final boolean lenient, final String defaultEncoding) throws IOException {
-        final MockXmlStreamReader mock = new MockXmlStreamReader(defaultEncoding);
-        String enc = mock.calculateHttpEncoding(
-                XmlStreamReader.getContentTypeMime(httpContentType),
-                XmlStreamReader.getContentTypeEncoding(httpContentType),
-                bomEnc, xmlGuessEnc, xmlEnc, null, lenient);
-        mock.close();
-        return enc;
-    }
-
-    /** Mock {@link XmlStreamReader} implementation */
-    private static class MockXmlStreamReader extends XmlStreamReader {
-        MockXmlStreamReader(final String defaultEncoding) throws IOException {
-            super(new ByteArrayInputStream("".getBytes()), null, true, defaultEncoding);
-        }
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/monitor/AbstractMonitorTestCase.java b/trunk/src/test/java/org/apache/commons/io/monitor/AbstractMonitorTestCase.java
deleted file mode 100644
index 4c29fab..0000000
--- a/trunk/src/test/java/org/apache/commons/io/monitor/AbstractMonitorTestCase.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.monitor;
-
-import java.io.File;
-import java.io.FileFilter;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.filefilter.FileFilterUtils;
-import org.apache.commons.io.filefilter.HiddenFileFilter;
-import org.apache.commons.io.filefilter.IOFileFilter;
-
-/**
- * {@link FileAlterationObserver} Test Case.
- */
-public abstract class AbstractMonitorTestCase extends TestCase {
-
-    /** File observer */
-    protected FileAlterationObserver observer;
-
-    /** Listener which collects file changes */
-    protected CollectionFileListener listener;
-
-    /** Test diretory name */
-    protected String testDirName = null;
-
-    /** Directory for test files */
-    protected File testDir;
-
-    /** Time in milliseconds to pause in tests */
-    protected long pauseTime = 100L;
-
-    /**
-     * Construct a new test case.
-     *
-     * @param name The name of the test
-     */
-    public AbstractMonitorTestCase(final String name) {
-        super(name);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        testDir = new File(new File("."), testDirName);
-        if (testDir.exists()) {
-            FileUtils.cleanDirectory(testDir);
-        } else {
-            testDir.mkdir();
-        }
-
-        final IOFileFilter files = FileFilterUtils.fileFileFilter();
-        final IOFileFilter javaSuffix = FileFilterUtils.suffixFileFilter(".java");
-        final IOFileFilter fileFilter = FileFilterUtils.and(files, javaSuffix);
-
-        final IOFileFilter directories = FileFilterUtils.directoryFileFilter();
-        final IOFileFilter visible = HiddenFileFilter.VISIBLE;
-        final IOFileFilter dirFilter = FileFilterUtils.and(directories, visible);
-
-        final IOFileFilter filter = FileFilterUtils.or(dirFilter, fileFilter);
-
-        createObserver(testDir, filter);
-    }
-
-    /**
-     * Create a {@link FileAlterationObserver}.
-     *
-     * @param file The directory to observe
-     * @param fileFilter The file filter to apply
-     */
-    protected void createObserver(final File file, final FileFilter fileFilter) {
-        observer = new FileAlterationObserver(file, fileFilter);
-        observer.addListener(listener);
-        observer.addListener(new FileAlterationListenerAdaptor());
-        try {
-            observer.initialize();
-        } catch (final Exception e) {
-            fail("Observer init() threw " + e);
-        }
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        FileUtils.deleteDirectory(testDir);
-    }
-
-    /**
-     * Check all the Collections are empty
-     *
-     * @param label the label to use for this check
-     */
-    protected void checkCollectionsEmpty(final String label) {
-        checkCollectionSizes("EMPTY-" + label, 0, 0, 0, 0, 0, 0);
-    }
-
-    /**
-     * Check all the Collections have the expected sizes.
-     *
-     * @param label the label to use for this check
-     * @param dirCreate expected number of dirs created
-     * @param dirChange expected number of dirs changed
-     * @param dirDelete expected number of dirs deleted
-     * @param fileCreate expected number of files created
-     * @param fileChange expected number of files changed
-     * @param fileDelete expected number of files deleted
-     */
-    protected void checkCollectionSizes(String label, 
-                                        final int dirCreate, 
-                                        final int dirChange, 
-                                        final int dirDelete, 
-                                        final int fileCreate, 
-                                        final int fileChange, 
-                                        final int fileDelete) {
-        label = label + "[" + listener.getCreatedDirectories().size() +
-                        " " + listener.getChangedDirectories().size() +
-                        " " + listener.getDeletedDirectories().size() +
-                        " " + listener.getCreatedFiles().size() +
-                        " " + listener.getChangedFiles().size() +
-                        " " + listener.getDeletedFiles().size() + "]";
-        assertEquals(label + ": No. of directories created",  dirCreate,  listener.getCreatedDirectories().size());
-        assertEquals(label + ": No. of directories changed",  dirChange,  listener.getChangedDirectories().size());
-        assertEquals(label + ": No. of directories deleted",  dirDelete,  listener.getDeletedDirectories().size());
-        assertEquals(label + ": No. of files created", fileCreate, listener.getCreatedFiles().size());
-        assertEquals(label + ": No. of files changed", fileChange, listener.getChangedFiles().size());
-        assertEquals(label + ": No. of files deleted", fileDelete, listener.getDeletedFiles().size());
-    }
-
-    /**
-     * Either creates a file if it doesn't exist or updates the last modified date/time
-     * if it does.
-     *
-     * @param file The file to touch
-     * @return The file
-     */
-    protected File touch(File file) {
-        final long lastModified = file.exists() ? file.lastModified() : 0;
-        try {
-            FileUtils.touch(file);
-            file = new File(file.getParent(), file.getName());
-            while (lastModified == file.lastModified()) {
-                sleepHandleInterruped(pauseTime);
-                FileUtils.touch(file);
-                file = new File(file.getParent(), file.getName());
-            }
-        } catch (final Exception e) {
-            fail("Touching " + file + ": " + e);
-        }
-        sleepHandleInterruped(pauseTime);
-        return file;
-    }
-
-    /**
-     * Thread.sleep(timeInMilliseconds) - ignore InterruptedException
-     * 
-     * @param timeInMilliseconds the time to sleep
-     */
-    protected void sleepHandleInterruped(final long timeInMilliseconds) {
-        try {
-            Thread.sleep(timeInMilliseconds);
-        } catch(final InterruptedException ie) {
-            // ignore
-        }
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/monitor/CollectionFileListener.java b/trunk/src/test/java/org/apache/commons/io/monitor/CollectionFileListener.java
deleted file mode 100644
index 8d84743..0000000
--- a/trunk/src/test/java/org/apache/commons/io/monitor/CollectionFileListener.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.monitor;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-
-/**
- * {@link FileAlterationListener} implementation that adds created, changed and deleted
- * files/directories to a set of {@link Collection}s.
- */
-public class CollectionFileListener implements FileAlterationListener, Serializable {
-
-    private static final long serialVersionUID = 939724715678693963L;
-    private final boolean clearOnStart;
-    private final Collection<File> createdFiles = new ArrayList<File>();
-    private final Collection<File> changedFiles = new ArrayList<File>();
-    private final Collection<File> deletedFiles = new ArrayList<File>();
-    private final Collection<File> createdDirectories = new ArrayList<File>();
-    private final Collection<File> changedDirectories = new ArrayList<File>();
-    private final Collection<File> deletedDirectories = new ArrayList<File>();
-
-    /**
-     * Create a new observer.
-     *
-     * @param clearOnStart true if clear() should be called by onStart().
-     */
-    public CollectionFileListener(final boolean clearOnStart) {
-        this.clearOnStart = clearOnStart;
-    }
-
-    /**
-     * File system observer started checking event.
-     *
-     * @param observer The file system observer
-     */
-    public void onStart(final FileAlterationObserver observer) {
-        if (clearOnStart) {
-            clear();
-        }
-    }
-
-    /**
-     * Clear file collections.
-     */
-    public void clear() {
-        createdFiles.clear();
-        changedFiles.clear();
-        deletedFiles.clear();
-        createdDirectories.clear();
-        changedDirectories.clear();
-        deletedDirectories.clear();
-    }
-
-    /**
-     * Return the set of changed directories.
-     *
-     * @return Directories which have changed
-     */
-    public Collection<File> getChangedDirectories() {
-        return changedDirectories;
-    }
-
-    /**
-     * Return the set of changed files.
-     *
-     * @return Files which have changed
-     */
-    public Collection<File> getChangedFiles() {
-        return changedFiles;
-    }
-
-    /**
-     * Return the set of created directories.
-     *
-     * @return Directories which have been created
-     */
-    public Collection<File> getCreatedDirectories() {
-        return createdDirectories;
-    }
-
-    /**
-     * Return the set of created files.
-     *
-     * @return Files which have been created
-     */
-    public Collection<File> getCreatedFiles() {
-        return createdFiles;
-    }
-
-    /**
-     * Return the set of deleted directories.
-     *
-     * @return Directories which been deleted
-     */
-    public Collection<File> getDeletedDirectories() {
-        return deletedDirectories;
-    }
-
-    /**
-     * Return the set of deleted files.
-     *
-     * @return Files which been deleted
-     */
-    public Collection<File> getDeletedFiles() {
-        return deletedFiles;
-    }
-
-    /**
-     * Directory created Event.
-     * 
-     * @param directory The directory created
-     */
-    public void onDirectoryCreate(final File directory) {
-        createdDirectories.add(directory);
-    }
-
-    /**
-     * Directory changed Event.
-     * 
-     * @param directory The directory changed
-     */
-    public void onDirectoryChange(final File directory) {
-        changedDirectories.add(directory);
-    }
-
-    /**
-     * Directory deleted Event.
-     * 
-     * @param directory The directory deleted
-     */
-    public void onDirectoryDelete(final File directory) {
-        deletedDirectories.add(directory);
-    }
-
-    /**
-     * File created Event.
-     * 
-     * @param file The file created
-     */
-    public void onFileCreate(final File file) {
-        createdFiles.add(file);
-    }
-
-    /**
-     * File changed Event.
-     * 
-     * @param file The file changed
-     */
-    public void onFileChange(final File file) {
-        changedFiles.add(file);
-    }
-
-    /**
-     * File deleted Event.
-     * 
-     * @param file The file deleted
-     */
-    public void onFileDelete(final File file) {
-        deletedFiles.add(file);
-    }
-
-    /**
-     * File system observer finished checking event.
-     *
-     * @param observer The file system observer
-     */
-    public void onStop(final FileAlterationObserver observer) {
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/monitor/FileAlterationMonitorTestCase.java b/trunk/src/test/java/org/apache/commons/io/monitor/FileAlterationMonitorTestCase.java
deleted file mode 100644
index 1601294..0000000
--- a/trunk/src/test/java/org/apache/commons/io/monitor/FileAlterationMonitorTestCase.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.monitor;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.concurrent.Executors;
-
-/**
- * {@link FileAlterationMonitor} Test Case.
- */
-public class FileAlterationMonitorTestCase extends AbstractMonitorTestCase {
-
-    /**
-     * Construct a new test case.
-     *
-     * @param name The name of the test
-     */
-    public FileAlterationMonitorTestCase(final String name) {
-        super(name);
-        testDirName = "test-monitor";
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        listener = new CollectionFileListener(false);
-        super.setUp();
-    }
-
-    /**
-     * Test default constructor.
-     */
-    public void testDefaultConstructor() {
-        final FileAlterationMonitor monitor = new FileAlterationMonitor();
-        assertEquals("Interval", 10000, monitor.getInterval());
-    }
-
-    /**
-     * Test add/remove observers.
-     */
-    public void testAddRemoveObservers() {
-        FileAlterationObserver[] observers = null;
-        FileAlterationMonitor monitor = null;
-
-        // Null Observers
-        monitor = new FileAlterationMonitor(123, observers);
-        assertEquals("Interval", 123, monitor.getInterval());
-        assertFalse("Observers[1]", monitor.getObservers().iterator().hasNext());
-
-        // Null Observer
-        observers = new FileAlterationObserver[1]; // observer is null
-        monitor = new FileAlterationMonitor(456, observers);
-        assertFalse("Observers[2]", monitor.getObservers().iterator().hasNext());
-
-        // Null Observer
-        monitor.addObserver(null);
-        assertFalse("Observers[3]", monitor.getObservers().iterator().hasNext());
-        monitor.removeObserver(null);
-
-        // Add Observer
-        final FileAlterationObserver observer = new FileAlterationObserver("foo");
-        monitor.addObserver(observer);
-        final Iterator<FileAlterationObserver> it = monitor.getObservers().iterator();
-        assertTrue("Observers[4]", it.hasNext());
-        assertEquals("Added", observer, it.next());
-        assertFalse("Observers[5]", it.hasNext());
-
-        // Remove Observer
-        monitor.removeObserver(observer);
-        assertFalse("Observers[6]", monitor.getObservers().iterator().hasNext());
-    }
-
-    /**
-     * Test checkAndNotify() method
-     */
-    public void testMonitor() {
-        try {
-            final long interval = 100;
-            listener.clear();
-            final FileAlterationMonitor monitor = new FileAlterationMonitor(interval, observer);
-            assertEquals("Interval", interval, monitor.getInterval());
-            monitor.start();
-
-            try {
-                monitor.start(); // try and start again
-            } catch (final IllegalStateException e) {
-                // expected result, monitor already running
-            }
-
-            // Create a File
-            checkCollectionsEmpty("A");
-            File file1 = touch(new File(testDir, "file1.java"));
-            checkFile("Create", file1, listener.getCreatedFiles());
-            listener.clear();
-
-            // Update a file
-            checkCollectionsEmpty("B");
-            file1 = touch(file1);
-            checkFile("Update", file1, listener.getChangedFiles());
-            listener.clear();
-
-            // Delete a file
-            checkCollectionsEmpty("C");
-            file1.delete();
-            checkFile("Delete", file1, listener.getDeletedFiles());
-            listener.clear();
-
-            // Stop monitoring
-            monitor.stop();
-
-            try {
-                monitor.stop(); // try and stop again
-            } catch (final IllegalStateException e) {
-                // expected result, monitor already stopped
-            }
-        } catch (final Exception e) {
-            e.printStackTrace();
-            fail("Threw " + e);
-        }
-    }
-
-    /**
-     * Test using a thread factory.
-     */
-    public void testThreadFactory() {
-        try {
-            final long interval = 100;
-            listener.clear();
-            final FileAlterationMonitor monitor = new FileAlterationMonitor(interval, observer);
-            monitor.setThreadFactory(Executors.defaultThreadFactory());
-            assertEquals("Interval", interval, monitor.getInterval());
-            monitor.start();
-
-            // Create a File
-            checkCollectionsEmpty("A");
-            final File file2 = touch(new File(testDir, "file2.java"));
-            checkFile("Create", file2, listener.getCreatedFiles());
-            listener.clear();
-
-            // Delete a file
-            checkCollectionsEmpty("B");
-            file2.delete();
-            checkFile("Delete", file2, listener.getDeletedFiles());
-            listener.clear();
-
-            // Stop monitoring
-            monitor.stop();
-
-        } catch (final Exception e) {
-            e.printStackTrace();
-            fail("Threw " + e);
-        }
-    }
-
-    /**
-     * Check all the File Collections have the expected sizes.
-     */
-    private void checkFile(final String label, final File file, final Collection<File> files) {
-        for (int i = 0; i < 20; i++) {
-            if (files.contains(file)) {
-                return; // found, test passes
-            }
-            sleepHandleInterruped(pauseTime);
-        }
-        fail(label + " " + file + " not found");
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/monitor/FileAlterationObserverTestCase.java b/trunk/src/test/java/org/apache/commons/io/monitor/FileAlterationObserverTestCase.java
deleted file mode 100644
index 859bab2..0000000
--- a/trunk/src/test/java/org/apache/commons/io/monitor/FileAlterationObserverTestCase.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.monitor;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.util.Iterator;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.filefilter.CanReadFileFilter;
-import org.apache.commons.io.filefilter.FileFilterUtils;
-
-/**
- * {@link FileAlterationObserver} Test Case.
- */
-public class FileAlterationObserverTestCase extends AbstractMonitorTestCase {
-
-    /**
-     * Construct a new test case.
-     *
-     * @param name The name of the test
-     */
-    public FileAlterationObserverTestCase(final String name) {
-        super(name);
-        testDirName = "test-observer";
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        listener = new CollectionFileListener(true);
-        super.setUp();
-    }
-
-    /**
-     * Test add/remove listeners.
-     */
-    public void testAddRemoveListeners() {
-        final FileAlterationObserver observer = new FileAlterationObserver("/foo");
-        // Null Listener
-        observer.addListener(null);
-        assertFalse("Listeners[1]", observer.getListeners().iterator().hasNext());
-        observer.removeListener(null);
-        assertFalse("Listeners[2]", observer.getListeners().iterator().hasNext());
-
-        // Add Listener
-        final FileAlterationListenerAdaptor listener = new FileAlterationListenerAdaptor();
-        observer.addListener(listener);
-        final Iterator<FileAlterationListener> it = observer.getListeners().iterator();
-        assertTrue("Listeners[3]", it.hasNext());
-        assertEquals("Added", listener, it.next());
-        assertFalse("Listeners[4]", it.hasNext());
-
-        // Remove Listener
-        observer.removeListener(listener);
-        assertFalse("Listeners[5]", observer.getListeners().iterator().hasNext());
-    }
-
-    /**
-     * Test toString().
-     */
-    public void testToString() {
-        final File file = new File("/foo");
-        FileAlterationObserver observer = null;
-
-        observer = new FileAlterationObserver(file);
-        assertEquals("FileAlterationObserver[file='" + file.getPath() +  "', listeners=0]",
-                observer.toString());
-
-        observer = new FileAlterationObserver(file, CanReadFileFilter.CAN_READ);
-        assertEquals("FileAlterationObserver[file='" + file.getPath() +  "', CanReadFileFilter, listeners=0]",
-                observer.toString());
-
-        assertEquals(file, observer.getDirectory());
-  }
-
-    /**
-     * Test checkAndNotify() method
-     */
-    public void testDirectory() {
-        try {
-            checkAndNotify();
-            checkCollectionsEmpty("A");
-            final File testDirA = new File(testDir, "test-dir-A");
-            final File testDirB = new File(testDir, "test-dir-B");
-            final File testDirC = new File(testDir, "test-dir-C");
-            testDirA.mkdir();
-            testDirB.mkdir();
-            testDirC.mkdir();
-            final File testDirAFile1 = touch(new File(testDirA, "A-file1.java"));
-            final File testDirAFile2 = touch(new File(testDirA, "A-file2.txt")); // filter should ignore this
-            final File testDirAFile3 = touch(new File(testDirA, "A-file3.java"));
-            File testDirAFile4 = touch(new File(testDirA, "A-file4.java"));
-            final File testDirBFile1 = touch(new File(testDirB, "B-file1.java"));
-
-            checkAndNotify();
-            checkCollectionSizes("B", 3, 0, 0, 4, 0, 0);
-            assertTrue("B testDirA",   listener.getCreatedDirectories().contains(testDirA));
-            assertTrue("B testDirB",   listener.getCreatedDirectories().contains(testDirB));
-            assertTrue("B testDirC",   listener.getCreatedDirectories().contains(testDirC));
-            assertTrue("B testDirAFile1", listener.getCreatedFiles().contains(testDirAFile1));
-            assertFalse("B testDirAFile2", listener.getCreatedFiles().contains(testDirAFile2));
-            assertTrue("B testDirAFile3", listener.getCreatedFiles().contains(testDirAFile3));
-            assertTrue("B testDirAFile4", listener.getCreatedFiles().contains(testDirAFile4));
-            assertTrue("B testDirBFile1", listener.getCreatedFiles().contains(testDirBFile1));
-
-            checkAndNotify();
-            checkCollectionsEmpty("C");
-
-            testDirAFile4 = touch(testDirAFile4);
-            FileUtils.deleteDirectory(testDirB);
-            checkAndNotify();
-            checkCollectionSizes("D", 0, 0, 1, 0, 1, 1);
-            assertTrue("D testDirB",   listener.getDeletedDirectories().contains(testDirB));
-            assertTrue("D testDirAFile4", listener.getChangedFiles().contains(testDirAFile4));
-            assertTrue("D testDirBFile1", listener.getDeletedFiles().contains(testDirBFile1));
-
-            FileUtils.deleteDirectory(testDir);
-            checkAndNotify();
-            checkCollectionSizes("E", 0, 0, 2, 0, 0, 3);
-            assertTrue("E testDirA",   listener.getDeletedDirectories().contains(testDirA));
-            assertTrue("E testDirAFile1", listener.getDeletedFiles().contains(testDirAFile1));
-            assertFalse("E testDirAFile2", listener.getDeletedFiles().contains(testDirAFile2));
-            assertTrue("E testDirAFile3", listener.getDeletedFiles().contains(testDirAFile3));
-            assertTrue("E testDirAFile4", listener.getDeletedFiles().contains(testDirAFile4));
-
-            testDir.mkdir();
-            checkAndNotify();
-            checkCollectionsEmpty("F");
-
-            checkAndNotify();
-            checkCollectionsEmpty("G");
-        } catch (final Exception e) {
-            e.printStackTrace();
-            fail("Threw " + e);
-        }
-    }
-
-    /**
-     * Test checkAndNotify() creating
-     */
-    public void testFileCreate() {
-        try {
-            checkAndNotify();
-            checkCollectionsEmpty("A");
-            File testDirA = new File(testDir, "test-dir-A");
-            testDirA.mkdir();
-            testDir  = touch(testDir);
-            testDirA = touch(testDirA);
-            File testDirAFile1 =       new File(testDirA, "A-file1.java");
-            final File testDirAFile2 = touch(new File(testDirA, "A-file2.java"));
-            File testDirAFile3 =       new File(testDirA, "A-file3.java");
-            final File testDirAFile4 = touch(new File(testDirA, "A-file4.java"));
-            File testDirAFile5 =       new File(testDirA, "A-file5.java");
-
-            checkAndNotify();
-            checkCollectionSizes("B", 1, 0, 0, 2, 0, 0);
-            assertFalse("B testDirAFile1", listener.getCreatedFiles().contains(testDirAFile1));
-            assertTrue("B testDirAFile2",  listener.getCreatedFiles().contains(testDirAFile2));
-            assertFalse("B testDirAFile3", listener.getCreatedFiles().contains(testDirAFile3));
-            assertTrue("B testDirAFile4",  listener.getCreatedFiles().contains(testDirAFile4));
-            assertFalse("B testDirAFile5", listener.getCreatedFiles().contains(testDirAFile5));
-
-            assertFalse("B testDirAFile1 exists", testDirAFile1.exists());
-            assertTrue("B testDirAFile2 exists",  testDirAFile2.exists());
-            assertFalse("B testDirAFile3 exists", testDirAFile3.exists());
-            assertTrue("B testDirAFile4 exists",  testDirAFile4.exists());
-            assertFalse("B testDirAFile5 exists", testDirAFile5.exists());
-
-            checkAndNotify();
-            checkCollectionsEmpty("C");
-
-            // Create file with name < first entry
-            testDirAFile1 = touch(testDirAFile1);
-            testDirA      = touch(testDirA);
-            checkAndNotify();
-            checkCollectionSizes("D", 0, 1, 0, 1, 0, 0);
-            assertTrue("D testDirAFile1 exists", testDirAFile1.exists());
-            assertTrue("D testDirAFile1",  listener.getCreatedFiles().contains(testDirAFile1));
-
-            // Create file with name between 2 entries
-            testDirAFile3 = touch(testDirAFile3);
-            testDirA      = touch(testDirA);
-            checkAndNotify();
-            checkCollectionSizes("E", 0, 1, 0, 1, 0, 0);
-            assertTrue("E testDirAFile3 exists", testDirAFile3.exists());
-            assertTrue("E testDirAFile3",  listener.getCreatedFiles().contains(testDirAFile3));
-
-            // Create file with name > last entry
-            testDirAFile5 = touch(testDirAFile5);
-            testDirA      = touch(testDirA);
-            checkAndNotify();
-            checkCollectionSizes("F", 0, 1, 0, 1, 0, 0);
-            assertTrue("F testDirAFile5 exists", testDirAFile5.exists());
-            assertTrue("F testDirAFile5",  listener.getCreatedFiles().contains(testDirAFile5));
-        } catch (final Exception e) {
-            fail("Threw " + e);
-        }
-    }
-
-    /**
-     * Test checkAndNotify() creating
-     */
-    public void testFileUpdate() {
-        try {
-            checkAndNotify();
-            checkCollectionsEmpty("A");
-            File testDirA = new File(testDir, "test-dir-A");
-            testDirA.mkdir();
-            testDir  = touch(testDir);
-            testDirA = touch(testDirA);
-            File testDirAFile1 = touch(new File(testDirA, "A-file1.java"));
-            final File testDirAFile2 = touch(new File(testDirA, "A-file2.java"));
-            File testDirAFile3 = touch(new File(testDirA, "A-file3.java"));
-            final File testDirAFile4 = touch(new File(testDirA, "A-file4.java"));
-            File testDirAFile5 = touch(new File(testDirA, "A-file5.java"));
-
-            checkAndNotify();
-            checkCollectionSizes("B", 1, 0, 0, 5, 0, 0);
-            assertTrue("B testDirAFile1", listener.getCreatedFiles().contains(testDirAFile1));
-            assertTrue("B testDirAFile2", listener.getCreatedFiles().contains(testDirAFile2));
-            assertTrue("B testDirAFile3", listener.getCreatedFiles().contains(testDirAFile3));
-            assertTrue("B testDirAFile4", listener.getCreatedFiles().contains(testDirAFile4));
-            assertTrue("B testDirAFile5", listener.getCreatedFiles().contains(testDirAFile5));
-
-            assertTrue("B testDirAFile1 exists", testDirAFile1.exists());
-            assertTrue("B testDirAFile2 exists", testDirAFile2.exists());
-            assertTrue("B testDirAFile3 exists", testDirAFile3.exists());
-            assertTrue("B testDirAFile4 exists", testDirAFile4.exists());
-            assertTrue("B testDirAFile5 exists", testDirAFile5.exists());
-
-            checkAndNotify();
-            checkCollectionsEmpty("C");
-
-            // Update first entry
-            testDirAFile1 = touch(testDirAFile1);
-            testDirA      = touch(testDirA);
-            checkAndNotify();
-            checkCollectionSizes("D", 0, 1, 0, 0, 1, 0);
-            assertTrue("D testDirAFile1",  listener.getChangedFiles().contains(testDirAFile1));
-
-            // Update file with name between 2 entries
-            testDirAFile3 = touch(testDirAFile3);
-            testDirA      = touch(testDirA);
-            checkAndNotify();
-            checkCollectionSizes("E", 0, 1, 0, 0, 1, 0);
-            assertTrue("E testDirAFile3",  listener.getChangedFiles().contains(testDirAFile3));
-
-            // Update last entry
-            testDirAFile5 = touch(testDirAFile5);
-            testDirA      = touch(testDirA);
-            checkAndNotify();
-            checkCollectionSizes("F", 0, 1, 0, 0, 1, 0);
-            assertTrue("F testDirAFile5",  listener.getChangedFiles().contains(testDirAFile5));
-        } catch (final Exception e) {
-            fail("Threw " + e);
-        }
-    }
-
-    /**
-     * Test checkAndNotify() deleting
-     */
-    public void testFileDelete() {
-        try {
-            checkAndNotify();
-            checkCollectionsEmpty("A");
-            File testDirA = new File(testDir, "test-dir-A");
-            testDirA.mkdir();
-            testDir  = touch(testDir);
-            testDirA = touch(testDirA);
-            final File testDirAFile1 = touch(new File(testDirA, "A-file1.java"));
-            final File testDirAFile2 = touch(new File(testDirA, "A-file2.java"));
-            final File testDirAFile3 = touch(new File(testDirA, "A-file3.java"));
-            final File testDirAFile4 = touch(new File(testDirA, "A-file4.java"));
-            final File testDirAFile5 = touch(new File(testDirA, "A-file5.java"));
-
-            assertTrue("B testDirAFile1 exists", testDirAFile1.exists());
-            assertTrue("B testDirAFile2 exists", testDirAFile2.exists());
-            assertTrue("B testDirAFile3 exists", testDirAFile3.exists());
-            assertTrue("B testDirAFile4 exists", testDirAFile4.exists());
-            assertTrue("B testDirAFile5 exists", testDirAFile5.exists());
-
-            checkAndNotify();
-            checkCollectionSizes("B", 1, 0, 0, 5, 0, 0);
-            assertTrue("B testDirAFile1", listener.getCreatedFiles().contains(testDirAFile1));
-            assertTrue("B testDirAFile2", listener.getCreatedFiles().contains(testDirAFile2));
-            assertTrue("B testDirAFile3", listener.getCreatedFiles().contains(testDirAFile3));
-            assertTrue("B testDirAFile4", listener.getCreatedFiles().contains(testDirAFile4));
-            assertTrue("B testDirAFile5", listener.getCreatedFiles().contains(testDirAFile5));
-
-            checkAndNotify();
-            checkCollectionsEmpty("C");
-
-            // Delete first entry
-            FileUtils.deleteQuietly(testDirAFile1);
-            testDirA = touch(testDirA);
-            checkAndNotify();
-            checkCollectionSizes("D", 0, 1, 0, 0, 0, 1);
-            assertFalse("D testDirAFile1 exists", testDirAFile1.exists());
-            assertTrue("D testDirAFile1",  listener.getDeletedFiles().contains(testDirAFile1));
-
-            // Delete file with name between 2 entries
-            FileUtils.deleteQuietly(testDirAFile3);
-            testDirA = touch(testDirA);
-            checkAndNotify();
-            checkCollectionSizes("E", 0, 1, 0, 0, 0, 1);
-            assertFalse("E testDirAFile3 exists", testDirAFile3.exists());
-            assertTrue("E testDirAFile3",  listener.getDeletedFiles().contains(testDirAFile3));
-
-            // Delete last entry
-            FileUtils.deleteQuietly(testDirAFile5);
-            testDirA = touch(testDirA);
-            checkAndNotify();
-            checkCollectionSizes("F", 0, 1, 0, 0, 0, 1);
-            assertFalse("F testDirAFile5 exists", testDirAFile5.exists());
-            assertTrue("F testDirAFile5",  listener.getDeletedFiles().contains(testDirAFile5));
-
-        } catch (final Exception e) {
-            fail("Threw " + e);
-        }
-    }
-
-    /**
-     * Test checkAndNotify() method
-     */
-    public void testObserveSingleFile() {
-        try {
-            final File testDirA = new File(testDir, "test-dir-A");
-            File testDirAFile1 = new File(testDirA, "A-file1.java");
-            testDirA.mkdir();
-
-            final FileFilter nameFilter = FileFilterUtils.nameFileFilter(testDirAFile1.getName());
-            createObserver(testDirA, nameFilter);
-            checkAndNotify();
-            checkCollectionsEmpty("A");
-            assertFalse("A testDirAFile1 exists", testDirAFile1.exists());
-
-            // Create
-            testDirAFile1 = touch(testDirAFile1);
-            File testDirAFile2 = touch(new File(testDirA, "A-file2.txt"));  /* filter should ignore */
-            File testDirAFile3 = touch(new File(testDirA, "A-file3.java")); /* filter should ignore */
-            assertTrue("B testDirAFile1 exists", testDirAFile1.exists());
-            assertTrue("B testDirAFile2 exists", testDirAFile2.exists());
-            assertTrue("B testDirAFile3 exists", testDirAFile3.exists());
-            checkAndNotify();
-            checkCollectionSizes("C", 0, 0, 0, 1, 0, 0);
-            assertTrue("C created", listener.getCreatedFiles().contains(testDirAFile1));
-            assertFalse("C created", listener.getCreatedFiles().contains(testDirAFile2));
-            assertFalse("C created", listener.getCreatedFiles().contains(testDirAFile3));
-
-            // Modify
-            testDirAFile1 = touch(testDirAFile1);
-            testDirAFile2 = touch(testDirAFile2);
-            testDirAFile3 = touch(testDirAFile3);
-            checkAndNotify();
-            checkCollectionSizes("D", 0, 0, 0, 0, 1, 0);
-            assertTrue("D changed", listener.getChangedFiles().contains(testDirAFile1));
-            assertFalse("D changed", listener.getChangedFiles().contains(testDirAFile2));
-            assertFalse("D changed", listener.getChangedFiles().contains(testDirAFile3));
-
-            // Delete
-            FileUtils.deleteQuietly(testDirAFile1);
-            FileUtils.deleteQuietly(testDirAFile2);
-            FileUtils.deleteQuietly(testDirAFile3);
-            assertFalse("E testDirAFile1 exists", testDirAFile1.exists());
-            assertFalse("E testDirAFile2 exists", testDirAFile2.exists());
-            assertFalse("E testDirAFile3 exists", testDirAFile3.exists());
-            checkAndNotify();
-            checkCollectionSizes("E", 0, 0, 0, 0, 0, 1);
-            assertTrue("E deleted", listener.getDeletedFiles().contains(testDirAFile1));
-            assertFalse("E deleted", listener.getDeletedFiles().contains(testDirAFile2));
-            assertFalse("E deleted", listener.getDeletedFiles().contains(testDirAFile3));
-
-        } catch (final Exception e) {
-            fail("Threw " + e);
-        }
-    }
-
-    /**
-     * Call {@link FileAlterationObserver#checkAndNotify()}.
-     *
-     * @throws Exception if an error occurs
-     */
-    protected void checkAndNotify() throws Exception {
-        observer.checkAndNotify();
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/AppendableOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/AppendableOutputStreamTest.java
deleted file mode 100644
index 6788279..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/AppendableOutputStreamTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Unit tests for {@link AppendableOutputStream}.
- *
- * @version $Id$
- */
-public class AppendableOutputStreamTest {
-
-    private AppendableOutputStream<StringBuilder> out;
-
-    @Before
-    public void setUp() throws Exception {
-        out = new AppendableOutputStream<StringBuilder>(new StringBuilder());
-    }
-
-    @Test
-    public void testWriteStringBuilder() throws Exception {
-        String testData = "ABCD";
-
-        out.write(testData.getBytes());
-
-        assertEquals(testData, out.getAppendable().toString());
-    }
-
-    @Test
-    public void testWriteInt() throws Exception {
-        out.write((int) 'F');
-
-        assertEquals("F", out.getAppendable().toString());
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/BrokenOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/BrokenOutputStreamTest.java
deleted file mode 100644
index 7fea25e..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/BrokenOutputStreamTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit Test Case for {@link BrokenOutputStream}.
- */
-public class BrokenOutputStreamTest extends TestCase {
-
-    private IOException exception;
-
-    private OutputStream stream;
-
-    @Override
-    protected void setUp() {
-        exception = new IOException("test exception");
-        stream = new BrokenOutputStream(exception);
-    }
-
-    public void testWrite() {
-        try {
-            stream.write(1);
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertEquals(exception, e);
-        }
-
-        try {
-            stream.write(new byte[1]);
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertEquals(exception, e);
-        }
-
-        try {
-            stream.write(new byte[1], 0, 1);
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertEquals(exception, e);
-        }
-    }
-
-    public void testFlush() {
-        try {
-            stream.flush();
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertEquals(exception, e);
-        }
-    }
-
-    public void testClose() {
-        try {
-            stream.close();
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertEquals(exception, e);
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java b/trunk/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java
deleted file mode 100644
index 3135418..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.commons.io.IOUtils;
-
-import junit.framework.TestCase;
-
-/**
- * Basic unit tests for the alternative ByteArrayOutputStream implementation.
- */
-public class ByteArrayOutputStreamTestCase extends TestCase {
-
-    private static final byte[] DATA;
-
-    static {
-        DATA = new byte[64];
-        for (byte i = 0; i < 64; i++) {
-            DATA[i] = i;
-        }
-    }
-
-    public ByteArrayOutputStreamTestCase(final String name) {
-        super(name);
-    }
-
-    private int writeData(final ByteArrayOutputStream baout,
-                final java.io.ByteArrayOutputStream ref,
-                final int count) {
-        if (count > DATA.length) {
-            throw new IllegalArgumentException("Requesting too many bytes");
-        }
-        if (count == 0) {
-            baout.write(100);
-            ref.write(100);
-            return 1;
-        } else {
-            baout.write(DATA, 0, count);
-            ref.write(DATA, 0, count);
-            return count;
-        }
-    }
-
-    private int writeData(final ByteArrayOutputStream baout,
-                final java.io.ByteArrayOutputStream ref,
-                final int[] instructions) {
-        int written = 0;
-        for (final int instruction : instructions) {
-            written += writeData(baout, ref, instruction);
-        }
-        return written;
-    }
-
-    private static boolean byteCmp(final byte[] src, final byte[] cmp) {
-        for (int i = 0; i < cmp.length; i++) {
-            if (src[i] != cmp[i]) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    private void checkByteArrays(final byte[] expected, final byte[] actual) {
-        if (expected.length != actual.length) {
-            fail("Resulting byte arrays are not equally long");
-        }
-        if (!byteCmp(expected, actual)) {
-            fail("Resulting byte arrays are not equal");
-        }
-    }
-
-    private void checkStreams(
-            final ByteArrayOutputStream actual,
-            final java.io.ByteArrayOutputStream expected) {
-        assertEquals("Sizes are not equal", expected.size(), actual.size());
-        final byte[] buf = actual.toByteArray();
-        final byte[] refbuf = expected.toByteArray();
-        checkByteArrays(buf, refbuf);
-    }
-
-    public void testToInputStream() throws IOException {
-        ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        java.io.ByteArrayOutputStream ref = new java.io.ByteArrayOutputStream();
-
-        //Write 8224 bytes
-        writeData(baout, ref, 32);
-        for(int i=0;i<128;i++) {
-            writeData(baout, ref, 64);
-        }
-
-        //Get data before more writes
-        InputStream in = baout.toInputStream();
-        byte refData[] = ref.toByteArray();
-
-        //Write some more data
-        writeData(baout, ref, new int[] { 2, 4, 8, 16 });
-
-        //Check original data
-        byte baoutData[] = IOUtils.toByteArray(in);
-        assertEquals(8224, baoutData.length);
-        checkByteArrays(refData, baoutData);
-
-        //Check all data written
-        baoutData = IOUtils.toByteArray(baout.toInputStream());
-        refData = ref.toByteArray();
-        assertEquals(8254, baoutData.length);
-        checkByteArrays(refData, baoutData);
-        baout.close();
-        in.close();
-    }
-
-    public void testToInputStreamWithReset() throws IOException {
-        //Make sure reset() do not destroy InputStream returned from toInputStream()
-        ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        java.io.ByteArrayOutputStream ref = new java.io.ByteArrayOutputStream();
-
-        //Write 8224 bytes
-        writeData(baout, ref, 32);
-        for(int i=0;i<128;i++) {
-            writeData(baout, ref, 64);
-        }
-
-        //Get data before reset
-        InputStream in = baout.toInputStream();
-        byte refData[] = ref.toByteArray();
-
-        //Reset and write some new data
-        baout.reset();
-        ref.reset();
-        writeData(baout, ref, new int[] { 2, 4, 8, 16 });
-
-        //Check original data
-        byte baoutData[] = IOUtils.toByteArray(in);
-        assertEquals(8224, baoutData.length);
-        checkByteArrays(refData, baoutData);
-
-        //Check new data written after reset
-        baoutData = IOUtils.toByteArray(baout.toInputStream());
-        refData = ref.toByteArray();
-        assertEquals(30, baoutData.length);
-        checkByteArrays(refData, baoutData);
-        baout.close();
-        in.close();
-    }
-
-    public void testStream() throws Exception {
-        int written;
-
-        //The ByteArrayOutputStream is initialized with 32 bytes to match
-        //the original more closely for this test.
-        final ByteArrayOutputStream baout = new ByteArrayOutputStream(32);
-        final java.io.ByteArrayOutputStream ref = new java.io.ByteArrayOutputStream();
-
-        //First three writes
-        written = writeData(baout, ref, new int[] {4, 10, 22});
-        assertEquals(36, written);
-        checkStreams(baout, ref);
-
-        //Another two writes to see if there are any bad effects after toByteArray()
-        written = writeData(baout, ref, new int[] {20, 12});
-        assertEquals(32, written);
-        checkStreams(baout, ref);
-
-        //Now reset the streams
-        baout.reset();
-        ref.reset();
-
-        //Test again to see if reset() had any bad effects
-        written = writeData(baout, ref, new int[] {5, 47, 33, 60, 1, 0, 8});
-        assertEquals(155, written);
-        checkStreams(baout, ref);
-
-        //Test the readFrom(InputStream) method
-        baout.reset();
-        written = baout.write(new ByteArrayInputStream(ref.toByteArray()));
-        assertEquals(155, written);
-        checkStreams(baout, ref);
-
-        //Write the commons Byte[]OutputStream to a java.io.Byte[]OutputStream
-        //and vice-versa to test the writeTo() method.
-        final ByteArrayOutputStream baout1 = new ByteArrayOutputStream(32);
-        ref.writeTo(baout1);
-        final java.io.ByteArrayOutputStream ref1 = new java.io.ByteArrayOutputStream();
-        baout.writeTo(ref1);
-        checkStreams(baout1, ref1);
-
-        //Testing toString(String)
-        final String baoutString = baout.toString("ASCII");
-        final String refString = ref.toString("ASCII");
-        assertEquals("ASCII decoded String must be equal", refString, baoutString);
-
-        //Make sure that empty ByteArrayOutputStreams really don't create garbage
-        //on toByteArray()
-        final ByteArrayOutputStream baos1 = new ByteArrayOutputStream();
-        final ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
-        assertSame(baos1.toByteArray(), baos2.toByteArray());
-        baos1.close();
-        baos2.close();
-        baout.close();
-        baout1.close();
-    }
-}
-
diff --git a/trunk/src/test/java/org/apache/commons/io/output/ChunkedOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/ChunkedOutputStreamTest.java
deleted file mode 100644
index 0792961..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/ChunkedOutputStreamTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.junit.Test;
-
-/**
- * Test the chunked output stream
- */
-public class ChunkedOutputStreamTest {
-
-    @Test
-    public void write_four_chunks() throws Exception {
-        final AtomicInteger numWrites = new AtomicInteger();
-        ByteArrayOutputStream baos = getByteArrayOutputStream(numWrites);
-        ChunkedOutputStream chunked = new ChunkedOutputStream(baos, 10);
-        chunked.write("0123456789012345678901234567891".getBytes());
-        assertEquals(4, numWrites.get());
-        chunked.close();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void negative_chunksize_not_permitted() throws Exception{
-        ChunkedOutputStream chunked = new ChunkedOutputStream(new ByteArrayOutputStream(), 0);
-        chunked.close();
-    }
-
-    @Test
-    public void defaultConstructor() throws IOException {
-        final AtomicInteger numWrites = new AtomicInteger();
-        ByteArrayOutputStream baos = getByteArrayOutputStream(numWrites);
-        ChunkedOutputStream chunked = new ChunkedOutputStream(baos);
-        chunked.write(new byte[1024 * 4 + 1]);
-        assertEquals(2, numWrites.get());
-        chunked.close();
-    }
-
-    private ByteArrayOutputStream getByteArrayOutputStream(final AtomicInteger numWrites) {
-        return new ByteArrayOutputStream() {
-            @Override
-            public void write(byte[] b, int off, int len) {
-                numWrites.incrementAndGet();
-                super.write(b, off, len);
-            }
-        };
-    }
-
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/ChunkedWriterTest.java b/trunk/src/test/java/org/apache/commons/io/output/ChunkedWriterTest.java
deleted file mode 100644
index 924d75a..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/ChunkedWriterTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.junit.Test;
-
-public class ChunkedWriterTest {
-    @Test
-    public void write_four_chunks() throws Exception {
-        final AtomicInteger numWrites = new AtomicInteger();
-        OutputStreamWriter osw = getOutputStreamWriter(numWrites);
-
-        ChunkedWriter chunked = new ChunkedWriter(osw, 10);
-        chunked.write("0123456789012345678901234567891".toCharArray());
-        chunked.flush();
-        assertEquals(4, numWrites.get());
-        chunked.close();
-    }
-
-    @Test
-    public void write_two_chunks_default_constructor() throws Exception {
-        final AtomicInteger numWrites = new AtomicInteger();
-        OutputStreamWriter osw = getOutputStreamWriter(numWrites);
-
-        ChunkedWriter chunked = new ChunkedWriter(osw);
-        chunked.write(new char[1024 * 4 + 1]);
-        chunked.flush();
-        assertEquals(2, numWrites.get());
-        chunked.close();
-    }
-
-    private OutputStreamWriter getOutputStreamWriter(final AtomicInteger numWrites) {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        return new OutputStreamWriter(baos) {
-            @Override
-            public void write(char[] cbuf, int off, int len) throws IOException {
-                numWrites.incrementAndGet();
-                super.write(cbuf, off, len);
-            }
-        };
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void negative_chunksize_not_permitted() throws Exception {
-        (new ChunkedWriter(new OutputStreamWriter(new ByteArrayOutputStream()), 0)).close();;
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/CloseShieldOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/CloseShieldOutputStreamTest.java
deleted file mode 100644
index dde4763..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/CloseShieldOutputStreamTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit Test Case for {@link CloseShieldOutputStream}.
- */
-public class CloseShieldOutputStreamTest extends TestCase {
-
-    private ByteArrayOutputStream original;
-
-    private OutputStream shielded;
-
-    private boolean closed;
-
-    @Override
-    protected void setUp() {
-        original = new ByteArrayOutputStream() {
-            @Override
-            public void close() {
-                closed = true;
-            }
-        };
-        shielded = new CloseShieldOutputStream(original);
-        closed = false;
-    }
-
-    public void testClose() throws IOException {
-        shielded.close();
-        assertFalse("closed", closed);
-        try {
-            shielded.write('x');
-            fail("write(b)");
-        } catch (final IOException e) {
-            // expected
-        }
-        original.write('y');
-        assertEquals(1, original.size());
-        assertEquals('y', original.toByteArray()[0]);
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/ClosedOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/ClosedOutputStreamTest.java
deleted file mode 100644
index a4d7ffb..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/ClosedOutputStreamTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit Test Case for {@link ClosedOutputStream}.
- */
-public class ClosedOutputStreamTest extends TestCase {
-
-    /**
-     * Test the <code>write(b)</code> method.
-     * @throws Exception 
-     */
-    public void testRead() throws Exception {
-        ClosedOutputStream cos = null;
-        try {
-            cos = new ClosedOutputStream();
-            cos.write('x');
-            fail("write(b)");
-        } catch (final IOException e) {
-            // expected
-        } finally {
-            cos.close();
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/CountingOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/CountingOutputStreamTest.java
deleted file mode 100644
index 652cb70..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/CountingOutputStreamTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.input.NullInputStream;
-
-
-/**
- * @version $Id$
- */
-
-public class CountingOutputStreamTest extends TestCase {
-
-    public CountingOutputStreamTest(final String name) {
-        super(name);
-    }
-
-    public void testCounting() throws IOException {
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        final CountingOutputStream cos = new CountingOutputStream(baos);
-
-        for(int i = 0; i < 20; i++) {
-            cos.write(i);
-        }
-        assertByteArrayEquals("CountingOutputStream.write(int)", baos.toByteArray(), 0, 20);
-        assertEquals("CountingOutputStream.getCount()", cos.getCount(), 20);
-
-        final byte[] array = new byte[10];
-        for(int i = 20; i < 30; i++) {
-            array[i-20] = (byte)i;
-        }
-        cos.write(array);
-        assertByteArrayEquals("CountingOutputStream.write(byte[])", baos.toByteArray(), 0, 30);
-        assertEquals("CountingOutputStream.getCount()", cos.getCount(), 30);
-
-        for(int i = 25; i < 35; i++) {
-            array[i-25] = (byte)i;
-        }
-        cos.write(array, 5, 5);
-        assertByteArrayEquals("CountingOutputStream.write(byte[], int, int)", baos.toByteArray(), 0, 35);
-        assertEquals("CountingOutputStream.getCount()", cos.getCount(), 35);
-
-        final int count = cos.resetCount();
-        assertEquals("CountingOutputStream.resetCount()", count, 35);
-
-        for(int i = 0; i < 10; i++) {
-            cos.write(i);
-        }
-        assertByteArrayEquals("CountingOutputStream.write(int)", baos.toByteArray(), 35, 45);
-        assertEquals("CountingOutputStream.getCount()", cos.getCount(), 10);
-
-        cos.close();
-    }
-
-    /*
-     * Test for files > 2GB in size - see issue IO-84
-     */
-    public void testLargeFiles_IO84() throws Exception {
-        final long size = (long)Integer.MAX_VALUE + (long)1;
-
-        final NullInputStream mock     = new NullInputStream(size);
-        final OutputStream nos         = new NullOutputStream();
-        final CountingOutputStream cos = new CountingOutputStream(nos);
-
-        // Test integer methods
-        IOUtils.copyLarge(mock, cos);
-        try {
-            cos.getCount();
-            fail("Expected getCount() to throw an ArithmeticException");
-        } catch (final ArithmeticException ae) {
-            // expected result
-        }
-        try {
-            cos.resetCount();
-            fail("Expected resetCount() to throw an ArithmeticException");
-        } catch (final ArithmeticException ae) {
-            // expected result
-        }
-
-        mock.close();
-
-        // Test long methods
-        IOUtils.copyLarge(mock, cos);
-        assertEquals("getByteCount()",   size, cos.getByteCount());
-        assertEquals("resetByteCount()", size, cos.resetByteCount());
-    }
-
-    private void assertByteArrayEquals(final String msg, final byte[] array, final int start, final int end) {
-        for (int i = start; i < end; i++) {
-            assertEquals(msg+": array[" + i + "] mismatch", array[i], i-start);
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/DeferredFileOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/DeferredFileOutputStreamTest.java
deleted file mode 100644
index d788066..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/DeferredFileOutputStreamTest.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Arrays;
-
-import junit.framework.TestCase;
-
-/**
- * Unit tests for the <code>DeferredFileOutputStream</code> class.
- *
- * @version $Id$
- */
-public class DeferredFileOutputStreamTest extends TestCase
- {
-
-    /**
-     * The test data as a string (which is the simplest form).
-     */
-    private final String testString = "0123456789";
-
-    /**
-     * The test data as a byte array, derived from the string.
-     */
-    private final byte[] testBytes = testString.getBytes();
-
-    /**
-     * Standard JUnit test case constructor.
-     *
-     * @param name The name of the test case.
-     */
-    public DeferredFileOutputStreamTest(final String name)
-    {
-        super(name);
-    }
-
-    /**
-     * Tests the case where the amount of data falls below the threshold, and
-     * is therefore confined to memory.
-     */
-    public void testBelowThreshold()
-    {
-        final DeferredFileOutputStream dfos =
-                new DeferredFileOutputStream(testBytes.length + 42, null);
-        try
-        {
-            dfos.write(testBytes, 0, testBytes.length);
-            dfos.close();
-        }
-        catch (final IOException e) {
-            fail("Unexpected IOException");
-        }
-        assertTrue(dfos.isInMemory());
-
-        final byte[] resultBytes = dfos.getData();
-        assertEquals(testBytes.length, resultBytes.length);
-        assertTrue(Arrays.equals(resultBytes, testBytes));
-    }
-
-    /**
-     * Tests the case where the amount of data is exactly the same as the
-     * threshold. The behavior should be the same as that for the amount of
-     * data being below (i.e. not exceeding) the threshold.
-     */
-    public void testAtThreshold() {
-        final DeferredFileOutputStream dfos =
-                new DeferredFileOutputStream(testBytes.length, null);
-        try
-        {
-            dfos.write(testBytes, 0, testBytes.length);
-            dfos.close();
-        }
-        catch (final IOException e) {
-            fail("Unexpected IOException");
-        }
-        assertTrue(dfos.isInMemory());
-
-        final byte[] resultBytes = dfos.getData();
-        assertEquals(testBytes.length, resultBytes.length);
-        assertTrue(Arrays.equals(resultBytes, testBytes));
-    }
-
-    /**
-     * Tests the case where the amount of data exceeds the threshold, and is
-     * therefore written to disk. The actual data written to disk is verified,
-     * as is the file itself.
-     */
-    public void testAboveThreshold() {
-        final File testFile = new File("testAboveThreshold.dat");
-
-        // Ensure that the test starts from a clean base.
-        testFile.delete();
-
-        final DeferredFileOutputStream dfos =
-                new DeferredFileOutputStream(testBytes.length - 5, testFile);
-        try
-        {
-            dfos.write(testBytes, 0, testBytes.length);
-            dfos.close();
-        }
-        catch (final IOException e) {
-            fail("Unexpected IOException");
-        }
-        assertFalse(dfos.isInMemory());
-        assertNull(dfos.getData());
-
-        verifyResultFile(testFile);
-
-        // Ensure that the test starts from a clean base.
-        testFile.delete();
-    }
-
-    /**
-     * Tests the case where there are multiple writes beyond the threshold, to
-     * ensure that the <code>thresholdReached()</code> method is only called
-     * once, as the threshold is crossed for the first time.
-     */
-    public void testThresholdReached() {
-        final File testFile = new File("testThresholdReached.dat");
-
-        // Ensure that the test starts from a clean base.
-        testFile.delete();
-
-        final DeferredFileOutputStream dfos =
-                new DeferredFileOutputStream(testBytes.length / 2, testFile);
-        final int chunkSize = testBytes.length / 3;
-
-        try
-        {
-            dfos.write(testBytes, 0, chunkSize);
-            dfos.write(testBytes, chunkSize, chunkSize);
-            dfos.write(testBytes, chunkSize * 2,
-                    testBytes.length - chunkSize * 2);
-            dfos.close();
-        }
-        catch (final IOException e) {
-            fail("Unexpected IOException");
-        }
-        assertFalse(dfos.isInMemory());
-        assertNull(dfos.getData());
-
-        verifyResultFile(testFile);
-
-        // Ensure that the test starts from a clean base.
-        testFile.delete();
-    }
-
-
-    /**
-     * Test wether writeTo() properly writes small content.
-     */
-    public void testWriteToSmall(){
-        final File testFile = new File("testWriteToMem.dat");
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        // Ensure that the test starts from a clean base.
-        testFile.delete();
-
-        final DeferredFileOutputStream dfos =
-                new DeferredFileOutputStream(testBytes.length *2, testFile);
-        try{
-            dfos.write(testBytes);
-
-            assertFalse(testFile.exists());
-            assertTrue(dfos.isInMemory());
-
-            try {
-                dfos.writeTo(baos);
-                fail("Should not have been able to write before closing");
-            } catch (final IOException ioe) {
-                // ok, as expected
-            }
-
-            dfos.close();
-            dfos.writeTo(baos);
-        } catch (final IOException ioe) {
-            fail("Unexpected IOException");
-        }
-        final byte[] copiedBytes  = baos.toByteArray();
-        assertTrue(Arrays.equals(testBytes, copiedBytes));
-
-        testFile.delete();
-    }
-
-    /**
-     * Test wether writeTo() properly writes large content.
-     */
-    public void testWriteToLarge(){
-        final File testFile = new File("testWriteToFile.dat");
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        // Ensure that the test starts from a clean base.
-        testFile.delete();
-
-        final DeferredFileOutputStream dfos =
-                new DeferredFileOutputStream(testBytes.length / 2, testFile);
-        try{
-            dfos.write(testBytes);
-
-            assertTrue(testFile.exists());
-            assertFalse(dfos.isInMemory());
-
-            try {
-                dfos.writeTo(baos);
-                fail("Should not have been able to write before closeing");
-            } catch (final IOException ioe) {
-                // ok, as expected
-            }
-
-            dfos.close();
-            dfos.writeTo(baos);
-        } catch (final IOException ioe) {
-            fail("Unexpected IOException");
-        }
-        final byte[] copiedBytes  = baos.toByteArray();
-        assertTrue(Arrays.equals(testBytes, copiedBytes));
-        verifyResultFile(testFile);
-        testFile.delete();
-    }
-
-    /**
-     * Test specifying a temporary file and the threshold not reached.
-     */
-    public void testTempFileBelowThreshold() {
-
-        final String prefix = "commons-io-test";
-        final String suffix = ".out";
-        final File tempDir  = new File(".");
-        final DeferredFileOutputStream dfos =
-                new DeferredFileOutputStream(testBytes.length + 42, prefix, suffix, tempDir);
-        assertNull("Check file is null-A", dfos.getFile());
-        try
-        {
-            dfos.write(testBytes, 0, testBytes.length);
-            dfos.close();
-        }
-        catch (final IOException e) {
-            fail("Unexpected IOException");
-        }
-        assertTrue(dfos.isInMemory());
-        assertNull("Check file is null-B", dfos.getFile());
-    }
-
-    /**
-     * Test specifying a temporary file and the threshold is reached.
-     */
-    public void testTempFileAboveThreshold() {
-
-        final String prefix = "commons-io-test";
-        final String suffix = ".out";
-        final File tempDir  = new File(".");
-        final DeferredFileOutputStream dfos =
-                new DeferredFileOutputStream(testBytes.length - 5, prefix, suffix, tempDir);
-        assertNull("Check file is null-A", dfos.getFile());
-        try
-        {
-            dfos.write(testBytes, 0, testBytes.length);
-            dfos.close();
-        }
-        catch (final IOException e) {
-            fail("Unexpected IOException");
-        }
-        assertFalse(dfos.isInMemory());
-        assertNull(dfos.getData());
-        assertNotNull("Check file not null", dfos.getFile());
-        assertTrue("Check file exists", dfos.getFile().exists());
-        assertTrue("Check prefix", dfos.getFile().getName().startsWith(prefix));
-        assertTrue("Check suffix", dfos.getFile().getName().endsWith(suffix));
-        assertEquals("Check dir", tempDir.getPath(), dfos.getFile().getParent());
-
-        verifyResultFile(dfos.getFile());
-
-        // Delete the temporary file.
-        dfos.getFile().delete();
-    }
-
-    /**
-     * Test specifying a temporary file and the threshold is reached.
-     */
-    public void testTempFileAboveThresholdPrefixOnly() {
-
-        final String prefix = "commons-io-test";
-        final String suffix = null;
-        final File tempDir  = null;
-        final DeferredFileOutputStream dfos =
-                new DeferredFileOutputStream(testBytes.length - 5, prefix, suffix, tempDir);
-        assertNull("Check file is null-A", dfos.getFile());
-        try
-        {
-            dfos.write(testBytes, 0, testBytes.length);
-            dfos.close();
-        }
-        catch (final IOException e) {
-            fail("Unexpected IOException");
-        }
-        assertFalse(dfos.isInMemory());
-        assertNull(dfos.getData());
-        assertNotNull("Check file not null", dfos.getFile());
-        assertTrue("Check file exists", dfos.getFile().exists());
-        assertTrue("Check prefix", dfos.getFile().getName().startsWith(prefix));
-        assertTrue("Check suffix", dfos.getFile().getName().endsWith(".tmp")); // ".tmp" is default
-
-        verifyResultFile(dfos.getFile());
-
-        // Delete the temporary file.
-        dfos.getFile().delete();
-    }
-
-    /**
-     * Test specifying a temporary file and the threshold is reached.
-     * @throws Exception 
-     */
-    public void testTempFileError() throws Exception {
-
-        final String prefix = null;
-        final String suffix = ".out";
-        final File tempDir  = new File(".");
-        try
-        {
-            (new DeferredFileOutputStream(testBytes.length - 5, prefix, suffix, tempDir)).close();
-            fail("Expected IllegalArgumentException ");
-        }
-        catch (final IllegalArgumentException e) {
-            // expected
-        }
-    }
-
-    /**
-     * Verifies that the specified file contains the same data as the original
-     * test data.
-     *
-     * @param testFile The file containing the test output.
-     */
-    private void verifyResultFile(final File testFile) {
-        try
-        {
-            final FileInputStream fis = new FileInputStream(testFile);
-            assertEquals(testBytes.length, fis.available());
-
-            final byte[] resultBytes = new byte[testBytes.length];
-            assertEquals(testBytes.length, fis.read(resultBytes));
-
-            assertTrue(Arrays.equals(resultBytes, testBytes));
-            assertEquals(-1, fis.read(resultBytes));
-
-            try
-            {
-                fis.close();
-            }
-            catch (final IOException e) {
-                // Ignore an exception on close
-            }
-        }
-        catch (final FileNotFoundException e) {
-            fail("Unexpected FileNotFoundException");
-        }
-        catch (final IOException e) {
-            fail("Unexpected IOException");
-        }
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java b/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
deleted file mode 100644
index 6e9829e..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
-
-import junit.framework.AssertionFailedError;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * Tests that the encoding is actually set and used.
- *
- * @version $Id$
- */
-public class FileWriterWithEncodingTest extends FileBasedTestCase {
-
-    private String defaultEncoding;
-    private File file1;
-    private File file2;
-    private String textContent;
-    private char[] anotherTestContent = new char[]{'f', 'z', 'x'};
-
-    public FileWriterWithEncodingTest(final String name) {
-        super(name);
-    }
-
-    @Override
-    public void setUp() {
-        final File encodingFinder = new File(getTestDirectory(), "finder.txt");
-        OutputStreamWriter out = null;
-        try {
-            out = new OutputStreamWriter(new FileOutputStream(encodingFinder));
-            defaultEncoding = out.getEncoding();
-        } catch (final IOException ex) {
-            throw new RuntimeException(ex.getMessage());
-        } finally {
-            IOUtils.closeQuietly(out);
-        }
-        file1 = new File(getTestDirectory(), "testfile1.txt");
-        file2 = new File(getTestDirectory(), "testfile2.txt");
-        final char[] arr = new char[1024];
-        final char[] chars = "ABCDEFGHIJKLMNOPQabcdefgihklmnopq".toCharArray();
-        for (int i = 0; i < arr.length; i++) {
-            arr[i] = chars[i % chars.length];
-        }
-        textContent = new String(arr);
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-        FileUtils.deleteDirectory(getTestDirectory());
-        defaultEncoding = null;
-        textContent = null;
-    }
-
-    //-----------------------------------------------------------------------
-    public void testSameEncoding_string_constructor() throws Exception {
-        succesfulRun(new FileWriterWithEncoding(file2, defaultEncoding));
-    }
-
-    public void testSameEncoding_string_string_constructor() throws Exception {
-        succesfulRun(new FileWriterWithEncoding(file2.getPath(), defaultEncoding));
-    }
-
-    public void testSameEncoding_Charset_constructor() throws Exception {
-        succesfulRun(new FileWriterWithEncoding(file2, Charset.defaultCharset()));
-    }
-
-    public void testSameEncoding_string_Charset_constructor() throws Exception {
-        succesfulRun(new FileWriterWithEncoding(file2.getPath(), Charset.defaultCharset()));
-    }
-
-    public void testSameEncoding_CharsetEncoder_constructor() throws Exception {
-        CharsetEncoder enc = Charset.defaultCharset().newEncoder();
-        succesfulRun(new FileWriterWithEncoding(file2, enc));
-    }
-
-    public void testSameEncoding_string_CharsetEncoder_constructor() throws Exception {
-        CharsetEncoder enc = Charset.defaultCharset().newEncoder();
-        succesfulRun(new FileWriterWithEncoding(file2.getPath(), enc));
-    }
-
-    private void succesfulRun(FileWriterWithEncoding fw21) throws Exception {
-        FileWriter fw1 = null;
-        FileWriterWithEncoding fw2 = null;
-        try {
-            fw1 = new FileWriter(file1);  // default encoding
-            fw2 = fw21;
-            writeTestPayload(fw1, fw2);
-            checkFile(file1, file2);
-
-        } finally {
-            IOUtils.closeQuietly(fw1);
-            IOUtils.closeQuietly(fw2);
-        }
-        assertTrue(file1.exists());
-        assertTrue(file2.exists());
-    }
-
-    public void testDifferentEncoding() throws Exception {
-        if (Charset.isSupported("UTF-16BE")) {
-            FileWriter fw1 = null;
-            FileWriterWithEncoding fw2 = null;
-            try {
-                fw1 = new FileWriter(file1);  // default encoding
-                fw2 = new FileWriterWithEncoding(file2, defaultEncoding);
-                writeTestPayload(fw1, fw2);
-                try {
-                    checkFile(file1, file2);
-                    fail();
-                } catch (final AssertionFailedError ex) {
-                    // success
-                }
-
-            } finally {
-                IOUtils.closeQuietly(fw1);
-                IOUtils.closeQuietly(fw2);
-            }
-            assertTrue(file1.exists());
-            assertTrue(file2.exists());
-        }
-        if (Charset.isSupported("UTF-16LE")) {
-            FileWriter fw1 = null;
-            FileWriterWithEncoding fw2 = null;
-            try {
-                fw1 = new FileWriter(file1);  // default encoding
-                fw2 = new FileWriterWithEncoding(file2, defaultEncoding);
-                writeTestPayload(fw1, fw2);
-                try {
-                    checkFile(file1, file2);
-                    fail();
-                } catch (final AssertionFailedError ex) {
-                    // success
-                }
-
-            } finally {
-                IOUtils.closeQuietly(fw1);
-                IOUtils.closeQuietly(fw2);
-            }
-            assertTrue(file1.exists());
-            assertTrue(file2.exists());
-        }
-    }
-
-    private void writeTestPayload(FileWriter fw1, FileWriterWithEncoding fw2) throws IOException {
-        assertTrue(file1.exists());
-        assertTrue(file2.exists());
-
-        fw1.write(textContent);
-        fw2.write(textContent);
-        fw1.write(65);
-        fw2.write(65);
-        fw1.write(anotherTestContent);
-        fw2.write(anotherTestContent);
-        fw1.write(anotherTestContent, 1, 2);
-        fw2.write(anotherTestContent, 1, 2);
-        fw1.write("CAFE", 1, 2);
-        fw2.write("CAFE", 1, 2);
-
-        fw1.flush();
-        fw2.flush();
-    }
-
-    //-----------------------------------------------------------------------
-    public void testConstructor_File_encoding_badEncoding() {
-        Writer writer = null;
-        try {
-            writer = new FileWriterWithEncoding(file1, "BAD-ENCODE");
-            fail();
-        } catch (final IOException ex) {
-            // expected
-            assertFalse(file1.exists());
-        } finally {
-            IOUtils.closeQuietly(writer);
-        }
-        assertFalse(file1.exists());
-    }
-
-    //-----------------------------------------------------------------------
-    public void testConstructor_File_directory() {
-        Writer writer = null;
-        try {
-            writer = new FileWriterWithEncoding(getTestDirectory(), defaultEncoding);
-            fail();
-        } catch (final IOException ex) {
-            // expected
-            assertFalse(file1.exists());
-        } finally {
-            IOUtils.closeQuietly(writer);
-        }
-        assertFalse(file1.exists());
-    }
-
-    //-----------------------------------------------------------------------
-    public void testConstructor_File_nullFile() throws IOException {
-        Writer writer = null;
-        try {
-            writer = new FileWriterWithEncoding((File) null, defaultEncoding);
-            fail();
-        } catch (final NullPointerException ex) {
-            // expected
-            assertFalse(file1.exists());
-        } finally {
-            IOUtils.closeQuietly(writer);
-        }
-        assertFalse(file1.exists());
-    }
-
-    //-----------------------------------------------------------------------
-    public void testConstructor_fileName_nullFile() throws IOException {
-        Writer writer = null;
-        try {
-            writer = new FileWriterWithEncoding((String) null, defaultEncoding);
-            fail();
-        } catch (final NullPointerException ex) {
-            // expected
-            assertFalse(file1.exists());
-        } finally {
-            IOUtils.closeQuietly(writer);
-        }
-        assertFalse(file1.exists());
-    }
-
-    public void testSameEncoding_null_Charset_constructor() throws Exception {
-        try {
-            succesfulRun(new FileWriterWithEncoding(file2, (Charset) null));
-            fail();
-        } catch (NullPointerException ignore) {
-
-        }
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java b/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
deleted file mode 100644
index 36fa6ea..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.Writer;
-import java.nio.charset.UnsupportedCharsetException;
-
-import org.apache.commons.io.Charsets;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
-/**
- * Tests that files really lock, although no writing is done as
- * the locking is tested only on construction.
- *
- * @version $Id$
- */
-public class LockableFileWriterTest extends FileBasedTestCase {
-
-    private File file;
-    private File lockDir;
-    private File lockFile;
-    private File altLockDir;
-    private File altLockFile;
-
-    public LockableFileWriterTest(final String name) {
-        super(name);
-    }
-
-    @Override
-    public void setUp() {
-        file = new File(getTestDirectory(), "testlockfile");
-        lockDir = new File(System.getProperty("java.io.tmpdir"));
-        lockFile = new File(lockDir, file.getName() + ".lck");
-        altLockDir = getTestDirectory();
-        altLockFile = new File(altLockDir, file.getName() + ".lck");
-    }
-
-    @Override
-    public void tearDown() {
-        file.delete();
-        lockFile.delete();
-        altLockFile.delete();
-    }
-
-    //-----------------------------------------------------------------------
-    public void testFileLocked() throws IOException {
-        LockableFileWriter lfw1 = null;
-        LockableFileWriter lfw2 = null;
-        LockableFileWriter lfw3 = null;
-        try {
-            // open a valid locakable writer
-            lfw1 = new LockableFileWriter(file);
-            assertTrue(file.exists());
-            assertTrue(lockFile.exists());
-
-            // try to open a second writer
-            try {
-                lfw2 = new LockableFileWriter(file);
-                fail("Somehow able to open a locked file. ");
-            } catch(final IOException ioe) {
-                final String msg = ioe.getMessage();
-                assertTrue( "Exception message does not start correctly. ",
-                            msg.startsWith("Can't write file, lock ") );
-                assertTrue(file.exists());
-                assertTrue(lockFile.exists());
-            }
-
-            // try to open a third writer
-            try {
-                lfw3 = new LockableFileWriter(file);
-                fail("Somehow able to open a locked file. ");
-            } catch(final IOException ioe) {
-                final String msg = ioe.getMessage();
-                assertTrue( "Exception message does not start correctly. ",
-                            msg.startsWith("Can't write file, lock ") );
-                assertTrue(file.exists());
-                assertTrue(lockFile.exists());
-            }
-
-        } finally {
-            IOUtils.closeQuietly(lfw1);
-            IOUtils.closeQuietly(lfw2);
-            IOUtils.closeQuietly(lfw3);
-        }
-        assertTrue(file.exists());
-        assertFalse(lockFile.exists());
-    }
-
-    //-----------------------------------------------------------------------
-    @SuppressWarnings("deprecation") // unavoidable until Java 7
-    public void testAlternateLockDir() throws IOException {
-        LockableFileWriter lfw1 = null;
-        LockableFileWriter lfw2 = null;
-        try {
-            // open a valid locakable writer
-            lfw1 = new LockableFileWriter(file, "UTF-8" ,true, altLockDir.getAbsolutePath());
-            assertTrue(file.exists());
-            assertTrue(altLockFile.exists());
-
-            // try to open a second writer
-            try {
-                lfw2 = new LockableFileWriter(file, Charsets.UTF_8, true, altLockDir.getAbsolutePath());
-                fail("Somehow able to open a locked file. ");
-            } catch(final IOException ioe) {
-                final String msg = ioe.getMessage();
-                assertTrue( "Exception message does not start correctly. ",
-                            msg.startsWith("Can't write file, lock ") );
-                assertTrue(file.exists());
-                assertTrue(altLockFile.exists());
-            }
-
-        } finally {
-            IOUtils.closeQuietly(lfw1);
-            IOUtils.closeQuietly(lfw2);
-        }
-        assertTrue(file.exists());
-        assertFalse(altLockFile.exists());
-    }
-
-    //-----------------------------------------------------------------------
-    public void testFileNotLocked() throws IOException {
-        // open a valid locakable writer
-        LockableFileWriter lfw1 = null;
-        try {
-            lfw1 = new LockableFileWriter(file);
-            assertTrue(file.exists());
-            assertTrue(lockFile.exists());
-        } finally {
-            IOUtils.closeQuietly(lfw1);
-        }
-        assertTrue(file.exists());
-        assertFalse(lockFile.exists());
-
-        // open a second valid writer on the same file
-        LockableFileWriter lfw2 = null;
-        try {
-            lfw2 = new LockableFileWriter(file);
-            assertTrue(file.exists());
-            assertTrue(lockFile.exists());
-        } finally {
-            IOUtils.closeQuietly(lfw2);
-        }
-        assertTrue(file.exists());
-        assertFalse(lockFile.exists());
-    }
-
-    //-----------------------------------------------------------------------
-    public void testConstructor_File_encoding_badEncoding() throws IOException {
-        Writer writer = null;
-        try {
-            writer = new LockableFileWriter(file, "BAD-ENCODE");
-            fail();
-        } catch (final UnsupportedCharsetException ex) {
-            // expected
-            assertFalse(file.exists());
-            assertFalse(lockFile.exists());
-        } finally {
-            IOUtils.closeQuietly(writer);
-        }
-        assertFalse(file.exists());
-        assertFalse(lockFile.exists());
-    }
-
-    //-----------------------------------------------------------------------
-    public void testConstructor_File_directory() {
-        Writer writer = null;
-        try {
-            writer = new LockableFileWriter(getTestDirectory());
-            fail();
-        } catch (final IOException ex) {
-            // expected
-            assertFalse(file.exists());
-            assertFalse(lockFile.exists());
-        } finally {
-            IOUtils.closeQuietly(writer);
-        }
-        assertFalse(file.exists());
-        assertFalse(lockFile.exists());
-    }
-
-    //-----------------------------------------------------------------------
-    public void testConstructor_File_nullFile() throws IOException {
-        Writer writer = null;
-        try {
-            writer = new LockableFileWriter((File) null);
-            fail();
-        } catch (final NullPointerException ex) {
-            // expected
-            assertFalse(file.exists());
-            assertFalse(lockFile.exists());
-        } finally {
-            IOUtils.closeQuietly(writer);
-        }
-        assertFalse(file.exists());
-        assertFalse(lockFile.exists());
-    }
-
-    //-----------------------------------------------------------------------
-    public void testConstructor_fileName_nullFile() throws IOException {
-        Writer writer = null;
-        try {
-            writer = new LockableFileWriter((String) null);
-            fail();
-        } catch (final NullPointerException ex) {
-            // expected
-            assertFalse(file.exists());
-            assertFalse(lockFile.exists());
-        } finally {
-            IOUtils.closeQuietly(writer);
-        }
-        assertFalse(file.exists());
-        assertFalse(lockFile.exists());
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/NullOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/NullOutputStreamTest.java
deleted file mode 100644
index be9ecf0..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/NullOutputStreamTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-
-/**
- * Really not a lot to do here, but checking that no 
- * Exceptions are thrown. 
- *
- * @version $Id$
- */
-
-public class NullOutputStreamTest extends TestCase {
-
-    public NullOutputStreamTest(final String name) {
-        super(name);
-    }
-
-    public void testNull() throws IOException {
-        final NullOutputStream nos = new NullOutputStream();
-        nos.write("string".getBytes());
-        nos.write("some string".getBytes(), 3, 5);
-        nos.write(1);
-        nos.write(0x0f);
-        nos.flush();
-        nos.close();
-        nos.write("allowed".getBytes());
-        nos.write(255);
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/NullWriterTest.java b/trunk/src/test/java/org/apache/commons/io/output/NullWriterTest.java
deleted file mode 100644
index b686f2d..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/NullWriterTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import junit.framework.TestCase;
-
-/**
- * Really not a lot to do here, but checking that no 
- * Exceptions are thrown. 
- *
- * @version $Id$
- */
-public class NullWriterTest extends TestCase {
-
-    public NullWriterTest(final String name) {
-        super(name);
-    }
-
-    public void testNull() {
-        final char[] chars = new char[] {'A', 'B', 'C'};
-        final NullWriter writer = new NullWriter();
-        writer.write(1);
-        writer.write(chars);
-        writer.write(chars, 1, 1);
-        writer.write("some string");
-        writer.write("some string", 2, 2);
-        writer.flush();
-        writer.close();
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/ProxyOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/ProxyOutputStreamTest.java
deleted file mode 100644
index ccbb586..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/ProxyOutputStreamTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit Test Case for {@link CloseShieldOutputStream}.
- */
-public class ProxyOutputStreamTest extends TestCase {
-
-    private ByteArrayOutputStream original;
-
-    private OutputStream proxied;
-
-    @Override
-    protected void setUp() {
-        original = new ByteArrayOutputStream(){
-            @Override
-            public void write(final byte[] ba) throws IOException {
-                if (ba != null){
-                    super.write(ba);
-                }
-            }
-        };
-        proxied = new ProxyOutputStream(original);
-    }
-
-    public void testWrite() throws Exception {
-        proxied.write('y');
-        assertEquals(1, original.size());
-        assertEquals('y', original.toByteArray()[0]);
-    }
-
-    public void testWriteNullBaSucceeds() throws Exception {
-        final byte[] ba = null;
-        original.write(ba);
-        proxied.write(ba);
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/ProxyWriterTest.java b/trunk/src/test/java/org/apache/commons/io/output/ProxyWriterTest.java
deleted file mode 100644
index d23dc8b..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/ProxyWriterTest.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-
-import org.junit.Test;
-
-/**
- * Test {@link ProxyWriter}.
- *
- * @version $Id$
- */
-public class ProxyWriterTest {
-
-    @Test
-    public void appendCharSequence() throws Exception {
-        final StringBuilderWriter writer = new StringBuilderWriter();
-        final ProxyWriter proxy = new ProxyWriter(writer);
-        try {
-            proxy.append("ABC");
-        } catch (final Exception e) {
-            fail("Appending CharSequence threw " + e);
-        }
-        assertEquals("ABC", writer.toString());
-        proxy.close();
-    }
-
-    @Test
-    public void appendCharSequence_with_offset() throws Exception {
-        final StringBuilderWriter writer = new StringBuilderWriter();
-        final ProxyWriter proxy = new ProxyWriter(writer);
-        proxy.append("ABC", 1, 3);
-        proxy.flush();
-        assertEquals("BC", writer.toString());
-        proxy.close();
-    }
-
-    @Test
-    public void appendChar() throws Exception {
-        final StringBuilderWriter writer = new StringBuilderWriter();
-        final ProxyWriter proxy = new ProxyWriter(writer);
-        proxy.append('c');
-        assertEquals("c", writer.toString());
-        proxy.close();
-    }
-
-    @Test
-    public void writeString() throws Exception {
-        final StringBuilderWriter writer = new StringBuilderWriter();
-        final ProxyWriter proxy = new ProxyWriter(writer);
-        try {
-            proxy.write("ABC");
-        } catch (final Exception e) {
-            fail("Writing String threw " + e);
-        }
-        assertEquals("ABC", writer.toString());
-        proxy.close();
-    }
-
-    @Test
-    public void writeStringPartial() throws Exception {
-        final StringBuilderWriter writer = new StringBuilderWriter();
-        final ProxyWriter proxy = new ProxyWriter(writer);
-        try {
-            proxy.write("ABC", 1, 2);
-        } catch (final Exception e) {
-            fail("Writing String threw " + e);
-        }
-        assertEquals("BC", writer.toString());
-        proxy.close();
-    }
-
-    @Test
-    public void writeCharArray() throws Exception {
-        final StringBuilderWriter writer = new StringBuilderWriter();
-        final ProxyWriter proxy = new ProxyWriter(writer);
-        try {
-            proxy.write(new char[]{'A', 'B', 'C'});
-        } catch (final Exception e) {
-            fail("Writing char[] threw " + e);
-        }
-        assertEquals("ABC", writer.toString());
-        proxy.close();
-    }
-
-    @Test
-    public void writeInt() throws Exception {
-        final StringBuilderWriter writer = new StringBuilderWriter();
-        final ProxyWriter proxy = new ProxyWriter(writer);
-        try {
-            proxy.write(65);
-        } catch (final Exception e) {
-            fail("Writing char[] threw " + e);
-        }
-        assertEquals("A", writer.toString());
-        proxy.close();
-    }
-
-    @Test
-    public void writeCharArrayPartial() throws Exception {
-        final StringBuilderWriter writer = new StringBuilderWriter();
-        final ProxyWriter proxy = new ProxyWriter(writer);
-        try {
-            proxy.write(new char[]{'A', 'B', 'C'}, 1, 2);
-        } catch (final Exception e) {
-            fail("Writing char[] threw " + e);
-        }
-        assertEquals("BC", writer.toString());
-        proxy.close();
-    }
-
-    @Test
-    public void nullString() throws Exception {
-
-        final ProxyWriter proxy = new ProxyWriter(new NullWriter());
-
-        try {
-            proxy.write((String) null);
-        } catch (final Exception e) {
-            fail("Writing null String threw " + e);
-        }
-
-        try {
-            proxy.write((String) null, 0, 0);
-        } catch (final Exception e) {
-            fail("Writing null String threw " + e);
-        }
-        proxy.close();
-    }
-
-    @Test
-    public void nullCharArray() throws Exception {
-
-        final ProxyWriter proxy = new ProxyWriter(new NullWriter());
-
-        try {
-            proxy.write((char[]) null);
-        } catch (final Exception e) {
-            fail("Writing null char[] threw " + e);
-        }
-
-        try {
-            proxy.write((char[]) null, 0, 0);
-        } catch (final Exception e) {
-            fail("Writing null char[] threw " + e);
-        }
-        proxy.close();
-    }
-
-    @Test
-    public void nullCharSequencec() throws Exception {
-
-        final ProxyWriter proxy = new ProxyWriter(new NullWriter());
-
-        try {
-            proxy.append(null);
-        } catch (final Exception e) {
-            fail("Appending null CharSequence threw " + e);
-        }
-        proxy.close();
-    }
-
-    @Test(expected = UnsupportedEncodingException.class)
-    public void exceptions_in_append_char() throws IOException {
-        OutputStreamWriter osw = new OutputStreamWriter(new ByteArrayOutputStream()) {
-            @Override
-            public void write(int c) throws IOException {
-                throw new UnsupportedEncodingException("Bah");
-            }
-        };
-        final ProxyWriter proxy = new ProxyWriter(osw);
-        try {
-            proxy.append('c');
-        } finally {
-            proxy.close();
-        }
-    }
-
-    @Test(expected = UnsupportedEncodingException.class)
-    public void exceptions_in_append_charSequence() throws IOException {
-        OutputStreamWriter osw = new OutputStreamWriter(new ByteArrayOutputStream()) {
-            @Override
-            public Writer append(CharSequence csq) throws IOException {
-                throw new UnsupportedEncodingException("Bah");
-            }
-        };
-        final ProxyWriter proxy = new ProxyWriter(osw);
-        try {
-            proxy.append("ABCE");
-        } finally {
-            proxy.close();
-        }
-    }
-
-    @Test(expected = UnsupportedEncodingException.class)
-    public void exceptions_in_append_charSequence_offset() throws IOException {
-        OutputStreamWriter osw = new OutputStreamWriter(new ByteArrayOutputStream()) {
-            @Override
-            public Writer append(CharSequence csq, int start, int end) throws IOException {
-                throw new UnsupportedEncodingException("Bah");
-            }
-        };
-        final ProxyWriter proxy = new ProxyWriter(osw);
-        try {
-            proxy.append("ABCE", 1, 2);
-        } finally {
-            proxy.close();
-        }
-    }
-
-    @Test(expected = UnsupportedEncodingException.class)
-    public void exceptions_in_write_int() throws IOException {
-        OutputStreamWriter osw = new OutputStreamWriter(new ByteArrayOutputStream()) {
-            @Override
-            public void write(int c) throws IOException {
-                throw new UnsupportedEncodingException("Bah");
-            }
-        };
-        final ProxyWriter proxy = new ProxyWriter(osw);
-        try {
-            proxy.write((int) 'a');
-        } finally {
-            proxy.close();
-        }
-    }
-
-    @Test(expected = UnsupportedEncodingException.class)
-    public void exceptions_in_write_char_array() throws IOException {
-        OutputStreamWriter osw = new OutputStreamWriter(new ByteArrayOutputStream()) {
-            @Override
-            public void write(char[] cbuf) throws IOException {
-                throw new UnsupportedEncodingException("Bah");
-            }
-        };
-        final ProxyWriter proxy = new ProxyWriter(osw);
-        try {
-            proxy.write("ABCE".toCharArray());
-        } finally {
-            proxy.close();
-        }
-    }
-
-    @Test(expected = UnsupportedEncodingException.class)
-    public void exceptions_in_write_offset_char_array() throws IOException {
-        OutputStreamWriter osw = new OutputStreamWriter(new ByteArrayOutputStream()) {
-            @Override
-            public void write(char[] cbuf, int off, int len) throws IOException {
-                throw new UnsupportedEncodingException("Bah");
-            }
-        };
-        final ProxyWriter proxy = new ProxyWriter(osw);
-        try {
-            proxy.write("ABCE".toCharArray(), 2, 3);
-        } finally {
-            proxy.close();
-        }
-    }
-
-    @Test(expected = UnsupportedEncodingException.class)
-    public void exceptions_in_write_string() throws IOException {
-        OutputStreamWriter osw = new OutputStreamWriter(new ByteArrayOutputStream()) {
-            @Override
-            public void write(String str) throws IOException {
-                throw new UnsupportedEncodingException("Bah");
-            }
-        };
-        final ProxyWriter proxy = new ProxyWriter(osw);
-        try {
-            proxy.write("ABCE");
-        } finally {
-            proxy.close();
-        }
-    }
-
-    @Test(expected = UnsupportedEncodingException.class)
-    public void exceptions_in_write_string_offset() throws IOException {
-        OutputStreamWriter osw = new OutputStreamWriter(new ByteArrayOutputStream()) {
-            @Override
-            public void write(String str, int off, int len) throws IOException {
-                throw new UnsupportedEncodingException("Bah");
-            }
-        };
-        final ProxyWriter proxy = new ProxyWriter(osw);
-        try {
-            proxy.write("ABCE", 1, 3);
-        } finally {
-            proxy.close();
-        }
-    }
-
-    @Test(expected = UnsupportedEncodingException.class)
-    public void exceptions_in_flush() throws IOException {
-        OutputStreamWriter osw = new OutputStreamWriter(new ByteArrayOutputStream()) {
-            @Override
-            public void flush() throws IOException {
-                throw new UnsupportedEncodingException("Bah");
-            }
-        };
-        final ProxyWriter proxy = new ProxyWriter(osw);
-        try {
-            proxy.flush();
-        } finally {
-            proxy.close();
-        }
-    }
-
-    @Test(expected = UnsupportedEncodingException.class)
-    public void exceptions_in_close() throws IOException {
-        OutputStreamWriter osw = new OutputStreamWriter(new ByteArrayOutputStream()) {
-            @Override
-            public void close() throws IOException {
-                throw new UnsupportedEncodingException("Bah");
-            }
-        };
-        final ProxyWriter proxy = new ProxyWriter(osw);
-        proxy.close();
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/StringBuilderWriterTest.java b/trunk/src/test/java/org/apache/commons/io/output/StringBuilderWriterTest.java
deleted file mode 100644
index 304baef..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/StringBuilderWriterTest.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.Writer;
-
-import junit.framework.TestCase;
-
-/**
- * Test case for {@link StringBuilderWriter}.
- *
- * @version $Id$
- */
-public class StringBuilderWriterTest extends TestCase {
-    private static final char[] FOOBAR_CHARS = new char[] {'F', 'o', 'o', 'B', 'a', 'r'};
-
-    public StringBuilderWriterTest(final String name) {
-        super(name);
-    }
-
-    public void testAppendConstructCapacity() throws IOException {
-        final Writer writer = new StringBuilderWriter(100);
-        writer.append("Foo");
-        assertEquals("Foo", writer.toString());
-        writer.close();
-    }
-
-    public void testAppendConstructStringBuilder() {
-        final StringBuilder builder = new StringBuilder("Foo");
-        final StringBuilderWriter writer = new StringBuilderWriter(builder);
-        writer.append("Bar");
-        assertEquals("FooBar", writer.toString());
-        assertSame(builder, writer.getBuilder());
-        writer.close();
-    }
-
-    public void testAppendConstructNull() throws IOException {
-        final Writer writer = new StringBuilderWriter(null);
-        writer.append("Foo");
-        assertEquals("Foo", writer.toString());
-        writer.close();
-    }
-
-    public void testAppendChar() throws IOException {
-        final Writer writer = new StringBuilderWriter();
-        writer.append('F').append('o').append('o');
-        assertEquals("Foo", writer.toString());
-        writer.close();
-    }
-
-    public void testAppendCharSequence() throws IOException {
-        final Writer writer = new StringBuilderWriter();
-        writer.append("Foo").append("Bar");
-        assertEquals("FooBar", writer.toString());
-        writer.close();
-    }
-
-    public void testAppendCharSequencePortion() throws IOException {
-        final Writer writer = new StringBuilderWriter();
-        writer.append("FooBar", 3, 6).append(new StringBuffer("FooBar"), 0, 3);
-        assertEquals("BarFoo", writer.toString());
-        writer.close();
-    }
-
-    public void testClose() {
-        final Writer writer = new StringBuilderWriter();
-        try {
-            writer.append("Foo");
-            writer.close();
-            writer.append("Bar");
-        } catch (final Throwable t) {
-            fail("Threw: " + t);
-        }
-        assertEquals("FooBar", writer.toString());
-    }
-
-    public void testWriteChar() throws IOException {
-        final Writer writer = new StringBuilderWriter();
-        writer.write('F');
-        assertEquals("F", writer.toString());
-        writer.write('o');
-        assertEquals("Fo", writer.toString());
-        writer.write('o');
-        assertEquals("Foo", writer.toString());
-        writer.close();
-    }
-
-    public void testWriteCharArray() throws IOException {
-        final Writer writer = new StringBuilderWriter();
-        writer.write(new char[] {'F', 'o', 'o'});
-        assertEquals("Foo", writer.toString());
-        writer.write(new char[] {'B', 'a', 'r'});
-        assertEquals("FooBar", writer.toString());
-        writer.close();
-    }
-
-    public void testWriteCharArrayPortion() throws IOException {
-        final Writer writer = new StringBuilderWriter();
-        writer.write(FOOBAR_CHARS, 3, 3);
-        assertEquals("Bar", writer.toString());
-        writer.write(FOOBAR_CHARS, 0, 3);
-        assertEquals("BarFoo", writer.toString());
-        writer.close();
-    }
-
-    public void testWriteString() throws IOException {
-        final Writer writer = new StringBuilderWriter();
-        writer.write("Foo");
-        assertEquals("Foo", writer.toString());
-        writer.write("Bar");
-        assertEquals("FooBar", writer.toString());
-        writer.close();
-    }
-
-    public void testWriteStringPortion() throws IOException {
-        final Writer writer = new StringBuilderWriter();
-        writer.write("FooBar", 3, 3);
-        assertEquals("Bar", writer.toString());
-        writer.write("FooBar", 0, 3);
-        assertEquals("BarFoo", writer.toString());
-        writer.close();
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/TaggedOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/TaggedOutputStreamTest.java
deleted file mode 100644
index 6762cf6..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/TaggedOutputStreamTest.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.UUID;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.io.TaggedIOException;
-
-/**
- * JUnit Test Case for {@link TaggedOutputStream}.
- */
-public class TaggedOutputStreamTest extends TestCase {
-
-    public void testNormalStream() {
-        try {
-            final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); 
-            final OutputStream stream = new TaggedOutputStream(buffer);
-            stream.write('a');
-            stream.write(new byte[] { 'b' });
-            stream.write(new byte[] { 'c' }, 0, 1);
-            stream.flush();
-            stream.close();
-            assertEquals(3, buffer.size());
-            assertEquals('a', buffer.toByteArray()[0]);
-            assertEquals('b', buffer.toByteArray()[1]);
-            assertEquals('c', buffer.toByteArray()[2]);
-        } catch (final IOException e) {
-            fail("Unexpected exception thrown");
-        }
-    }
-
-    public void testBrokenStream() {
-        final IOException exception = new IOException("test exception");
-        final TaggedOutputStream stream =
-            new TaggedOutputStream(new BrokenOutputStream(exception));
-
-        // Test the write() method
-        try {
-            stream.write('x');
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertTrue(stream.isCauseOf(e));
-            try {
-                stream.throwIfCauseOf(e);
-                fail("Expected exception not thrown.");
-            } catch (final IOException e2) {
-                assertEquals(exception, e2);
-            }
-        }
-
-        // Test the flush() method
-        try {
-            stream.flush();
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertTrue(stream.isCauseOf(e));
-            try {
-                stream.throwIfCauseOf(e);
-                fail("Expected exception not thrown.");
-            } catch (final IOException e2) {
-                assertEquals(exception, e2);
-            }
-        }
-
-        // Test the close() method
-        try {
-            stream.close();
-            fail("Expected exception not thrown.");
-        } catch (final IOException e) {
-            assertTrue(stream.isCauseOf(e));
-            try {
-                stream.throwIfCauseOf(e);
-                fail("Expected exception not thrown.");
-            } catch (final IOException e2) {
-                assertEquals(exception, e2);
-            }
-        }
-    }
-
-    public void testOtherException() throws Exception {
-        final IOException exception = new IOException("test exception");
-        final OutputStream closed = new ClosedOutputStream();
-        final TaggedOutputStream stream = new TaggedOutputStream(closed);
-
-        assertFalse(stream.isCauseOf(exception));
-        assertFalse(stream.isCauseOf(
-                new TaggedIOException(exception, UUID.randomUUID())));
-
-        try {
-            stream.throwIfCauseOf(exception);
-        } catch (final IOException e) {
-            fail("Unexpected exception thrown");
-        }
-
-        try {
-            stream.throwIfCauseOf(
-                    new TaggedIOException(exception, UUID.randomUUID()));
-        } catch (final IOException e) {
-            fail("Unexpected exception thrown");
-        }
-        stream.close();
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/TeeOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/TeeOutputStreamTest.java
deleted file mode 100644
index ef5c01c..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/TeeOutputStreamTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-import org.junit.Assert;
-
-/**
- * @version $Id$
- */
-
-public class TeeOutputStreamTest extends TestCase {
-
-    private static class ExceptionOnCloseByteArrayOutputStream extends ByteArrayOutputStream {
-
-        @Override
-        public void close() throws IOException {
-            throw new IOException();
-        }
-    }
-
-    private static class RecordCloseByteArrayOutputStream extends ByteArrayOutputStream {
-
-        boolean closed;
-
-        @Override
-        public void close() throws IOException {
-            super.close();
-            closed = true;
-        }
-    }
-
-    public TeeOutputStreamTest(final String name) {
-        super(name);
-    }
-
-    /**
-     * Tests that the branch {@code OutputStream} is closed when closing the main {@code OutputStream} throws an
-     * exception on {@link TeeOutputStream#close()}.
-     */
-    public void testCloseBranchIOException() {
-        final ByteArrayOutputStream badOs = new ExceptionOnCloseByteArrayOutputStream();
-        final RecordCloseByteArrayOutputStream goodOs = new RecordCloseByteArrayOutputStream();
-        final TeeOutputStream tos = new TeeOutputStream(goodOs, badOs);
-        try {
-            tos.close();
-            Assert.fail("Expected " + IOException.class.getName());
-        } catch (final IOException e) {
-            Assert.assertTrue(goodOs.closed);
-        }
-    }
-
-    /**
-     * Tests that the main {@code OutputStream} is closed when closing the branch {@code OutputStream} throws an
-     * exception on {@link TeeOutputStream#close()}.
-     */
-    public void testCloseMainIOException() {
-        final ByteArrayOutputStream badOs = new ExceptionOnCloseByteArrayOutputStream();
-        final RecordCloseByteArrayOutputStream goodOs = new RecordCloseByteArrayOutputStream();
-        final TeeOutputStream tos = new TeeOutputStream(badOs, goodOs);
-        try {
-            tos.close();
-            Assert.fail("Expected " + IOException.class.getName());
-        } catch (final IOException e) {
-            Assert.assertTrue(goodOs.closed);
-        }
-    }
-
-    public void testTee() throws IOException {
-        final ByteArrayOutputStream baos1 = new ByteArrayOutputStream();
-        final ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
-        final TeeOutputStream tos = new TeeOutputStream(baos1, baos2);
-        for (int i = 0; i < 20; i++) {
-            tos.write(i);
-        }
-        assertByteArrayEquals("TeeOutputStream.write(int)", baos1.toByteArray(), baos2.toByteArray());
-
-        final byte[] array = new byte[10];
-        for (int i = 20; i < 30; i++) {
-            array[i - 20] = (byte) i;
-        }
-        tos.write(array);
-        assertByteArrayEquals("TeeOutputStream.write(byte[])", baos1.toByteArray(), baos2.toByteArray());
-
-        for (int i = 25; i < 35; i++) {
-            array[i - 25] = (byte) i;
-        }
-        tos.write(array, 5, 5);
-        assertByteArrayEquals("TeeOutputStream.write(byte[], int, int)", baos1.toByteArray(), baos2.toByteArray());
-        tos.flush();
-        tos.close();
-    }
-
-    private void assertByteArrayEquals(final String msg, final byte[] array1, final byte[] array2) {
-        assertEquals(msg + ": array size mismatch", array1.length, array2.length);
-        for (int i = 0; i < array1.length; i++) {
-            assertEquals(msg + ": array[ " + i + "] mismatch", array1[i], array2[i]);
-        }
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/ThresholdingOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/ThresholdingOutputStreamTest.java
deleted file mode 100644
index 695e31c..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/ThresholdingOutputStreamTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.commons.io.output;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.junit.Test;
-
-public class ThresholdingOutputStreamTest {
-
-    @Test
-    public void testSetByteCount() throws Exception {
-        final AtomicBoolean reached = new AtomicBoolean(false);
-        ThresholdingOutputStream tos = new ThresholdingOutputStream(3) {
-            {
-                setByteCount(2);
-            }
-            @Override
-            protected OutputStream getStream() throws IOException {
-                return new ByteArrayOutputStream(4);
-            }
-
-            @Override
-            protected void thresholdReached() throws IOException {
-                reached.set( true);
-            }
-        };
-
-        tos.write(12);
-        assertFalse( reached.get());
-        tos.write(12);
-        assertTrue(reached.get());
-        tos.close();
-    }
-}
\ No newline at end of file
diff --git a/trunk/src/test/java/org/apache/commons/io/output/WriterOutputStreamTest.java b/trunk/src/test/java/org/apache/commons/io/output/WriterOutputStreamTest.java
deleted file mode 100644
index 3107b6c..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/WriterOutputStreamTest.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.IOException;
-import java.io.StringWriter;
-import java.util.Random;
-
-import junit.framework.TestCase;
-
-public class WriterOutputStreamTest extends TestCase {
-    private static final String TEST_STRING = "\u00e0 peine arriv\u00e9s nous entr\u00e2mes dans sa chambre";
-    private static final String LARGE_TEST_STRING;
-
-    static {
-        final StringBuilder buffer = new StringBuilder();
-        for (int i=0; i<100; i++) {
-            buffer.append(TEST_STRING);
-        }
-        LARGE_TEST_STRING = buffer.toString();
-    }
-
-    private final Random random = new Random();
-
-    private void testWithSingleByteWrite(final String testString, final String charsetName) throws IOException {
-        final byte[] bytes = testString.getBytes(charsetName);
-        final StringWriter writer = new StringWriter();
-        final WriterOutputStream out = new WriterOutputStream(writer, charsetName);
-        for (final byte b : bytes) {
-            out.write(b);
-        }
-        out.close();
-        assertEquals(testString, writer.toString());
-    }
-
-    private void testWithBufferedWrite(final String testString, final String charsetName) throws IOException {
-        final byte[] expected = testString.getBytes(charsetName);
-        final StringWriter writer = new StringWriter();
-        final WriterOutputStream out = new WriterOutputStream(writer, charsetName);
-        int offset = 0;
-        while (offset < expected.length) {
-            final int length = Math.min(random.nextInt(128), expected.length-offset);
-            out.write(expected, offset, length);
-            offset += length;
-        }
-        out.close();
-        assertEquals(testString, writer.toString());
-    }
-
-    public void testUTF8WithSingleByteWrite() throws IOException {
-        testWithSingleByteWrite(TEST_STRING, "UTF-8");
-    }
-
-    public void testLargeUTF8WithSingleByteWrite() throws IOException {
-        testWithSingleByteWrite(LARGE_TEST_STRING, "UTF-8");
-    }
-
-    public void testUTF8WithBufferedWrite() throws IOException {
-        testWithBufferedWrite(TEST_STRING, "UTF-8");
-    }
-
-    public void testLargeUTF8WithBufferedWrite() throws IOException {
-        testWithBufferedWrite(LARGE_TEST_STRING, "UTF-8");
-    }
-
-    public void testUTF16WithSingleByteWrite() throws IOException {
-        testWithSingleByteWrite(TEST_STRING, "UTF-16");
-    }
-
-    public void testUTF16WithBufferedWrite() throws IOException {
-        testWithBufferedWrite(TEST_STRING, "UTF-16");
-    }
-
-    public void testUTF16BEWithSingleByteWrite() throws IOException {
-        testWithSingleByteWrite(TEST_STRING, "UTF-16BE");
-    }
-
-    public void testUTF16BEWithBufferedWrite() throws IOException {
-        testWithBufferedWrite(TEST_STRING, "UTF-16BE");
-    }
-
-    public void testUTF16LEWithSingleByteWrite() throws IOException {
-        testWithSingleByteWrite(TEST_STRING, "UTF-16LE");
-    }
-
-    public void testUTF16LEWithBufferedWrite() throws IOException {
-        testWithBufferedWrite(TEST_STRING, "UTF-16LE");
-    }
-
-
-    public void testFlush() throws IOException {
-        final StringWriter writer = new StringWriter();
-        final WriterOutputStream out = new WriterOutputStream(writer, "us-ascii", 1024, false);
-        out.write("abc".getBytes("us-ascii"));
-        assertEquals(0, writer.getBuffer().length());
-        out.flush();
-        assertEquals("abc", writer.toString());
-        out.close();
-    }
-
-    public void testWriteImmediately() throws IOException {
-        final StringWriter writer = new StringWriter();
-        final WriterOutputStream out = new WriterOutputStream(writer, "us-ascii", 1024, true);
-        out.write("abc".getBytes("us-ascii"));
-        assertEquals("abc", writer.toString());
-        out.close();
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java b/trunk/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
deleted file mode 100644
index fcb48fc..0000000
--- a/trunk/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.output;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.Arrays;
-
-import junit.framework.TestCase;
-
-/**
- * @version $Id$
- */
-public class XmlStreamWriterTest extends TestCase {
-    /** french */
-    private static final String TEXT_LATIN1 = "eacute: \u00E9";
-    /** greek */
-    private static final String TEXT_LATIN7 = "alpha: \u03B1";
-    /** euro support */
-    private static final String TEXT_LATIN15 = "euro: \u20AC";
-    /** japanese */
-    private static final String TEXT_EUC_JP = "hiragana A: \u3042";
-    /** Unicode: support everything */
-    private static final String TEXT_UNICODE = TEXT_LATIN1 + ", " + TEXT_LATIN7
-            + ", " + TEXT_LATIN15 + ", " + TEXT_EUC_JP;
-
-    private static String createXmlContent(final String text, final String encoding) {
-        String xmlDecl = "<?xml version=\"1.0\"?>";
-        if (encoding != null) {
-            xmlDecl = "<?xml version=\"1.0\" encoding=\"" + encoding + "\"?>";
-        }
-        final String xml = xmlDecl + "\n<text>" + text + "</text>";
-        return xml;
-    }
-
-    private static void checkXmlContent(final String xml, final String encoding, final String defaultEncoding)
-            throws IOException {
-        final ByteArrayOutputStream out = new ByteArrayOutputStream();
-        final XmlStreamWriter writer = new XmlStreamWriter(out, defaultEncoding);
-        writer.write(xml);
-        writer.close();
-        final byte[] xmlContent = out.toByteArray();
-        assertEquals(encoding, writer.getEncoding());
-        assertTrue(Arrays.equals(xml.getBytes(encoding), xmlContent));
-
-    }
-
-    private static void checkXmlWriter(final String text, final String encoding)
-            throws IOException {
-        checkXmlWriter(text, encoding, null);
-    }
-
-    private static void checkXmlWriter(final String text, final String encoding, final String defaultEncoding)
-            throws IOException {
-        final String xml = createXmlContent(text, encoding);
-        String effectiveEncoding = encoding;
-        if (effectiveEncoding == null) {
-            effectiveEncoding = defaultEncoding == null ? "UTF-8" : defaultEncoding;
-        }
-        checkXmlContent(xml, effectiveEncoding, defaultEncoding);
-    }
-
-    public void testNoXmlHeader() throws IOException {
-        final String xml = "<text>text with no XML header</text>";
-        checkXmlContent(xml, "UTF-8", null);
-    }
-
-    public void testEmpty() throws IOException {
-        final ByteArrayOutputStream out = new ByteArrayOutputStream();
-        final XmlStreamWriter writer = new XmlStreamWriter(out);
-        writer.flush();
-        writer.write("");
-        writer.flush();
-        writer.write(".");
-        writer.flush();
-        writer.close();
-    }
-
-    public void testDefaultEncoding() throws IOException {
-        checkXmlWriter(TEXT_UNICODE, null, null);
-        checkXmlWriter(TEXT_UNICODE, null, "UTF-8");
-        checkXmlWriter(TEXT_UNICODE, null, "UTF-16");
-        checkXmlWriter(TEXT_UNICODE, null, "UTF-16BE");
-        checkXmlWriter(TEXT_UNICODE, null, "ISO-8859-1");
-    }
-
-    public void testUTF8Encoding() throws IOException {
-        checkXmlWriter(TEXT_UNICODE, "UTF-8");
-    }
-
-    public void testUTF16Encoding() throws IOException {
-        checkXmlWriter(TEXT_UNICODE, "UTF-16");
-    }
-
-    public void testUTF16BEEncoding() throws IOException {
-        checkXmlWriter(TEXT_UNICODE, "UTF-16BE");
-    }
-
-    public void testUTF16LEEncoding() throws IOException {
-        checkXmlWriter(TEXT_UNICODE, "UTF-16LE");
-    }
-
-    public void testLatin1Encoding() throws IOException {
-        checkXmlWriter(TEXT_LATIN1, "ISO-8859-1");
-    }
-
-    public void testLatin7Encoding() throws IOException {
-        checkXmlWriter(TEXT_LATIN7, "ISO-8859-7");
-    }
-
-    public void testLatin15Encoding() throws IOException {
-        checkXmlWriter(TEXT_LATIN15, "ISO-8859-15");
-    }
-
-    public void testEUC_JPEncoding() throws IOException {
-        checkXmlWriter(TEXT_EUC_JP, "EUC-JP");
-    }
-
-    public void testEBCDICEncoding() throws IOException {
-        checkXmlWriter("simple text in EBCDIC", "CP1047");
-    }
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/testtools/FileBasedTestCase.java b/trunk/src/test/java/org/apache/commons/io/testtools/FileBasedTestCase.java
deleted file mode 100644
index 48044a2..0000000
--- a/trunk/src/test/java/org/apache/commons/io/testtools/FileBasedTestCase.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.testtools;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.Reader;
-import java.io.Writer;
-import java.util.Arrays;
-
-import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.output.ByteArrayOutputStream;
-
-/**
- * Base class for testcases doing tests with files.
- */
-public abstract class FileBasedTestCase extends TestCase {
-
-    private static volatile File testDir;
-
-    public FileBasedTestCase(final String name) {
-        super(name);
-    }
-
-    public static File getTestDirectory() {
-        if (testDir == null) {
-            testDir = new File("test/io/").getAbsoluteFile();
-        }
-        testDir.mkdirs();
-        return testDir;
-    }
-
-    protected void createFile(final File file, final long size)
-            throws IOException {
-        if (!file.getParentFile().exists()) {
-            throw new IOException("Cannot create file " + file
-                + " as the parent directory does not exist");
-        }
-        final BufferedOutputStream output =
-            new BufferedOutputStream(new java.io.FileOutputStream(file));
-        try {
-            generateTestData(output, size);
-        } finally {
-            IOUtils.closeQuietly(output);
-        }
-    }
-
-    protected byte[] generateTestData(final long size) {
-        try {
-            final ByteArrayOutputStream baout = new ByteArrayOutputStream();
-            generateTestData(baout, size);
-            return baout.toByteArray();
-        } catch (final IOException ioe) {
-            throw new RuntimeException("This should never happen: " + ioe.getMessage());
-        }
-    }
-
-    protected void generateTestData(final OutputStream out, final long size)
-                throws IOException {
-        for (int i = 0; i < size; i++) {
-            //output.write((byte)'X');
-
-            // nice varied byte pattern compatible with Readers and Writers
-            out.write( (byte)( (i % 127) + 1) );
-        }
-    }
-
-    protected void createLineBasedFile(final File file, final String[] data) throws IOException {
-        if (file.getParentFile() != null && !file.getParentFile().exists()) {
-            throw new IOException("Cannot create file " + file + " as the parent directory does not exist");
-        }
-        final PrintWriter output = new PrintWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8"));
-        try {
-            for (final String element : data) {
-                output.println(element);
-            }
-        } finally {
-            IOUtils.closeQuietly(output);
-        }
-    }
-
-    protected File newFile(final String filename) throws IOException {
-        final File destination = new File( getTestDirectory(), filename );
-        /*
-        assertTrue( filename + "Test output data file shouldn't previously exist",
-                    !destination.exists() );
-        */
-        if (destination.exists()) {
-            FileUtils.forceDelete(destination);
-        }
-        return destination;
-    }
-
-    protected void checkFile( final File file, final File referenceFile )
-                throws Exception {
-        assertTrue( "Check existence of output file", file.exists() );
-        assertEqualContent( referenceFile, file );
-    }
-
-    /** Assert that the content of two files is the same. */
-    private void assertEqualContent( final File f0, final File f1 )
-        throws IOException
-    {
-        /* This doesn't work because the filesize isn't updated until the file
-         * is closed.
-        assertTrue( "The files " + f0 + " and " + f1 +
-                    " have differing file sizes (" + f0.length() +
-                    " vs " + f1.length() + ")", ( f0.length() == f1.length() ) );
-        */
-        final InputStream is0 = new java.io.FileInputStream( f0 );
-        try {
-            final InputStream is1 = new java.io.FileInputStream( f1 );
-            try {
-                final byte[] buf0 = new byte[ 1024 ];
-                final byte[] buf1 = new byte[ 1024 ];
-                int n0 = 0;
-                int n1 = 0;
-
-                while( -1 != n0 )
-                {
-                    n0 = is0.read( buf0 );
-                    n1 = is1.read( buf1 );
-                    assertTrue( "The files " + f0 + " and " + f1 +
-                                " have differing number of bytes available (" + n0 +
-                                " vs " + n1 + ")", ( n0 == n1 ) );
-
-                    assertTrue( "The files " + f0 + " and " + f1 +
-                                " have different content", Arrays.equals( buf0, buf1 ) );
-                }
-            } finally {
-                is1.close();
-            }
-        } finally {
-            is0.close();
-        }
-    }
-
-    /** 
-     * Assert that the content of a file is equal to that in a byte[].
-     *
-     * @param b0 the expected contents
-     * @param file the file to check
-     *
-     * @throws IOException If an I/O error occurs while reading the file contents
-     */
-    protected void assertEqualContent(final byte[] b0, final File file) throws IOException {
-        final InputStream is = new java.io.FileInputStream(file);
-        int count = 0, numRead = 0;
-        final byte[] b1 = new byte[b0.length];
-        try {
-            while (count < b0.length && numRead >= 0) {
-                numRead = is.read(b1, count, b0.length);
-                count += numRead;
-            }
-            assertEquals("Different number of bytes: ", b0.length, count);
-            for (int i = 0; i < count; i++) {
-                assertEquals("byte " + i + " differs", b0[i], b1[i]);
-            }
-        } finally {
-            is.close();
-        }
-    }
-
-    /** 
-     * Assert that the content of a file is equal to that in a char[].
-     *
-     * @param c0 the expected contents
-     * @param file the file to check
-     *
-     * @throws IOException If an I/O error occurs while reading the file contents
-     */
-    protected void assertEqualContent(final char[] c0, final File file) throws IOException {
-        final Reader ir = new java.io.FileReader(file);
-        int count = 0, numRead = 0;
-        final char[] c1 = new char[c0.length];
-        try {
-            while (count < c0.length && numRead >= 0) {
-                numRead = ir.read(c1, count, c0.length);
-                count += numRead;
-            }
-            assertEquals("Different number of chars: ", c0.length, count);
-            for (int i = 0; i < count; i++) {
-                assertEquals("char " + i + " differs", c0[i], c1[i]);
-            }
-        } finally {
-            ir.close();
-        }
-    }
-
-    protected void checkWrite(final OutputStream output) throws Exception {
-        try {
-            new java.io.PrintStream(output).write(0);
-        } catch (final Throwable t) {
-            throw new AssertionFailedError(
-                "The copy() method closed the stream "
-                    + "when it shouldn't have. "
-                    + t.getMessage());
-        }
-    }
-
-    protected void checkWrite(final Writer output) throws Exception {
-        try {
-            new java.io.PrintWriter(output).write('a');
-        } catch (final Throwable t) {
-            throw new AssertionFailedError(
-                "The copy() method closed the stream "
-                    + "when it shouldn't have. "
-                    + t.getMessage());
-        }
-    }
-
-    protected void deleteFile( final File file )
-        throws Exception {
-        if (file.exists()) {
-            assertTrue("Couldn't delete file: " + file, file.delete());
-        }
-    }
-
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/testtools/YellOnCloseInputStream.java b/trunk/src/test/java/org/apache/commons/io/testtools/YellOnCloseInputStream.java
deleted file mode 100644
index 0e940dc..0000000
--- a/trunk/src/test/java/org/apache/commons/io/testtools/YellOnCloseInputStream.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.testtools;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import junit.framework.AssertionFailedError;
-
-import org.apache.commons.io.input.ProxyInputStream;
-
-/**
- * Helper class for checking behaviour of IO classes.
- */
-public class YellOnCloseInputStream extends ProxyInputStream {
-
-    /**
-     * @param proxy InputStream to delegate to.
-     */
-    public YellOnCloseInputStream(final InputStream proxy) {
-        super(proxy);
-    }
-
-    /** @see java.io.InputStream#close() */
-    @Override
-    public void close() throws IOException {
-        throw new AssertionFailedError("close() was called on OutputStream");
-    }
-
-}
diff --git a/trunk/src/test/java/org/apache/commons/io/testtools/YellOnFlushAndCloseOutputStream.java b/trunk/src/test/java/org/apache/commons/io/testtools/YellOnFlushAndCloseOutputStream.java
deleted file mode 100644
index 7c73d0d..0000000
--- a/trunk/src/test/java/org/apache/commons/io/testtools/YellOnFlushAndCloseOutputStream.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.testtools;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import junit.framework.AssertionFailedError;
-
-import org.apache.commons.io.output.ProxyOutputStream;
-
-/**
- * Helper class for checking behaviour of IO classes.
- */
-public class YellOnFlushAndCloseOutputStream extends ProxyOutputStream {
-
-    private boolean yellForFlush;
-    private boolean yellForClose;
-
-    /**
-     * @param proxy OutputStream to delegate to.
-     * @param yellForFlush True if flush() is forbidden
-     * @param yellForClose True if close() is forbidden
-     */
-    public YellOnFlushAndCloseOutputStream(final OutputStream proxy, final boolean yellForFlush, final boolean yellForClose) {
-        super(proxy);
-        this.yellForFlush = yellForFlush;
-        this.yellForClose = yellForClose;
-    }
-
-    /** @see java.io.OutputStream#flush() */
-    @Override
-    public void flush() throws IOException {
-        if (yellForFlush) {
-            throw new AssertionFailedError("flush() was called on OutputStream");
-        }
-        super.flush();
-    }
-
-    /** @see java.io.OutputStream#close() */
-    @Override
-    public void close() throws IOException {
-        if (yellForClose) {
-            throw new AssertionFailedError("close() was called on OutputStream");
-        }
-        super.close();
-    }
-
-    public void off() {
-        yellForFlush = false;
-        yellForClose = false;
-    }
-
-}
diff --git a/trunk/src/test/resources/org/apache/commons/io/FileUtilsTestDataCR.dat b/trunk/src/test/resources/org/apache/commons/io/FileUtilsTestDataCR.dat
deleted file mode 100644
index beff0d6..0000000
--- a/trunk/src/test/resources/org/apache/commons/io/FileUtilsTestDataCR.dat
+++ /dev/null
Binary files differ
diff --git a/trunk/src/test/resources/org/apache/commons/io/FileUtilsTestDataCRLF.dat b/trunk/src/test/resources/org/apache/commons/io/FileUtilsTestDataCRLF.dat
deleted file mode 100644
index 294d779..0000000
--- a/trunk/src/test/resources/org/apache/commons/io/FileUtilsTestDataCRLF.dat
+++ /dev/null
@@ -1,3 +0,0 @@
-1

-2

-3

diff --git a/trunk/src/test/resources/org/apache/commons/io/FileUtilsTestDataLF.dat b/trunk/src/test/resources/org/apache/commons/io/FileUtilsTestDataLF.dat
deleted file mode 100644
index 01e79c3..0000000
--- a/trunk/src/test/resources/org/apache/commons/io/FileUtilsTestDataLF.dat
+++ /dev/null
@@ -1,3 +0,0 @@
-1
-2
-3
diff --git a/trunk/src/test/resources/org/apache/commons/io/testfileBOM.xml b/trunk/src/test/resources/org/apache/commons/io/testfileBOM.xml
deleted file mode 100644
index 9701aaa..0000000
--- a/trunk/src/test/resources/org/apache/commons/io/testfileBOM.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<element>
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.   
-
-Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.   
-
-Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.   
-
-Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.   
-
-Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.   
-
-At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.   
-
-Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus.   
-
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.   
-
-Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.   
-
-Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.   
-
-Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo
-</element>
diff --git a/trunk/src/test/resources/org/apache/commons/io/testfileNoBOM.xml b/trunk/src/test/resources/org/apache/commons/io/testfileNoBOM.xml
deleted file mode 100644
index 0c9c951..0000000
--- a/trunk/src/test/resources/org/apache/commons/io/testfileNoBOM.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<element>
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.   
-
-Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.   
-
-Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.   
-
-Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.   
-
-Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.   
-
-At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.   
-
-Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus.   
-
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.   
-
-Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.   
-
-Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.   
-
-Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo
-</element>
diff --git a/trunk/src/test/resources/test-file-20byteslength.bin b/trunk/src/test/resources/test-file-20byteslength.bin
deleted file mode 100644
index 1823b69..0000000
--- a/trunk/src/test/resources/test-file-20byteslength.bin
+++ /dev/null
@@ -1,2 +0,0 @@
-123456789
-123456789
diff --git a/trunk/src/test/resources/test-file-empty.bin b/trunk/src/test/resources/test-file-empty.bin
deleted file mode 100644
index e69de29..0000000
--- a/trunk/src/test/resources/test-file-empty.bin
+++ /dev/null
diff --git a/trunk/src/test/resources/test-file-gbk.bin b/trunk/src/test/resources/test-file-gbk.bin
deleted file mode 100644
index 5c1efeb..0000000
--- a/trunk/src/test/resources/test-file-gbk.bin
+++ /dev/null
@@ -1,2 +0,0 @@
-Ã÷ݔ×Ó¾©

-¼òÌåÖÐÎÄ

diff --git a/trunk/src/test/resources/test-file-iso8859-1-shortlines-win-linebr.bin b/trunk/src/test/resources/test-file-iso8859-1-shortlines-win-linebr.bin
deleted file mode 100644
index 6291acb..0000000
--- a/trunk/src/test/resources/test-file-iso8859-1-shortlines-win-linebr.bin
+++ /dev/null
@@ -1,12 +0,0 @@
-1

-

-

-

-2

-

-

-

-3

-

-

-

diff --git a/trunk/src/test/resources/test-file-iso8859-1.bin b/trunk/src/test/resources/test-file-iso8859-1.bin
deleted file mode 100644
index db93dd9..0000000
--- a/trunk/src/test/resources/test-file-iso8859-1.bin
+++ /dev/null
@@ -1,52 +0,0 @@
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±²®
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±²
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ 
-A Test Line. Special chars: ÄäÜüÖöß ÃáéíïçñÂ
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïç
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíï
-A Test Line. Special chars: ÄäÜüÖöß Ãáéí
-A Test Line. Special chars: ÄäÜüÖöß Ãáé
-A Test Line. Special chars: ÄäÜüÖöß Ãá
-A Test Line. Special chars: ÄäÜüÖöß Ã
-A Test Line. Special chars: ÄäÜüÖöß 
-A Test Line. Special chars: ÄäÜüÖöß
-A Test Line. Special chars: ÄäÜüÖö
-A Test Line. Special chars: ÄäÜüÖ
-A Test Line. Special chars: ÄäÜü
-A Test Line. Special chars: ÄäÜ
-A Test Line. Special chars: Ää
-A Test Line. Special chars: Ä
-A Test Line. Special chars: 
-A Test Line. Special chars:
-A Test Line. Special chars
-A Test Line. Special char
-A Test Line. Special cha
-A Test Line. Special ch
-A Test Line. Special c
-A Test Line. Special 
-A Test Line. Special
-A Test Line. Specia
-A Test Line. Speci
-A Test Line. Spec
-A Test Line. Spe
-A Test Line. Sp
-A Test Line. S
-A Test Line. 
-A Test Line.
-A Test Line
-A Test Lin
-A Test Li
-A Test L
-A Test 
-A Test
-A Tes
-A Te
-A T
-A 
-A
diff --git a/trunk/src/test/resources/test-file-shiftjis.bin b/trunk/src/test/resources/test-file-shiftjis.bin
deleted file mode 100644
index 74c6d05..0000000
--- a/trunk/src/test/resources/test-file-shiftjis.bin
+++ /dev/null
@@ -1,2 +0,0 @@
-Hiragana letters: ‚Ÿ‚ ‚¡‚¢‚£
-Kanji letters: –¾—AŽq‹ž
diff --git a/trunk/src/test/resources/test-file-utf16be.bin b/trunk/src/test/resources/test-file-utf16be.bin
deleted file mode 100644
index 31bef00..0000000
--- a/trunk/src/test/resources/test-file-utf16be.bin
+++ /dev/null
Binary files differ
diff --git a/trunk/src/test/resources/test-file-utf16le.bin b/trunk/src/test/resources/test-file-utf16le.bin
deleted file mode 100644
index 023d31c..0000000
--- a/trunk/src/test/resources/test-file-utf16le.bin
+++ /dev/null
Binary files differ
diff --git a/trunk/src/test/resources/test-file-utf8-cr-only.bin b/trunk/src/test/resources/test-file-utf8-cr-only.bin
deleted file mode 100644
index 42748a8..0000000
--- a/trunk/src/test/resources/test-file-utf8-cr-only.bin
+++ /dev/null
Binary files differ
diff --git a/trunk/src/test/resources/test-file-utf8-win-linebr.bin b/trunk/src/test/resources/test-file-utf8-win-linebr.bin
deleted file mode 100644
index 91b0a06..0000000
--- a/trunk/src/test/resources/test-file-utf8-win-linebr.bin
+++ /dev/null
@@ -1,52 +0,0 @@
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±²®

-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±²

-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±

-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£

-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥

-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ

-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©

-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ 

-A Test Line. Special chars: ÄäÜüÖöß ÃáéíïçñÂ

-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ

-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïç

-A Test Line. Special chars: ÄäÜüÖöß Ãáéíï

-A Test Line. Special chars: ÄäÜüÖöß Ãáéí

-A Test Line. Special chars: ÄäÜüÖöß Ãáé

-A Test Line. Special chars: ÄäÜüÖöß Ãá

-A Test Line. Special chars: ÄäÜüÖöß Ã

-A Test Line. Special chars: ÄäÜüÖöß 

-A Test Line. Special chars: ÄäÜüÖöß

-A Test Line. Special chars: ÄäÜüÖö

-A Test Line. Special chars: ÄäÜüÖ

-A Test Line. Special chars: ÄäÜü

-A Test Line. Special chars: ÄäÜ

-A Test Line. Special chars: Ää

-A Test Line. Special chars: Ä

-A Test Line. Special chars: 

-A Test Line. Special chars:

-A Test Line. Special chars

-A Test Line. Special char

-A Test Line. Special cha

-A Test Line. Special ch

-A Test Line. Special c

-A Test Line. Special 

-A Test Line. Special

-A Test Line. Specia

-A Test Line. Speci

-A Test Line. Spec

-A Test Line. Spe

-A Test Line. Sp

-A Test Line. S

-A Test Line. 

-A Test Line.

-A Test Line

-A Test Lin

-A Test Li

-A Test L

-A Test 

-A Test

-A Tes

-A Te

-A T

-A 

-A

diff --git a/trunk/src/test/resources/test-file-utf8.bin b/trunk/src/test/resources/test-file-utf8.bin
deleted file mode 100644
index 616b091..0000000
--- a/trunk/src/test/resources/test-file-utf8.bin
+++ /dev/null
@@ -1,52 +0,0 @@
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±²®
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±²
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ 
-A Test Line. Special chars: ÄäÜüÖöß ÃáéíïçñÂ
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíïç
-A Test Line. Special chars: ÄäÜüÖöß Ãáéíï
-A Test Line. Special chars: ÄäÜüÖöß Ãáéí
-A Test Line. Special chars: ÄäÜüÖöß Ãáé
-A Test Line. Special chars: ÄäÜüÖöß Ãá
-A Test Line. Special chars: ÄäÜüÖöß Ã
-A Test Line. Special chars: ÄäÜüÖöß 
-A Test Line. Special chars: ÄäÜüÖöß
-A Test Line. Special chars: ÄäÜüÖö
-A Test Line. Special chars: ÄäÜüÖ
-A Test Line. Special chars: ÄäÜü
-A Test Line. Special chars: ÄäÜ
-A Test Line. Special chars: Ää
-A Test Line. Special chars: Ä
-A Test Line. Special chars: 
-A Test Line. Special chars:
-A Test Line. Special chars
-A Test Line. Special char
-A Test Line. Special cha
-A Test Line. Special ch
-A Test Line. Special c
-A Test Line. Special 
-A Test Line. Special
-A Test Line. Specia
-A Test Line. Speci
-A Test Line. Spec
-A Test Line. Spe
-A Test Line. Sp
-A Test Line. S
-A Test Line. 
-A Test Line.
-A Test Line
-A Test Lin
-A Test Li
-A Test L
-A Test 
-A Test
-A Tes
-A Te
-A T
-A 
-A
diff --git a/trunk/src/test/resources/test-file-windows-31j.bin b/trunk/src/test/resources/test-file-windows-31j.bin
deleted file mode 100644
index eff55df..0000000
--- a/trunk/src/test/resources/test-file-windows-31j.bin
+++ /dev/null
@@ -1,2 +0,0 @@
-‚Ÿ‚ ‚¡‚¢‚£

-–¾—AŽq‹ž

diff --git a/trunk/src/test/resources/test-file-x-windows-949.bin b/trunk/src/test/resources/test-file-x-windows-949.bin
deleted file mode 100644
index 60d203e..0000000
--- a/trunk/src/test/resources/test-file-x-windows-949.bin
+++ /dev/null
@@ -1,2 +0,0 @@
-Çѱ¹¾î

-´ëÇѹα¹

diff --git a/trunk/src/test/resources/test-file-x-windows-950.bin b/trunk/src/test/resources/test-file-x-windows-950.bin
deleted file mode 100644
index 7c9cd59..0000000
--- a/trunk/src/test/resources/test-file-x-windows-950.bin
+++ /dev/null
@@ -1,2 +0,0 @@
-©ú¿é¤l¨Ê

-ÁcÅ餤¤å