|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.geronimo.gshell.command.IO
public class IO
Container for input/output handles.
| Nested Class Summary | |
|---|---|
static class |
IO.Verbosity
Defines the valid values of the IO containers verbosity settings. |
| 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()
Helper which uses current values from System. |
|
IO(InputStream in,
OutputStream out)
Construct a new IO container. |
|
IO(InputStream in,
OutputStream out,
boolean autoFlush)
Construct a new IO container. |
|
IO(InputStream in,
OutputStream out,
OutputStream err)
Construct a new IO container. |
|
IO(InputStream in,
OutputStream out,
OutputStream err,
boolean autoFlush)
Construct a new IO container. |
|
| Method Summary | |
|---|---|
void |
close()
Close all streams. |
void |
debug(String msg)
|
void |
debug(String format,
Object... args)
|
void |
error(String msg)
|
void |
error(String format,
Object... args)
|
void |
flush()
Flush both output streams. |
IO.Verbosity |
getVerbosity()
Returns the verbosity level. |
void |
info(String msg)
|
void |
info(String format,
Object... args)
|
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 |
isSharedOutputStreams()
|
boolean |
isVerbose()
Check if the verbosity level is set to IO.Verbosity.VERBOSE. |
void |
setVerbosity(IO.Verbosity verbosity)
Set the verbosity level. |
String |
toString()
|
void |
verbose(String msg)
|
void |
verbose(String format,
Object... args)
|
void |
warn(String msg)
|
void |
warn(String format,
Object... args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final InputStream inputStream
For general usage, please use the reader.public final OutputStream outputStream
For general usage, please use the writer.public final OutputStream errorStream
For general usage, please use the writer.public final Reader in
public final PrintWriter out
public final PrintWriter err
| Constructor Detail |
|---|
public IO(InputStream in,
OutputStream out,
OutputStream err,
boolean autoFlush)
in - The input steam; must not be nullout - The output stream; must not be nullerr - The error output stream; must not be nullautoFlush - True to enable auto-flushing off writers.
public IO(InputStream in,
OutputStream out,
OutputStream err)
in - The input steam; must not be nullout - The output stream; must not be nullerr - The error output stream; must not be null
public IO(InputStream in,
OutputStream out,
boolean autoFlush)
in - The input steam; must not be nullout - The output stream and error stream; must not be nullautoFlush - True to enable auto-flushing off writers.
public IO(InputStream in,
OutputStream out)
in - The input steam; must not be nullout - The output stream and error stream; must not be nullpublic IO()
System.
| Method Detail |
|---|
public String toString()
toString in class Objectpublic boolean isSharedOutputStreams()
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()
public void close()
throws IOException
IOExceptionpublic void debug(String msg)
public void debug(String format,
Object... args)
public void verbose(String msg)
public void verbose(String format,
Object... args)
public void info(String msg)
public void info(String format,
Object... args)
public void warn(String msg)
public void warn(String format,
Object... args)
public void error(String msg)
public void error(String format,
Object... args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||