Two main classes are described in this section: StatsInputStream and StatsOutputStream
It wraps an InputStream and gathers statistics of the InputStream passed in the constructor. It can be used to:
InputSream originalStream=.... StatsInputStream srIstream = new StatsInputStream(originalStream); //performs all the application operation on stream ... srIstream.close(); long size = srIstream.getSize(); String bitRate = srIstream.getBitRateString();
For further information see the api javadoc
The class StatsInputStream has a counterpart for Character oriented I/O in StatsReader. The usage and the purpose are identical.
For further information see the api javadoc
This class is an OutputStream wrapper. It gathers statistics of the OutputStream passed in the constructor. It can be used to determine the number of bytes written or the time spent writing to the OutputStream.
StatsOutputStream srStream = new StatsOutputStream(originalStream); //performs all the application operation on stream ... srStream.close(); long size = srStream.getSize();
For further information see the api javadoc
The class StatsOutputStream has a counterpart for Character oriented I/O in StatsWriter. The usage and the purpose are identical.
For further information see the api javadoc