1<?xml version="1.0"?> 2<!-- 3Licensed to the Apache Software Foundation (ASF) under one or more 4contributor license agreements. See the NOTICE file distributed with 5this work for additional information regarding copyright ownership. 6The ASF licenses this file to You under the Apache License, Version 2.0 7(the "License"); you may not use this file except in compliance with 8the License. You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12Unless required by applicable law or agreed to in writing, software 13distributed under the License is distributed on an "AS IS" BASIS, 14WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15See the License for the specific language governing permissions and 16limitations under the License. 17--> 18<document> 19 <properties> 20 <title>Upgrade from 1.3.2 to 1.4</title> 21 <author email="[email protected]">Commons Documentation Team</author> 22 </properties> 23<body> 24 25<section name="Upgrade"> 26<p> 27These are the release notes and advice for upgrading Commons-IO from 28version 1.3.2 to version 1.4. 29<source> 30Commons IO is a package of Java utility classes for java.io's hierarchy. 31Classes in this package are considered to be so standard and of such high 32reuse as to justify existence in java.io. 33 34Commons IO contains utility classes, stream implementations, file filters, 35file comparators and endian transformation classes. 36 37 38Compatibility with 1.3.2 39------------------------ 40Binary compatible - Yes 41 42Source compatible - Yes 43 44Semantic compatible - Yes 45 Check the bug fixes section for semantic bug fixes 46 47Commons IO 1.4 introduces four new implementations which depend on JDK 1.4 features 48(CharSequenceReader, FileWriterWithEncoding, IOExceptionWithCause and RegexFileFilter). 49It has been built with the JDK source and target options set to JDK 1.3 and, except for 50those implementations, can be used with JDK 1.3 (see IO-127). 51 52 53Deprecations from 1.3.2 54----------------------- 55- FileCleaner deprecated in favour of FileCleaningTracker [see IO-116] 56 57 58Bug fixes from 1.3.2 59-------------------- 60- FileUtils 61 - forceDelete of orphaned Softlinks does not work [IO-147] 62 - Infinite loop on FileUtils.copyDirectory when the destination directory is within 63 the source directory [IO-141] 64 65- HexDump 66 - HexDump's use of static StringBuffers isn't thread-safe [IO-136] 67 68 69Enhancements from 1.3.2 70----------------------- 71- FileUtils 72 - Add a deleteQuietly method [IO-135] 73 - Add a copyDirectory() method that makes use of FileFilter [IO-105] 74 - Add moveDirectory() and moveFile() methods [IO-77] 75 76- FilenameUtils 77 - Add file name extension separator constants[IO-149] 78 79- IOExceptionWithCause [IO-148] 80 - Add a new IOException implementation with constructors which take a cause 81 82- TeeInputStream [IO-129] 83 - Add new Tee input stream implementation 84 85- FileWriterWithEncoding [IO-153] 86 - Add new File Writer implementation that accepts an encoding 87 88- CharSequenceReader [IO-138] 89 - Add new Reader implementation that handles any CharSequence (String, 90 StringBuffer, StringBuilder or CharBuffer) 91 92- ThresholdingOutputStream [IO-121] 93 - Add a reset() method which sets the count of the bytes written back to zero. 94 95- DeferredFileOutputStream [IO-130] 96 - Add support for temporary files 97 98- ByteArrayOutputStream 99 - Add a new write(InputStream) method [IO-152] 100 101- New Closed Input/Output stream implementations [IO-122] 102 - AutoCloseInputStream - automatically closes and discards the underlying input stream 103 - ClosedInputStream - returns -1 for any read attempts 104 - ClosedOutputStream - throws an IOException for any write attempts 105 - CloseShieldInputStream - prevents the underlying input stream from being closed. 106 - CloseShieldOutputStream - prevents the underlying output stream from being closed. 107 108- Add Singleton Constants to several stream classes [IO-143] 109 110- PrefixFileFilter [IO-126] 111 - Add facility to specify case sensitivity on prefix matching 112 113- SuffixFileFilter [IO-126] 114 - Add facility to specify case sensitivity on suffix matching 115 116- RegexFileFilter [IO-74] 117 - Add new regular expression file filter implementation 118 119- Make IOFileFilter implementations Serializable [IO-131] 120 121- Improve IOFileFilter toString() methods [IO-120] 122 123- Make fields final so classes are immutable/threadsafe [IO-133] 124 - changes to Age, Delegate, Name, Not, Prefix, Regex, Size, Suffix and Wildcard IOFileFilter 125 implementations. 126 127- IOCase 128 - Add a compare method to IOCase [IO-144] 129 130- Add a package of java.util.Comparator implementations for files [IO-145] 131 - DefaultFileComparator - compare files using the default File.compareTo(File) method. 132 - ExtensionFileComparator - compares files using file name extensions. 133 - LastModifiedFileComparator - compares files using the last modified date/time. 134 - NameFileComparator - compares files using file names. 135 - PathFileComparator - compares files using file paths. 136 - SizeFileComparator - compares files using file sizes. 137</source> 138</p> 139</section> 140 141</body> 142</document> 143