11$Id$
22
33 Commons IO Package
4- Version 1.3
4+ Version 1.3.1
55 Release Notes
66
77
@@ -15,191 +15,23 @@ Commons IO contains utility classes, stream implementations, file filters,
1515and endian transformation classes.
1616
1717
18- Compatibility with 1.2
18+ Compatibility with 1.3
1919----------------------
20- Binary compatible - Yes
20+ Binary compatible - No
21+ See [IO-112]
2122
22- Source compatible - Yes
23+ Source compatible - No
24+ See [IO-112]
2325
2426Semantic compatible - Yes
25- Check the bug fixes section for semantic bug fixes
2627
2728
28- Deprecations from 1.2
29- ---------------------
30- - WildcardFilter deprecated, replaced by WildcardFileFilter
31- - old class only accepted files, thus had a confusing dual purpose
32-
33- - FileSystemUtils.freeSpace deprecated, replaced by freeSpaceKb
34- - freeSpace returns a result that varies by operating system and
35- thus isn't that useful
36- - freeSpaceKb returns much better and more consistent results
37- - freeSpaceKb existed in v1.2, so this is a gentle cutover
38-
39-
40- Bug fixes from 1.2
29+ Bug fixes from 1.3
4130------------------
42- - LineIterator now implements Iterator
43- - It was always supposed to...
44-
45- - FileSystemUtils.freeSpace/freeSpaceKb [IO-83]
46- - These should now work on AIX and HP-UX
47-
48- - FileSystemUtils.freeSpace/freeSpaceKb [IO-90]
49- - Avoid infinite looping in Windows
50- - Catch more errors with nice messages
51-
52- - FileSystemUtils.freeSpace [IO-91]
53- - This is now documented not to work on SunOS 5
54-
55- - FileSystemUtils [IO-93]
56- - Fixed resource leak leading to 'Too many open files' error
57- - Previously did not destroy Process instances (as JDK Javadoc is so poor)
58- - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4801027
59-
60- - FileUtils.touch [IO-100]
61- - The touch method previously gave no indication when the file could not
62- be touched successfully (such as due to access restrictions) - it now
63- throws an IOException if the last modified date cannot be changed
64-
65- - FileCleaner
66- - This now handles the situation where an error occurs when deleting the file
67-
68- - IOUtils.copy [IO-84]
69- - Copy methods could return inaccurate byte/char count for large streams
70- - The copy(InputStream, OutputStream) method now returns -1 if the count is greater than an int
71- - The copy(Reader, Writer) method now throws now returns -1 if the count is greater than an int
72- - Added a new copyLarge(InputStream, OutputStream) method that returns a long
73- - Added a new copyLarge(Reader, Writer) method that returns a long
74-
75- - CountingInputStream/CountingOutputStream [IO-84]
76- - Methods were declared as int thus the count was innacurate for large streams
77- - new long based methods getByteCount()/resetByteCount() added
78- - existing methods changed to throw an exception if the count is greater than an int
79-
80- - FileBasedTestCase
81- - Fixed bug in compare content methods identified by GNU classpath
82-
83- - EndianUtils.writeSwappedLong(byte[], int) [IO-101]
84- - An int overrun in the bit shifting when it should have been a long
85-
86- - EndianUtils.writeSwappedLong(InputStream) [IO-102]
87- - The return of input.read(byte[]) was not being checked to ensure all 8 bytes were read
88-
89- Enhancements from 1.2
90- ---------------------
91- - DirectoryWalker [IO-86]
92- - New class designed for subclassing to walk through a set of files.
93- DirectoryWalker provides the walk of the directories, filtering of
94- directories and files, and cancellation support. The subclass must provide
95- the specific behaviour, such as text searching or image processing.
96-
97- - IOCase
98- - New class/enumeration for case-sensitivity control
99-
100- - FilenameUtils
101- - New methods to handle case-sensitivity
102- - wildcardMatch - new method that has IOCase as a parameter
103- - equals - new method that has IOCase as a parameter
104-
105- - FileUtils [IO-108] - new default encoding methods for:
106- - readFileToString(File)
107- - readLines(File)
108- - lineIterator(File)
109- - writeStringToFile(File, String)
110- - writeLines(File, Collection)
111- - writeLines(File, Collection, String)
112-
113- - FileUtils.openOutputStream [IO-107]
114- - new method to open a FileOutputStream, creating parent directories if required
115- - FileUtils.touch
116- - FileUtils.copyURLToFile
117- - FileUtils.writeStringToFile
118- - FileUtils.writeByteArrayToFile
119- - FileUtils.writeLines
120- - enhanced to create parent directories if required
121- - FileUtils.openInputStream [IO-107]
122- - new method to open a FileInputStream, providing better error messages than the JDK
123-
124- - FileUtils.isFileOlder
125- - new methods to check if a file is older (i.e. isFileOlder()) - counterparts
126- to the existing isFileNewer() methods.
127-
128- - FileUtils.checksum, FileUtils.checksumCRC32
129- - new methods to create a checksum of a file
130-
131- - FileUtils.copyFileToDirectory [IO-104]
132- - new variant that optionally retains the file date
133-
134- - FileDeleteStrategy
135- - FileCleaner [IO-56,IO-70]
136- - FileDeleteStrategy is a strategy for handling file deletion
137- - This can be used as a calback in FileCleaner
138- - Together these allow FileCleaner to do a forceDelete to kill directories
139-
140- - FileCleaner.exitWhenFinished [IO-99]
141- - A new method that allows the internal cleaner thread to be cleanly terminated
142-
143- - WildcardFileFilter
144- - Replacement for WildcardFilter
145- - Accepts both files and directories
146- - Ability to control case-sensitivity
147-
148- - NameFileFilter
149- - Ability to control case-sensitivity
150-
151- - FileFileFilter
152- - New IOFileFilter implementation
153- - Accepts files where File.isFile() is true
154- - In other words it filters out directories
155- - Singleton instance provided (FILE)
156-
157- - CanReadFileFilter
158- - New IOFileFilter implementation
159- - Accepts files where File.canRead() is true
160- - Singleton instances provided (CAN_READ/CANNOT_READ/READ_ONLY)
161-
162- - CanWriteFileFilter
163- - New IOFileFilter implementation
164- - Accepts files where File.canWrite() is true
165- - Singleton instances provided (CAN_WRITE/CANNOT_WRITE)
166-
167- - HiddenFileFilter
168- - New IOFileFilter implementation
169- - Accepts files where File.isHidden() is true
170- - Singleton instances provided (HIDDEN/VISIBLE)
171-
172- - EmptyFileFilter
173- - New IOFileFilter implementation
174- - Accepts files or directories that are empty
175- - Singleton instances provided (EMPTY/NOT_EMPTY)
176-
177- - TrueFileFilter/FalseFileFilter/DirectoryFileFilter
178- - New singleton instance constants (TRUE/FALSE/DIRECTORY)
179- - The new constants are more JDK 1.5 friendly with regards to static imports
180- (whereas if everything uses INSTANCE, then they just clash)
181- - The old INSTANCE constants are still present and have not been deprecated
182-
183- - FileFilterUtils.sizeRangeFileFilter
184- - new sizeRangeFileFilter(long minimumSize, long maximumSize) method which
185- creates a filter that accepts files within the specified size range.
186-
187- - FileFilterUtils.makeDirectoryOnly/makeFileOnly
188- - two new methods that decorate a file filter to make it apply to
189- directories only or files only
190-
191- - NullWriter
192- - New writer that acts as a sink for all data, as per /dev/null
193-
194- - NullInputStream
195- - New input stream that emulates a stream of a specified size
196-
197- - NullReader
198- - New reader that emulates a reader of a specified size
199-
200- - ByteArrayOutputStream [IO-97]
201- - Performance enhancements
20231
32+ - FileUtils
33+ - NPE in openOutputStream(File) when file has no parent in path [IO-112]
34+ - readFileToString(File) is not static [IO-113]
20335
20436Feedback
20537--------
0 commit comments