org.codehaus.groovy.maven.common
Class StreamPair

java.lang.Object
  extended by org.codehaus.groovy.maven.common.StreamPair

public class StreamPair
extends java.lang.Object

Contains a pair of PrintStream.

Version:
$Id: StreamPair.java 11349 2008-03-31 16:24:18Z user57 $
Author:
Jason Dillon

Nested Class Summary
static class StreamPair.Type
          Pseudo-enum for a stream type.
 
Field Summary
 boolean combined
           
 java.io.PrintStream err
           
static StreamPair.Type ERR
           
static int ERR_CODE
           
static java.lang.String ERR_NAME
           
 java.io.PrintStream out
           
static StreamPair.Type OUT
           
static int OUT_CODE
           
static java.lang.String OUT_NAME
           
static StreamPair SYSTEM
          The original System streams (as they were when this class loads).
 
Constructor Summary
StreamPair(java.io.PrintStream out)
           
StreamPair(java.io.PrintStream out, java.io.PrintStream err)
           
 
Method Summary
 void close()
           
 void flush()
           
 java.io.PrintStream get(StreamPair.Type type)
           
static StreamPair system()
          Create a new pair as System is currently configured.
static void system(StreamPair streams)
          Install the given stream pair as the System streams.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

out

public final java.io.PrintStream out

err

public final java.io.PrintStream err

combined

public final boolean combined

SYSTEM

public static final StreamPair SYSTEM
The original System streams (as they were when this class loads).


OUT

public static final StreamPair.Type OUT

OUT_NAME

public static final java.lang.String OUT_NAME
See Also:
Constant Field Values

OUT_CODE

public static final int OUT_CODE
See Also:
Constant Field Values

ERR

public static final StreamPair.Type ERR

ERR_NAME

public static final java.lang.String ERR_NAME
See Also:
Constant Field Values

ERR_CODE

public static final int ERR_CODE
See Also:
Constant Field Values
Constructor Detail

StreamPair

public StreamPair(java.io.PrintStream out,
                  java.io.PrintStream err)

StreamPair

public StreamPair(java.io.PrintStream out)
Method Detail

get

public java.io.PrintStream get(StreamPair.Type type)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

flush

public void flush()

close

public void close()

system

public static StreamPair system()
Create a new pair as System is currently configured.


system

public static void system(StreamPair streams)
Install the given stream pair as the System streams.



Copyright © 2006-2010 Codehaus. All Rights Reserved.