RELEASE-NOTES.txt 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110
  1. Apache Commons IO
  2. Version 2.6
  3. Release Notes
  4. INTRODUCTION:
  5. Apache Commons IO is a package of Java utility classes like java.io.
  6. Classes in this package are considered to be so standard and of such high
  7. reuse as to justify existence in java.io.
  8. The Apache Commons IO library contains utility classes, stream implementations,
  9. file filters, file comparators, endian transformation classes, and much more.
  10. Apache Commons IO 2.6 requires at least Java 7 to build and run.
  11. DEPRECATIONS
  12. ============
  13. All closeQuietly overloads in org.apache.commons.io.IOUtils have been
  14. deprecated. Use the try-with-resources statement or handle suppressed
  15. exceptions manually.
  16. The class org.apache.commons.io.FileSystemUtils has been deprecated.
  17. Use equivalent methods in java.nio.file.FileStore instead, e.g.
  18. Files.getFileStore(Paths.get("/home")).getUsableSpace() or iterate over
  19. FileSystems.getDefault().getFileStores().
  20. COMPATIBILITY WITH JAVA 9
  21. ==================
  22. The MANIFEST.MF now contains an additional entry:
  23. Automatic-Module-Name: org.apache.commons.io
  24. This should make it possible to use Commons IO 2.6 as a module in the Java 9
  25. module system. For more information see the corresponding issue:
  26. https://issues.apache.org/jira/browse/IO-551
  27. Building Commons IO 2.6 should work out of the box with the latest Java 9
  28. release. Please report any Java 9 related issues at:
  29. https://issues.apache.org/jira/browse/IO
  30. NEW FEATURES
  31. ============
  32. o IO-551: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility.
  33. o IO-367: Add convenience methods for copyToDirectory. Thanks to James Sawle.
  34. o IO-493: Add infinite circular input stream. Thanks to Piotr Turski.
  35. o IO-507: Add a ByteOrderUtils class.
  36. o IO-518: Add ObservableInputStream.
  37. o IO-519: Add MessageDigestCalculatingInputStream.
  38. o IO-513: Add convenience methods for reading class path resources.
  39. Thanks to Behrang Saeedzadeh.
  40. FIXED BUGS
  41. ==========
  42. o IO-546: ClosedOutputStream#flush should throw. Thanks to Tomas Celaya.
  43. o IO-550: Documentation issue, fix 404 Javadoc issues in the description page.
  44. Thanks to Jimi Adrian.
  45. o IO-442: Javadoc contradictory for FileFilterUtils.ageFileFilter(cutoff) and
  46. the filter it constructs: AgeFileFilter(cutoff).
  47. Thanks to Simon Robinson.
  48. o IO-534: FileUtilTestCase.testForceDeleteDir() should not delete testDirectory
  49. parent.
  50. o IO-528: Fix Tailer.run race condition runaway logging. Thanks to Dave Moten.
  51. o IO-483: getPrefixLength return -1 if unix file contains colon.
  52. Thanks to Marko Vasic.
  53. o IO-520: FileUtilsTestCase#testContentEqualsIgnoreEOL fails on Windows.
  54. o IO-516: .gitattributes not correctly applied. Thanks to Jason Pyeron.
  55. o IO-515: Allow Specifying Initial Buffer Size of DeferredFileOutputStream.
  56. Thanks to Brett Lounsbury, Gary Gregory.
  57. o IO-512: ThresholdingOutputStream.thresholdReached() results in
  58. FileNotFoundException. Thanks to Ralf Hauser.
  59. o IO-511: After a few unit tests, a few newly created directories not cleaned
  60. completely. Thanks to Ahmet Celik.
  61. o IO-502: Exceptions are suppressed incorrectly when copying files.
  62. Thanks to Christian Schulte.
  63. o IO-503: Update platform requirement to Java 7.
  64. o IO-537: BOMInputStream shouldn't sort array of BOMs in-place.
  65. Thanks to Borys Zibrov.
  66. CHANGES
  67. =======
  68. o IO-553: Make code style of hasBOM() consistent with getBOMCharsetName().
  69. Thanks to Michael Ernst.
  70. o IO-542: FileUtils#readFileToByteArray: optimize reading of files with known
  71. size. Thanks to Ilmars Poikans.
  72. o IO-547: Throw a IllegalArgumentException instead of NullPointerException in
  73. FileSystemUtils.freeSpaceWindows(). Thanks to Nikhil Shinde,
  74. Michael Ernst, Gary Greory.
  75. o IO-506: Deprecate methods FileSystemUtils.freeSpaceKb().
  76. Thanks to Christian Schulte.
  77. o IO-505: Make LineIterator implement Closeable to support try-with-resources
  78. statements. Thanks to Christian Schulte.
  79. o IO-504: Deprecated of all IOUtils.closeQuietly() methods and use
  80. try-with-resources internally. Thanks to Christian Schulte.
  81. REMOVED
  82. =======
  83. o IO-514: Remove org.apache.commons.io.Java7Support.
  84. COMPATIBILITY WITH OLDER VERSIONS
  85. =================================
  86. Compatibility with 2.5:
  87. Binary compatible: Yes.
  88. Source compatible: Yes.
  89. Semantic compatible: Yes.
  90. Compatibility with 2.6 and 1.4:
  91. Binary compatible: Yes.
  92. Source compatible: No, see the rare case in
  93. https://issues.apache.org/jira/browse/IO-318.
  94. Semantic compatible: No, see the rare case in
  95. https://issues.apache.org/jira/browse/IO-318.
  96. Commons IO 2.6 requires JDK 1.7 or later.
  97. Commons IO 2.5 requires JDK 1.6 or later.
  98. Commons IO 2.4 requires JDK 1.6 or later.
  99. Commons IO 2.3 requires JDK 1.6 or later.
  100. Commons IO 2.2 requires JDK 1.5 or later.
  101. Commons IO 1.4 requires JDK 1.3 or later.
  102. ==============================================================================
  103. Apache Commons IO Version 2.5
  104. ==============================================================================
  105. New features and bug fixes.
  106. Changes in this version include:
  107. New features:
  108. o IO-487: Add ValidatingObjectInputStream for controlled deserialization
  109. o IO-471: Support for additional encodings in ReversedLinesFileReader Thanks to Leandro Reis.
  110. o IO-425: Setter method for threshold on ThresholdingOutputStream Thanks to Craig Swank.
  111. o IO-406: Introduce new class AppendableOutputStream Thanks to Niall Pemberton.
  112. o IO-459: Add WindowsLineEndingInputStream and UnixLineEndingInputStream. Thanks to Kristian Rosenvold.
  113. o IO-457: Add a BoundedReader, a wrapper that can be used to constrain access
  114. to an underlying stream when used with mark/reset -
  115. to avoid overflowing the mark limit of the underlying buffer. Thanks to Kristian Rosenvold.
  116. o IO-426: Add API IOUtils.closeQuietly(Closeable...)
  117. o IO-410: Readfully() That Returns A Byte Array Thanks to Beluga Behr.
  118. o IO-395: Overload IOUtils buffer methods to accept buffer size Thanks to Beluga Behr.
  119. o IO-382: Chunked IO for large arrays.
  120. Added writeChunked(byte[], OutputStream) and writeChunked(char[] Writer)
  121. Added ChunkedOutputStream, ChunkedWriter
  122. o IO-233: Add Methods for Buffering Streams/Writers To IOUtils
  123. Added overloaded buffer() methods - see also IO-330
  124. o IO-330: IOUtils#toBufferedOutputStream/toBufferedWriter to conditionally wrap the output
  125. Added overloaded buffer() methods - see also IO-233
  126. o IO-381: Add FileUtils.copyInputStreamToFile API with option to leave the source open.
  127. See copyInputStreamToFile(final InputStream source, final File destination, boolean closeSource)
  128. o IO-379: CharSequenceInputStream - add tests for available()
  129. Fix code so it really does reflect a minimum available.
  130. o IO-346: Add ByteArrayOutputStream.toInputStream()
  131. o IO-341: A constant for holding the BOM character (U+FEFF)
  132. o IO-361: Add API FileUtils.forceMkdirsParent().
  133. o IO-360: Add API Charsets.requiredCharsets().
  134. o IO-359: Add IOUtils.skip and skipFully(ReadableByteChannel, long). Thanks to yukoba.
  135. o IO-358: Add IOUtils.read and readFully(ReadableByteChannel, ByteBuffer buffer). Thanks to yukoba.
  136. o IO-353: Add API IOUtils.copy(InputStream, OutputStream, int) Thanks to ggregory.
  137. o IO-349: Add API with array offset and length argument to FileUtils.writeByteArrayToFile. Thanks to scop.
  138. o IO-348: Missing information in IllegalArgumentException thrown by org.apache.commons.io.FileUtils#validateListFilesParameters. Thanks to plcstpierre.
  139. o IO-345: Supply a hook method allowing Tailer actively determining stop condition. Thanks to mkresse.
  140. o IO-437: Make IOUtils.EOF public and reuse it in various classes.
  141. Fixed Bugs:
  142. o IO-446: adds an endOfFileReached method to the TailerListener Thanks to Jeffrey Barrus.
  143. o IO-484: FilenameUtils should handle embedded null bytes Thanks to Philippe Arteau.
  144. o IO-481: Changed/Corrected algorithm for waitFor
  145. o IO-428: BOMInputStream.skip returns wrong count if stream contains no BOM Thanks to Stefan Gmeiner.
  146. o IO-488: FileUtils.waitFor(...) swallows thread interrupted status Thanks to Björn Buchner.
  147. o IO-452: Support for symlinks with missing target. Added support for JDK7 symlink features when present Thanks to David Standish.
  148. o IO-453: Regression in FileUtils.readFileToString from 2.0.1 Thanks to Steven Christou.
  149. o IO-451: ant test fails - resources missing from test classpath Thanks to David Standish.
  150. o IO-435: Document that FileUtils.deleteDirectory, directoryContains and cleanDirectory
  151. may throw an IllegalArgumentException in case the passed directory does not
  152. exist or is not a directory. Thanks to Dominik Stadler.
  153. o IO-424: Javadoc fixes, mostly to appease 1.8.0 Thanks to Ville Skyttä.
  154. o IO-389: FileUtils.sizeOfDirectory can throw IllegalArgumentException Thanks to Austin Doupnik.
  155. o IO-390: FileUtils.sizeOfDirectoryAsBigInteger can overflow.
  156. Ensure that recursive calls all use BigInteger
  157. o IO-385: FileUtils.doCopyFile can potentially loop for ever
  158. Exit loop if no data to copy
  159. o IO-383: FileUtils.doCopyFile caches the file size; needs to be documented
  160. Added Javadoc; show file lengths in exception message
  161. o IO-380: FileUtils.copyInputStreamToFile should document it closes the input source Thanks to claudio_ch.
  162. o IO-279: Tailer erroneously considers file as new.
  163. Fix to use file.lastModified() rather than System.currentTimeMillis()
  164. o IO-356: CharSequenceInputStream#reset() behaves incorrectly in case when buffer size is not dividable by data size.
  165. Fix code so skip relates to the encoded bytes; reset now re-encodes the data up to the point of the mark
  166. o IO-368: ClassLoaderObjectInputStream does not handle primitive typed members
  167. o IO-314: Deprecate all methods that use the default encoding
  168. o IO-338: When a file is rotated, finish reading previous file prior to starting new one
  169. o IO-354: Commons IO Tailer does not respect UTF-8 Charset.
  170. o IO-323: What should happen in FileUtils.sizeOf[Directory] when an overflow takes place?
  171. Added Javadoc.
  172. o IO-372: FileUtils.moveDirectory can produce misleading error message on failiure
  173. o IO-362: IOUtils.contentEquals* methods returns false if input1 == input2, should return true. Thanks to mmadson, ggregory.
  174. o IO-357: [Tailer] InterruptedException while the thread is sleeping is silently ignored Thanks to mortenh.
  175. o IO-352: Spelling fixes. Thanks to scop.
  176. o IO-436: Improper JavaDoc comment for FilenameUtils.indexOfExtension. Thanks to christoph.schneegans.
  177. Changes:
  178. o IO-433: Converted all testcases to JUnit 4
  179. o IO-466: Added testcase to show this was fixed with IO-423
  180. o IO-479: Correct exception message in FileUtils.getFile(File, String...) Thanks to Zhouce Chen.
  181. o IO-465: Update to JUnit 4.12 Thanks to based2.
  182. o IO-462: IOExceptionWithCause no longer needed
  183. o IO-422: Deprecate Charsets Charset constants in favor of Java 7's java.nio.charset.StandardCharsets
  184. o IO-239: Convert IOCase to a Java 1.5+ Enumeration
  185. [N.B. this is binary compatible]
  186. o IO-328: getPrefixLength returns null if filename has leading slashes
  187. Javadoc: add examples to show correct behaviour; add unit tests
  188. o IO-299: FileUtils.listFilesAndDirs includes original dir in results even when it doesn't match filter
  189. Javadoc: clarify that original dir is included in the results
  190. o IO-375: FilenameUtils.splitOnTokens(String text) check for '**' could be simplified
  191. o IO-374: WildcardFileFilter ctors should not use null to mean IOCase.SENSITIVE when delegating to other ctors
  192. Compatibility with 2.4:
  193. Binary compatible: Yes.
  194. Source compatible: Yes.
  195. Semantic compatible: Yes.
  196. Compatibility with 2.2 and 1.4:
  197. Binary compatible: Yes.
  198. Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
  199. Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
  200. Commons IO 2.5 requires JDK 1.6 or later.
  201. Commons IO 2.4 requires JDK 1.6 or later.
  202. Commons IO 2.3 requires JDK 1.6 or later.
  203. Commons IO 2.2 requires JDK 1.5 or later.
  204. Commons IO 1.4 requires JDK 1.3 or later.
  205. ==============================================================================
  206. Apache Commons IO Version 2.4
  207. ==============================================================================
  208. Changes in this version include:
  209. New features:
  210. o IO-269: Tailer locks file from deletion/rename on Windows. Thanks to
  211. sebb.
  212. o IO-333: Export OSGi packages at version 1.x in addition to 2.x. Thanks
  213. to fmeschbe.
  214. o IO-320: Add XmlStreamReader support for UTF-32. Thanks to ggregory.
  215. o IO-331: BOMInputStream wrongly detects UTF-32LE_BOM files as
  216. UTF-16LE_BOM files in method getBOM(). Thanks to ggregory.
  217. o IO-327: Add byteCountToDisplaySize(BigInteger). Thanks to ggregory.
  218. o IO-326: Add new FileUtils.sizeOf[Directory] APIs to return BigInteger.
  219. Thanks to ggregory.
  220. o IO-325: Add IOUtils.toByteArray methods to work with URL and URI. Thanks
  221. to raviprak.
  222. o IO-324: Add missing Charset sister APIs to method that take a String
  223. charset name. Thanks to raviprak.
  224. Fixed Bugs:
  225. o IO-336: Yottabyte (YB) incorrectly defined in FileUtils. Thanks to
  226. rleavelle.
  227. o IO-279: Tailer erroneously considers file as new. Thanks to Sergio
  228. Bossa, Chris Baron.
  229. o IO-335: Tailer#readLines - incorrect CR handling.
  230. o IO-334: FileUtils.toURLs throws NPE for null parameter; document the
  231. behavior.
  232. o IO-332: Improve tailer's reading performance. Thanks to liangly.
  233. o IO-279: Improve Tailer performance with buffered reads (see IO-332).
  234. o IO-329: FileUtils.writeLines uses unbuffered IO. Thanks to tivv.
  235. o IO-319: FileUtils.sizeOfDirectory follows symbolic links. Thanks to
  236. raviprak.
  237. Compatibility with 2.3:
  238. Binary compatible: Yes.
  239. Source compatible: Yes.
  240. Semantic compatible: Yes.
  241. Compatibility with 2.2 and 1.4:
  242. Binary compatible: Yes.
  243. Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
  244. Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
  245. Commons IO 2.4 requires JDK 1.6 or later.
  246. Commons IO 2.3 requires JDK 1.6 or later.
  247. Commons IO 2.2 requires JDK 1.5 or later.
  248. Commons IO 1.4 requires JDK 1.3 or later.
  249. ==============================================================================
  250. Apache Commons IO Version 2.3
  251. ==============================================================================
  252. Changes in this version include:
  253. New features:
  254. o IO-322: Add and use class Charsets. Thanks to ggregory.
  255. o IO-321: ByteOrderMark UTF_32LE is incorrect. Thanks to ggregory.
  256. o IO-318: Add Charset sister APIs to method that take a String charset name. Thanks to ggregory.
  257. Compatibility with 2.2 and 1.4:
  258. Binary compatible: Yes.
  259. Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
  260. Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318.
  261. Commons IO 2.3 requires JDK 1.6 or later.
  262. Commons IO 2.2 requires JDK 1.5 or later.
  263. Commons IO 1.4 requires JDK 1.3 or later.
  264. ==============================================================================
  265. Apache Commons IO Version 2.2
  266. ==============================================================================
  267. Changes in this version include:
  268. New features:
  269. o Add IOUTils.toBufferedReader(Reader) Issue: IO-313. Thanks to ggregory.
  270. o Allow applications to provide buffer (or size) for copyLarge methods. Issue: IO-308. Thanks to Manoj Mokashi.
  271. o New copyLarge() method in IOUtils that takes additional offset, length arguments Issue: IO-305. Thanks to Manoj Mokashi.
  272. o Use terabyte (TB), petabyte (PB) and exabyte (EB) in FileUtils.byteCountToDisplaySize(long size) Issue: IO-287. Thanks to Ron Kuris, Gary Gregory.
  273. o FileUtils.listFiles() doesn't return directories Issue: IO-173. Thanks to Marcos Vinícius da Silva.
  274. o CharSequenceInputStream to efficiently stream content of a CharSequence Issue: IO-297. Thanks to Oleg Kalnichevski.
  275. o The second constructor of Tailer class does not pass 'delay' to the third one Issue: IO-304. Thanks to liangly.
  276. o TeeOutputStream does not call branch.close() when main.close() throws an exception Issue: IO-303. Thanks to fabian.barney.
  277. o ArrayIndexOutOfBoundsException in BOMInputStream when reading a file without BOM multiple times Issue: IO-302. Thanks to jsteuerwald, detinho.
  278. o Add IOUtils.closeQuietly(Selector) necessary Issue: IO-301. Thanks to kaykay.unique.
  279. o IOUtils.closeQuietly() should take a ServerSocket as a parameter Issue: IO-292. Thanks to sebb.
  280. o Add read/readFully methods to IOUtils Issue: IO-290. Thanks to sebb.
  281. o Supply a ReversedLinesFileReader Issue: IO-288. Thanks to Georg Henzler.
  282. o Add new function FileUtils.directoryContains. Issue: IO-291. Thanks to ggregory.
  283. o FileUtils.contentEquals and IOUtils.contentEquals - Add option to ignore "line endings"
  284. Added contentEqualsIgnoreEOL methods to both classes Issue: IO-275. Thanks to CJ Aspromgos.
  285. Fixed Bugs:
  286. o IOUtils.read(InputStream/Reader) ignores the offset parameter Issue: IO-311. Thanks to Robert Muir.
  287. o CharSequenceInputStream(CharSequence s, Charset charset, int bufferSize) ignores bufferSize Issue: IO-312.
  288. o FileUtils.moveDirectoryToDirectory removes source directory if destination is a subdirectory Issue: IO-300.
  289. o ReaderInputStream#read(byte[] b, int off, int len) should check for valid parameters Issue: IO-307.
  290. o ReaderInputStream#read(byte[] b, int off, int len) should always return 0 for length == 0 Issue: IO-306.
  291. o "FileUtils#deleteDirectoryOnExit(File)" does not work Issue: IO-276. Thanks to nkami.
  292. o BoundedInputStream.read() treats max differently from BoundedInputStream.read(byte[]...) Issue: IO-273. Thanks to sebb.
  293. o Various methods of class 'org.apache.commons.io.FileUtils' incorrectly suppress 'java.io.IOException' Issue: IO-298. Thanks to Christian Schulte.
  294. Changes:
  295. o ReaderInputStream optimization: more efficient reading of small chunks of data Issue: IO-296. Thanks to Oleg Kalnichevski.
  296. Compatibility with 2.1 and 1.4:
  297. Binary compatible: Yes
  298. Source compatible: Yes
  299. Semantic compatible: Yes. Check the bug fixes section for semantic bug fixes
  300. Commons IO 2.2 requires a minimum of JDK 1.5.
  301. Commons IO 1.4 requires a minimum of JDK 1.3.
  302. ==============================================================================
  303. Apache Commons IO Version 2.1
  304. ==============================================================================
  305. New features:
  306. o Use standard Maven directory layout Issue: IO-285. Thanks to ggregory.
  307. o Add IOUtils API toString for URL and URI to get contents Issue: IO-284. Thanks to ggregory.
  308. o Add API FileUtils.copyFile(File input, OutputStream output) Issue: IO-282. Thanks to ggregory.
  309. o FileAlterationObserver has no getter for FileFilter Issue: IO-262.
  310. o Add FileUtils.getFile API with varargs parameter Issue: IO-261.
  311. o Add new APPEND parameter for writing string into files Issue: IO-182.
  312. o Add new read method "toByteArray" to handle InputStream with known size. Issue: IO-251. Thanks to Marco Albini.
  313. Fixed Bugs:
  314. o Dubious use of mkdirs() return code Issue: IO-280. Thanks to sebb.
  315. o ReaderInputStream enters infinite loop when it encounters an unmappable character Issue: IO-277.
  316. o FileUtils.moveFile() JavaDoc should specify FileExistsException thrown Issue: IO-264.
  317. o ClassLoaderObjectInputStream does not handle Proxy classes Issue: IO-260.
  318. o Tailer returning partial lines when reaching EOF before EOL Issue: IO-274. Thanks to Frank Grimes.
  319. o FileUtils.copyFile() throws IOException when copying large files to a shared directory (on Windows) Issue: IO-266. Thanks to Igor Smereka.
  320. o FileSystemUtils.freeSpaceKb throws exception for Windows volumes with no visible files.
  321. Improve coverage by also looking for hidden files. Issue: IO-263. Thanks to Gil Adam.
  322. Changes:
  323. o FileAlterationMonitor.stop(boolean allowIntervalToFinish) Issue: IO-259.
  324. ==============================================================================
  325. Apache Commons IO Package 2.0.1
  326. ==============================================================================
  327. Compatibility with 2.0 and 1.4
  328. ------------------------------
  329. Binary compatible - Yes
  330. Source compatible - Yes
  331. Semantic compatible - Yes
  332. Check the bug fixes section for semantic bug fixes
  333. Commons IO 2.0.1 requires a minimum of JDK 1.5
  334. (Commons IO 1.4 had a minimum of JDK 1.3)
  335. Enhancements from 2.0
  336. ---------------------
  337. * [IO-256] - Provide thread factory for FileAlternationMonitor
  338. Bug fixes from 2.0
  339. ------------------
  340. * [IO-257] - BOMInputStream.read(byte[]) can return 0 which it should not
  341. * [IO-258] - XmlStreamReader consumes the stream during encoding detection
  342. ==============================================================================
  343. Apache Commons IO Package 2.0
  344. ==============================================================================
  345. Compatibility with 1.4
  346. ----------------------
  347. Binary compatible - Yes
  348. Source compatible - Yes
  349. Semantic compatible - Yes
  350. Check the bug fixes section for semantic bug fixes
  351. Commons IO 2.0 requires a minimum of JDK 1.5
  352. (Commons IO 1.4 had a minimum of JDK 1.3)
  353. Deprecations from 1.4
  354. ---------------------
  355. - IOUtils
  356. - write(StringBuffer, Writer) in favour of write(CharSequence, Writer)
  357. - write(StringBuffer, OutputStream) in favour of write(CharSequence, OutputStream)
  358. - write(StringBuffer, OutputStream, String) in favour of write(CharSequence, OutputStream, String)
  359. - FileFilterUtils
  360. - andFileFilter(IOFileFilter, IOFileFilter) in favour of and(IOFileFilter...)
  361. - orFileFilter(IOFileFilter, IOFileFilter) in favour of or(IOFileFilter...)
  362. Enhancements from 1.4
  363. ---------------------
  364. * [IO-140] Move minimum Java requirement from JDK 1.3 to JDK 1.5
  365. - use Generics
  366. - add new CharSequence write() flavour methods to IOUtils and FileUtils
  367. - replace StringBuffer with StringBuilder, where appropriate
  368. - add new Reader/Writer methods to ProxyReader and ProxyWriter
  369. - Annotate with @Override and @Deprecated
  370. * [IO-178] New BOMInputStream and ByteOrderMark implementations - to detect and optionally exclude an initial Byte Order mark (BOM)
  371. * [IO-197] New BoundedInputStream (copied from from Apache JackRabbit)
  372. * [IO-193] New Broken Input and Output streams
  373. * [IO-132] New File Listener/Monitor facility
  374. * [IO-158] New ReaderInputStream and WriterOutputStream implementations
  375. * [IO-139] New StringBuilder Writer implementation
  376. * [IO-192] New Tagged Input and Output streams
  377. * [IO-177] New Tailer class - simple implementation of the Unix "tail -f" functionality
  378. * [IO-162] New XML Stream Reader/Writer implementations (from ROME via plexus-utils)
  379. * [IO-142] Comparators - add facility to sort file lists/arrays
  380. * [IO-186] Comparators - new Composite and Directory File Comparator implementations
  381. * [IO-176] DirectoryWalker - add filterDirectoryContents() callback method for filtering directory contents
  382. * [IO-210] FileFilter - new Magic Number FileFilter
  383. * [IO-221] FileFilterUtils - add methods for suffix and prefix filters which take an IOCase object
  384. * [IO-232] FileFilterUtils - add method for name filters which take an IOCase object
  385. * [IO-229] FileFilterUtils - add varargs and() and or() methods
  386. * [IO-198] FileFilterUtils - add ability to apply file filters to collections and arrays
  387. * [IO-156] FilenameUtils - add normalize() and normalizeNoEndSeparator() methods which allow the separator character to be specified
  388. * [IO-194] FileSystemUtils - add freeSpaceKb() method with no input arguments
  389. * [IO-185] FileSystemUtils - add freeSpaceKb() methods that take a timeout parameter - fixes freeSpaceWindows() blocks
  390. * [IO-155] FileUtils - use NIO to copy files
  391. * [IO-168] FileUtils - add new isSymlink() method
  392. * [IO-219] FileUtils - throw FileExistsException when moving a file or directory if the destination already exists
  393. * [IO-234] FileUtils - add Methods for retrieving System User/Temp directories/paths
  394. * [IO-208] FileUtils - add timeout (connection and read) support for copyURLToFile() method
  395. * [IO-238] FileUtils - add sizeOf(File) method
  396. * [IO-181] LineIterator now implements Iterable
  397. * [IO-224] IOUtils - add closeQuietly(Closeable) and closeQuietly(Socket) methods
  398. * [IO-203] IOUtils - add skipFully() method for InputStreams
  399. * [IO-137] IOUtils and ByteArrayOutputStream - add toBufferedInputStream() method to avoid unnecessary array allocation/copy
  400. * [IO-195] Proxy streams/Reader/Writer - provide exception handling methods
  401. * [IO-211] Proxy Input/Output streams - add pre/post processing support
  402. * [IO-242] Proxy Reader/Writer - add pre/post processing support
  403. Bug fixes from 1.4
  404. ------------------
  405. * [IO-214] ByteArrayOutputStream - fix inconsistent synchronization of fields
  406. * [IO-201] Counting Input/Output streams - fix inconsistent synchronization
  407. * [IO-159] FileCleaningTracker - fix remove() never returns null
  408. * [IO-220] FileCleaningTracker - fix Vector performs badly under load
  409. * [IO-167] FilenameUtils - fix case-insensitive string handling in FilenameUtils and FilesystemUtils
  410. * [IO-179] FilenameUtils - fix StringIndexOutOfBounds exception in getPathNoEndSeparator()
  411. * [IO-248] FilenameUtils - fix getFullPathNoEndSeparator() returns empty while path is a one level directory
  412. * [IO-246] FilenameUtils - fix wildcardMatch gives incorrect results
  413. * [IO-187] FileSystemUtils - fix freeSpaceKb() doesn't work with relative paths on Linux
  414. * [IO-160] FileSystemUtils - fix freeSpace() fails on solaris
  415. * [IO-209] FileSystemUtils - fix freeSpaceKb() fails to return correct size for a windows mount point
  416. * [IO-163] FileUtils - fix toURLs() using deprecated method of conversion to URL
  417. * [IO-168] FileUtils - fix Symbolic links followed when deleting directory
  418. * [IO-231] FileUtils - fix wrong exception message generated in isFileNewer() method
  419. * [IO-207] FileUtils - fix race condition in forceMkdir() method
  420. * [IO-217] FileUtils - fix copyDirectoryToDirectory() makes infinite loops
  421. * [IO-166] FileUtils - fix URL decoding in toFile(URL)
  422. * [IO-190] FileUtils - fix copyDirectory not preserving lastmodified date on sub-directories
  423. * [IO-240] FileFilterUtils - ensure cvsFilter and svnFilter are only created once.
  424. * [IO-175] IOUtils - fix copyFile() issues with very large files
  425. * [IO-191] Improvements from static analysis
  426. * [IO-216] LockableFileWriter - delete files quietly when an exception is thrown during initialization
  427. * [IO-243] SwappedDataInputStream - fix readBoolean is inverted
  428. * [IO-235] Tests - remove unused YellOnFlushAndCloseOutputStream from CopyUtilsTest
  429. * [IO-161] Tests - fix FileCleaningTrackerTestCase hanging
  430. Documentation changes from 1.4
  431. ------------------------------
  432. * [IO-183 FilenameUtils.getExtension() method documentation improvements
  433. * [IO-226 FileUtils.byteCountToDisplaySize() documentation corrections
  434. * [IO-205 FileUtils.forceMkdir() documentation improvements
  435. * [IO-215 FileUtils copy file/directory improve documentation regarding preserving the last modified date
  436. * [IO-189 HexDump.dump() method documentation improvements
  437. * [IO-171 IOCase document that it assumes there are only two OSes: Windows and Unix
  438. * [IO-223 IOUtils.copy() documentation corrections
  439. * [IO-247 IOUtils.closeQuietly() improve documentation with examples
  440. * [IO-202 NotFileFilter documentation corrections
  441. * [IO-206 ProxyInputStream - fix misleading parameter names
  442. * [IO-212 ProxyInputStream.skip() documentation corrections
  443. ==============================================================================
  444. Apache Commons IO Version 1.4
  445. ==============================================================================
  446. Compatibility with 1.3.2
  447. ------------------------
  448. Binary compatible - Yes
  449. Source compatible - Yes
  450. Semantic compatible - Yes
  451. Check the bug fixes section for semantic bug fixes
  452. Commons IO 1.4 introduces four new implementations which depend on JDK 1.4 features
  453. (CharSequenceReader, FileWriterWithEncoding, IOExceptionWithCause and RegexFileFilter).
  454. It has been built with the JDK source and target options set to JDK 1.3 and, except for
  455. those implementations, can be used with JDK 1.3 (see IO IO-127).
  456. Deprecations from 1.3.2
  457. -----------------------
  458. - FileCleaner deprecated in favour of FileCleaningTracker [see IO-116]
  459. Bug fixes from 1.3.2
  460. --------------------
  461. - FileUtils
  462. - forceDelete of orphaned Softlinks does not work [IO-147]
  463. - Infinite loop on FileUtils.copyDirectory when the destination directory is within
  464. the source directory [IO-141]
  465. - Add a copyDirectory() method that makes use of FileFilter [IO-105]
  466. - Add moveDirectory() and moveFile() methods [IO-77]
  467. - HexDump
  468. - HexDump's use of static StringBuffers isn't thread-safe [IO-136]
  469. Enhancements from 1.3.2
  470. -----------------------
  471. - FileUtils
  472. - Add a deleteQuietly method [IO-135]
  473. - FilenameUtils
  474. - Add file name extension separator constants[IO-149]
  475. - IOExceptionWithCause [IO-148]
  476. - Add a new IOException implementation with constructors which take a cause
  477. - TeeInputStream [IO-129]
  478. - Add new Tee input stream implementation
  479. - FileWriterWithEncoding [IO-153]
  480. - Add new File Writer implementation that accepts an encoding
  481. - CharSequenceReader [IO-138]
  482. - Add new Reader implementation that handles any CharSequence (String,
  483. StringBuffer, StringBuilder or CharBuffer)
  484. - ThesholdingOuputStream [IO-121]
  485. - Add a reset() method which sets the count of the bytes written back to zero.
  486. - DeferredFileOutputStream [IO-130]
  487. - Add support for temporary files
  488. - ByteArrayOutputStream
  489. - Add a new write(InputStream) method [IO-152]
  490. - New Closed Input/Output stream implementations [IO-122]
  491. - AutoCloseInputStream - automatically closes and discards the underlying input stream
  492. - ClosedInputStream - returns -1 for any read attempts
  493. - ClosedOutputStream - throws an IOException for any write attempts
  494. - CloseShieldInputStream - prevents the underlying input stream from being closed.
  495. - CloseShieldOutputStream - prevents the underlying output stream from being closed.
  496. - Add Singleton Constants to several stream classes [IO-143]
  497. - PrefixFileFilter [IO-126]
  498. - Add faciltiy to specify case sensitivity on prefix matching
  499. - SuffixFileFilter [IO-126]
  500. - Add faciltiy to specify case sensitivity on suffix matching
  501. - RegexFileFilter [IO-74]
  502. - Add new regular expression file filter implementation
  503. - Make IOFileFilter implementations Serializable [IO-131]
  504. - Improve IOFileFilter toString() methods [IO-120]
  505. - Make fields final so classes are immutable/threadsafe [IO-133]
  506. - changes to Age, Delegate, Name, Not, Prefix, Regex, Size, Suffix and Wildcard IOFileFilter
  507. implementations.
  508. - IOCase
  509. - Add a compare method to IOCase [IO-144]
  510. - Add a package of java.util.Comparator implementations for files [IO-145]
  511. - DefaultFileComparator - compare files using the default File.compareTo(File) method.
  512. - ExtensionFileComparator - compares files using file name extensions.
  513. - LastModifiedFileComparator - compares files using the last modified date/time.
  514. - NameFileComparator - compares files using file names.
  515. - PathFileComparator - compares files using file paths.
  516. - SizeFileComparator - compares files using file sizes.
  517. ==============================================================================
  518. Apache Commons IO Version 1.3.2
  519. ==============================================================================
  520. Compatibility with 1.3.1
  521. ----------------------
  522. Binary compatible - Yes
  523. Source compatible - Yes
  524. Semantic compatible - Yes
  525. Compatibility with 1.3
  526. ----------------------
  527. Binary compatible - No
  528. See [IO-113]
  529. Source compatible - No
  530. See [IO-113]
  531. Semantic compatible - Yes
  532. Enhancements since 1.3.1
  533. ------------------------
  534. - Created the FileCleaningTracker, basically a non-static version of the
  535. FileCleaner, which can be controlled by the user. [IO-116]
  536. - The FileCleaner is deprecated.
  537. Bug fixes from 1.3.1
  538. --------------------
  539. - Some tests, which are implicitly assuming a Unix-like file system, are
  540. now skipped on Windows. [IO-115]
  541. - EndianUtils
  542. - Both readSwappedUnsignedInteger(...) methods could return negative
  543. numbers due to int/long casting. [IO-117]
  544. Bug fixes from 1.3
  545. ------------------
  546. - FileUtils
  547. - NPE in openOutputStream(File) when file has no parent in path [IO-112]
  548. - readFileToString(File) is not static [IO-113]
  549. ==============================================================================
  550. Apache Commons IO Version 1.3.1
  551. ==============================================================================
  552. Compatibility with 1.3
  553. ----------------------
  554. Binary compatible - No
  555. See [IO-113]
  556. Source compatible - No
  557. See [IO-113]
  558. Semantic compatible - Yes
  559. Bug fixes from 1.3
  560. ------------------
  561. - FileUtils
  562. - NPE in openOutputStream(File) when file has no parent in path [IO-112]
  563. - readFileToString(File) is not static [IO-113]
  564. ==============================================================================
  565. Apache Commons IO Version 1.3
  566. ==============================================================================
  567. Compatibility with 1.2
  568. ----------------------
  569. Binary compatible - Yes
  570. Source compatible - Yes
  571. Semantic compatible - Yes
  572. Check the bug fixes section for semantic bug fixes
  573. Deprecations from 1.2
  574. ---------------------
  575. - WildcardFilter deprecated, replaced by WildcardFileFilter
  576. - old class only accepted files, thus had a confusing dual purpose
  577. - FileSystemUtils.freeSpace deprecated, replaced by freeSpaceKb
  578. - freeSpace returns a result that varies by operating system and
  579. thus isn't that useful
  580. - freeSpaceKb returns much better and more consistent results
  581. - freeSpaceKb existed in v1.2, so this is a gentle cutover
  582. Bug fixes from 1.2
  583. ------------------
  584. - LineIterator now implements Iterator
  585. - It was always supposed to...
  586. - FileSystemUtils.freeSpace/freeSpaceKb [IO-83]
  587. - These should now work on AIX and HP-UX
  588. - FileSystemUtils.freeSpace/freeSpaceKb [IO-90]
  589. - Avoid infinite looping in Windows
  590. - Catch more errors with nice messages
  591. - FileSystemUtils.freeSpace [IO-91]
  592. - This is now documented not to work on SunOS 5
  593. - FileSystemUtils [IO-93]
  594. - Fixed resource leak leading to 'Too many open files' error
  595. - Previously did not destroy Process instances (as JDK Javadoc is so poor)
  596. - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4801027
  597. - FileUtils.touch [IO-100]
  598. - The touch method previously gave no indication when the file could not
  599. be touched successfully (such as due to access restrictions) - it now
  600. throws an IOException if the last modified date cannot be changed
  601. - FileCleaner
  602. - This now handles the situation where an error occurs when deleting the file
  603. - IOUtils.copy [IO-84]
  604. - Copy methods could return inaccurate byte/char count for large streams
  605. - The copy(InputStream, OutputStream) method now returns -1 if the count is greater than an int
  606. - The copy(Reader, Writer) method now throws now returns -1 if the count is greater than an int
  607. - Added a new copyLarge(InputStream, OutputStream) method that returns a long
  608. - Added a new copyLarge(Reader, Writer) method that returns a long
  609. - CountingInputStream/CountingOutputStream [IO-84]
  610. - Methods were declared as int thus the count was innacurate for large streams
  611. - new long based methods getByteCount()/resetByteCount() added
  612. - existing methods changed to throw an exception if the count is greater than an int
  613. - FileBasedTestCase
  614. - Fixed bug in compare content methods identified by GNU classpath
  615. - EndianUtils.writeSwappedLong(byte[], int) [IO-101]
  616. - An int overrun in the bit shifting when it should have been a long
  617. - EndianUtils.writeSwappedLong(InputStream) [IO-102]
  618. - The return of input.read(byte[]) was not being checked to ensure all 8 bytes were read
  619. Enhancements from 1.2
  620. ---------------------
  621. - DirectoryWalker [IO-86]
  622. - New class designed for subclassing to walk through a set of files.
  623. DirectoryWalker provides the walk of the directories, filtering of
  624. directories and files, and cancellation support. The subclass must provide
  625. the specific behaviour, such as text searching or image processing.
  626. - IOCase
  627. - New class/enumeration for case-sensitivity control
  628. - FilenameUtils
  629. - New methods to handle case-sensitivity
  630. - wildcardMatch - new method that has IOCase as a parameter
  631. - equals - new method that has IOCase as a parameter
  632. - FileUtils [IO-108] - new default encoding methods for:
  633. - readFileToString(File)
  634. - readLines(File)
  635. - lineIterator(File)
  636. - writeStringToFile(File, String)
  637. - writeLines(File, Collection)
  638. - writeLines(File, Collection, String)
  639. - FileUtils.openOutputStream [IO-107]
  640. - new method to open a FileOutputStream, creating parent directories if required
  641. - FileUtils.touch
  642. - FileUtils.copyURLToFile
  643. - FileUtils.writeStringToFile
  644. - FileUtils.writeByteArrayToFile
  645. - FileUtils.writeLines
  646. - enhanced to create parent directories if required
  647. - FileUtils.openInputStream [IO-107]
  648. - new method to open a FileInputStream, providing better error messages than the JDK
  649. - FileUtils.isFileOlder
  650. - new methods to check if a file is older (i.e. isFileOlder()) - counterparts
  651. to the existing isFileNewer() methods.
  652. - FileUtils.checksum, FileUtils.checksumCRC32
  653. - new methods to create a checksum of a file
  654. - FileUtils.copyFileToDirectory [IO-104]
  655. - new variant that optionally retains the file date
  656. - FileDeleteStrategy
  657. - FileCleaner [IO-56,IO-70]
  658. - FileDeleteStrategy is a strategy for handling file deletion
  659. - This can be used as a calback in FileCleaner
  660. - Together these allow FileCleaner to do a forceDelete to kill directories
  661. - FileCleaner.exitWhenFinished [IO-99]
  662. - A new method that allows the internal cleaner thread to be cleanly terminated
  663. - WildcardFileFilter
  664. - Replacement for WildcardFilter
  665. - Accepts both files and directories
  666. - Ability to control case-sensitivity
  667. - NameFileFilter
  668. - Ability to control case-sensitivity
  669. - FileFileFilter
  670. - New IOFileFilter implementation
  671. - Accepts files where File.isFile() is true
  672. - In other words it filters out directories
  673. - Singleton instance provided (FILE)
  674. - CanReadFileFilter
  675. - New IOFileFilter implementation
  676. - Accepts files where File.canRead() is true
  677. - Singleton instances provided (CAN_READ/CANNOT_READ/READ_ONLY)
  678. - CanWriteFileFilter
  679. - New IOFileFilter implementation
  680. - Accepts files where File.canWrite() is true
  681. - Singleton instances provided (CAN_WRITE/CANNOT_WRITE)
  682. - HiddenFileFilter
  683. - New IOFileFilter implementation
  684. - Accepts files where File.isHidden() is true
  685. - Singleton instances provided (HIDDEN/VISIBLE)
  686. - EmptyFileFilter
  687. - New IOFileFilter implementation
  688. - Accepts files or directories that are empty
  689. - Singleton instances provided (EMPTY/NOT_EMPTY)
  690. - TrueFileFilter/FalseFileFilter/DirectoryFileFilter
  691. - New singleton instance constants (TRUE/FALSE/DIRECTORY)
  692. - The new constants are more JDK 1.5 friendly with regards to static imports
  693. (whereas if everything uses INSTANCE, then they just clash)
  694. - The old INSTANCE constants are still present and have not been deprecated
  695. - FileFilterUtils.sizeRangeFileFilter
  696. - new sizeRangeFileFilter(long minimumSize, long maximumSize) method which
  697. creates a filter that accepts files within the specified size range.
  698. - FileFilterUtils.makeDirectoryOnly/makeFileOnly
  699. - two new methods that decorate a file filter to make it apply to
  700. directories only or files only
  701. - NullWriter
  702. - New writer that acts as a sink for all data, as per /dev/null
  703. - NullInputStream
  704. - New input stream that emulates a stream of a specified size
  705. - NullReader
  706. - New reader that emulates a reader of a specified size
  707. - ByteArrayOutputStream [IO-97]
  708. - Performance enhancements
  709. ==============================================================================
  710. Apache Commons IO Version 1.2
  711. ==============================================================================
  712. Compatibility with 1.1
  713. ----------------------
  714. Binary compatible - Yes
  715. Source compatible - Yes
  716. Semantic compatible - Yes
  717. Deprecations from 1.1
  718. ---------------------
  719. Bug fixes from 1.1
  720. ------------------
  721. - FileSystemUtils.freeSpace(drive)
  722. Fix to allow Windows based command to function in French locale
  723. - FileUtils.read*
  724. Increase certainty that files are closed in case of error
  725. - LockableFileWriter
  726. Locking mechanism was broken and only provided limited protection [38942]
  727. File deletion and locking in case of constructor error was broken
  728. Enhancements from 1.1
  729. ---------------------
  730. - AgeFileFilter/SizeFileFilter
  731. New file filters that compares against the age and size of the file
  732. - FileSystemUtils.freeSpaceKb(drive)
  733. New method that unifies result to be in kilobytes [38574]
  734. - FileUtils.contentEquals(File,File)
  735. Performance improved by adding length and file location checking
  736. - FileUtils.iterateFiles
  737. Two new method to provide direct access to iterators over files
  738. - FileUtils.lineIterator
  739. IOUtils.lineIterator
  740. New methods to provide an iterator over the lines in a file [38083]
  741. - FileUtils.copyDirectoryToDirectory
  742. New method to copy a directory to within another directory [36315]
  743. ==============================================================================
  744. Apache Commons IO Version 1.1
  745. ==============================================================================
  746. Incompatible changes from 1.0
  747. -----------------------------
  748. Binary compatible - Yes
  749. Source compatible - Yes
  750. Semantic compatible - Yes, except:
  751. - FileUtils.writeStringToFile()
  752. A null encoding previously used 'ISO-8859-1', now it uses the platform default
  753. Generally this will make no difference
  754. - LockableFileWriter
  755. Improved validation and now create directories if necesssary
  756. plus these bug fixes may affect you semantically:
  757. - FileUtils.touch() (Bug fix 29821)
  758. Now creates the file if it did not previously exist
  759. - FileUtils.toFile(URL) (Bug fix 32575)
  760. Now handles escape syntax such as %20
  761. - FileUtils.sizeOfDirectory() (Bug fix 36801)
  762. May now return a size of 0 if the directory is security restricted
  763. Deprecations from 1.0
  764. ---------------------
  765. - CopyUtils has been deprecated.
  766. Its methods have been moved to IOUtils.
  767. The new IOUtils methods handle nulls better, and have clearer names.
  768. - IOUtils.toByteArray(String) - Use {@link String#getBytes()}
  769. - IOUtils.toString(byte[]) - Use {@link String#String(byte[])}
  770. - IOUtils.toString(byte[],String) - Use {@link String#String(byte[],String)}
  771. Bug fixes from 1.0
  772. ------------------
  773. - FileUtils - touch() [29821]
  774. Now creates the file if it did not previously exist
  775. - FileUtils - toFile(URL) [32575]
  776. Now handles escape syntax such as %20
  777. - FileFilterUtils - makeCVSAware(IOFileFilter) [33023]
  778. Fixed bug that caused method to be completely broken
  779. - CountingInputStream [33336]
  780. Fixed bug that caused the count to reduce by one at the end of the stream
  781. - CountingInputStream - skip(long) [34311]
  782. Bytes from calls to this method were not previously counted
  783. - NullOutputStream [33481]
  784. Remove unnecessary synchronization
  785. - AbstractFileFilter - accept(File, String) [30992]
  786. Fixed broken implementation
  787. - FileUtils [36801]
  788. Previously threw NPE when listing files in a security restricted directory
  789. Now throw IOException with a better message
  790. - FileUtils - writeStringToFile()
  791. Null encoding now correctly uses the platform default
  792. Enhancements from 1.0
  793. ---------------------
  794. - FilenameUtils - new class [33303,29351]
  795. A static utility class for working with filenames
  796. Seeks to ease the pain of developing on Windows and deploying on Unix
  797. - FileSystemUtils - new class [32982,36325]
  798. A static utility class for working with file systems
  799. Provides one method at present, to get the free space on the filing system
  800. - IOUtils - new public constants
  801. Constants for directory and line separators on Windows and Unix
  802. - IOUtils - toByteArray(Reader,encoding)
  803. Handles encodings when reading to a byte array
  804. - IOUtils - toCharArray(InputStream) [28979]
  805. - toCharArray(InputStream,encoding)
  806. - toCharArray(Reader)
  807. Reads a stream/reader into a charatcter array
  808. - IOUtils - readLines(InputStream) [36214]
  809. - readLines(InputStream,encoding)
  810. - readLines(Reader)
  811. Reads a stream/reader line by line into a List of Strings
  812. - IOUtils - toInputStream(String) [32958]
  813. - toInputStream(String,encoding)
  814. Creates an input stream that uses the string as a source of data
  815. - IOUtils - writeLines(Collection,lineEnding,OutputStream) [36214]
  816. - writeLines(Collection,lineEnding,OutputStream,encoding)
  817. - writeLines(Collection,lineEnding,Writer)
  818. Writes a collection to a stream/writer line by line
  819. - IOUtils - write(...)
  820. Write data to a stream/writer (moved from CopyUtils with better null handling)
  821. - IOUtils - copy(...)
  822. Copy data between streams (moved from CopyUtils with better null handling)
  823. - IOUtils - contentEquals(Reader,Reader)
  824. Method to compare the contents of two readers
  825. - FileUtils - toFiles(URL[])
  826. Converts an array of URLs to an array of Files
  827. - FileUtils - copyDirectory() [32944]
  828. New methods to copy a directory
  829. - FileUtils - readFileToByteArray(File)
  830. Reads an entire file into a byte array
  831. - FileUtils - writeByteArrayToFile(File,byte[])
  832. Writes a byte array to a file
  833. - FileUtils - readLines(File,encoding) [36214]
  834. Reads a file line by line into a List of Strings
  835. - FileUtils - writeLines(File,encoding,List)
  836. writeLines(File,encoding,List,lineEnding)
  837. Writes a collection to a file line by line
  838. - FileUtils - EMPTY_FILE_ARRAY
  839. Constant for an empty array of File objects
  840. - ConditionalFileFilter - new interface [30705]
  841. Defines the behaviour of list based filters
  842. - AndFileFilter, OrFileFilter [30705]
  843. Now support a list of filters to and/or
  844. - WildcardFilter [31115]
  845. New filter that can match using wildcard file names
  846. - FileFilterUtils - makeSVNAware(IOFileFilter)
  847. New method, like makeCVSAware, that ignores Subversion source control directories
  848. - ClassLoaderObjectInputStream
  849. An ObjectInputStream that supports a ClassLoader
  850. - CountingInputStream,CountingOutputStream - resetCount() [28976]
  851. Adds the ability to reset the count part way through reading/writing the stream
  852. - DeferredFileOutputStream - writeTo(OutputStream) [34173]
  853. New method to allow current contents to be written to a stream
  854. - DeferredFileOutputStream [34142]
  855. Performance optimizations avoiding double buffering
  856. - LockableFileWriter - encoding support [36825]
  857. Add support for character encodings to LockableFileWriter
  858. Improve the validation
  859. Create directories if necesssary
  860. - IOUtils and EndianUtils are no longer final [28978]
  861. Allows developers to have subclasses if desired
  862. ==============================================================================
  863. Feedback
  864. ==============================================================================
  865. Open source works best when you give feedback:
  866. http://commons.apache.org/io/
  867. Please direct all bug reports to JIRA
  868. http://issues.apache.org/jira/browse/IO
  869. Or subscribe to the commons-user mailing list (prefix emails by [io])
  870. http://commons.apache.org/mail-lists.html
  871. The Commons-IO Team