|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectap.EasyWriter
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 |
void |
close()
Closes the file |
void |
print(char ch)
Writes one character to the file |
void |
print(double x)
Writes a double to the file |
void |
print(int k)
Writes an integer to the file |
void |
print(java.lang.Object obj)
Writes an object to the file |
void |
print(java.lang.String s)
Writes a string to the file |
void |
println()
Writes a newline character to the file |
void |
println(char ch)
Writes one character and newline to the file |
void |
println(double x)
Writes a double and newline to the file |
void |
println(int k)
Writes an integer and newline to the file |
void |
println(java.lang.Object obj)
Writes an object and newline to the file |
void |
println(java.lang.String s)
Writes a string and newline to the file |
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)
fileName
- the name of the file to be createdpublic EasyWriter(java.lang.String fileName, java.lang.String mode)
fileName
- the name of the file to be createdmode
- if equals to "app" opens in append modeMethod Detail |
public void close()
public boolean bad()
public void print(char ch)
ch
- character to be writtenpublic void print(int k)
k
- number to be writtenpublic void print(double x)
x
- number to be writtenpublic void print(java.lang.String s)
s
- string to be writtenpublic void print(java.lang.Object obj)
obj
- object to be writtenpublic void println()
public void println(char ch)
ch
- character to be writtenpublic void println(int k)
k
- number to be writtenpublic void println(double x)
x
- number to be writtenpublic void println(java.lang.String s)
s
- string to be writtenpublic void println(java.lang.Object obj)
obj
- object to be written
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |