blue.io
Class IO

java.lang.Object
  |
  +--blue.io.IO

public class IO
extends java.lang.Object

Used to read from the standard input stream or write to the standard output stream. Very useful for novice programmers.


Constructor Summary
IO()
           
 
Method Summary
static boolean done()
          Returns true if the most recent message sent to IO had a "successful" outcome; false if not.
static char next_char()
          Tries to inspect the next token in the standard input stream; returns it.
static void print(boolean b)
          Writes the boolean to the standard output file.
static void print(char c)
          Writes the char to the standard output file.
static void print(double f)
          Writes the double to the standard output file.
static void print(int i)
          Writes the int to the standard output file.
static void print(java.lang.Object o)
          Write a 'token' of the object to the standard output stream.
static void print(java.lang.String s)
          Writes the String to the standard output file without delimiters.
static void println()
          Issues a new line command.
static void println(boolean b)
          Writes the boolean to the standard output file followed by a new line.
static void println(char c)
          Writes the char to the standard output file followed by a new line.
static void println(double f)
          Writes the double to the standard output file followed by a new line.
static void println(int i)
          Writes the int to the standard output file followed by a new line.
static void println(java.lang.Object o)
          Write a 'token' of the object to the standard output stream followed by a new line.
static void println(java.lang.String s)
          Writes the String to the standard output file without delimiters followed by a new line.
static char read_char()
          Tries to recognize the next token in the standard input stream as an char; returns it.
static double read_double()
          Tries to recognize the next token in the standard input stream as an double; returns it.
static int read_int()
          Tries to recognize the next token in the standard input stream as an int; returns it.
static java.lang.String readString()
          Tries to recognize the next token in the standard input stream as a String with no surrounding 'white space'; returns it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IO

public IO()
Method Detail

done

public static boolean done()
Returns true if the most recent message sent to IO had a "successful" outcome; false if not.

read_int

public static int read_int()
Tries to recognize the next token in the standard input stream as an int; returns it.

print

public static void print(int i)
Writes the int to the standard output file.

println

public static void println(int i)
Writes the int to the standard output file followed by a new line.

read_double

public static double read_double()
Tries to recognize the next token in the standard input stream as an double; returns it.

print

public static void print(double f)
Writes the double to the standard output file.

println

public static void println(double f)
Writes the double to the standard output file followed by a new line.

read_char

public static char read_char()
Tries to recognize the next token in the standard input stream as an char; returns it.

next_char

public static char next_char()
Tries to inspect the next token in the standard input stream; returns it.

print

public static void print(char c)
Writes the char to the standard output file.

println

public static void println(char c)
Writes the char to the standard output file followed by a new line.

print

public static void print(boolean b)
Writes the boolean to the standard output file.

println

public static void println(boolean b)
Writes the boolean to the standard output file followed by a new line.

readString

public static java.lang.String readString()
Tries to recognize the next token in the standard input stream as a String with no surrounding 'white space'; returns it.

print

public static void print(java.lang.String s)
Writes the String to the standard output file without delimiters.

println

public static void println(java.lang.String s)
Writes the String to the standard output file without delimiters followed by a new line.

println

public static void println()
Issues a new line command.

print

public static void print(java.lang.Object o)
Write a 'token' of the object to the standard output stream.

println

public static void println(java.lang.Object o)
Write a 'token' of the object to the standard output stream followed by a new line.