io-tools is a project that provides you with Java utilities for stream wiring and file format detection.
Stream Utilities (EasyStream)
This is a small set of utilities for dealing with streams. You can use this library for:
· 'Convert' an OutputStream into an InputStream and Writer into a Reader.
· Stream statistics gathering: bytes read/written, bit rate.
· Stream buffering: read the content of an InputStream multiple times or seek to a definite position.
· Stream wiring: While reading the data from an InputStream "tee" it to supplied OutputStream(s) or write data to multiple OutputStream(s) at the same time.
EasyStream is a natural extension of Apache commons-io, providing advanced solutions to some common but not trivial problem. Focus is on performance and memory usage.
Format detection (WazFormat)
This library is a format identification framework that integrates a native format identification engine with droid and in future will integrate mime-utils and apache tika.
· Supports more than 60 file formats.
· on the fly detection: it wraps the original InputStream so it's able to "preserve" the data in it for further processing (the data is eventually buffered to disk or to memory but the users won't notice it).
· Nested detection: it can detect what is inside a bzip2 stream or a PKCS#7 document.
· Result of identification is an Enum. Most of identification libraries return a string that must be further parsed by the calling software.
Detailed instructions on how to install and use the io-tools utility on your Mac are available HERE.
io-tools is a cross-platform utility capable of running on any operating system that comes with Java support (e.g. Mac OS X, Windows, Linux).