Package org.codehaus.groovy.tools.shell
Class IO
- java.lang.Object
-
- org.codehaus.groovy.tools.shell.IO
-
public class IO extends java.lang.ObjectContainer for input/output handles.- Version:
- $Id$
- Author:
- Jason Dillon
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIO.Verbosity
-
Field Summary
Fields Modifier and Type Field Description booleanansiSupportedWhether ansi support is availablejava.io.PrintWritererrPrefered error output writer.java.io.OutputStreamerrorStreamRaw error output stream.java.io.ReaderinPrefered input reader.java.io.InputStreaminputStreamRaw input stream.java.io.PrintWriteroutPrefered output writer.java.io.OutputStreamoutputStreamRaw output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close all streams.voidflush()Flush both output streams.IO.VerbositygetVerbosity()Returns the verbosity level.booleanisDebug()Check if the verbosity level is set toIO.Verbosity.DEBUG.booleanisInfo()Check if the verbosity level is set toIO.Verbosity.INFO.booleanisQuiet()Check if the verbosity level is set toIO.Verbosity.QUIET.booleanisVerbose()Check if the verbosity level is set toIO.Verbosity.VERBOSE.voidsetVerbosity(IO.Verbosity verbosity)Set the verbosity level.protected java.io.PrintWritertryConstructRenderWriter(java.io.OutputStream stream)
-
-
-
Field Detail
-
inputStream
public final java.io.InputStream inputStream
Raw input stream.
-
outputStream
public final java.io.OutputStream outputStream
Raw output stream.
-
errorStream
public final java.io.OutputStream errorStream
Raw error output stream.
-
in
public final java.io.Reader in
Prefered input reader.
-
out
public final java.io.PrintWriter out
Prefered output writer.
-
err
public final java.io.PrintWriter err
Prefered error output writer.
-
ansiSupported
public final boolean ansiSupported
Whether ansi support is available
-
-
Method Detail
-
tryConstructRenderWriter
protected java.io.PrintWriter tryConstructRenderWriter(java.io.OutputStream stream)
-
setVerbosity
public void setVerbosity(IO.Verbosity verbosity)
Set the verbosity level.
-
getVerbosity
public IO.Verbosity getVerbosity()
Returns the verbosity level.
-
isQuiet
public boolean isQuiet()
Check if the verbosity level is set toIO.Verbosity.QUIET.
-
isInfo
public boolean isInfo()
Check if the verbosity level is set toIO.Verbosity.INFO.
-
isVerbose
public boolean isVerbose()
Check if the verbosity level is set toIO.Verbosity.VERBOSE.
-
isDebug
public boolean isDebug()
Check if the verbosity level is set toIO.Verbosity.DEBUG.For general usage, when debug output is required, it is better to use the logging facility instead.
-
flush
public void flush() throws java.io.IOExceptionFlush both output streams.- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOExceptionClose all streams.- Throws:
java.io.IOException
-
-