Retrieves the unique {@link java.io.Reader Reader} object associatedwith this console.
This method is intended to be used by sophisticated applications, for example, a {@link java.util.Scanner} object which utilizes the richparsing/scanning functionality provided by the Scanner:
Console con = System.console(); if (con != null) { Scanner sc = new Scanner(con.reader()); ... }
For simple applications requiring only line-oriented reading, use {@link #readLine}.
The bulk read operations {@link java.io.Reader#read(char[]) read(char[]) }, {@link java.io.Reader#read(char[],int,int) read(char[], int, int) } and{@link java.io.Reader#read(java.nio.CharBuffer) read(java.nio.CharBuffer)}on the returned object will not read in characters beyond the line bound for each invocation, even if the destination buffer has space for more characters. The {@code Reader}'s {@code read} methods may block if aline bound has not been entered or reached on the console's input device. A line bound is considered to be any one of a line feed ('\n'), a carriage return ('\r'), a carriage return followed immediately by a linefeed, or an end of stream.
@return The reader associated with this console