| <?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="[email protected]">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-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) |
| |
| - ThresholdingOutputStream [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 facility to specify case sensitivity on prefix matching |
| |
| - SuffixFileFilter [IO-126] |
| - Add facility 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> |