mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8222329: Readable read(CharBuffer) does not specify that 0 is returned when there is no remaining space in buffer
Reviewed-by: rriggs, lancea, alanb
This commit is contained in:
parent
05e9c41edd
commit
58bb6555e7
3 changed files with 23 additions and 12 deletions
|
@ -471,13 +471,16 @@ public abstract sealed class $Type$Buffer
|
|||
* Attempts to read characters into the specified character buffer.
|
||||
* The buffer is used as a repository of characters as-is: the only
|
||||
* changes made are the results of a put operation. No flipping or
|
||||
* rewinding of the buffer is performed.
|
||||
* rewinding of the buffer is performed. If the {@linkplain #length
|
||||
* length} of the specified character buffer is zero, then no characters
|
||||
* will be read and zero will be returned.
|
||||
*
|
||||
* @param target the buffer to read characters into
|
||||
* @return The number of characters added to the buffer, or
|
||||
* -1 if this source of characters is at its end
|
||||
* @return The number of characters added to the buffer,
|
||||
* possibly zero, or -1 if this source of characters is at its end
|
||||
* @throws IOException if an I/O error occurs
|
||||
* @throws ReadOnlyBufferException if target is a read only buffer
|
||||
* @throws ReadOnlyBufferException if target is a read only buffer,
|
||||
* even if its length is zero
|
||||
* @since 1.5
|
||||
*/
|
||||
public int read(CharBuffer target) throws IOException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue