Commons IO Package
Version 2.2
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 Commons IO library 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 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.
==============================================================================
Commons IO Package 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.
==============================================================================
Commons IO Package Version 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
==============================================================================
Commons IO Package Version 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 Re
- 1
- 2
- 3
前往页