|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.skylit.io.EasyWriter
EasyWriter provides simple methods for opening and * writing to text files. All exceptions are handled * inside the class and are hidden from the user. * *
Field Summary | |
protected static int |
CLOSEERROR
|
protected int |
myErrorFlags
|
protected java.lang.String |
myFileName
|
protected java.io.PrintWriter |
myOutFile
|
protected static int |
OPENERROR
|
protected static int |
WRITEERROR
|
Constructor Summary | |
EasyWriter(java.lang.String fileName)
Constructor. |
|
EasyWriter(java.lang.String fileName,
java.lang.String mode)
Constructor. |
Method Summary | |
boolean |
bad()
Checks the status of the file * @return true if en error occurred opening or writing to the file, * false otherwise |
void |
close()
Closes the file |
void |
print(char ch)
Writes one character to the file * @param ch character to be written |
void |
print(double x)
Writes a double to the file * @param x number to be written |
void |
print(int k)
Writes an integer to the file * @param k number to be written |
void |
print(java.lang.String s)
Writes a string to the file * @param s string to be written |
void |
println()
Writes a newline character to the file |
void |
println(char ch)
Writes one character and newline to the file * @param ch character to be written |
void |
println(double x)
Writes a double and newline to the file * @param x number to be written |
void |
println(int k)
Writes an integer and newline to the file * @param k number to be written |
void |
println(java.lang.String s)
Writes a string and newline to the file * @param s string to be written |
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.PrintWriter myOutFile
protected int myErrorFlags
protected static final int OPENERROR
protected static final int CLOSEERROR
protected static final int WRITEERROR
Constructor Detail |
public EasyWriter(java.lang.String fileName)
public EasyWriter(java.lang.String fileName, java.lang.String mode)
Method Detail |
public void close()
public boolean bad()
public void print(char ch)
public void print(int k)
public void print(double x)
public void print(java.lang.String s)
public void println()
public void println(char ch)
public void println(int k)
public void println(double x)
public void println(java.lang.String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |