4926314: Optimize Reader.read(CharBuffer)

Reviewed-by: alanb, bpb
This commit is contained in:
Philippe Marschall 2021-04-26 17:33:35 +00:00 committed by Brian Burkhalter
parent 082abbdaf7
commit 65c19c4094
6 changed files with 371 additions and 10 deletions

View file

@ -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.
*