Class SimpleIO
java.lang.Object
|
+----SimpleIO
- public final class SimpleIO
- extends Object
Class for Simple IO operations.
- Version:
- $Id: SimpleIO.java,v 1.2 2000-01-31 11:25:56+09 kaiya Exp $
- Author:
- kaiya@acm.org
-
endl
- constant symbol for newline.
-
print(String)
- print string s without newline.
-
println(String)
- print string s with newline.
-
readfile(String)
- read string from file "s".
-
readln(String)
- read string from standard input with prompt "msg".
-
string2int(String)
- convert string to integer.
-
writefile(String, String)
- wirte string a to file f.
endl
public static final String endl
- constant symbol for newline.
string2int
public static int string2int(String s)
- convert string to integer.
If can not parse "s", return 0.
readln
public static String readln(String msg)
- read string from standard input with prompt "msg".
If "msg" == null, without prompt.
Return null if fail.
readfile
public static String readfile(String s)
- read string from file "s".
return null if fail.
writefile
public static boolean writefile(String a,
String f)
- wirte string a to file f.
return false if fail.
println
public static void println(String s)
- print string s with newline.
print
public static void print(String s)
- print string s without newline.