1Apache Commons IO 2Version 2.15.0 3Release Notes 4 5INTRODUCTION: 6 7Commons IO is a package of Java utility classes like java.io. 8Classes in this package are considered to be so standard and of such high 9reuse as to justify existence in java.io. 10 11The Apache Commons IO library contains utility classes, stream implementations, file filters, 12file comparators, endian transformation classes, and much more. 13 14Java 8 is required. 15 16Changes in this version include: 17 18New features: 19o Add org.apache.commons.io.channels.FileChannels. Thanks to Gary Gregory. 20o Add RandomAccessFiles#contentEquals(RandomAccessFile, RandomAccessFile). Thanks to Gary Gregory. 21o Add RandomAccessFiles#reset(RandomAccessFile). Thanks to Gary Gregory. 22o Add PathUtilsContentEqualsBenchmark. Thanks to Gary Gregory. 23o Add org.apache.commons.io.StreamIterator. Thanks to Gary Gregory. 24o Add MessageDigestInputStream and deprecate MessageDigestCalculatingInputStream. Thanks to Gary Gregory. 25 26Fixed Bugs: 27o IO-810: XmlStreamReader encoding match RE is too strict. Thanks to Laurence Gonsalves. 28o IO-810: Javadoc in FileUtils does not reflect code for thrown exceptions. Thanks to Gregor Dschung, Gary Gregory. 29o IO-812: Javadoc should mention closing Streams based on file resources. Thanks to Adam Rauch, Gary Gregory. 30o IO-811: In tests, Files.walk() direct and indirect callers fail to close the returned Stream. Thanks to Adam Rauch, Gary Gregory. 31o IO-811: FileUtils.listFiles(File, String[], boolean) fails to close its internal Stream. Thanks to Adam Rauch, Gary Gregory. 32o IO-811: FileUtils.iterateFiles(File, String[], boolean) fails to close its internal Stream. Thanks to Adam Rauch, Gary Gregory. 33o IO-811: StreamIterator fails to close its internal Stream. Thanks to Adam Rauch, Gary Gregory. 34o IO-814: Don't throw UncheckedIOException #491. Thanks to Elliotte Rusty Harold, Gary Gregory. 35o IO-414: Don't write a BOM on every (or any) line #492. Thanks to Elliotte Rusty Harold, Gary Gregory. 36o IO-814: RandomAccessFileMode.create(Path) provides a better NullPointerException message. Thanks to Gary Gregory. 37o Improve performance of PathUtils.fileContentEquals(Path, Path, LinkOption[], OpenOption[]) by about 60%, see PathUtilsContentEqualsBenchmark. Thanks to Gary Gregory. 38o Improve performance of PathUtils.fileContentEquals(Path, Path) by about 60%, see PathUtilsContentEqualsBenchmark. Thanks to Gary Gregory. 39o Improve performance of FileUtils.contentEquals(File, File) by about 60%, see PathUtilsContentEqualsBenchmark. Thanks to Gary Gregory. 40o Remove unused test code #494. Thanks to Elliotte Rusty Harold. 41o [Javadoc] IOUtils#contentEquals does not throw NullPointerException #496. Thanks to sebbASF. 42o Fix CodeQL warnings in UnsynchronizedBufferedInputStream: Implicit narrowing conversion in compound assignment. Thanks to Gary Gregory. 43o MessageDigestCalculatingInputStream.MessageDigestMaintainingObserver.MessageDigestMaintainingObserver(MessageDigest) now throws a NullPointerException 44 if the MessageDigest is null. Thanks to Gary Gregory. 45o MessageDigestCalculatingInputStream.MessageDigestCalculatingInputStream(InputStream, MessageDigest) now throws a NullPointerException 46 if the MessageDigest is null. Thanks to Gary Gregory. 47o IO-816: UnsynchronizedBufferedInputStream.read(byte[], int, int) does not use buffer. Thanks to Andreas Loth, Gary Gregory. 48 49Changes: 50o Bump org.apache.commons:commons-parent from 62 to 64. Thanks to Gary Gregory. 51 52Compatibility with 2.6: 53Binary compatible: Yes. 54Source compatible: Yes. 55Semantic compatible: Yes. 56 57Commons IO 2.9.0 requires Java 8. 58Commons IO 2.8.0 requires Java 8. 59Commons IO 2.7 requires Java 8. 60Commons IO 2.6 requires Java 7. 61Commons IO 2.5 requires Java 6. 62Commons IO 2.4 requires Java 6. 63Commons IO 2.3 requires Java 6. 64Commons IO 2.2 requires Java 5. 65Commons IO 1.4 requires Java 1.3. 66 67Historical list of changes: https://commons.apache.org/proper/commons-io/changes-report.html 68 69For complete information on Apache Commons IO, including instructions on how to submit bug reports, 70patches, or suggestions for improvement, see the Apache Commons IO website: 71 72https://commons.apache.org/proper/commons-io/ 73 74Download page: https://commons.apache.org/proper/commons-io/download_io.cgi 75 76Have fun! 77-Apache Commons Team 78 79============================================================================== 80 81Apache Commons IO 82Version 2.14.0 83Release Notes 84 85INTRODUCTION: 86 87Commons IO is a package of Java utility classes like java.io. 88Classes in this package are considered to be so standard and of such high 89reuse as to justify existence in java.io. 90 91The Apache Commons IO library contains utility classes, stream implementations, file filters, 92file comparators, endian transformation classes, and much more. 93 94Java 8 required. 95 96Changes in this version include: 97 98New features: 99o Add DeferredFileOutputStream.getPath(). Thanks to Gary Gregory. 100o Add FileCleaningTracker.track(Path, Object[, FileDeleteStrategy]). Thanks to Gary Gregory. 101o Add IOUtils.skip[Fully](InputStream, long, Supplier<byte[]>). Thanks to Gary Gregory. 102o Add FilesUncheck.find(Path, int, BiPredicate%lt;Path, BasicFileAttributes>, FileVisitOption...) Thanks to Gary Gregory. 103o Add IOIntSupplier. Thanks to Gary Gregory. 104o Add IOLongSupplier. Thanks to Gary Gregory. 105o Add Uncheck.getAsInt(IOIntSupplier [, Supplier<String>]). Thanks to Gary Gregory. 106o Add Uncheck.getAsLong(IOLongSupplier [, Supplier<String>]). Thanks to Gary Gregory. 107o Add Uncheck.run(IORunnable, Supplier<String>) Thanks to Gary Gregory. 108o Add Uncheck.get(IOSupplier, Supplier<String>) Thanks to Gary Gregory. 109o IOFileFilter now also extends java.nio.file.PathMatcher. Thanks to Gary Gregory. 110o Add PathMatcherFileFilter to adapt java.nio.file.PathMatcher. Thanks to Gary Gregory. 111o Add ThresholdingOutputStream.getOutputStream() and deprecate getStream(). Thanks to Gary Gregory. 112o Add DeferredFileOutputStream.Builder.setOutputFile(Path). Thanks to Gary Gregory. 113o Add DeferredFileOutputStream.Builder.setDirectory(Path). Thanks to Gary Gregory. 114o Add AbstractStreamBuilder.setBufferSizeChecker(IntToIntFunction). Thanks to Gary Gregory. 115o Add AbstractStreamBuilder.setBufferSizeMax(int). Thanks to Gary Gregory. 116 117Fixed Bugs: 118o IO-799: ReaderInputStream.read() throws an exception instead of returning -1 when called again after returning -1. Thanks to Jeroen van der Vegt, Gary Gregory. 119o IO-804: FileUtils.forceMkdirParent() Javadoc is incorrect. Thanks to Elliotte Rusty Harold, Gary Gregory. 120o [StepSecurity] ci: Harden GitHub Actions #461. Thanks to step-security-bot, Gary Gregory. 121o MagicNumberFileFilter.accept(Path, BasicFileAttributes) doesn't its byteOffset before reading. Thanks to Gary Gregory. 122o Javadoc improvements. Thanks to Gary Gregory. 123o Spelling #468. Thanks to Josh Soref, Gary Gregory. 124o Use assertThrows #475. Thanks to Jakub Kupczyk. 125 126Changes: 127o Bump jimfs from 1.2 to 1.3.0 #465 (tests). Thanks to Dependabot. 128o Bump commons-parent from 58 to 62. Thanks to Gary Gregory. 129o Bump commons-lang3 from 3.12 to 3.13.0. Thanks to Gary Gregory. 130 131Compatibility with 2.6: 132Binary compatible: Yes. 133Source compatible: Yes. 134Semantic compatible: Yes. 135 136Commons IO 2.9.0 requires Java 8. 137Commons IO 2.8.0 requires Java 8. 138Commons IO 2.7 requires Java 8. 139Commons IO 2.6 requires Java 7. 140Commons IO 2.5 requires Java 6. 141Commons IO 2.4 requires Java 6. 142Commons IO 2.3 requires Java 6. 143Commons IO 2.2 requires Java 5. 144Commons IO 1.4 requires Java 1.3. 145 146Historical list of changes: https://commons.apache.org/proper/commons-io/changes-report.html 147 148For complete information on Apache Commons IO, including instructions on how to submit bug reports, 149patches, or suggestions for improvement, see the Apache Commons IO website: 150 151https://commons.apache.org/proper/commons-io/ 152 153Download page: https://commons.apache.org/proper/commons-io/download_io.cgi 154 155Have fun! 156-Apache Commons Team 157 158============================================================================== 159 160Apache Commons IO 161Version 2.13.0 162Release Notes 163 164INTRODUCTION: 165 166Commons IO is a package of Java utility classes like java.io. 167Classes in this package are considered to be so standard and of such high 168reuse as to justify existence in java.io. 169 170The Apache Commons IO library contains utility classes, stream implementations, file filters, 171file comparators, endian transformation classes, and much more. 172 173Java 8 required. 174 175Changes in this version include: 176 177New features: 178o Add CharSequenceInputStream.Builder. Thanks to Gary Gregory. 179o Add ChunkedOutputStream.Builder. Thanks to Gary Gregory. 180o Add AbstractStreamBuilder.setOpenOptions(OpenOption...). Thanks to Gary Gregory. 181o Add some missing conversions to AbstractOrigin subclasses. Thanks to Gary Gregory. 182o Add AbstractOrigin.getByteArray(long, int). Thanks to Gary Gregory. 183o Add and use RandomAccessFiles. Thanks to Gary Gregory. 184o Add AbstractOrigin.size(). Thanks to Gary Gregory. 185o Add PathUtils.EMPTY_FILE_ATTRIBUTE_ARRAY. Thanks to Gary Gregory. 186o Add CharSequenceInputStream.Builder.setCharsetEncoder(CharsetEncoder). Thanks to Gary Gregory. 187o Add CharsetEncoders.toCharsetEncoder(CharsetEncoder, Supplier<CharsetEncoder>). Thanks to Gary Gregory. 188 189Fixed Bugs: 190o IO-791: Regression in FileUtils.touch() - no longer creates parent directories. Thanks to Chad Wilson, Gary Gregory. 191o ByteArrayOrigin should be able convert a byte[] to a ByteArrayInputStream. Thanks to Gary Gregory. 192o AbstractOriginSupplier.checkOrigin() now throws IllegalStateException instead of NullPointerException. Thanks to Gary Gregory. 193o IO-796: FileAlreadyExistsException in PathUtils.createParentDirectories(Path, LinkOption, FileAttribute...). Thanks to Giacomo Boccardo, Gary Gregory. 194o Only read the relevant portion of a file in AbstractOrigin.FileOrigin.getByteArray(long, int) Thanks to Gary Gregory. 195o Only read the relevant portion of a file in AbstractOrigin.PathOrigin.getByteArray(long, int) Thanks to Gary Gregory. 196o IO-798: DeferredFileOutputStream throws exception when system temp dir is a symlink. Thanks to Shai Shapira, Gary Gregory. 197o ReaderInputStream.Builder.setCharsetEncoder(null) should reset to a default object, not throw an NPE. Thanks to Gary Gregory. 198o ReaderInputStream.Builder.setCharset(null) should reset to a default object, not throw an NPE. Thanks to Gary Gregory. 199 200Changes: 201o Bump commons-parent from 57 to 58. Thanks to Gary Gregory, Dependabot. 202 203Compatibility with 2.6: 204Binary compatible: Yes. 205Source compatible: Yes. 206Semantic compatible: Yes. 207 208Commons IO 2.9.0 requires Java 8. 209Commons IO 2.8.0 requires Java 8. 210Commons IO 2.7 requires Java 8. 211Commons IO 2.6 requires Java 7. 212Commons IO 2.5 requires Java 6. 213Commons IO 2.4 requires Java 6. 214Commons IO 2.3 requires Java 6. 215Commons IO 2.2 requires Java 5. 216Commons IO 1.4 requires Java 1.3. 217 218Historical list of changes: https://commons.apache.org/proper/commons-io/changes-report.html 219 220For complete information on Apache Commons IO, including instructions on how to submit bug reports, 221patches, or suggestions for improvement, see the Apache Commons IO website: 222 223https://commons.apache.org/proper/commons-io/ 224 225Download page: https://commons.apache.org/proper/commons-io/download_io.cgi 226 227Have fun! 228-Apache Commons Team 229 230Apache Commons IO 231Version 2.12.0 232Release Notes 233 234============================================================================== 235 236INTRODUCTION: 237 238Commons IO is a package of Java utility classes like java.io. 239Classes in this package are considered to be so standard and of such high 240reuse as to justify existence in java.io. 241 242The Apache Commons IO library contains utility classes, stream implementations, file filters, 243file comparators, endian transformation classes, and much more. 244 245Java 8 required. 246 247Changes in this version include: 248 249New features: 250o IO-746: Drop unnecessary casts and conversions #267. Thanks to Davide Angelocola. 251o Add GitHub coverage.yml. Thanks to Gary Gregory. 252o Add BrokenReader.INSTANCE. Thanks to Gary Gregory. 253o Add UncheckedBufferedReader. Thanks to Gary Gregory. 254o Add UncheckedFilterReader. Thanks to Gary Gregory. 255o Add UncheckedFilterWriter. Thanks to Gary Gregory. 256o Add StringInputStream. Thanks to Gary Gregory. 257o Add UncheckedFilterInputStream. Thanks to Gary Gregory. 258o Add UncheckedFilterOutputStream. Thanks to Gary Gregory. 259o Add BrokenInputStream.INSTANCE. Thanks to Gary Gregory. 260o Add ClosedInputStream.INSTANCE and deprecate CLOSED_INPUT_STREAM. Thanks to Gary Gregory. 261o Add ClosedReader.INSTANCE and deprecate CLOSED_READER. Thanks to Gary Gregory. 262o Add BrokenWriter.INSTANCE. Thanks to Gary Gregory. 263o Add ClosedOutputStream.INSTANCE and deprecate CLOSED_OUTPUT_STREAM. Thanks to Gary Gregory. 264o Add ClosedWriter.INSTANCE and deprecate CLOSED_WRITER. Thanks to Gary Gregory. 265o Add NullOutputStream.INSTANCE and deprecate NULL_OUTPUT_STREAM. Thanks to Gary Gregory. 266o Add NullPrintStream.INSTANCE and deprecate NULL_PRINT_STREAM. Thanks to Gary Gregory. 267o Add NullWriter.INSTANCE and deprecate NULL_WRITER. Thanks to Gary Gregory. 268o Add NullInputStream.INSTANCE. Thanks to Gary Gregory. 269o Add NullReader.INSTANCE. Thanks to Gary Gregory. 270o Add PathUtils.readString(Path, Charset). Thanks to Gary Gregory. 271o Add FileUtils.newOutputStream(File, boolean). Thanks to Gary Gregory. 272o Add PathUtils.newOutputStream(Path, boolean). Thanks to Gary Gregory. 273o Add UncheckedAppendable. Thanks to Gary Gregory. 274o Add and reuse UncheckedIOExceptions. Thanks to Gary Gregory. 275o Add PathUtils.getTempDirectory(). Thanks to Gary Gregory. 276o Add FileSystem.getNameSeparator(). Thanks to Gary Gregory. 277o Add FileSystem.normalizeSeparators(). Thanks to Gary Gregory. 278o Add PathUtils.isNewer(Path, FileTime, LinkOption...). Thanks to Gary Gregory. 279o Add PathUtils.isNewer(Path, Instant, LinkOption...). Thanks to Gary Gregory. 280o Add AgeFileFilter.AgeFileFilter(Instant). 281 Add AgeFileFilter.AgeFileFilter(Instant, boolean). Thanks to Gary Gregory. 282o Add FileUtils.lastModifiedFileTime(File). Thanks to Gary Gregory. 283o Add FileTimes. Thanks to Gary Gregory. 284o Add PathUtils.waitFor(Path, Duration, LinkOption...). Thanks to Gary Gregory. 285o Add org.apache.commons.io.input.Tailer.getDelayDuration(). Thanks to Gary Gregory. 286o Add FileUtils.current(). Thanks to Gary Gregory. 287o Add and use PathUtils.setLastModifiedTime(Path) for more precision. 288 Add and use PathUtils.setLastModifiedTime(Path, Path) for more precision. Thanks to Gary Gregory. 289o Add and use PathUtils.isNewer(Path, ChronoZonedDateTime, LinkOption...) for more precision. 290 Add and use PathUtils.isNewer(Path, Path) for more precision. 291 Add and use FileUtils.isNewer(File, FileTime) for more precision. Thanks to Gary Gregory. 292o Add and use PathUtils.isOlder(Path, FileTime, LinkOption...). 293 Add and use PathUtils.isOlder(Path, Instant, LinkOption...). 294 Add and use PathUtils.isOlder(Path, long, LinkOption...). 295 Add and use PathUtils.isOlder(Path, Path). Thanks to Gary Gregory. 296o Add and use PathUtils.sizeOf(Path). 297 Add and use PathUtils.sizeOfAsBigInteger(Path). 298 Add and use PathUtils.sizeOfDirectory(Path). 299 Add and use PathUtils.sizeOfDirectoryAsBigInteger(Path). Thanks to Gary Gregory. 300o Add and use IOCase.value(IOCase, IOCase). Thanks to Gary Gregory. 301o Add Tailer.Tailable interface to allow tailing of remote files for example using jCIFS. Thanks to Jon Freedman, Gary Gregory. 302o Add and use RandomAccessFileMode. Thanks to Gary Gregory. 303o Add PathUtils.writeString(Path, CharSequence, Charset, OpenOption...). Thanks to Gary Gregory. 304o Add PathUtiFiles.getFileAttributeView() shorthands: 305 - PathUtils.getAclFileAttributeView(Path, LinkOption...) 306 - PathUtils.getDosFileAttributeView(Path, LinkOption...) 307 - PathUtils.getPosixFileAttributeView(Path, LinkOption...) Thanks to Gary Gregory. 308o IO-747: Make commons-io a JPMS module by adding module-info.class. 309o IO-753: Add IOUtils method to copy output stream to input stream #281. Thanks to SebastianDietrich, Gary Gregory. 310o Add PathUtils.isPosix(Path, LinkOption...). #290 Thanks to Gary Gregory. 311o Add PathUtils.readAttributes(Path, Class, LinkOption...). #290 Thanks to Gary Gregory. 312o Add IOExceptionList.checkEmpty(List, Object). Thanks to Gary Gregory. 313o Add IOBiConsumer, IOTriConsumer, IOComparator, IOUnaryOperator, IOBinaryOperator. Thanks to Gary Gregory. 314o Add and reuse IOConsumer forAll(*), forEach(*), and forEachIndexed(*). Thanks to Gary Gregory. 315o Add CharsetEncoders. Thanks to Gary Gregory. 316o Add CharsetDecoders. Thanks to Gary Gregory. 317o Add PathUtils.createParentDirectories(Path, LinkOption, FileAttribute...). Thanks to Gary Gregory. 318o Update FileEntry to use FileTime instead of long for file time stamps. Thanks to Gary Gregory. 319o IO-680: Add more tests for IOUtils.contentEqualsIgnoreEOL #137. Thanks to XenoAmess, sebbASF, Gary Gregory. 320o Reduce boilerplate through new UncheckedIO class and friends in org.apache.commons.io.function. Thanks to Gary Gregory. 321o Add PathUtils.touch(Path). Thanks to Gary Gregory. 322o Add FileSystem.getIllegalFileNameCodePoints(). Thanks to Gary Gregory. 323o Add FileUtils.isFileNewer(File, ChronoLocalDate, OffsetTime). 324 Add FileUtils.isFileNewer(File, OffsetDateTime). 325 Add FileUtils.isFileOlder(File, ChronoLocalDate, OffsetTime). 326 Add FileUtils.isFileOlder(File, OffsetDateTime). Thanks to Isira Seneviratne, Gary Gregory. 327o Add IOBiConsumer.noop(). Thanks to Gary Gregory. 328o Add IOUtils.closeQuietly(Iterable<Closeable>). 329 Add IOUtils.closeQuietly(Stream<Closeable>). Thanks to Gary Gregory. 330o Add Charsets.toCharset(Charset, Charset). 331 Add Charsets.toCharset(String, Charset). Thanks to Gary Gregory. 332o Add XmlStreamWriter(OutputStream, Charset). Thanks to Gary Gregory. 333o Add PathUtils.getLastModifiedFileTime(*). Thanks to Gary Gregory. 334o Add IOBiFunction, IOTriFunction, IOQuadFunction, IOPredicate, IOIterator, IOSpliterator, IOBaseStream, IOStream, FilesUncheck. Thanks to Gary Gregory. 335o Add IOUtils.consume(Reader). Thanks to Gary Gregory. 336o Add IOSupplier.asSupplier(). Thanks to Gary Gregory. 337o Add IOFunction.asFunction(). Thanks to Gary Gregory. 338o Add IOConsumer.asConsumer(). Thanks to Gary Gregory. 339o Add TimestampedObserver.isClosed(). Thanks to Gary Gregory. 340o IOExceptionList implements Iterable. Thanks to Gary Gregory. 341o IO-784: Add support for Appendable to HexDump #418. Thanks to Fredrik Kjellberg, Gary Gregory. 342o Add and use ThreadUtils. Thanks to DaGeRe, Gary Gregory. 343o IO-786: Add UnsynchronizedFilterInputStream. Thanks to Gary Gregory. 344o IO-786: Add UnsynchronizedBufferedInputStream. Thanks to Gary Gregory, Benoit Tellier. 345o Add FileSystem.getBlockSize(). Thanks to Gary Gregory. 346o Add builders and avoid creating more constructors for all permutations of current options. Thanks to Gary Gregory. 347o Refactor using new Supplier API IOUtils.toString(IOSupplier<InputStream>, Charset[, IOSupplier<String>]). Thanks to Gary Gregory, maxxedev. 348o Refactor using new Supplier API org.apache.commons.io.file.PathUtils.copy(IOSupplier<InputStream>, Path, CopyOption...). Thanks to Gary Gregory, maxxedev. 349 350Fixed Bugs: 351o IO-697: IOUtils.toByteArray size validation does not match documentation. Thanks to otter606. 352o Fix Javadoc links to the JRE Javadoc 8. Thanks to Gary Gregory. 353o IO-744: FileWriterWithEncoding for an existing file no longer truncates the file. #251. Thanks to RBRi, Gary Gregory. 354o A null Charset or Charset name in FileWriterWithEncoding constructors uses the default Charset. Thanks to Gary Gregory. 355o Fix usage of assertNotNull #269. Thanks to Davide Angelocola. 356o IO-727: FilenameUtils directoryContains() should handle files with the same prefix #217. Thanks to trungPa, Gary Gregory. 357o IO-748: FileUtils.moveToDirectory() exception documentation and exception message error. Thanks to Dirk Heinrichs, Gary Gregory, Elango Ravi. 358o ThreadMonitor.sleep(Duration) ignores nanoseconds. Thanks to Gary Gregory. 359o Fix Javadoc in ThreadMonitor#run() method. #273. Thanks to Arturo Bernal. 360o IO-749: FileUtils.listFiles() does not list matching files if File parameter is a symbolic link. Thanks to haihuiyang, Gary Gregory. 361o Fix typo in Javadocs for FileUtils#convertFileCollectionToFileArray() #276. Thanks to niranjanghule, Gary Gregory. 362o Avoid Code Duplication: Reuse Sleep from ThreadMonitor #66. Thanks to DaGeRe, Gary Gregory. 363o IO-750: FileUtils.iterateFiles also lists directories. Thanks to Sita Ge�ner, Sebastian Peters, Gary Gregory. 364o IO-721: Wrong exception message in FileUtils.setLastModified(File, File). Thanks to Dirk Heinrichs, Gary Gregory. 365o IO-717: Infinite loop in ReaderInputStream instead of throwing exception for CodingErrorAction.REPORT. Thanks to Marcono1234, Gary Gregory. 366o IO-716: ReaderInputStream enter infinite loop for too small buffer sizes. Thanks to Marcono1234, Gary Gregory. 367o IO-638: Infinite loop in CharSequenceInputStream.read for 4-byte characters with UTF-8 and 3-byte buffer. Thanks to Thayne McCombs, Gary Gregory. 368o IO-638: PathUtils.setReadOnly(Path, boolean, LinkOption...) should add READ_* file attributes when using POSIX. Thanks to Gary Gregory. 369o IO-638: PathUtils.setReadOnly(Path, boolean, LinkOption...) readOnly argument is always assumed true on POSIX. Thanks to Gary Gregory. 370o IO-729: Prevent IllegalArgumentExceptions in BrokenInputStream/Reader/OutputStream/Writer #278. Thanks to Rob Spoor, Gary Gregory. 371o FileUtils.copyURLToFile(URL, File, int, int) leaks its URLConnection. 372 Called by FileUtils.copyURLToFile(URL, File). Thanks to Gary Gregory. 373o IO-714: Fixed ReaderInputStream not calling CharsetEncoder.flush issue #283. Thanks to kevinwang1975, Gary Gregory. 374o Minor changes #287. Thanks to Arturo Bernal. 375o IO-756: Update FileWriterWithEncoding to extend ProxyWriter #296. Thanks to wodencafe, Gary Gregory, Bruno P. Kinoshita. 376o Initialize the message of an IOExceptionList to a default if null. Thanks to Gary Gregory. 377o IO-751: When deleting symlinks, File/PathUtils.deleteDirectory() changes file permissions of the target. Thanks to Gary Gregory, Richard Cyganiak. 378o ReaderInputStream maps null Charset, Charset name, and CharsetEncoder to the platform default instead of throwing a NullPointerException. Thanks to Gary Gregory. 379o CharSequenceInputStream maps null Charset and Charset name to the platform default instead of throwing a NullPointerException. Thanks to Gary Gregory. 380o WriterOutputStream maps null Charset, Charset name, and CharsetEncoder name to the platform default instead of throwing a NullPointerException. Thanks to Gary Gregory. 381o FileUtils.copyURLToFile should create target parent directories and overwrite target file #319. Thanks to Chad Wilson, Gary Gregory. 382o IO-484: Fix incorrect FilenameUtils Javadoc for null bytes #310. Thanks to Marcono1234, Gary Gregory. 383o IO-484: Change to uppercase variable constant. #323. Thanks to Arturo Bernal. 384o IO-484: IOCase.isCaseSensitive(IOCase) result is backward #325. Thanks to David Huang, Gary Gregory. 385o IO-758: Deprecate PathUtils.NOFOLLOW_LINK_OPTION_ARRAY in favor of noFollowLinkOptionArray(). Thanks to Marcono1234, Gary Gregory. 386o Improve ReaderInputStream documentation #291. Thanks to Marcono1234, Gary Gregory. 387o Fix misleading comments in FileFilterTest #334. Thanks to richarda23. 388o Add missing Javadoc for exceptions thrown for invalid arguments #339. Thanks to Diego Marcilio. 389o FileFilterTest minor fixes #340. Thanks to richarda23. 390o IO-764: IOUtils.write() throws OutOfMemoryError/NegativeArraySizeException while writing big strings #343. Thanks to DaGeRe, Gary Gregory. 391o IO-768: Add reserved Windows file names CONIN$ and CONOUT$ to FileSystem #355. Thanks to Marcono1234, Michael Osipov. 392o IO-773: RegexFileFilter is no longer Serializable. Thanks to Dominik Reinarz, Gary Gregory. 393o IO-763: [Javadoc] FileFilterUtils doc does not match impl: missing some file filters. Thanks to Richard Adams, Gary Gregory. 394o IO-762: FileSystem.WINDOWS.isReservedFileName doesn't check for file extension. Thanks to Leonidas Chiron, Gary Gregory. 395o IO-772: Confusing Javadoc on IOUtils#resourceToURL() and other resource* methods. Thanks to Dan Ziemba, Gary Gregory. 396o IO-443: FileUtils.copyFile methods throw an unnecessary "Failed to copy full contents from" exception. Thanks to Dan Ziemba, Gary Gregory. 397o IO-564: Pick up Javadoc from super for override write() methods in AbstractByteArrayOutputStream and ByteArrayOutputStream. Thanks to Hao Zhong, Bernd Eckenfels, Pascal Schumacher, Gary Gregory. 398o Fix minor typos #367. Thanks to Marc Wrobel. 399o IO-776: Fix parameters to requireNonNull call in DeferredOutputSteam #368. Thanks to Chris Povirk. 400o Fix PathUtils.copyFileToDirectory(URL,Path,CopyOption[]). Thanks to Gary Gregory. 401o IO-386: FileUtils.doCopyFile uses different methods to check the file sizes. Thanks to Sebb, Bernd Eckenfels, zhipengxu, Gary Gregory. 402o Fix typos #375. Thanks to Michael Ernst. 403o IO-611: FilenameUtils.normalize javadoc and tests #383. Thanks to Fedor Urvanov. 404o IO-611: Better docs in IOUtils and IOUtils.byteArray(int size) #374. Thanks to ArdenL-Liu, Bruno P. Kinoshita, Gary Gregory. 405o IO-782: SequenceReader should close readers when its close method is called #391. Thanks to Matteo Di Giovinazzo, Gary Gregory. 406o IO-790: Fix symbolic link file filter #450. Thanks to Miguel Mu�oz, Gary Gregory. 407o IO-790: Apply nanoseconds precision for QueueInputStream timeout duration. #453. Thanks to maxxedev, Gary Gregory, Bruno P. Kinoshita. 408o Fix overflow for FileUtilsTest constants #456. Thanks to Marcono1234. 409o Serialization is deprecated and will be removed in 3.0. Thanks to Gary Gregory. 410o FileSystemUtils.performCommand(String[], int, Duration): Use Locale.getDefault() instead of ENGLISH. Thanks to Gary Gregory. 411o IO-726: Add MemoryMappedFileInputStream #215. Thanks to shollander, Gary Gregory. 412 413Changes: 414o Bump actions/cache from 2.1.6 to 3.0.10 #307, #337, #393. Thanks to Dependabot, Gary Gregory. 415o Bump actions/checkout from 2.3.4 to 3.1.0 #286, #298, #330, #392. Thanks to Dependabot, Gary Gregory. 416o Bump actions/setup-java from 2 to 3.6.0 #346, #397. Thanks to Dependabot. 417o Bump github/codeql-action from 1 to 2 #353. Thanks to Dependabot. 418o Bump Maven Javadoc plugin from 3.2.0 to 3.4.1. Thanks to Dependabot, Gary Gregory. 419o Bump spotbugs-maven-plugin from 4.2.3 to 4.7.3.0 #250, #259, #272, #274, #285, #288, #289, #305, #315, #326, #338, #360, #366, #370, #380, #395, #403. Thanks to Dependabot. 420o Bump spotbugs from 4.5.2 to 4.7.3 #313, #317, #357, #382, #398. Thanks to Gary Gregory, Dependabot. 421o Bump JUnit from 5.7.2 to 5.8.2. Thanks to Gary Gregory. 422o Bump maven-enforcer-plugin from 3.0.0-M3 to 3.3.0 #255, #363, #431, #446. Thanks to Dependabot. 423o Bump checkstyle from 8.44 to 9.3 #256, #257, #266, #279, #292. #308. Thanks to Dependabot, Gary Gregory. 424o Bump junit-bom from 5.8.0-M1 to 5.9.1 #260, #271, #275, #309, #386. Thanks to Dependabot. 425o Bump mockito-inline from 3.11.2 to 4.11.0 #262, #264, #282, #306, #314, #331, #348, #359, #381, #399, #405, #414, #420. Thanks to Dependabot, Gary Gregory. 426o Bump jmh.version from 1.32 to 1.36 #258, #316, #342, #404. Thanks to Dependabot. 427o Bump moditect-maven-plugin from 1.0.0.RC1 to 1.0.0.Final #280, #439, #445. Thanks to Dependabot. 428o Bump junit-pioneer from 1.4.2 to 1.9.1 #304. #335, #362, #402, #406, #409. Thanks to Dependabot, Gary Gregory. 429o Bump japicmp-maven-plugin from 0.15.3 to 0.16.0. Thanks to Gary Gregory. 430o Bump commons-parent from 52 to 57 #388, #415, #421, #184. Thanks to Gary Gregory, Dependabot. 431o Bump jacoco-maven-plugin from 0.8.7 to 0.8.8. Thanks to Gary Gregory. 432o Bump maven-antrun-plugin from 3.0.0 to 3.1.0 #354. Thanks to Dependabot. 433o Bump commons.surefire.version 3.0.0-M5 to 3.0.0-M7. Thanks to Gary Gregory. 434o Bump PMD from 6.44.0 to 6.52.0. Thanks to Gary Gregory. 435o Bump maven-pmd-plugin from 3.16.0 to 3.19.0. Thanks to Gary Gregory. 436o Bump apache-rat from 0.13 to 0.14. Thanks to Gary Gregory. 437o Bump exec-maven-plugin from 3.0.0 to 3.1.0 #369. Thanks to Dependabot. 438o Bump maven-checkstyle-plugin from 3.1.2 to 3.2.0 #376. Thanks to Dependabot. 439o Bump apache-rat-plugin from 0.14 to 0.15 #387. Thanks to Dependabot. 440o Bump default buffer size for CharSequenceInputStream to IOUtils#DEFAULT_BUFFER_SIZE. Thanks to Gary Gregory. 441o Bump default buffer size for ChunkedOutputStream to IOUtils#DEFAULT_BUFFER_SIZE. Thanks to Gary Gregory. 442o Bump default buffer size for ChunkedWriter to IOUtils#DEFAULT_BUFFER_SIZE. Thanks to Gary Gregory. 443o Bump default buffer size for ReaderInputStream to IOUtils#DEFAULT_BUFFER_SIZE. Thanks to Gary Gregory. 444o Bump default buffer size for WriterOutputStream to IOUtils#DEFAULT_BUFFER_SIZE. Thanks to Gary Gregory. 445 446Compatibility with 2.6: 447Binary compatible: Yes. 448Source compatible: Yes. 449Semantic compatible: Yes. 450 451Commons IO 2.9.0 requires Java 8. 452Commons IO 2.8.0 requires Java 8. 453Commons IO 2.7 requires Java 8. 454Commons IO 2.6 requires Java 7. 455Commons IO 2.5 requires Java 6. 456Commons IO 2.4 requires Java 6. 457Commons IO 2.3 requires Java 6. 458Commons IO 2.2 requires Java 5. 459Commons IO 1.4 requires Java 1.3. 460 461Historical list of changes: https://commons.apache.org/proper/commons-io/changes-report.html 462 463For complete information on Apache Commons IO, including instructions on how to submit bug reports, 464patches, or suggestions for improvement, see the Apache Commons IO website: 465 466https://commons.apache.org/proper/commons-io/ 467 468Download page: https://commons.apache.org/proper/commons-io/download_io.cgi 469 470Have fun! 471-Apache Commons Team 472 473============================================================================== 474 475Apache Commons IO 476Version 2.11.0 477Release Notes 478 479INTRODUCTION: 480 481Commons IO is a package of Java utility classes like java.io. 482Classes in this package are considered to be so standard and of such high 483reuse as to justify existence in java.io. 484 485The Apache Commons IO library contains utility classes, stream implementations, file filters, 486file comparators, endian transformation classes, and much more. 487 488Java 8 required. 489 490Changes in this version include: 491 492 493Fixed Bugs: 494o IO-741: FileUtils.listFiles does not list matching files if File parameter is a symbolic link. Thanks to Zach Sherman. 495o IO-724: FileUtils#deleteDirectory(File) exception Javadoc inaccurate update #245. Thanks to liran2000. 496o Minor changes #243. Thanks to Arturo Bernal. 497o Replace construction of FileInputStream and FileOutputStream objects with Files NIO APIs. #221. Thanks to Arturo Bernal. 498o Fix IndexOutOfBoundsException in IOExceptionList constructors. Thanks to Gary Gregory. 499o Remove IOException from the method signatures that no longer throw IOException. 500 This maintains binary compatibility but not source compatibility. 501 - FilenameUtils 502 directoryContains(String, String) 503 - BoundedReader 504 BoundedReader(java.io.Reader, int) 505 - IOUtils 506 lineIterator(java.io.InputStream, Charset) 507 lineIterator(java.io.InputStream, String) 508 toByteArray(String) 509 toInputStream(CharSequence, String) 510 toInputStream(String, String) 511 toString(byte[]) 512 toString(byte[], String) Thanks to Gary Gregory. 513 514Changes: 515o Add SymbolicLinkFileFilter. Thanks to Gary Gregory. 516o Add test to make sure the setter of AndFileFilter works correctly #244. Thanks to trncate. 517o Add XmlStreamReader(Path). Thanks to Gary Gregory. 518o Bump mockito-inline from 3.11.0 to 3.11.2 #247. Thanks to Dependabot. 519o Bump jmh.version from 1.27 to 1.32 #237. Thanks to Dependabot. 520o Bump spotbugs from 4.2.3 to 4.3.0 #249. Thanks to Dependabot. 521 522Compatibility with 2.6: 523Binary compatible: Yes. 524Source compatible: Yes. 525Semantic compatible: Yes. 526 527Commons IO 2.9.0 requires Java 8. 528Commons IO 2.8.0 requires Java 8. 529Commons IO 2.7 requires Java 8. 530Commons IO 2.6 requires Java 7. 531Commons IO 2.5 requires Java 6. 532Commons IO 2.4 requires Java 6. 533Commons IO 2.3 requires Java 6. 534Commons IO 2.2 requires Java 5. 535Commons IO 1.4 requires Java 1.3. 536 537Historical list of changes: https://commons.apache.org/proper/commons-io/changes-report.html 538 539For complete information on Apache Commons IO, including instructions on how to submit bug reports, 540patches, or suggestions for improvement, see the Apache Commons IO website: 541 542https://commons.apache.org/proper/commons-io/ 543 544Download page: https://commons.apache.org/proper/commons-io/download_io.cgi 545 546Have fun! 547-Apache Commons Team 548 549============================================================================== 550 551Apache Commons IO 552Version 2.10.0 553Release Notes 554 555INTRODUCTION: 556 557Commons IO is a package of Java utility classes like java.io. 558Classes in this package are considered to be so standard and of such high 559reuse as to justify existence in java.io. 560 561The Apache Commons IO library contains utility classes, stream implementations, file filters, 562file comparators, endian transformation classes, and much more. 563 564Java 8 required. 565 566Changes in this version include: 567 568New features: 569o Add and use RegexFileFilter.toString(). Thanks to Gary Gregory. 570o Add and use RegexFileFilter.RegexFileFilter(Pattern, Function<Path>, String>) Thanks to Gary Gregory. 571o Add and use IOCase.isCaseSensitive(IOCase). Thanks to Gary Gregory. 572 573Fixed Bugs: 574o IO-733: RegexFileFilter uses the path and file name instead of just the file name. Thanks to Jim Sellers, Gary Gregory. 575o IO-734: The OSGi manifest now contains sun.* import packages #239. Thanks to Eric Norman. 576o IO-585: Sanitize double slash after prefix #79. Thanks to Adam McClenaghan. 577 578Changes: 579o Bump actions/cache from 2.1.5 to 2.1.6 #238. Thanks to Dependabot. 580o Bump junit-pioneer from 1.4.1 to 1.4.2 #240. Thanks to Dependabot. 581o Bump checkstyle from 8.42 to 8.43 #241. Thanks to Dependabot. 582o Bump mockito-inline from 3.10.0 to 3.11.0 #242. Thanks to Dependabot. 583 584Compatibility with 2.6: 585Binary compatible: Yes. 586Source compatible: Yes. 587Semantic compatible: Yes. 588 589Commons IO 2.9.0 requires Java 8. 590Commons IO 2.8.0 requires Java 8. 591Commons IO 2.7 requires Java 8. 592Commons IO 2.6 requires Java 7. 593Commons IO 2.5 requires Java 6. 594Commons IO 2.4 requires Java 6. 595Commons IO 2.3 requires Java 6. 596Commons IO 2.2 requires Java 5. 597Commons IO 1.4 requires Java 1.3. 598 599Historical list of changes: https://commons.apache.org/proper/commons-io/changes-report.html 600 601For complete information on Apache Commons IO, including instructions on how to submit bug reports, 602patches, or suggestions for improvement, see the Apache Commons IO website: 603 604https://commons.apache.org/proper/commons-io/ 605 606Download page: https://commons.apache.org/proper/commons-io/download_io.cgi 607 608Have fun! 609-Apache Commons Team 610 611============================================================================== 612 613Apache Commons IO 614Version 2.8.0 615Release Notes 616 617INTRODUCTION: 618 619Commons IO is a package of Java utility classes like java.io. 620Classes in this package are considered to be so standard and of such high 621reuse as to justify existence in java.io. 622 623The Apache Commons IO library contains utility classes, stream implementations, file filters, 624file comparators, endian transformation classes, and much more. 625 626Java 8 required. 627 628Changes in this version include: 629 630New features: 631o Add org.apache.commons.io.input.CircularInputStream. Thanks to Gary Gregory. 632o Add org.apache.commons.io.file.PathUtils.cleanDirectory(Path, FileVisitOption...). Thanks to Gary Gregory. 633o Add org.apache.commons.io.file.PathUtils.deleteDirectory(Path, FileVisitOption...). Thanks to Gary Gregory. 634o Add NullAppendable. Thanks to Gary Gregory. 635o Add PathUtils.getAclEntryList(Path). Thanks to Gary Gregory. 636o Null-guard IOUtils.close(Closeable, IOConsumer). Thanks to Gary Gregory. 637o Add ReversedLinesFileReader.readLines(int). Thanks to Gary Gregory. 638o Add ReversedLinesFileReader.toString(int). Thanks to Gary Gregory. 639o IO-684: Add PathUtils.delete(Path, DeleteOption...). 640 Add PathUtils.deleteDirectory(Path, DeleteOption...). 641 Add PathUtils.deleteFile(Path, DeleteOption...). 642 Add PathUtils.setReadOnly(Path, boolean, LinkOption...). 643 Add CleaningPathVisitor.CleaningPathVisitor(PathCounters, DeleteOption[], String...). 644 Add DeletingPathVisitor.DeletingPathVisitor(PathCounters, DeleteOption[], String...). Thanks to Gary Gregory, Robin Jansohn. 645o Add RandomAccessFileInputStream. Thanks to Gary Gregory. 646o IO-681: IOUtils.close(Closeable) should allow a list of closeables. 647o Add IOUtils.consume(InputStream). Thanks to Gary Gregory. 648o IO-676: Add isFileNewer() and isFileOlder() methods that support the Java 8 Date/Time API. #124. Thanks to Isira Seneviratne, Gary Gregory. 649o Add a MarkShieldInputStream #119. Thanks to Adam Retter, Gary Gregory. 650o Deprecate IOUtils.LINE_SEPARATOR in favor of Java 7's System.lineSeparator(). Thanks to Gary Gregory. 651 652Fixed Bugs: 653o CharSequenceReader.skip should return 0 instead of EOF on stream end #123. Thanks to Rob Spoor, Jochen Wiedmann. 654o Implement CharSequenceReader.ready() #122. Thanks to Rob Spoor. 655o IO-669: Fix code smells; fix typos #115. Thanks to XenoAmess, Gary Gregory. 656o Add caching for required charsets #120. Thanks to Jerome Wolff, Gary Gregory. 657o IO-673: Make some simplifications #121. Thanks to Jerome Wolff. 658o IO-674: InfiniteCircularInputStream is not infinite if its input buffer contains -1. Thanks to Gary Gregory. 659o IO-675: InfiniteCircularInputStream throws a divide-by-zero exception when reading if its input buffer is size 0. Thanks to Gary Gregory. 660o IO-677: FileSystem.getCurrent() does not return the correct enum. Thanks to Gary Gregory. 661o IO-679: input.AbstractCharacterFilterReader passes count of chars read #132. Thanks to proneel. 662o IO-683: CircularBufferInputStream.read() fails to convert byte to unsigned int 663o Fix SpotBugs issues in org.apache.commons.io.FileUtils. Thanks to Gary Gregory. 664o IO-672: Copying a File sets last modified date to 01 January 1970. 665o IO-676: Prevent NullPointerException in ReversedLinesFileReader constructors #117. Thanks to Michael Ernst, Gary Gregory. 666 667Changes: 668o Replace FindBugs with SpotBugs. Thanks to Gary Gregory. 669o maven-checkstyle-plugin 3.1.0 -> 3.1.1. Thanks to Gary Gregory. 670o Update tests from org.apache.commons:commons-lang3 3.10 to 3.11. Thanks to Gary Gregory. 671o Update commons-parent from 50 to 51 #129. Thanks to Gary Gregory. 672o Update actions/checkout from v1 to v2.3.1 #126. Thanks to Gary Gregory. 673o Update junit-pioneer from 0.6.0 to 0.8.0, #127, #135. Thanks to Gary Gregory. 674o Update mockito-core from 3.3.3 to 3.5.9 #128, #133, #145, #149, #151. Thanks to Gary Gregory. 675o Update spotbugs from 4.0.6 to 4.1.1 #134. Thanks to Dependabot. 676o Update junit-pioneer from 0.8.0 to 0.9.0 #138. Thanks to Dependabot. 677o Update actions/checkout from v2.3.1 to v2.3.2 #140. Thanks to Dependabot. 678o Update actions/setup-java from v1.4.0 to v1.4.2 #141, #148. Thanks to Dependabot. 679 680Compatibility with 2.7: 681Binary compatible: Yes. 682Source compatible: Yes. 683Semantic compatible: Yes. 684 685Commons IO 2.7 requires Java 8. 686Commons IO 2.6 requires Java 7. 687Commons IO 2.5 requires Java 6. 688Commons IO 2.4 requires Java 6. 689Commons IO 2.3 requires Java 6. 690Commons IO 2.2 requires Java 5. 691Commons IO 1.4 requires Java 1.3. 692 693Historical list of changes: https://commons.apache.org/proper/commons-io/changes-report.html 694 695For complete information on Apache Commons IO, including instructions on how to submit bug reports, 696patches, or suggestions for improvement, see the Apache Commons IO website: 697 698https://commons.apache.org/proper/commons-io/ 699 700Download page: https://commons.apache.org/proper/commons-io/download_io.cgi 701 702Have fun! 703-Apache Commons Team 704 705============================================================================== 706 707Apache Commons IO 708Version 2.7 709Release Notes 710 711INTRODUCTION: 712 713Commons IO is a package of Java utility classes like java.io. 714Classes in this package are considered to be so standard and of such high 715reuse as to justify existence in java.io. 716 717The Apache Commons IO library contains utility classes, stream implementations, file filters, 718file comparators, endian transformation classes, and much more. 719 720Java 8 required. 721 722Changes in this version include: 723 724New features: 725o Adding the CircularBufferInputStream, and the PeekableInputStream. 726o IO-553: Add org.apache.commons.io.FilenameUtils.isIllegalWindowsFileName(char). 727o IO-577: Add readers to filter out given characters: CharacterSetFilterReader and CharacterFilterReader. Thanks to Gary Gregory. 728o IO-594: Add IOUtils copy methods with java.lang.Appendable as the target. Thanks to Gary Gregory. 729o IO-605: Add class CanExecuteFileFilter. Thanks to Gary Gregory. 730o IO-578: Support java.nio.Path and non-default file systems for ReversedLinesFileReader (#62). Thanks to Mark Chesney. 731o IO-608: Add a convenience NullPrintStream. Thanks to Gary Gregory. 732o IO-612: Add class TeeReader. Thanks to Rob Spoor, Gary Gregory. 733o IO-613: Add classes ClosedReader and CloseShieldReader. #84. Thanks to Rob Spoor, Gary Gregory. 734o IO-614: Add classes TaggedWriter, ClosedWriter and BrokenWriter. #86. Thanks to Rob Spoor. 735o IO-615: Add classes TeeWriter, FilterCollectionWriter, ProxyCollectionWriter, IOExceptionList, IOIndexedException. Thanks to Gary Gregory, Rob Spoor. 736o IO-616: Add class AppendableWriter. #87. Thanks to Rob Spoor. 737o IO-617: Add class CloseShieldWriter. #83. Thanks to Rob Spoor, Gary Gregory. 738o IO-618: Add classes Added TaggedReader, ClosedReader and BrokenReader. #85. Thanks to Rob Spoor. 739o IO-619: Support sub sequences in CharSequenceReader. #91. Thanks to Rob Spoor. 740o IO-631: Add a CountingFileVisitor (as the basis for a forthcoming DeletingFileVisitor). Thanks to Gary Gregory. 741o IO-632: Add PathUtils for operations on NIO Path. Thanks to Gary Gregory. 742o IO-633: Add DeletingFileVisitor. Thanks to Gary Gregory. 743o IO-635: Add org.apache.commons.io.IOUtils.close(Closeable). Thanks to Gary Gregory. 744o IO-636: Add and reuse org.apache.commons.io.IOUtils.closeQuitely(Closeable, Consumer<IOException>). 745 Add and reuse org.apache.commons.io.IOUtils.close(Closeable, IOConsumer<IOException>). Thanks to Gary Gregory. 746o IO-645: Add org.apache.commons.io.file.PathUtils.fileContentEquals(Path, Path, OpenOption...). Thanks to Gary Gregory. 747o IO-458: Add a SequenceReader similar to java.io.SequenceInputStream. Thanks to Gary Gregory, Joshua Gitlin. 748o IO-648: Implement directory content equality. 100#. Thanks to Gary Gregory. 749o IO-648: Refactor ByteArrayOutputStream into synchronized and unsynchronized versions #108. Thanks to Adam Retter, Alex Herbert, Gary Gregory. 750o IO-662: Refactor ByteArrayOutputStream into synchronized and unsynchronized versions #108. Thanks to Adam Retter, Gary Gregory. 751 752Fixed Bugs: 753o IO-589: Some tests fail if the base path contains a space. 754o IO-582: Make methods in ObservableInputStream.Observer public. Thanks to Bruno Palos. 755o IO-535: Thread bug in FileAlterationMonitor.stop(int). Thanks to Svetlin Zarev, Anthony Raymond. 756o IO-557: Perform locale independent upper case conversions. Thanks to luccioman. 757o IO-570: Missing Javadoc in FilenameUtils causing Travis-CI build to fail. Thanks to Pranet Verma. 758o IO-571: Remove redundant isDirectory() check in org.apache.commons.io.FileUtils.listFilesAndDirs(File, IOFileFilter, IOFileFilter). Thanks to pranet. 759o IO-559: FilenameUtils.normalize now verifies hostname syntax in UNC path. 760o IO-554: FileUtils.copyToFile(InputStream source, File destination) should not close input stream. Thanks to Michele Mariotti. 761o IO-604: FileUtils.doCopyFile(File, File, boolean) can throw ClosedByInterruptException. Thanks to Gary Gregory. 762o IO-625: Corrected misleading exception message for FileUtils.copyDirectoryToDirectory. Thanks to Mikko Maunu. 763o IO-626: A mistake in the FilenameUtils.concat()'s Javadoc about an absolute path. Thanks to Yuji Konishi. 764o IO-640: NPE in org.apache.commons.io.IOUtils.contentEquals(InputStream, InputStream) when only one input is null. Thanks to Gary Gregory. 765o IO-641: NPE in org.apache.commons.io.IOUtils.contentEquals(Reader, Reader) when only one input is null. Thanks to Gary Gregory. 766o IO-643: NPE in org.apache.commons.io.IOUtils.contentEqualsIgnoreEOL(Reader, Reader) when only one input is null. Thanks to Gary Gregory. 767o IO-644: NPE in org.apache.commons.io.FileUtils.contentEqualsIgnoreEOL(File, File) when only one input is null. Thanks to Gary Gregory. 768o IO-664: org.apache.commons.io.FileUtils.copyURLToFile(*) open but do not close streams. Thanks to Gary Gregory. 769 770Changes: 771o IO-572: Refactor duplicate code in org.apache.commons.io.FileUtils. Thanks to Pranet Verma. 772o IO-580: Update org.apache.commons.io.FilenameUtils.isExtension(String, String[]) to use var args. 773o IO-701: Make array declaration in ThresholdingOutputStream consistent with other array declarations in the library #77. Thanks to Raymond Tan. 774o IO-607: Update from Java 7 to Java 8. Thanks to Gary Gregory. 775o IO-610: Remove throws IOException in method isSymlink() #80. Thanks to Sebastian. 776o IO-628: Migration to JUnit Jupiter #97. Thanks to Allon Mureinik. 777o IO-630: Deprecate org.apache.commons.io.output.NullOutputStream.NullOutputStream() in favor of org.apache.commons.io.output.NullOutputStream.NULL_OUTPUT_STREAM. Thanks to Gary Gregory. 778o IO-629: FileUtils#forceDelete should use Files#delete rather than File#delete so exception messages includes reason for failure. Thanks to Ian Springer, Ian Springer, Gary Gregory. 779o IO-634: Make getCause synchronized and use a Deque instead of a Stack #64. Thanks to V�clav Haisman, Bruno P. Kinoshita, Gary Gregory. 780o Update tests from Apache Commons Lang 3.9 to 3.10. Thanks to Gary Gregory. 781o Update tests org.junit-pioneer:junit-pioneer 0.3.0 -> 0.6.0. Thanks to Gary Gregory. 782o Update tests org.junit.jupiter:junit-jupiter 5.5.2 -> 5.6.2. Thanks to Gary Gregory. 783o Update tests org.mockito:mockito-core 3.0.0 -> 3.3.3. Thanks to Gary Gregory. 784o IO-666: Normalize internal buffers to 8192 bytes. Thanks to Gary Gregory. 785o IO-665: Ensure that passing a null InputStream results in NPE with tests #112. Thanks to Otto Fowler, Gary Gregory. 786o commons.jacoco.version 0.8.4 -> 0.8.5. Thanks to Gary Gregory. 787o com.github.siom79.japicmp:japicmp-maven-plugin 0.14.1 -> 0.14.3. Thanks to Gary Gregory. 788o IO-667: Add functional interfaces IOFunction and IOSupplier #110. Thanks to Adam Retter, Gary Gregory. 789o Support sub sequences in CharSequenceReader #91. Thanks to Rob Spoor, Gary Gregory. 790o Remove deprecated sudo setting. #113. Thanks to dengliming. 791 792Compatibility with 2.6: 793Binary compatible: Yes. 794Source compatible: Yes. 795Semantic compatible: Yes. 796 797Commons IO 2.7 requires Java 8. 798Commons IO 2.6 requires Java 7. 799Commons IO 2.5 requires Java 6. 800Commons IO 2.4 requires Java 6. 801Commons IO 2.3 requires Java 6. 802Commons IO 2.2 requires Java 5. 803Commons IO 1.4 requires Java 1.3. 804 805Historical list of changes: https://commons.apache.org/proper/commons-io/changes-report.html 806 807For complete information on Apache Commons IO, including instructions on how to submit bug reports, 808patches, or suggestions for improvement, see the Apache Commons IO website: 809 810https://commons.apache.org/proper/commons-io/ 811 812Download page: https://commons.apache.org/proper/commons-io/download_io.cgi 813 814Have fun! 815-Apache Commons Team 816 817============================================================================== 818 819Apache Commons IO Version 2.6 820 821INTRODUCTION: 822 823Apache Commons IO is a package of Java utility classes like java.io. 824Classes in this package are considered to be so standard and of such high 825reuse as to justify existence in java.io. 826 827The Apache Commons IO library contains utility classes, stream implementations, 828file filters, file comparators, endian transformation classes, and much more. 829 830Apache Commons IO 2.6 requires at least Java 7 to build and run. 831 832 833DEPRECATIONS 834============ 835 836All closeQuietly overloads in org.apache.commons.io.IOUtils have been 837deprecated. Use the try-with-resources statement or handle suppressed 838exceptions manually. 839 840The class org.apache.commons.io.FileSystemUtils has been deprecated. 841Use equivalent methods in java.nio.file.FileStore instead, e.g. 842Files.getFileStore(Paths.get("/home")).getUsableSpace() or iterate over 843FileSystems.getDefault().getFileStores(). 844 845 846COMPATIBILITY WITH JAVA 9 847================== 848 849The MANIFEST.MF now contains an additional entry: 850 851 Automatic-Module-Name: org.apache.commons.io 852 853This should make it possible to use Commons IO 2.6 as a module in the Java 9 854module system. For more information see the corresponding issue: 855 856 https://issues.apache.org/jira/browse/IO-551 857 858Building Commons IO 2.6 should work out of the box with the latest Java 9 859release. Please report any Java 9 related issues at: 860 861 https://issues.apache.org/jira/browse/IO 862 863 864NEW FEATURES 865============ 866 867o IO-551: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility. 868o IO-367: Add convenience methods for copyToDirectory. Thanks to James Sawle. 869o IO-493: Add infinite circular input stream. Thanks to Piotr Turski. 870o IO-507: Add a ByteOrderUtils class. 871o IO-518: Add ObservableInputStream. 872o IO-519: Add MessageDigestCalculatingInputStream. 873o IO-513: Add convenience methods for reading class path resources. 874 Thanks to Behrang Saeedzadeh. 875 876FIXED BUGS 877========== 878 879o IO-546: ClosedOutputStream#flush should throw. Thanks to Tomas Celaya. 880o IO-550: Documentation issue, fix 404 Javadoc issues in the description page. 881 Thanks to Jimi Adrian. 882o IO-442: Javadoc contradictory for FileFilterUtils.ageFileFilter(cutoff) and 883 the filter it constructs: AgeFileFilter(cutoff). 884 Thanks to Simon Robinson. 885o IO-534: FileUtilTestCase.testForceDeleteDir() should not delete testDirectory 886 parent. 887o IO-528: Fix Tailer.run race condition runaway logging. Thanks to Dave Moten. 888o IO-483: getPrefixLength return -1 if Unix file contains colon. 889 Thanks to Marko Vasic. 890o IO-520: FileUtilsTestCase#testContentEqualsIgnoreEOL fails on Windows. 891o IO-516: .gitattributes not correctly applied. Thanks to Jason Pyeron. 892o IO-515: Allow Specifying Initial Buffer Size of DeferredFileOutputStream. 893 Thanks to Brett Lounsbury, Gary Gregory. 894o IO-512: ThresholdingOutputStream.thresholdReached() results in 895 FileNotFoundException. Thanks to Ralf Hauser. 896o IO-511: After a few unit tests, a few newly created directories not cleaned 897 completely. Thanks to Ahmet Celik. 898o IO-502: Exceptions are suppressed incorrectly when copying files. 899 Thanks to Christian Schulte. 900o IO-503: Update platform requirement to Java 7. 901o IO-537: BOMInputStream shouldn't sort array of BOMs in-place. 902 Thanks to Borys Zibrov. 903 904CHANGES 905======= 906 907o IO-553: Make code style of hasBOM() consistent with getBOMCharsetName(). 908 Thanks to Michael Ernst. 909o IO-542: FileUtils#readFileToByteArray: optimize reading of files with known 910 size. Thanks to Ilmars Poikans. 911o IO-547: Throw a IllegalArgumentException instead of NullPointerException in 912 FileSystemUtils.freeSpaceWindows(). Thanks to Nikhil Shinde, 913 Michael Ernst, Gary Greory. 914o IO-506: Deprecate methods FileSystemUtils.freeSpaceKb(). 915 Thanks to Christian Schulte. 916o IO-505: Make LineIterator implement Closeable to support try-with-resources 917 statements. Thanks to Christian Schulte. 918o IO-504: Deprecated of all IOUtils.closeQuietly() methods and use 919 try-with-resources internally. Thanks to Christian Schulte. 920 921REMOVED 922======= 923 924o IO-514: Remove org.apache.commons.io.Java7Support. 925 926COMPATIBILITY WITH OLDER VERSIONS 927================================= 928 929Compatibility with 2.5: 930Binary compatible: Yes. 931Source compatible: Yes. 932Semantic compatible: Yes. 933 934Compatibility with 2.6 and 1.4: 935Binary compatible: Yes. 936Source compatible: No, see the rare case in 937 https://issues.apache.org/jira/browse/IO-318. 938Semantic compatible: No, see the rare case in 939 https://issues.apache.org/jira/browse/IO-318. 940 941Commons IO 2.6 requires Java 7 or later. 942Commons IO 2.5 requires Java 6 or later. 943Commons IO 2.4 requires Java 6 or later. 944Commons IO 2.3 requires Java 6 or later. 945Commons IO 2.2 requires Java 5 or later. 946Commons IO 1.4 requires Java 1.3 or later. 947 948============================================================================== 949 950Apache Commons IO Version 2.5 951 952New features and bug fixes. 953 954Changes in this version include: 955 956New features: 957o IO-487: Add ValidatingObjectInputStream for controlled deserialization 958o IO-471: Support for additional encodings in ReversedLinesFileReader Thanks to Leandro Reis. 959o IO-425: Setter method for threshold on ThresholdingOutputStream Thanks to Craig Swank. 960o IO-406: Introduce new class AppendableOutputStream Thanks to Niall Pemberton. 961o IO-459: Add WindowsLineEndingInputStream and UnixLineEndingInputStream. Thanks to Kristian Rosenvold. 962o IO-457: Add a BoundedReader, a wrapper that can be used to constrain access 963 to an underlying stream when used with mark/reset - 964 to avoid overflowing the mark limit of the underlying buffer. Thanks to Kristian Rosenvold. 965o IO-426: Add API IOUtils.closeQuietly(Closeable...) 966o IO-410: Readfully() That Returns A Byte Array Thanks to Beluga Behr. 967o IO-395: Overload IOUtils buffer methods to accept buffer size Thanks to Beluga Behr. 968o IO-382: Chunked IO for large arrays. 969 Added writeChunked(byte[], OutputStream) and writeChunked(char[] Writer) 970 Added ChunkedOutputStream, ChunkedWriter 971o IO-233: Add Methods for Buffering Streams/Writers To IOUtils 972 Added overloaded buffer() methods - see also IO-330 973o IO-330: IOUtils#toBufferedOutputStream/toBufferedWriter to conditionally wrap the output 974 Added overloaded buffer() methods - see also IO-233 975o IO-381: Add FileUtils.copyInputStreamToFile API with option to leave the source open. 976 See copyInputStreamToFile(final InputStream source, final File destination, boolean closeSource) 977o IO-379: CharSequenceInputStream - add tests for available() 978 Fix code so it really does reflect a minimum available. 979o IO-346: Add ByteArrayOutputStream.toInputStream() 980o IO-341: A constant for holding the BOM character (U+FEFF) 981o IO-361: Add API FileUtils.forceMkdirsParent(). 982o IO-360: Add API Charsets.requiredCharsets(). 983o IO-359: Add IOUtils.skip and skipFully(ReadableByteChannel, long). Thanks to yukoba. 984o IO-358: Add IOUtils.read and readFully(ReadableByteChannel, ByteBuffer buffer). Thanks to yukoba. 985o IO-353: Add API IOUtils.copy(InputStream, OutputStream, int) Thanks to ggregory. 986o IO-349: Add API with array offset and length argument to FileUtils.writeByteArrayToFile. Thanks to scop. 987o IO-348: Missing information in IllegalArgumentException thrown by org.apache.commons.io.FileUtils#validateListFilesParameters. Thanks to plcstpierre. 988o IO-345: Supply a hook method allowing Tailer actively determining stop condition. Thanks to mkresse. 989o IO-437: Make IOUtils.EOF public and reuse it in various classes. 990 991Fixed Bugs: 992o IO-446: adds an endOfFileReached method to the TailerListener Thanks to Jeffrey Barrus. 993o IO-484: FilenameUtils should handle embedded null bytes Thanks to Philippe Arteau. 994o IO-481: Changed/Corrected algorithm for waitFor 995o IO-428: BOMInputStream.skip returns wrong count if stream contains no BOM Thanks to Stefan Gmeiner. 996o IO-488: FileUtils.waitFor(...) swallows thread interrupted status Thanks to Bj�rn Buchner. 997o IO-452: Support for symlinks with missing target. Added support for JDK7 symlink features when present Thanks to David Standish. 998o IO-453: Regression in FileUtils.readFileToString from 2.0.1 Thanks to Steven Christou. 999o IO-451: ant test fails - resources missing from test classpath Thanks to David Standish. 1000o IO-435: Document that FileUtils.deleteDirectory, directoryContains and cleanDirectory 1001 may throw an IllegalArgumentException in case the passed directory does not 1002 exist or is not a directory. Thanks to Dominik Stadler. 1003o IO-424: Javadoc fixes, mostly to appease 1.8.0 Thanks to Ville Skytt�. 1004o IO-389: FileUtils.sizeOfDirectory can throw IllegalArgumentException Thanks to Austin Doupnik. 1005o IO-390: FileUtils.sizeOfDirectoryAsBigInteger can overflow. 1006 Ensure that recursive calls all use BigInteger 1007o IO-385: FileUtils.doCopyFile can potentially loop for ever 1008 Exit loop if no data to copy 1009o IO-383: FileUtils.doCopyFile caches the file size; needs to be documented 1010 Added Javadoc; show file lengths in exception message 1011o IO-380: FileUtils.copyInputStreamToFile should document it closes the input source Thanks to claudio_ch. 1012o IO-279: Tailer erroneously considers file as new. 1013 Fix to use file.lastModified() rather than System.currentTimeMillis() 1014o IO-356: CharSequenceInputStream#reset() behaves incorrectly in case when buffer size is not dividable by data size. 1015 Fix code so skip relates to the encoded bytes; reset now re-encodes the data up to the point of the mark 1016o IO-368: ClassLoaderObjectInputStream does not handle primitive typed members 1017o IO-314: Deprecate all methods that use the default encoding 1018o IO-338: When a file is rotated, finish reading previous file prior to starting new one 1019o IO-354: Commons IO Tailer does not respect UTF-8 Charset. 1020o IO-323: What should happen in FileUtils.sizeOf[Directory] when an overflow takes place? 1021 Added Javadoc. 1022o IO-372: FileUtils.moveDirectory can produce misleading error message on failure 1023o IO-362: IOUtils.contentEquals* methods returns false if input1 == input2, should return true. Thanks to mmadson, ggregory. 1024o IO-357: [Tailer] InterruptedException while the thread is sleeping is silently ignored Thanks to mortenh. 1025o IO-352: Spelling fixes. Thanks to scop. 1026o IO-436: Improper Javadoc comment for FilenameUtils.indexOfExtension. Thanks to christoph.schneegans. 1027 1028Changes: 1029o IO-433: Converted all testcases to JUnit 4 1030o IO-466: Added testcase to show this was fixed with IO-423 1031o IO-479: Correct exception message in FileUtils.getFile(File, String...) Thanks to Zhouce Chen. 1032o IO-465: Update to JUnit 4.12 Thanks to based2. 1033o IO-462: IOExceptionWithCause no longer needed 1034o IO-422: Deprecate Charsets Charset constants in favor of Java 7's java.nio.charset.StandardCharsets 1035o IO-239: Convert IOCase to a Java 1.5+ Enumeration 1036 [N.B. this is binary compatible] 1037o IO-328: getPrefixLength returns null if filename has leading slashes 1038 Javadoc: add examples to show correct behavior; add unit tests 1039o IO-299: FileUtils.listFilesAndDirs includes original dir in results even when it doesn't match filter 1040 Javadoc: clarify that original dir is included in the results 1041o IO-375: FilenameUtils.splitOnTokens(String text) check for '**' could be simplified 1042o IO-374: WildcardFileFilter ctors should not use null to mean IOCase.SENSITIVE when delegating to other ctors 1043 1044Compatibility with 2.4: 1045Binary compatible: Yes. 1046Source compatible: Yes. 1047Semantic compatible: Yes. 1048 1049Compatibility with 2.2 and 1.4: 1050Binary compatible: Yes. 1051Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. 1052Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. 1053 1054Commons IO 2.5 requires Java 6 or later. 1055Commons IO 2.4 requires Java 6 or later. 1056Commons IO 2.3 requires Java 6 or later. 1057Commons IO 2.2 requires Java 5 or later. 1058Commons IO 1.4 requires Java 1.3 or later. 1059 1060============================================================================== 1061 1062Apache Commons IO Version 2.4 1063 1064Changes in this version include: 1065 1066New features: 1067o IO-269: Tailer locks file from deletion/rename on Windows. Thanks to 1068sebb. 1069o IO-333: Export OSGi packages at version 1.x in addition to 2.x. Thanks 1070to fmeschbe. 1071o IO-320: Add XmlStreamReader support for UTF-32. Thanks to ggregory. 1072o IO-331: BOMInputStream wrongly detects UTF-32LE_BOM files as 1073UTF-16LE_BOM files in method getBOM(). Thanks to ggregory. 1074o IO-327: Add byteCountToDisplaySize(BigInteger). Thanks to ggregory. 1075o IO-326: Add new FileUtils.sizeOf[Directory] APIs to return BigInteger. 1076Thanks to ggregory. 1077o IO-325: Add IOUtils.toByteArray methods to work with URL and URI. Thanks 1078to raviprak. 1079o IO-324: Add missing Charset sister APIs to method that take a String 1080charset name. Thanks to raviprak. 1081 1082Fixed Bugs: 1083o IO-336: Yottabyte (YB) incorrectly defined in FileUtils. Thanks to 1084rleavelle. 1085o IO-279: Tailer erroneously considers file as new. Thanks to Sergio 1086Bossa, Chris Baron. 1087o IO-335: Tailer#readLines - incorrect CR handling. 1088o IO-334: FileUtils.toURLs throws NPE for null parameter; document the 1089behavior. 1090o IO-332: Improve tailer's reading performance. Thanks to liangly. 1091o IO-279: Improve Tailer performance with buffered reads (see IO-332). 1092o IO-329: FileUtils.writeLines uses unbuffered IO. Thanks to tivv. 1093o IO-319: FileUtils.sizeOfDirectory follows symbolic links. Thanks to 1094raviprak. 1095 1096 1097Compatibility with 2.3: 1098Binary compatible: Yes. 1099Source compatible: Yes. 1100Semantic compatible: Yes. 1101 1102Compatibility with 2.2 and 1.4: 1103Binary compatible: Yes. 1104Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. 1105Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. 1106 1107Commons IO 2.4 requires Java 6 or later. 1108Commons IO 2.3 requires Java 6 or later. 1109Commons IO 2.2 requires Java 5 or later. 1110Commons IO 1.4 requires Java 1.3 or later. 1111 1112============================================================================== 1113 1114Apache Commons IO Version 2.3 1115 1116Changes in this version include: 1117 1118New features: 1119o IO-322: Add and use class Charsets. Thanks to ggregory. 1120o IO-321: ByteOrderMark UTF_32LE is incorrect. Thanks to ggregory. 1121o IO-318: Add Charset sister APIs to method that take a String charset name. Thanks to ggregory. 1122 1123Compatibility with 2.2 and 1.4: 1124Binary compatible: Yes. 1125Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. 1126Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. 1127 1128Commons IO 2.3 requires Java 6 or later. 1129Commons IO 2.2 requires Java 5 or later. 1130Commons IO 1.4 requires Java 1.3 or later. 1131 1132============================================================================== 1133 1134Apache Commons IO Version 2.2 1135 1136Changes in this version include: 1137 1138New features: 1139o Add IOUtils.toBufferedReader(Reader) Issue: IO-313. Thanks to ggregory. 1140o Allow applications to provide buffer (or size) for copyLarge methods. Issue: IO-308. Thanks to Manoj Mokashi. 1141o New copyLarge() method in IOUtils that takes additional offset, length arguments Issue: IO-305. Thanks to Manoj Mokashi. 1142o Use terabyte (TB), petabyte (PB) and exabyte (EB) in FileUtils.byteCountToDisplaySize(long size) Issue: IO-287. Thanks to Ron Kuris, Gary Gregory. 1143o FileUtils.listFiles() doesn't return directories Issue: IO-173. Thanks to Marcos Vin�cius da Silva. 1144o CharSequenceInputStream to efficiently stream content of a CharSequence Issue: IO-297. Thanks to Oleg Kalnichevski. 1145o The second constructor of Tailer class does not pass 'delay' to the third one Issue: IO-304. Thanks to liangly. 1146o TeeOutputStream does not call branch.close() when main.close() throws an exception Issue: IO-303. Thanks to fabian.barney. 1147o ArrayIndexOutOfBoundsException in BOMInputStream when reading a file without BOM multiple times Issue: IO-302. Thanks to jsteuerwald, detinho. 1148o Add IOUtils.closeQuietly(Selector) necessary Issue: IO-301. Thanks to kaykay.unique. 1149o IOUtils.closeQuietly() should take a ServerSocket as a parameter Issue: IO-292. Thanks to sebb. 1150o Add read/readFully methods to IOUtils Issue: IO-290. Thanks to sebb. 1151o Supply a ReversedLinesFileReader Issue: IO-288. Thanks to Georg Henzler. 1152o Add new function FileUtils.directoryContains. Issue: IO-291. Thanks to ggregory. 1153o FileUtils.contentEquals and IOUtils.contentEquals - Add option to ignore "line endings" 1154 Added contentEqualsIgnoreEOL methods to both classes Issue: IO-275. Thanks to CJ Aspromgos. 1155 1156Fixed Bugs: 1157o IOUtils.read(InputStream/Reader) ignores the offset parameter Issue: IO-311. Thanks to Robert Muir. 1158o CharSequenceInputStream(CharSequence s, Charset charset, int bufferSize) ignores bufferSize Issue: IO-312. 1159o FileUtils.moveDirectoryToDirectory removes source directory if destination is a subdirectory Issue: IO-300. 1160o ReaderInputStream#read(byte[] b, int off, int len) should check for valid parameters Issue: IO-307. 1161o ReaderInputStream#read(byte[] b, int off, int len) should always return 0 for length == 0 Issue: IO-306. 1162o "FileUtils#deleteDirectoryOnExit(File)" does not work Issue: IO-276. Thanks to nkami. 1163o BoundedInputStream.read() treats max differently from BoundedInputStream.read(byte[]...) Issue: IO-273. Thanks to sebb. 1164o Various methods of class 'org.apache.commons.io.FileUtils' incorrectly suppress 'java.io.IOException' Issue: IO-298. Thanks to Christian Schulte. 1165 1166Changes: 1167o ReaderInputStream optimization: more efficient reading of small chunks of data Issue: IO-296. Thanks to Oleg Kalnichevski. 1168 1169 1170Compatibility with 2.1 and 1.4: 1171Binary compatible: Yes 1172Source compatible: Yes 1173Semantic compatible: Yes. Check the bug fixes section for semantic bug fixes 1174 1175Commons IO 2.2 requires a minimum of Java 5. 1176Commons IO 1.4 requires a minimum of Java 1.3. 1177 1178============================================================================== 1179 1180Apache Commons IO Version 2.1 1181 1182New features: 1183o Use standard Maven directory layout Issue: IO-285. Thanks to ggregory. 1184o Add IOUtils API toString for URL and URI to get contents Issue: IO-284. Thanks to ggregory. 1185o Add API FileUtils.copyFile(File input, OutputStream output) Issue: IO-282. Thanks to ggregory. 1186o FileAlterationObserver has no getter for FileFilter Issue: IO-262. 1187o Add FileUtils.getFile API with varargs parameter Issue: IO-261. 1188o Add new APPEND parameter for writing string into files Issue: IO-182. 1189o Add new read method "toByteArray" to handle InputStream with known size. Issue: IO-251. Thanks to Marco Albini. 1190 1191Fixed Bugs: 1192o Dubious use of mkdirs() return code Issue: IO-280. Thanks to sebb. 1193o ReaderInputStream enters infinite loop when it encounters an unmappable character Issue: IO-277. 1194o FileUtils.moveFile() Javadoc should specify FileExistsException thrown Issue: IO-264. 1195o ClassLoaderObjectInputStream does not handle Proxy classes Issue: IO-260. 1196o Tailer returning partial lines when reaching EOF before EOL Issue: IO-274. Thanks to Frank Grimes. 1197o FileUtils.copyFile() throws IOException when copying large files to a shared directory (on Windows) Issue: IO-266. Thanks to Igor Smereka. 1198o FileSystemUtils.freeSpaceKb throws exception for Windows volumes with no visible files. 1199 Improve coverage by also looking for hidden files. Issue: IO-263. Thanks to Gil Adam. 1200 1201Changes: 1202o FileAlterationMonitor.stop(boolean allowIntervalToFinish) Issue: IO-259. 1203 1204============================================================================== 1205 1206Apache Commons IO Package 2.0.1 1207 1208Compatibility with 2.0 and 1.4 1209------------------------------ 1210Binary compatible - Yes 1211 1212Source compatible - Yes 1213 1214Semantic compatible - Yes 1215 Check the bug fixes section for semantic bug fixes 1216 1217Commons IO 2.0.1 requires a minimum of Java 5 1218 (Commons IO 1.4 had a minimum of Java 1.3) 1219 1220Enhancements from 2.0 1221--------------------- 1222 1223 * [IO-256] - Provide thread factory for FileAlternationMonitor 1224 1225Bug fixes from 2.0 1226------------------ 1227 1228 * [IO-257] - BOMInputStream.read(byte[]) can return 0 which it should not 1229 * [IO-258] - XmlStreamReader consumes the stream during encoding detection 1230 1231============================================================================== 1232 1233Apache Commons IO Package 2.0 1234 1235Compatibility with 1.4 1236---------------------- 1237Binary compatible - Yes 1238 1239Source compatible - Yes 1240 1241Semantic compatible - Yes 1242 Check the bug fixes section for semantic bug fixes 1243 1244Commons IO 2.0 requires a minimum of Java 5 1245 (Commons IO 1.4 had a minimum of Java 1.3) 1246 1247Deprecations from 1.4 1248--------------------- 1249 1250- IOUtils 1251 - write(StringBuffer, Writer) in favour of write(CharSequence, Writer) 1252 - write(StringBuffer, OutputStream) in favour of write(CharSequence, OutputStream) 1253 - write(StringBuffer, OutputStream, String) in favour of write(CharSequence, OutputStream, String) 1254 1255- FileFilterUtils 1256 - andFileFilter(IOFileFilter, IOFileFilter) in favour of and(IOFileFilter...) 1257 - orFileFilter(IOFileFilter, IOFileFilter) in favour of or(IOFileFilter...) 1258 1259Enhancements from 1.4 1260--------------------- 1261 1262 * [IO-140] Move minimum Java requirement from Java 1.3 to Java 5 1263 - use Generics 1264 - add new CharSequence write() flavour methods to IOUtils and FileUtils 1265 - replace StringBuffer with StringBuilder, where appropriate 1266 - add new Reader/Writer methods to ProxyReader and ProxyWriter 1267 - Annotate with @Override and @Deprecated 1268 1269 * [IO-178] New BOMInputStream and ByteOrderMark implementations - to detect and optionally exclude an initial Byte Order mark (BOM) 1270 * [IO-197] New BoundedInputStream (copied from Apache JackRabbit) 1271 * [IO-193] New Broken Input and Output streams 1272 * [IO-132] New File Listener/Monitor facility 1273 * [IO-158] New ReaderInputStream and WriterOutputStream implementations 1274 * [IO-139] New StringBuilder Writer implementation 1275 * [IO-192] New Tagged Input and Output streams 1276 * [IO-177] New Tailer class - simple implementation of the Unix "tail -f" functionality 1277 * [IO-162] New XML Stream Reader/Writer implementations (from ROME via plexus-utils) 1278 1279 * [IO-142] Comparators - add facility to sort file lists/arrays 1280 * [IO-186] Comparators - new Composite and Directory File Comparator implementations 1281 * [IO-176] DirectoryWalker - add filterDirectoryContents() callback method for filtering directory contents 1282 * [IO-210] FileFilter - new Magic Number FileFilter 1283 * [IO-221] FileFilterUtils - add methods for suffix and prefix filters which take an IOCase object 1284 * [IO-232] FileFilterUtils - add method for name filters which take an IOCase object 1285 * [IO-229] FileFilterUtils - add varargs and() and or() methods 1286 * [IO-198] FileFilterUtils - add ability to apply file filters to collections and arrays 1287 * [IO-156] FilenameUtils - add normalize() and normalizeNoEndSeparator() methods which allow the separator character to be specified 1288 * [IO-194] FileSystemUtils - add freeSpaceKb() method with no input arguments 1289 * [IO-185] FileSystemUtils - add freeSpaceKb() methods that take a timeout parameter - fixes freeSpaceWindows() blocks 1290 * [IO-155] FileUtils - use NIO to copy files 1291 * [IO-168] FileUtils - add new isSymlink() method 1292 * [IO-219] FileUtils - throw FileExistsException when moving a file or directory if the destination already exists 1293 * [IO-234] FileUtils - add Methods for retrieving System User/Temp directories/paths 1294 * [IO-208] FileUtils - add timeout (connection and read) support for copyURLToFile() method 1295 * [IO-238] FileUtils - add sizeOf(File) method 1296 * [IO-181] LineIterator now implements Iterable 1297 * [IO-224] IOUtils - add closeQuietly(Closeable) and closeQuietly(Socket) methods 1298 * [IO-203] IOUtils - add skipFully() method for InputStreams 1299 * [IO-137] IOUtils and ByteArrayOutputStream - add toBufferedInputStream() method to avoid unnecessary array allocation/copy 1300 * [IO-195] Proxy streams/Reader/Writer - provide exception handling methods 1301 * [IO-211] Proxy Input/Output streams - add pre/post processing support 1302 * [IO-242] Proxy Reader/Writer - add pre/post processing support 1303 1304Bug fixes from 1.4 1305------------------ 1306 * [IO-214] ByteArrayOutputStream - fix inconsistent synchronization of fields 1307 * [IO-201] Counting Input/Output streams - fix inconsistent synchronization 1308 * [IO-159] FileCleaningTracker - fix remove() never returns null 1309 * [IO-220] FileCleaningTracker - fix Vector performs badly under load 1310 * [IO-167] FilenameUtils - fix case-insensitive string handling in FilenameUtils and FilesystemUtils 1311 * [IO-179] FilenameUtils - fix StringIndexOutOfBounds exception in getPathNoEndSeparator() 1312 * [IO-248] FilenameUtils - fix getFullPathNoEndSeparator() returns empty while path is a one level directory 1313 * [IO-246] FilenameUtils - fix wildcardMatch gives incorrect results 1314 * [IO-187] FileSystemUtils - fix freeSpaceKb() doesn't work with relative paths on Linux 1315 * [IO-160] FileSystemUtils - fix freeSpace() fails on solaris 1316 * [IO-209] FileSystemUtils - fix freeSpaceKb() fails to return correct size for a windows mount point 1317 * [IO-163] FileUtils - fix toURLs() using deprecated method of conversion to URL 1318 * [IO-168] FileUtils - fix Symbolic links followed when deleting directory 1319 * [IO-231] FileUtils - fix wrong exception message generated in isFileNewer() method 1320 * [IO-207] FileUtils - fix race condition in forceMkdir() method 1321 * [IO-217] FileUtils - fix copyDirectoryToDirectory() makes infinite loops 1322 * [IO-166] FileUtils - fix URL decoding in toFile(URL) 1323 * [IO-190] FileUtils - fix copyDirectory not preserving lastmodified date on subdirectories 1324 * [IO-240] FileFilterUtils - ensure cvsFilter and svnFilter are only created once. 1325 * [IO-175] IOUtils - fix copyFile() issues with very large files 1326 * [IO-191] Improvements from static analysis 1327 * [IO-216] LockableFileWriter - delete files quietly when an exception is thrown during initialization 1328 * [IO-243] SwappedDataInputStream - fix readBoolean is inverted 1329 * [IO-235] Tests - remove unused YellOnFlushAndCloseOutputStream from CopyUtilsTest 1330 * [IO-161] Tests - fix FileCleaningTrackerTestCase hanging 1331 1332Documentation changes from 1.4 1333------------------------------ 1334 * [IO-183 FilenameUtils.getExtension() method documentation improvements 1335 * [IO-226 FileUtils.byteCountToDisplaySize() documentation corrections 1336 * [IO-205 FileUtils.forceMkdir() documentation improvements 1337 * [IO-215 FileUtils copy file/directory improve documentation regarding preserving the last modified date 1338 * [IO-189 HexDump.dump() method documentation improvements 1339 * [IO-171 IOCase document that it assumes there are only two OSes: Windows and Unix 1340 * [IO-223 IOUtils.copy() documentation corrections 1341 * [IO-247 IOUtils.closeQuietly() improve documentation with examples 1342 * [IO-202 NotFileFilter documentation corrections 1343 * [IO-206 ProxyInputStream - fix misleading parameter names 1344 * [IO-212 ProxyInputStream.skip() documentation corrections 1345 1346============================================================================== 1347 1348Apache Commons IO Version 1.4 1349 1350Compatibility with 1.3.2 1351------------------------ 1352Binary compatible - Yes 1353 1354Source compatible - Yes 1355 1356Semantic compatible - Yes 1357 Check the bug fixes section for semantic bug fixes 1358 1359Commons IO 1.4 introduces four new implementations which depend on Java 4 features 1360(CharSequenceReader, FileWriterWithEncoding, IOExceptionWithCause and RegexFileFilter). 1361It has been built with the JDK source and target options set to Java 1.3 and, except for 1362those implementations, can be used with Java 1.3 (see IO-127). 1363 1364Deprecations from 1.3.2 1365----------------------- 1366- FileCleaner deprecated in favour of FileCleaningTracker [see IO-116] 1367 1368Bug fixes from 1.3.2 1369-------------------- 1370- FileUtils 1371 - forceDelete of orphaned Softlinks does not work [IO-147] 1372 - Infinite loop on FileUtils.copyDirectory when the destination directory is within 1373 the source directory [IO-141] 1374 - Add a copyDirectory() method that makes use of FileFilter [IO-105] 1375 - Add moveDirectory() and moveFile() methods [IO-77] 1376 1377- HexDump 1378 - HexDump's use of static StringBuffers isn't thread-safe [IO-136] 1379 1380Enhancements from 1.3.2 1381----------------------- 1382- FileUtils 1383 - Add a deleteQuietly method [IO-135] 1384 1385- FilenameUtils 1386 - Add file name extension separator constants[IO-149] 1387 1388- IOExceptionWithCause [IO-148] 1389 - Add a new IOException implementation with constructors which take a cause 1390 1391- TeeInputStream [IO-129] 1392 - Add new Tee input stream implementation 1393 1394- FileWriterWithEncoding [IO-153] 1395 - Add new File Writer implementation that accepts an encoding 1396 1397- CharSequenceReader [IO-138] 1398 - Add new Reader implementation that handles any CharSequence (String, 1399 StringBuffer, StringBuilder or CharBuffer) 1400 1401- ThresholdingOutputStream [IO-121] 1402 - Add a reset() method which sets the count of the bytes written back to zero. 1403 1404- DeferredFileOutputStream [IO-130] 1405 - Add support for temporary files 1406 1407- ByteArrayOutputStream 1408 - Add a new write(InputStream) method [IO-152] 1409 1410- New Closed Input/Output stream implementations [IO-122] 1411 - AutoCloseInputStream - automatically closes and discards the underlying input stream 1412 - ClosedInputStream - returns -1 for any read attempts 1413 - ClosedOutputStream - throws an IOException for any write attempts 1414 - CloseShieldInputStream - prevents the underlying input stream from being closed. 1415 - CloseShieldOutputStream - prevents the underlying output stream from being closed. 1416 1417- Add Singleton Constants to several stream classes [IO-143] 1418 1419- PrefixFileFilter [IO-126] 1420 - Add facility to specify case sensitivity on prefix matching 1421 1422- SuffixFileFilter [IO-126] 1423 - Add facility to specify case sensitivity on suffix matching 1424 1425- RegexFileFilter [IO-74] 1426 - Add new regular expression file filter implementation 1427 1428- Make IOFileFilter implementations Serializable [IO-131] 1429 1430- Improve IOFileFilter toString() methods [IO-120] 1431 1432- Make fields final so classes are immutable/threadsafe [IO-133] 1433 - changes to Age, Delegate, Name, Not, Prefix, Regex, Size, Suffix and Wildcard IOFileFilter 1434 implementations. 1435 1436- IOCase 1437 - Add a compare method to IOCase [IO-144] 1438 1439- Add a package of java.util.Comparator implementations for files [IO-145] 1440 - DefaultFileComparator - compare files using the default File.compareTo(File) method. 1441 - ExtensionFileComparator - compares files using file name extensions. 1442 - LastModifiedFileComparator - compares files using the last modified date/time. 1443 - NameFileComparator - compares files using file names. 1444 - PathFileComparator - compares files using file paths. 1445 - SizeFileComparator - compares files using file sizes. 1446 1447============================================================================== 1448 1449Apache Commons IO Version 1.3.2 1450 1451Compatibility with 1.3.1 1452---------------------- 1453Binary compatible - Yes 1454 1455Source compatible - Yes 1456 1457Semantic compatible - Yes 1458 1459Compatibility with 1.3 1460---------------------- 1461Binary compatible - No 1462 See [IO-113] 1463 1464Source compatible - No 1465 See [IO-113] 1466 1467Semantic compatible - Yes 1468 1469Enhancements since 1.3.1 1470------------------------ 1471 1472- Created the FileCleaningTracker, basically a non-static version of the 1473 FileCleaner, which can be controlled by the user. [IO-116] 1474- The FileCleaner is deprecated. 1475 1476Bug fixes from 1.3.1 1477-------------------- 1478 1479- Some tests, which are implicitly assuming a Unix-like file system, are 1480 now skipped on Windows. [IO-115] 1481- EndianUtils 1482 - Both readSwappedUnsignedInteger(...) methods could return negative 1483 numbers due to int/long casting. [IO-117] 1484 1485Bug fixes from 1.3 1486------------------ 1487 1488- FileUtils 1489 - NPE in openOutputStream(File) when file has no parent in path [IO-112] 1490 - readFileToString(File) is not static [IO-113] 1491 1492============================================================================== 1493 1494Apache Commons IO Version 1.3.1 1495 1496Compatibility with 1.3 1497---------------------- 1498Binary compatible - No 1499 See [IO-113] 1500 1501Source compatible - No 1502 See [IO-113] 1503 1504Semantic compatible - Yes 1505 1506Bug fixes from 1.3 1507------------------ 1508 1509- FileUtils 1510 - NPE in openOutputStream(File) when file has no parent in path [IO-112] 1511 - readFileToString(File) is not static [IO-113] 1512 1513============================================================================== 1514 1515Apache Commons IO Version 1.3 1516 1517Compatibility with 1.2 1518---------------------- 1519Binary compatible - Yes 1520 1521Source compatible - Yes 1522 1523Semantic compatible - Yes 1524 Check the bug fixes section for semantic bug fixes 1525 1526Deprecations from 1.2 1527--------------------- 1528- WildcardFilter deprecated, replaced by WildcardFileFilter 1529 - old class only accepted files, thus had a confusing dual purpose 1530 1531- FileSystemUtils.freeSpace deprecated, replaced by freeSpaceKb 1532 - freeSpace returns a result that varies by operating system and 1533 thus isn't that useful 1534 - freeSpaceKb returns much better and more consistent results 1535 - freeSpaceKb existed in v1.2, so this is a gentle cutover 1536 1537Bug fixes from 1.2 1538------------------ 1539- LineIterator now implements Iterator 1540 - It was always supposed to... 1541 1542- FileSystemUtils.freeSpace/freeSpaceKb [IO-83] 1543 - These should now work on AIX and HP-UX 1544 1545- FileSystemUtils.freeSpace/freeSpaceKb [IO-90] 1546 - Avoid infinite looping in Windows 1547 - Catch more errors with nice messages 1548 1549- FileSystemUtils.freeSpace [IO-91] 1550 - This is now documented not to work on SunOS 5 1551 1552- FileSystemUtils [IO-93] 1553 - Fixed resource leak leading to 'Too many open files' error 1554 - Previously did not destroy Process instances (as JDK Javadoc is so poor) 1555 - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4801027 1556 1557- FileUtils.touch [IO-100] 1558 - The touch method previously gave no indication when the file could not 1559 be touched successfully (such as due to access restrictions) - it now 1560 throws an IOException if the last modified date cannot be changed 1561 1562- FileCleaner 1563 - This now handles the situation where an error occurs when deleting the file 1564 1565- IOUtils.copy [IO-84] 1566 - Copy methods could return inaccurate byte/char count for large streams 1567 - The copy(InputStream, OutputStream) method now returns -1 if the count is greater than an int 1568 - The copy(Reader, Writer) method now throws now returns -1 if the count is greater than an int 1569 - Added a new copyLarge(InputStream, OutputStream) method that returns a long 1570 - Added a new copyLarge(Reader, Writer) method that returns a long 1571 1572- CountingInputStream/CountingOutputStream [IO-84] 1573 - Methods were declared as int thus the count was inaccurate for large streams 1574 - new long based methods getByteCount()/resetByteCount() added 1575 - existing methods changed to throw an exception if the count is greater than an int 1576 1577- FileBasedTestCase 1578 - Fixed bug in compare content methods identified by GNU classpath 1579 1580- EndianUtils.writeSwappedLong(byte[], int) [IO-101] 1581 - An int overrun in the bit shifting when it should have been a long 1582 1583- EndianUtils.writeSwappedLong(InputStream) [IO-102] 1584 - The return of input.read(byte[]) was not being checked to ensure all 8 bytes were read 1585 1586Enhancements from 1.2 1587--------------------- 1588- DirectoryWalker [IO-86] 1589 - New class designed for subclassing to walk through a set of files. 1590 DirectoryWalker provides the walk of the directories, filtering of 1591 directories and files, and cancellation support. The subclass must provide 1592 the specific behavior, such as text searching or image processing. 1593 1594- IOCase 1595 - New class/enumeration for case-sensitivity control 1596 1597- FilenameUtils 1598 - New methods to handle case-sensitivity 1599 - wildcardMatch - new method that has IOCase as a parameter 1600 - equals - new method that has IOCase as a parameter 1601 1602- FileUtils [IO-108] - new default encoding methods for: 1603 - readFileToString(File) 1604 - readLines(File) 1605 - lineIterator(File) 1606 - writeStringToFile(File, String) 1607 - writeLines(File, Collection) 1608 - writeLines(File, Collection, String) 1609 1610- FileUtils.openOutputStream [IO-107] 1611 - new method to open a FileOutputStream, creating parent directories if required 1612- FileUtils.touch 1613- FileUtils.copyURLToFile 1614- FileUtils.writeStringToFile 1615- FileUtils.writeByteArrayToFile 1616- FileUtils.writeLines 1617 - enhanced to create parent directories if required 1618- FileUtils.openInputStream [IO-107] 1619 - new method to open a FileInputStream, providing better error messages than the JDK 1620 1621- FileUtils.isFileOlder 1622 - new methods to check if a file is older (i.e. isFileOlder()) - counterparts 1623 to the existing isFileNewer() methods. 1624 1625- FileUtils.checksum, FileUtils.checksumCRC32 1626 - new methods to create a checksum of a file 1627 1628- FileUtils.copyFileToDirectory [IO-104] 1629 - new variant that optionally retains the file date 1630 1631- FileDeleteStrategy 1632- FileCleaner [IO-56,IO-70] 1633 - FileDeleteStrategy is a strategy for handling file deletion 1634 - This can be used as a callback in FileCleaner 1635 - Together these allow FileCleaner to do a forceDelete to kill directories 1636 1637- FileCleaner.exitWhenFinished [IO-99] 1638 - A new method that allows the internal cleaner thread to be cleanly terminated 1639 1640- WildcardFileFilter 1641 - Replacement for WildcardFilter 1642 - Accepts both files and directories 1643 - Ability to control case-sensitivity 1644 1645- NameFileFilter 1646 - Ability to control case-sensitivity 1647 1648- FileFileFilter 1649 - New IOFileFilter implementation 1650 - Accepts files where File.isFile() is true 1651 - In other words it filters out directories 1652 - Singleton instance provided (FILE) 1653 1654- CanReadFileFilter 1655 - New IOFileFilter implementation 1656 - Accepts files where File.canRead() is true 1657 - Singleton instances provided (CAN_READ/CANNOT_READ/READ_ONLY) 1658 1659- CanWriteFileFilter 1660 - New IOFileFilter implementation 1661 - Accepts files where File.canWrite() is true 1662 - Singleton instances provided (CAN_WRITE/CANNOT_WRITE) 1663 1664- HiddenFileFilter 1665 - New IOFileFilter implementation 1666 - Accepts files where File.isHidden() is true 1667 - Singleton instances provided (HIDDEN/VISIBLE) 1668 1669- EmptyFileFilter 1670 - New IOFileFilter implementation 1671 - Accepts files or directories that are empty 1672 - Singleton instances provided (EMPTY/NOT_EMPTY) 1673 1674- TrueFileFilter/FalseFileFilter/DirectoryFileFilter 1675 - New singleton instance constants (TRUE/FALSE/DIRECTORY) 1676 - The new constants are more Java 5 friendly with regards to static imports 1677 (whereas if everything uses INSTANCE, then they just clash) 1678 - The old INSTANCE constants are still present and have not been deprecated 1679 1680- FileFilterUtils.sizeRangeFileFilter 1681 - new sizeRangeFileFilter(long minimumSize, long maximumSize) method which 1682 creates a filter that accepts files within the specified size range. 1683 1684- FileFilterUtils.makeDirectoryOnly/makeFileOnly 1685 - two new methods that decorate a file filter to make it apply to 1686 directories only or files only 1687 1688- NullWriter 1689 - New writer that acts as a sink for all data, as per /dev/null 1690 1691- NullInputStream 1692 - New input stream that emulates a stream of a specified size 1693 1694- NullReader 1695 - New reader that emulates a reader of a specified size 1696 1697- ByteArrayOutputStream [IO-97] 1698 - Performance enhancements 1699 1700============================================================================== 1701 1702Apache Commons IO Version 1.2 1703 1704Compatibility with 1.1 1705---------------------- 1706Binary compatible - Yes 1707 1708Source compatible - Yes 1709 1710Semantic compatible - Yes 1711 1712Deprecations from 1.1 1713--------------------- 1714 1715Bug fixes from 1.1 1716------------------ 1717- FileSystemUtils.freeSpace(drive) 1718 Fix to allow Windows based command to function in French locale 1719 1720- FileUtils.read* 1721 Increase certainty that files are closed in case of error 1722 1723- LockableFileWriter 1724 Locking mechanism was broken and only provided limited protection [38942] 1725 File deletion and locking in case of constructor error was broken 1726 1727Enhancements from 1.1 1728--------------------- 1729- AgeFileFilter/SizeFileFilter 1730 New file filters that compares against the age and size of the file 1731 1732- FileSystemUtils.freeSpaceKb(drive) 1733 New method that unifies result to be in kilobytes [38574] 1734 1735- FileUtils.contentEquals(File,File) 1736 Performance improved by adding length and file location checking 1737 1738- FileUtils.iterateFiles 1739 Two new method to provide direct access to iterators over files 1740 1741- FileUtils.lineIterator 1742 IOUtils.lineIterator 1743 New methods to provide an iterator over the lines in a file [38083] 1744 1745- FileUtils.copyDirectoryToDirectory 1746 New method to copy a directory to within another directory [36315] 1747 1748============================================================================== 1749 1750Apache Commons IO Version 1.1 1751 1752Incompatible changes from 1.0 1753----------------------------- 1754Binary compatible - Yes 1755 1756Source compatible - Yes 1757 1758Semantic compatible - Yes, except: 1759- FileUtils.writeStringToFile() 1760 A null encoding previously used 'ISO-8859-1', now it uses the platform default 1761 Generally this will make no difference 1762 1763- LockableFileWriter 1764 Improved validation and now create directories if necessary 1765 1766plus these bug fixes may affect you semantically: 1767- FileUtils.touch() (Bug fix 29821) 1768 Now creates the file if it did not previously exist 1769 1770- FileUtils.toFile(URL) (Bug fix 32575) 1771 Now handles escape syntax such as %20 1772 1773- FileUtils.sizeOfDirectory() (Bug fix 36801) 1774 May now return a size of 0 if the directory is security restricted 1775 1776Deprecations from 1.0 1777--------------------- 1778- CopyUtils has been deprecated. 1779 Its methods have been moved to IOUtils. 1780 The new IOUtils methods handle nulls better, and have clearer names. 1781 1782- IOUtils.toByteArray(String) - Use {@link String#getBytes()} 1783- IOUtils.toString(byte[]) - Use {@link String#String(byte[])} 1784- IOUtils.toString(byte[],String) - Use {@link String#String(byte[],String)} 1785 1786Bug fixes from 1.0 1787------------------ 1788- FileUtils - touch() [29821] 1789 Now creates the file if it did not previously exist 1790 1791- FileUtils - toFile(URL) [32575] 1792 Now handles escape syntax such as %20 1793 1794- FileFilterUtils - makeCVSAware(IOFileFilter) [33023] 1795 Fixed bug that caused method to be completely broken 1796 1797- CountingInputStream [33336] 1798 Fixed bug that caused the count to reduce by one at the end of the stream 1799 1800- CountingInputStream - skip(long) [34311] 1801 Bytes from calls to this method were not previously counted 1802 1803- NullOutputStream [33481] 1804 Remove unnecessary synchronization 1805 1806- AbstractFileFilter - accept(File, String) [30992] 1807 Fixed broken implementation 1808 1809- FileUtils [36801] 1810 Previously threw NPE when listing files in a security restricted directory 1811 Now throw IOException with a better message 1812 1813- FileUtils - writeStringToFile() 1814 Null encoding now correctly uses the platform default 1815 1816Enhancements from 1.0 1817--------------------- 1818- FilenameUtils - new class [33303,29351] 1819 A static utility class for working with filenames 1820 Seeks to ease the pain of developing on Windows and deploying on Unix 1821 1822- FileSystemUtils - new class [32982,36325] 1823 A static utility class for working with file systems 1824 Provides one method at present, to get the free space on the filing system 1825 1826- IOUtils - new public constants 1827 Constants for directory and line separators on Windows and Unix 1828 1829- IOUtils - toByteArray(Reader,encoding) 1830 Handles encodings when reading to a byte array 1831 1832- IOUtils - toCharArray(InputStream) [28979] 1833 - toCharArray(InputStream,encoding) 1834 - toCharArray(Reader) 1835 Reads a stream/reader into a character array 1836 1837- IOUtils - readLines(InputStream) [36214] 1838 - readLines(InputStream,encoding) 1839 - readLines(Reader) 1840 Reads a stream/reader line by line into a List of Strings 1841 1842- IOUtils - toInputStream(String) [32958] 1843 - toInputStream(String,encoding) 1844 Creates an input stream that uses the string as a source of data 1845 1846- IOUtils - writeLines(Collection,lineEnding,OutputStream) [36214] 1847 - writeLines(Collection,lineEnding,OutputStream,encoding) 1848 - writeLines(Collection,lineEnding,Writer) 1849 Writes a collection to a stream/writer line by line 1850 1851- IOUtils - write(...) 1852 Write data to a stream/writer (moved from CopyUtils with better null handling) 1853 1854- IOUtils - copy(...) 1855 Copy data between streams (moved from CopyUtils with better null handling) 1856 1857- IOUtils - contentEquals(Reader,Reader) 1858 Method to compare the contents of two readers 1859 1860- FileUtils - toFiles(URL[]) 1861 Converts an array of URLs to an array of Files 1862 1863- FileUtils - copyDirectory() [32944] 1864 New methods to copy a directory 1865 1866- FileUtils - readFileToByteArray(File) 1867 Reads an entire file into a byte array 1868 1869- FileUtils - writeByteArrayToFile(File,byte[]) 1870 Writes a byte array to a file 1871 1872- FileUtils - readLines(File,encoding) [36214] 1873 Reads a file line by line into a List of Strings 1874 1875- FileUtils - writeLines(File,encoding,List) 1876 writeLines(File,encoding,List,lineEnding) 1877 Writes a collection to a file line by line 1878 1879- FileUtils - EMPTY_FILE_ARRAY 1880 Constant for an empty array of File objects 1881 1882- ConditionalFileFilter - new interface [30705] 1883 Defines the behavior of list based filters 1884 1885- AndFileFilter, OrFileFilter [30705] 1886 Now support a list of filters to and/or 1887 1888- WildcardFilter [31115] 1889 New filter that can match using wildcard file names 1890 1891- FileFilterUtils - makeSVNAware(IOFileFilter) 1892 New method, like makeCVSAware, that ignores Subversion source control directories 1893 1894- ClassLoaderObjectInputStream 1895 An ObjectInputStream that supports a ClassLoader 1896 1897- CountingInputStream,CountingOutputStream - resetCount() [28976] 1898 Adds the ability to reset the count part way through reading/writing the stream 1899 1900- DeferredFileOutputStream - writeTo(OutputStream) [34173] 1901 New method to allow current contents to be written to a stream 1902 1903- DeferredFileOutputStream [34142] 1904 Performance optimizations avoiding double buffering 1905 1906- LockableFileWriter - encoding support [36825] 1907 Add support for character encodings to LockableFileWriter 1908 Improve the validation 1909 Create directories if necessary 1910 1911- IOUtils and EndianUtils are no longer final [28978] 1912 Allows developers to have subclasses if desired 1913 1914============================================================================== 1915Feedback 1916============================================================================== 1917 1918Open source works best when you give feedback: 1919https://commons.apache.org/io/ 1920 1921Please direct all bug reports to JIRA 1922https://issues.apache.org/jira/browse/IO 1923 1924Or subscribe to the commons-user mailing list (prefix emails by [io]) 1925https://commons.apache.org/mail-lists.html 1926 1927The Commons-IO Team 1928