Commons IO - Users guide Commons Documentation Team

The top level of the IO component contains two Utils, FileUtils and IOUtil that are of use to all programmers. It also contains an EndianUtils class which is slightly more specialised.

IOUtil is generally concerned with copying between input and output and converting between Strings and byte[].

FileUtil is obviously concerned with handling lots of nice things to do with Files. Copying, removing, enquiring as to meta-data etc.

EndianUtils helps developers to work between Big/Little Endian files.

The top level also contains two Proxy classes, ProxyInputStream and ProxyOutputStream. These exist because FilterInputStream and FilterOutputStream obscure their implementation by switching around the methods which they call. The Proxy classes are more honest, calling the same method as was called on themselves. This makes implementing a Proxy/Filter a lot easier.

The filefilter subpackage contains a small set of filters, perhaps more importantly they also contain an interface framework which merges the java.io.FilenameFilter and java.io.FileFilter interfaces together with Lang's Predicate interface. The FileFilterUtils class provides a facade to the PredicateUtils allowing such things as an AndFileFilter to be handled by Lang's Predicates.

IO contains an output package containing Writers and OutputStreams. HexDump, FormattedWriter, TeeOutputStream, LockableFileWriter, DemuxOutputStream and CountingOutputStream are currently in the output package.

IO contains an input package containing Readers and InputStreams. ClassLoaderObjectInputStream, DemuxInputStream, SwappedDataInputStream and CountingInputStream are the current inhabitants of input.

IO 1.1 will be the next release for this component, consisting of various bugfixes concerning the 1.0 release.