mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
4926314: Optimize Reader.read(CharBuffer)
Reviewed-by: alanb, bpb
This commit is contained in:
parent
082abbdaf7
commit
65c19c4094
6 changed files with 371 additions and 10 deletions
|
@ -25,6 +25,7 @@
|
|||
|
||||
package java.io;
|
||||
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
import sun.nio.cs.StreamDecoder;
|
||||
|
@ -152,6 +153,10 @@ public class InputStreamReader extends Reader {
|
|||
return sd.getEncoding();
|
||||
}
|
||||
|
||||
public int read(CharBuffer target) throws IOException {
|
||||
return sd.read(target);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a single character.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue