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 2.1 to 2.2</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 2.1 to version 2.2 29<source> 30Commons IO is a package of Java utility classes like java.io. 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, endian transformation classes, and much more. 36 37============================================================================== 38Commons IO Package Version 2.2 39============================================================================== 40 41Changes in this version include: 42 43New features: 44o IO-305: New copyLarge() method in IOUtils that takes additional offset, length arguments Thanks to Manoj Mokashi. 45o IO-287: Use terabyte (TB) , petabyte (PB) and exabyte (EB) in FileUtils.byteCountToDisplaySize(long size) Thanks to Ron Kuris, Gary Gregory. 46o IO-173: FileUtils.listFiles() doesn't return directories Thanks to Marcos Vinícius da Silva. 47o IO-297: CharSequenceInputStream to efficiently stream content of a CharSequence Thanks to Oleg Kalnichevski. 48o IO-304: The second constructor of Tailer class does not pass 'delay' to the third one Thanks to liangly. 49o IO-303: TeeOutputStream does not call branch.close() when main.close() throws an exception Thanks to fabian.barney. 50o IO-302: ArrayIndexOutOfBoundsException in BOMInputStream when reading a file without BOM multiple times Thanks to jsteuerwald, detinho. 51o IO-301: Add IOUtils.closeQuietly(Selector) necessary Thanks to kaykay.unique. 52o IO-292: IOUtils.closeQuietly() should take a ServerSocket as a parameter Thanks to sebb. 53o IO-290: Add read/readFully methods to IOUtils Thanks to sebb. 54o IO-288: Supply a ReversedLinesFileReader Thanks to Georg Henzler. 55o IO-291: Add new function FileUtils.directoryContains. Thanks to ggregory. 56o IO-275: FileUtils.contentEquals and IOUtils.contentEquals - Add option to ignore "line endings" 57 Added contentEqualsIgnoreEOL methods to both classes Thanks to CJ Aspromgos. 58 59Fixed Bugs: 60o IO-300: FileUtils.moveDirectoryToDirectory removes source directory if destination is a subdirectory 61o IO-307: ReaderInputStream#read(byte[] b, int off, int len) should check for valid parameters 62o IO-306: ReaderInputStream#read(byte[] b, int off, int len) should always return 0 for length == 0 63o IO-276: "FileUtils#deleteDirectoryOnExit(File)" does not work Thanks to nkami. 64o IO-273: BoundedInputStream.read() treats max differently from BoundedInputStream.read(byte[]...) Thanks to sebb. 65o IO-298: Various methods of class 'org.apache.commons.io.FileUtils' incorrectly suppress 'java.io.IOException' Thanks to Christian Schulte. 66 67Changes: 68o IO-296: ReaderInputStream optimization: more efficient reading of small chunks of data Thanks to Oleg Kalnichevski. 69 70Compatibility with 2.1 and 1.4: 71Binary compatible: Yes 72Source compatible: Yes 73Semantic compatible: Yes. Check the bug fixes section for semantic bug fixes 74 75Commons IO 2.2 requires a minimum of JDK 1.5. 76Commons IO 1.4 requires a minimum of JDK 1.3. 77</source> 78</p> 79</section> 80 81</body> 82</document> 83