Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.10
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.tools.shell
[Java] Class IO

    java.lang.Object
      org.codehaus.groovy.tools.shell.IO

    public class IO
    extends Object

Container for input/output handles.

Authors:
  Jason Dillon

Version:
  \$Id: IO.java 18634 2009-12-12 12:04:57Z paulk \$

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(InputStream inputStream, OutputStream outputStream, OutputStream errorStream)` Construct a new IO container.
`IO()` Construct a new IO container using system streams.

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 Verbosity#DEBUG#DEBUG.
`boolean` | `isInfo()` Check if the verbosity level is set to Verbosity#INFO#INFO.
`boolean` | `isQuiet()` Check if the verbosity level is set to Verbosity#QUIET#QUIET.
`boolean` | `isVerbose()` Check if the verbosity level is set to Verbosity#VERBOSE#VERBOSE.
`void` | `setVerbosity(IO.Verbosity verbosity)` Set the verbosity level.

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### err

    public final PrintWriter err

  Prefered error output writer.

### errorStream

    public final OutputStream errorStream

  Raw error output stream.

### in

    public final Reader in

  Prefered input reader.

### inputStream

    public final InputStream inputStream

  Raw input stream.

### out

    public final PrintWriter out

  Prefered output writer.

### outputStream

    public final OutputStream outputStream

  Raw output stream.

Constructor Detail

### IO

    public IO(InputStream inputStream, OutputStream outputStream, OutputStream errorStream)

  Construct a new IO container.

### IO

    public IO()

  Construct a new IO container using system streams.

Method Detail

### close

    public void close()

  Close all streams.

### flush

    public void flush()

  Flush both output streams.

### getVerbosity

    public IO.Verbosity getVerbosity()

  Returns the verbosity level.

### isDebug

    public boolean isDebug()

  Check if the verbosity level is set to Verbosity#DEBUG#DEBUG.

  For generaly usage, when debug output is required, it is better to use the logging facility instead.

### isInfo

    public boolean isInfo()

  Check if the verbosity level is set to Verbosity#INFO#INFO.

### isQuiet

    public boolean isQuiet()

  Check if the verbosity level is set to Verbosity#QUIET#QUIET.

### isVerbose

    public boolean isVerbose()

  Check if the verbosity level is set to Verbosity#VERBOSE#VERBOSE.

### setVerbosity

    public void setVerbosity(IO.Verbosity verbosity)

  Set the verbosity level.
  Parameters:
    verbosity

Copyright © 2003-2010 The Codehaus. All rights reserved.