Groovy 1.7.0

org.codehaus.groovy.tools.shell
Class IO

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

class IO
extends Object

Container for input/output handles.

version:
$Id: IO.java 8907 2007-10-30 12:28:43Z paulk $
author:
Jason Dillon


Nested Class Summary
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.

Verbosity getVerbosity()

Returns the verbosity level.

boolean isDebug()

Check if the verbosity level is set to {

boolean isInfo()

Check if the verbosity level is set to {

boolean isQuiet()

Check if the verbosity level is set to {

boolean isVerbose()

Check if the verbosity level is set to {

void setVerbosity(Verbosity verbosity)

Set the verbosity level.

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

Field Detail

err

final PrintWriter err
Prefered error output writer.


errorStream

final OutputStream errorStream
Raw error output stream.


in

final Reader in
Prefered input reader.


inputStream

final InputStream inputStream
Raw input stream.


out

final PrintWriter out
Prefered output writer.


outputStream

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 Verbosity getVerbosity()
Returns the verbosity level.


isDebug

public boolean isDebug()
Check if the verbosity level is set to Verbosity#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.


isQuiet

public boolean isQuiet()
Check if the verbosity level is set to Verbosity#QUIET.


isVerbose

public boolean isVerbose()
Check if the verbosity level is set to Verbosity#VERBOSE.


setVerbosity

public void setVerbosity(Verbosity verbosity)
Set the verbosity level.
param:
verbosity


 

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