2 // Body of StdIn interface.
3 // This file implements the code of the StdIn.cp file.
12 private static BufferedReader rdr
=
13 new BufferedReader(new InputStreamReader(System
.in
));
15 public static void ReadLn(char[] arr
) throws IOException
{
16 String str
= rdr
.readLine();
18 arr
[0] = '\0'; return;
21 int sLn
= str
.length();
22 len
= (sLn
< len ? sLn
: len
-1);
23 str
.getChars(0, len
, arr
, 0);
27 public static char Read() throws IOException
29 return (char)rdr
.read();
32 public static boolean More() throws IOException
34 return true; // temporary fix until we figure out
35 // return rdr.ready(); // how to get the same semantics for
36 } // .NET and the JVM (kjg Sep. 2004)
38 public static void SkipLn() throws IOException
40 String str
= rdr
.readLine(); // and discard str
43 } // end of public class StdIn