Hello.
I wonder what is the "official" way of counting (getting the count of) bytes
sent/received by java.io.OutputStream / java.io.InputStream.
So far I've found these 2 things
1. javax.swing.ProgressMonitorInputStream (no mention about monitoring
_output_?)
2.
http://fastutil.dsi.unimi.it/docs/it/unimi/dsi/fastutil/io/MeasurableInputStream.html
TIA
Gordon Beaton - 03 Nov 2007 10:55 GMT
> I wonder what is the "official" way of counting (getting the count
> of) bytes sent/received by java.io.OutputStream /
> java.io.InputStream.
There is no "official" way. Neither will send or receive anything
behind your back, so it's simple to just count them in your code, or
use your own stream classes that do the counting for you (which I'll
guess the second of your references does).
/gordon
--
Roedy Green - 03 Nov 2007 17:07 GMT
On Fri, 02 Nov 2007 19:31:24 +0100, raven
<qs-raven@wp.remove.this.please.pl> wrote, quoted or indirectly quoted
someone who said :
>Hello.
>I wonder what is the "official" way of counting (getting the count of) bytes
[quoted text clipped - 6 lines]
>
>TIA
You could write a CountingFilter that implements a FilterOutputStream

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com