mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8264208: Console charset API
Reviewed-by: joehw, rriggs, alanb
This commit is contained in:
parent
5aab1609b9
commit
bebfae48e3
10 changed files with 202 additions and 30 deletions
|
@ -35,7 +35,7 @@ import sun.nio.cs.StreamDecoder;
|
|||
* reads bytes and decodes them into characters using a specified {@link
|
||||
* java.nio.charset.Charset charset}. The charset that it uses
|
||||
* may be specified by name or may be given explicitly, or the platform's
|
||||
* default charset may be accepted.
|
||||
* {@link Charset#defaultCharset() default charset} may be accepted.
|
||||
*
|
||||
* <p> Each invocation of one of an InputStreamReader's read() methods may
|
||||
* cause one or more bytes to be read from the underlying byte-input stream.
|
||||
|
@ -48,7 +48,7 @@ import sun.nio.cs.StreamDecoder;
|
|||
*
|
||||
* <pre>
|
||||
* BufferedReader in
|
||||
* = new BufferedReader(new InputStreamReader(System.in));
|
||||
* = new BufferedReader(new InputStreamReader(anInputStream));
|
||||
* </pre>
|
||||
*
|
||||
* @see BufferedReader
|
||||
|
@ -64,9 +64,12 @@ public class InputStreamReader extends Reader {
|
|||
private final StreamDecoder sd;
|
||||
|
||||
/**
|
||||
* Creates an InputStreamReader that uses the default charset.
|
||||
* Creates an InputStreamReader that uses the
|
||||
* {@link Charset#defaultCharset() default charset}.
|
||||
*
|
||||
* @param in An InputStream
|
||||
*
|
||||
* @see Charset#defaultCharset()
|
||||
*/
|
||||
public InputStreamReader(InputStream in) {
|
||||
super(in);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue