Roland Weber wrote:
Hi Tony,
thanks for the details.
I looked at the source for BufferedInputStream and it looks like
it tries to fill the empty space in the buffer each time you read from
it (for a socket connection it will read more than one packet of data)
instead of just doing a single read from the underlying stream.
Ok, then the byte-by-byte reading in CIS when parsing the chunk header
might well be the problem. If you want to fix that, you'll have to hack
deeply into CIS. Here is what I would do if I had no other choice:
- extend CIS by a local byte array as a buffer (needs two extra int
for cursor and fill size)
- change the chunk header parsing to read a bunch of bytes into the
buffer, then parsing from there
- change all read methods to return leftover bytes from the buffer
before calling a read on the underlying stream
hope that helps,
Roland
Tony and Roland,
I suspect rather strongly it is BufferedInputStream that needs fixing,
not ChunkedInputStream
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]