commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject [IO] CharSequenceInputStream - strange code
Date Mon, 22 Apr 2013 16:14:31 GMT
I'm trying to fix IO-356, and having problems.

I think this is because the code is a bit confused.

The read() method reads bytes from the encoded byte buffer.

However skip(int) skips the underlying CharBuf, and available() checks the
CharBuf

I would expect read() and skip(1) to have the same effect (except possibly
at EOF).
However that is not the case currently.

Also I would expect available() to relate to the number of characters
available for read().

The class extends InputStream, and I would expect all the
overridden/implemented methods to relate to the InputStream, not the source
Charset.

Or am I missing something here?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message