blob: 13b35590711602e766a3f9fed831b4ddad2de1c4 [file] [log] [blame]
$Id$
Commons IO Package
Version 1.3
Release Notes
INTRODUCTION:
Commons IO is a package of Java utility classes for java.io's hierarchy.
Classes in this package are considered to be so standard and of such high
reuse as to justify existence in java.io.
Commons IO contains utility classes, stream implementations, file filters,
and endian transformation classes.
Compatibility with 1.2
----------------------
Binary compatible - Yes
Source compatible - Yes
Semantic compatible - Yes
Deprecations from 1.2
---------------------
- WildcardFilter deprecated, replaced by WildcardFileFilter
- old class only accepted files, thus had a confusing dual purpose
- FileSystemUtils.freeSpace deprecated, replaced by freeSpaceKb
- freeSpace returns a result that varies by operating system and
thus isn't that useful
- freeSpaceKb returns much better and more consistent results
- freeSpaceKb existed in v1.2, so this is a gentle cutover
Bug fixes from 1.2
------------------
- LineIterator now implements Iterator
- It was always supposed to...
- FileSystemUtils.freeSpace/freeSpaceKb [IO-83]
- These should now work on AIX and HP-UX
- FileSystemUtils.freeSpace/freeSpaceKb [IO-90]
- Avoid infinite looping in Windows
- Catch more errors with nice messages
- FileSystemUtils.freeSpace [IO-91]
- This is now documented not to work on SunOS 5
- FileSystemUtils [IO-93]
- Fixed resource leak leading to 'Too many open files' error
- Previously did not destroy Process instances (as JDK Javadoc is so poor)
- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4801027
- FileCleaner
- This now handles the situation where an error occurs when deleting the file
- IOUtils.copy [IO-84]
- Comment about result byte/char count being limited to an int, thus
being inacurate for large streams
Enhancements from 1.2
---------------------
- IOCase
- New class/enumeration for case-sensitivity control
- FilenameUtils
- New methods to handle case-sensitivity
- wildcardMatch - new method that has IOCase as a parameter
- equals - new method that has IOCase as a parameter
- FileUtils.isFileOlder
- add methods to check if a file is older (i.e. isFileOlder()) - counterparts
to the existing isFileNewer() methods.
- FileUtils.checksum, FileUtils.checksumCRC32
- add methods to create a checksum of a file
- FileDeleteStrategy
- FileCleaner [IO-56,IO-70]
- FileDeleteStrategy is a strategy for handling file deletion
- This can be used as a calback in FileCleaner
- Together these allow FileCleaner to do a forceDelete to kill directories
- WildcardFileFilter
- Replacement for WildcardFilter
- Accepts both files and directories
- Ability to control case-sensitivity
- NameFileFilter
- Ability to control case-sensitivity
- FileFileFilter
- New IOFileFilter implementation
- Accepts files where File.isFile() is true
- In other words it filters out directories
- Singleton instance provided (FILE)
- CanReadFileFilter
- New IOFileFilter implementation
- Accepts files where File.canRead() is true
- Singleton instances provided (CAN_READ/CANNOT_READ/READ_ONLY)
- CanWriteFileFilter
- New IOFileFilter implementation
- Accepts files where File.canWrite() is true
- Singleton instances provided (CAN_WRITE/CANNOT_WRITE)
- HiddenFileFilter
- New IOFileFilter implementation
- Accepts files where File.isHidden() is true
- Singleton instances provided (HIDDEN/VISIBLE)
- EmptyFileFilter
- New IOFileFilter implementation
- Accepts files or directories that are empty
- Singleton instances provided (EMPTY/NOT_EMPTY)
- TrueFileFilter/FalseFileFilter/DirectoryFileFilter
- New singleton instance constants (TRUE/FALSE/DIRECTORY)
- The new constants are more JDK 1.5 friendly with regards to static imports
(whereas if everything uses INSTANCE, then they just clash)
- The old INSTANCE constants are still present and have not been deprecated
- FileFilterUtils
- new sizeRangeFileFilter(long minimumSize, long maximumSize) method which
creates a filter that accepts files within the specified size range.
Feedback
--------
Open source works best when you give feedback:
http://jakarta.apache.org/commons/io/
Please direct all bug reports to JIRA
http://issues.apache.org/jira/browse/IO
Or subscribe to the commons-user mailing list (prefix emails by [io])
http://jakarta.apache.org/site/mail.html
The Commons-IO Team