|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectap.EasyReader
| Field Summary | |
protected static int |
CLOSEERROR
|
protected static int |
EOF
|
protected int |
myErrorFlags
|
protected java.lang.String |
myFileName
|
protected java.io.BufferedReader |
myInFile
|
protected static int |
OPENERROR
|
protected static int |
READERROR
|
| Constructor Summary | |
EasyReader()
Constructor. |
|
EasyReader(java.lang.String fileName)
Constructor. |
|
| Method Summary | |
boolean |
bad()
Checks the status of the file |
void |
close()
Closes the file |
boolean |
eof()
Checks the EOF status of the file |
char |
readChar()
Reads the next character from a file (any character including a space or a newline character). |
double |
readDouble()
Reads the next double (without validating its format) |
int |
readInt()
Reads the next integer (without validating its format) |
java.lang.String |
readLine()
Reads from the current position in the file up to and including the next newline character. |
java.lang.String |
readWord()
Skips whitespace and reads the next word (a string of consecutive non-whitespace characters (up to but excluding the next space, newline, etc.) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String myFileName
protected java.io.BufferedReader myInFile
protected int myErrorFlags
protected static final int OPENERROR
protected static final int CLOSEERROR
protected static final int READERROR
protected static final int EOF
| Constructor Detail |
public EasyReader()
public EasyReader(java.lang.String fileName)
fileName - the name or pathname of the file| Method Detail |
public void close()
public boolean bad()
public boolean eof()
public char readChar()
null character
(Unicode 0) if trying to read beyond the EOFpublic java.lang.String readLine()
public java.lang.String readWord()
public int readInt()
public double readDouble()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||