[
https://issues.apache.org/jira/browse/IO-379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sebb resolved IO-379.
---------------------
Resolution: Fixed
Fix Version/s: 2.5
URL: http://svn.apache.org/r1470725
Log:
IO-379 CharSequenceInputStream - add tests for available()
Fix code so it really does reflect a minimum available.
Modified:
commons/proper/io/trunk/src/changes/changes.xml
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java
commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java
> CharSequenceInputStream - add tests for available()
> ---------------------------------------------------
>
> Key: IO-379
> URL: https://issues.apache.org/jira/browse/IO-379
> Project: Commons IO
> Issue Type: Bug
> Reporter: Sebb
> Fix For: 2.5
>
>
> There are currently no tests for the available() method.
> Tme method should return an estimate of the number of items remaining, so it
> should be possible to read - or skip - that many items without reaching EOF.
> At present, the code measures the number of CharBuf entries remaining; I
> think that is wrong - it should be the number of bytes left in the byte
> stream.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira