JDK-6194334 : (spec) InputStream.available - request for clarification of return value
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2004-11-11
  • Updated: 2010-07-29
  • Resolved: 2005-05-20
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE REQUEST :
The InputStream.available API specification states that the method should return the number of bytes that can be read or skipped without blocking.

Is this return value required to be the 'maximum' (i.e. the 'exact') number of bytes that can be read at the moment available() is called? In other words, if available() returns 'n', is it OK to assume that the number of bytes available is exactly 'n' and no more than 'n' ? Or should this return value be interpreted to mean that _at least_ 'n' bytes are available?



JUSTIFICATION :
The spec is slightly ambiguous and could possibly be interpreted in different ways.
###@###.### 2004-11-11 23:12:45 GMT

Comments
EVALUATION This bug is duplicated to 4711604 ###@###.### 2005-05-20 10:27:30 GMT
20-05-2005