Package org.codehaus.groovy.tools.shell
Class IO
java.lang.Object
org.codehaus.groovy.tools.shell.IO
Container for input/output handles.
- Version:
- $Id$
- Author:
- Jason Dillon
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal boolean
Whether ansi support is availablefinal PrintWriter
Prefered error output writer.final OutputStream
Raw error output stream.final Reader
Prefered input reader.final InputStream
Raw input stream.final PrintWriter
Prefered output writer.final OutputStream
Raw output stream. -
Constructor Summary
ConstructorsConstructorDescriptionIO()
Construct a new IO container using system streams.IO
(InputStream inputStream, OutputStream outputStream, OutputStream errorStream) Construct a new IO container. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close all streams.void
flush()
Flush both output streams.Returns the verbosity level.boolean
isDebug()
Check if the verbosity level is set toIO.Verbosity.DEBUG
.boolean
isInfo()
Check if the verbosity level is set toIO.Verbosity.INFO
.boolean
isQuiet()
Check if the verbosity level is set toIO.Verbosity.QUIET
.boolean
Check if the verbosity level is set toIO.Verbosity.VERBOSE
.void
setVerbosity
(IO.Verbosity verbosity) Set the verbosity level.protected PrintWriter
tryConstructRenderWriter
(OutputStream stream)
-
Field Details
-
inputStream
Raw input stream. -
outputStream
Raw output stream. -
errorStream
Raw error output stream. -
in
Prefered input reader. -
out
Prefered output writer. -
err
Prefered error output writer. -
ansiSupported
public final boolean ansiSupportedWhether ansi support is available
-
-
Constructor Details
-
IO
Construct a new IO container. -
IO
public IO()Construct a new IO container using system streams.
-
-
Method Details
-
tryConstructRenderWriter
-
setVerbosity
Set the verbosity level. -
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
Flush both output streams.- Throws:
IOException
-
close
Close all streams.- Throws:
IOException
-