org.codehaus.plexus.util.cli

Class StreamPumper

public class StreamPumper extends Thread

Class to pump the error stream during Process's runtime. Copied from the Ant built-in task.

Since: June 11, 2001

Version: $Id: StreamPumper.java 5958 2007-02-28 10:29:55Z olamy $

Author: Florin Vancea Paul Julius

Field Summary
StreamConsumerconsumer
booleandone
BufferedReaderin
PrintWriterout
static intSIZE
Constructor Summary
StreamPumper(InputStream in)
StreamPumper(InputStream in, StreamConsumer consumer)
StreamPumper(InputStream in, PrintWriter writer)
StreamPumper(InputStream in, PrintWriter writer, StreamConsumer consumer)
Method Summary
voidclose()
voidconsumeLine(String line)
voidflush()
booleanisDone()
voidrun()

Field Detail

consumer

private StreamConsumer consumer

done

boolean done

in

private BufferedReader in

out

private PrintWriter out

SIZE

private static final int SIZE

Constructor Detail

StreamPumper

public StreamPumper(InputStream in)

StreamPumper

public StreamPumper(InputStream in, StreamConsumer consumer)

StreamPumper

public StreamPumper(InputStream in, PrintWriter writer)

StreamPumper

public StreamPumper(InputStream in, PrintWriter writer, StreamConsumer consumer)

Method Detail

close

public void close()

consumeLine

private void consumeLine(String line)

flush

public void flush()

isDone

public boolean isDone()

run

public void run()