Release Notes
FileUtils#readFileToByteArray: optimize reading of files with known size
Add convenience methods for copyToDirectory
Javadoc contradictory for FileFilterUtils.ageFileFilter(cutoff) and the filter it constructs: AgeFileFilter(cutoff)
FileUtilTestCase.testForceDeleteDir() should not delete testDirectory parent
fix Tailer.run race condition runaway logging
getPrefixLength return -1 if unix file contains colon
FileUtilsTestCase#testContentEqualsIgnoreEOL fails on Windows
.gitattributes not correctly applied
Allow Specifying Initial Buffer Size of DeferredFileOutputStream.
ThresholdingOutputStream.thresholdReached() results in FileNotFoundException.
After a few unit tests, a few newly created directories not cleaned completely.
Exceptions are suppressed incorrectly when copying files.
Update platform requirement to Java 7.
BOMInputStream shouldn't sort array of BOMs in-place.
Deprecate methods FileSystemUtils.freeSpaceKb().
Make LineIterator implement Closeable to support try-with-resources statements.
Deprecated of all IOUtils.closeQuietly() methods and use try-with-resources internally.
Add infinite circular input stream
Add a ByteOrderFactory class.
Add ObservableInputStream
Add MessageDigestCalculatingInputStream
Add convenience methods for reading class path resources.
Remove org.apache.commons.io.Java7Support
Typo: In an IOUtils.java comment it says "focussed" instead of "focused".
Converted all test cases to JUnit 4
Add ValidatingObjectInputStream for controlled deserialization
adds an endOfFileReached method to the TailerListener
FilenameUtils should handle embedded null bytes
Changed/Corrected algorithm for waitFor
Support for additional encodings in ReversedLinesFileReader
BOMInputStream.skip returns wrong count if stream contains no BOM
Setter method for threshold on ThresholdingOutputStream
FileUtils.waitFor(...) swallows thread interrupted status
Support for symlinks with missing target. Added support for JDK7 symlink features when present
Added testcase to show this was fixed with IO-423
Correct exception message in FileUtils.getFile(File, String...)
Introduce new class AppendableOutputStream
Update to JUnit 4.12
IOExceptionWithCause no longer needed
Add WindowsLineEndingInputStream and UnixLineEndingInputStream.
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.
Regression in FileUtils.readFileToString from 2.0.1
ant test fails - resources missing from test classpath
Document that FileUtils.deleteDirectory, directoryContains and cleanDirectory
may throw an IllegalArgumentException in case the passed directory does not
exist or is not a directory.
Add API IOUtils.closeQuietly(Closeable...)
Javadoc fixes, mostly to appease 1.8.0
Deprecate Charsets Charset constants in favor of Java 7's java.nio.charset.StandardCharsets
Readfully() That Returns A Byte Array
Overload IOUtils buffer methods to accept buffer size
FileUtils.sizeOfDirectory can throw IllegalArgumentException
FileUtils.sizeOfDirectoryAsBigInteger can overflow.
Ensure that recursive calls all use BigInteger
Chunked IO for large arrays.
Added writeChunked(byte[], OutputStream) and writeChunked(char[] Writer)
Added ChunkedOutputStream, ChunkedWriter
FileUtils.doCopyFile can potentially loop for ever
Exit loop if no data to copy
FileUtils.doCopyFile caches the file size; needs to be documented
Added Javadoc; show file lengths in exception message
Convert IOCase to a Java 1.5+ Enumeration
[N.B. this is binary compatible]
Add Methods for Buffering Streams/Writers To IOUtils
Added overloaded buffer() methods - see also IO-330
IOUtils#toBufferedOutputStream/toBufferedWriter to conditionally wrap the output
Added overloaded buffer() methods - see also IO-233
Add FileUtils.copyInputStreamToFile API with option to leave the source open.
See copyInputStreamToFile(final InputStream source, final File destination, boolean closeSource)
FileUtils.copyInputStreamToFile should document it closes the input source
Tailer erroneously considers file as new.
Fix to use file.lastModified() rather than System.currentTimeMillis()
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
CharSequenceInputStream - add tests for available()
Fix code so it really does reflect a minimum available.
getPrefixLength returns null if filename has leading slashes
Javadoc: add examples to show correct behaviour; add unit tests
FileUtils.listFilesAndDirs includes original dir in results even when it doesn't match filter
Javadoc: clarify that original dir is included in the results
Add ByteArrayOutputStream.toInputStream()
ClassLoaderObjectInputStream does not handle primitive typed members
A constant for holding the BOM character (U+FEFF)
Deprecate all methods that use the default encoding
When a file is rotated, finish reading previous file prior to starting new one
Commons IO Tailer does not respect UTF-8 Charset.
What should happen in FileUtils.sizeOf[Directory] when an overflow takes place?
Added Javadoc.
FileUtils.moveDirectory can produce misleading error message on failiure
FilenameUtils.splitOnTokens(String text) check for '**' could be simplified
WildcardFileFilter ctors should not use null to mean IOCase.SENSITIVE when delegating to other ctors
IOUtils.contentEquals* methods returns false if input1 == input2, should return true.
Add API FileUtils.forceMkdirsParent().
Add API Charsets.requiredCharsets().
Add IOUtils.skip and skipFully(ReadableByteChannel, long).
Add IOUtils.read and readFully(ReadableByteChannel, ByteBuffer buffer).
[Tailer] InterruptedException while the thread is sleeping is silently ignored
Add API IOUtils.copy(InputStream, OutputStream, int)
Add API with array offset and length argument to FileUtils.writeByteArrayToFile.
Spelling fixes.
Missing information in IllegalArgumentException thrown by org.apache.commons.io.FileUtils#validateListFilesParameters.
Supply a hook method allowing Tailer actively determining stop condition.
Improper JavaDoc comment for FilenameUtils.indexOfExtension.
Make IOUtils.EOF public and reuse it in various classes.
org.apache.commons.io.comparator Javadoc is inconsistent with real code.
Yottabyte (YB) incorrectly defined in FileUtils.
Tailer locks file from deletion/rename on Windows.
Tailer erroneously considers file as new.
Tailer#readLines - incorrect CR handling.
FileUtils.toURLs throws NPE for null parameter; document the behavior.
Export OSGi packages at version 1.x in addition to 2.x.
Add XmlStreamReader support for UTF-32.
BOMInputStream wrongly detects UTF-32LE_BOM files as UTF-16LE_BOM files in method getBOM().
Improve tailer's reading performance.
Improve Tailer performance with buffered reads (see IO-332).
FileUtils.writeLines uses unbuffered IO.
Add byteCountToDisplaySize(BigInteger).
Add new FileUtils.sizeOf[Directory] APIs to return BigInteger.
Add IOUtils.toByteArray methods to work with URL and URI.
Add missing Charset sister APIs to method that take a String charset name.
FileUtils.sizeOfDirectory follows symbolic links.
Add and use class Charsets.
ByteOrderMark UTF_32LE is incorrect.
Add Charset sister APIs to method that take a String charset name.
Add IOUTils.toBufferedReader(Reader)
Allow applications to provide buffer (or size) for copyLarge methods.
IOUtils.read(InputStream/Reader) ignores the offset parameter
CharSequenceInputStream(CharSequence s, Charset charset, int bufferSize) ignores bufferSize
New copyLarge() method in IOUtils that takes additional offset, length arguments
FileUtils.moveDirectoryToDirectory removes source directory if destination is a sub-directory
ReaderInputStream#read(byte[] b, int off, int len) should check for valid parameters
Use terabyte (TB), petabyte (PB) and exabyte (EB) in FileUtils.byteCountToDisplaySize(long size)
ReaderInputStream#read(byte[] b, int off, int len) should always return 0 for length == 0
FileUtils.listFiles() doesn't return directories
"FileUtils#deleteDirectoryOnExit(File)" does not work
BoundedInputStream.read() treats max differently from BoundedInputStream.read(byte[]...)
CharSequenceInputStream to efficiently stream content of a CharSequence
ReaderInputStream optimization: more efficient reading of small chunks of data
Various methods of class 'org.apache.commons.io.FileUtils' incorrectly suppress 'java.io.IOException'
The second constructor of Tailer class does not pass 'delay' to the third one
TeeOutputStream does not call branch.close() when main.close() throws an exception
ArrayIndexOutOfBoundsException in BOMInputStream when reading a file without BOM multiple times
Add IOUtils.closeQuietly(Selector) necessary
IOUtils.closeQuietly() should take a ServerSocket as a parameter
Add read/readFully methods to IOUtils
Supply a ReversedLinesFileReader
Add new function FileUtils.directoryContains.
FileUtils.contentEquals and IOUtils.contentEquals - Add option to ignore "line endings"
Added contentEqualsIgnoreEOL methods to both classes
Use standard Maven directory layout
Add IOUtils API toString for URL and URI to get contents
Add API FileUtils.copyFile(File input, OutputStream output)
Dubious use of mkdirs() return code
ReaderInputStream enters infinite loop when it encounters an unmappable character
FileUtils.moveFile() JavaDoc should specify FileExistsException thrown
FileAlterationObserver has no getter for FileFilter
Add FileUtils.getFile API with varargs parameter
ClassLoaderObjectInputStream does not handle Proxy classes
FileAlterationMonitor.stop(boolean allowIntervalToFinish)
Add new APPEND parameter for writing string into files
Tailer returning partial lines when reaching EOF before EOL
FileUtils.copyFile() throws IOException when copying large files to a shared directory (on Windows)
FileSystemUtils.freeSpaceKb throws exception for Windows volumes with no visible files.
Improve coverage by also looking for hidden files.
Add new read method "toByteArray" to handle InputStream with known size.
TODO: Convert RELEASE-NOTES.txt from 2.0.1?
TODO: Convert RELEASE-NOTES.txt from 2.0?
TODO: Convert RELEASE-NOTES.txt from 1.4?
Some tests, which are implicitly assuming a Unix-like file
system, are now skipped on Windows.
Created the FileCleaningTracker, basically a non-static
version of the FileCleaner, which can be controlled by
the user.
EndianUtils - both readSwappedUnsignedInteger(...) methods could
return negative numbers due to int/long casting.