hi does anybody have any idea on how to write java code that measures the number of bytes transferred in java programs? i am really trying to measure the amount of bytes being transferred when my mobile agents move from one location to another. could someone kindly point me in the right direction. many thanks in advance. mendoza
Hi, welcome to JavaRanch! Please take a moment to read our display name policy, and modify your display name to include a first and last name. Thanks. Next - does this have something to do with performance? I don't think so, so I 'm moving this to the I/O and Streams forum. Follow the link...
"I'm not back." - Bill Harding, Twister
Joined: Jan 30, 2000
If I understand you correctly, probably the simplest way in general is to use a custom FilterOutputStream which keeps track of how many bytes have been written: