|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fraid.io.FraidIO
public class FraidIO
This is the FrAid IO system. You can redirect them usng setOutputStream, log or unlog them (even at run time).
| Field Summary | |
|---|---|
static FraidPrintStream |
err
Describe variable err here. |
static FraidPrintStream |
info
Info stream. |
static FraidPrintStream |
log
The log stream. |
static java.io.OutputStream |
nullOutput
Just like the null stream in Unix. |
static FraidPrintStream |
out
Standard output. |
static FraidPrintStream |
prompt
The prompt is handled by a separate stream to allow seamless logging and consoleless execution. |
| Constructor Summary | |
|---|---|
FraidIO()
|
|
| Method Summary | |
|---|---|
static void |
closeAllOutputStreams()
Closes all output streams. |
static java.io.Reader |
logReader(java.io.Reader aReader)
Log whatever goes through a Reader. |
static void |
logStream(FraidPrintStream aStream)
"Tees" a stream and sends a copy of it the log. |
static void |
logTeeReader(TeeReader aTee)
After a Reader is being "teed" for logging and stopped this starts the logging again. |
static void |
printPrompt(java.io.PrintStream aOutput)
Prints the next prompt. |
static void |
restoreOutputStreams()
Restores all output streams. |
static void |
setLogFileStream(java.lang.String aFileName)
Sets the logFileName. |
static java.io.OutputStream |
setOutputStream(FraidPrintStream aFraidStream,
java.io.OutputStream aNewOutput)
Redirects a FrAid output stream. |
static void |
unlogStream(FraidPrintStream aStream)
If a stream was logged, closses its tee to the log. |
static void |
unlogTeeReader(TeeReader aTee)
After a Reader is being "teed" for logging, this stops the logging. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.io.OutputStream nullOutput
public static FraidPrintStream out
infopublic static FraidPrintStream err
err here.
Default is System.out.
public static FraidPrintStream info
public static FraidPrintStream prompt
public static FraidPrintStream log
| Constructor Detail |
|---|
public FraidIO()
| Method Detail |
|---|
public static void printPrompt(java.io.PrintStream aOutput)
public static void setLogFileStream(java.lang.String aFileName)
aFileName - a String value
public static java.io.OutputStream setOutputStream(FraidPrintStream aFraidStream,
java.io.OutputStream aNewOutput)
aFraidStream - which FrAid stream,aNewOutput - to go where.
public static void logStream(FraidPrintStream aStream)
aStream - the Fraid stream to log.public static void unlogStream(FraidPrintStream aStream)
aStream - the Fraid stream to disconect from logging.public static java.io.Reader logReader(java.io.Reader aReader)
aReader - the Reader to log.
public static void unlogTeeReader(TeeReader aTee)
aTee - a TeeReader valuepublic static void logTeeReader(TeeReader aTee)
aTee - a TeeReader valuepublic static void closeAllOutputStreams()
public static void restoreOutputStreams()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||