|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectStdin
public class Stdin
The Stdin class reads text from standard input. The class contains the same readLine method as BufferedReader and adds methods to read all the Java primitive data types with integrated error checking. It also handles EOF.
This class is not meant to be instantiated.
Full documentation for the classes in the hsa package available at:
http://www.holtsoft.com/java/hsa_package.html
Field Summary | |
---|---|
protected static TextInputFile |
in
|
Constructor Summary | |
---|---|
Stdin()
|
Method Summary | |
---|---|
static void |
close()
Closes Stdin to further reading. |
static boolean |
eof()
Returns whether there is an eof before the next token. |
static boolean |
readBoolean()
Read a boolean from standard input. |
static byte |
readByte()
Read an 8-bit integer (a "byte") from standard input. |
static char |
readChar()
Read a single character from standard input. |
static double |
readDouble()
Read a double precision floating point number (a "double") from standard input. |
static float |
readFloat()
Read a floating point number (a "float") from standard input. |
static int |
readInt()
Read a 32-bit integer (an "int") from standard input. |
static String |
readLine()
Read a full line of text from standard input. |
static long |
readLong()
Read a 64-bit integer (a "long") from standard input. |
static short |
readShort()
Read a 16-bit integer (a "short") from standard input. |
static String |
readString()
Read a token from standard input. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static TextInputFile in
Constructor Detail |
---|
public Stdin()
Method Detail |
---|
public static void close()
public static boolean eof()
public static boolean readBoolean()
public static byte readByte()
public static char readChar()
public static double readDouble()
public static float readFloat()
public static int readInt()
public static String readLine()
public static long readLong()
public static short readShort()
public static String readString()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |