public static String readString ( Charset charset ) throws IOException { Reader in = new InputStreamReader ( System . in , charset ) ; BufferedReader reader = new BufferedReader ( in ) ; try { return reader . readLine ( ) ; } finally { reader . close ( ) ; } }
Reads the next line from the standard input using the given charset .