|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.groovy.tools.shell.IO
public class IO
Container for input/output handles.
| Nested Class Summary | |
|---|---|
static class |
IO.Verbosity
|
| Field Summary | |
|---|---|
PrintWriter |
err
Prefered error output writer. |
OutputStream |
errorStream
Raw error output stream. |
Reader |
in
Prefered input reader. |
InputStream |
inputStream
Raw input stream. |
PrintWriter |
out
Prefered output writer. |
OutputStream |
outputStream
Raw output stream. |
| Constructor Summary | |
|---|---|
IO()
Construct a new IO container using system streams. |
|
IO(InputStream inputStream,
OutputStream outputStream,
OutputStream errorStream)
Construct a new IO container. |
|
| Method Summary | |
|---|---|
void |
close()
Close all streams. |
void |
flush()
Flush both output streams. |
IO.Verbosity |
getVerbosity()
Returns the verbosity level. |
boolean |
isDebug()
Check if the verbosity level is set to IO.Verbosity.DEBUG. |
boolean |
isInfo()
Check if the verbosity level is set to IO.Verbosity.INFO. |
boolean |
isQuiet()
Check if the verbosity level is set to IO.Verbosity.QUIET. |
boolean |
isVerbose()
Check if the verbosity level is set to IO.Verbosity.VERBOSE. |
void |
setVerbosity(IO.Verbosity verbosity)
Set the verbosity level. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final InputStream inputStream
public final OutputStream outputStream
public final OutputStream errorStream
public final Reader in
public final PrintWriter out
public final PrintWriter err
| Constructor Detail |
|---|
public IO(InputStream inputStream,
OutputStream outputStream,
OutputStream errorStream)
public IO()
| Method Detail |
|---|
public void setVerbosity(IO.Verbosity verbosity)
verbosity - public IO.Verbosity getVerbosity()
public boolean isQuiet()
IO.Verbosity.QUIET.
public boolean isInfo()
IO.Verbosity.INFO.
public boolean isVerbose()
IO.Verbosity.VERBOSE.
public boolean isDebug()
IO.Verbosity.DEBUG.
For generaly usage, when debug output is required, it is better to use the logging facility instead.
public void flush()
throws IOException
IOException
public void close()
throws IOException
IOException
|
Copyright © 2003-2009 The Codehaus. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||