org.mmbase.util
Class ProcessWriter

java.lang.Object
  |
  +--org.mmbase.util.ProcessWriter
All Implemented Interfaces:
java.lang.Runnable

public class ProcessWriter
extends java.lang.Object
implements java.lang.Runnable

A class to pipe data from one stream to the other as a thread. Useful for building execution pipes.

Version:
$Id: ProcessWriter.java,v 1.5 2002/01/24 09:13:42 eduard Exp $
Author:
Kees Jongenburger

Constructor Summary
ProcessWriter(java.io.InputStream in, java.io.OutputStream out)
          Creates a writer to pipe data.
ProcessWriter(java.io.InputStream in, java.io.OutputStream out, int blocksize)
          Creates a writer to pipe data.
 
Method Summary
 void run()
          Performs the piping process.
 void start()
          Starts the piping process by creating the thread and running it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessWriter

public ProcessWriter(java.io.InputStream in,
                     java.io.OutputStream out)
Creates a writer to pipe data. Uses a default blocksize of 1024.
Parameters:
in - The stream from which to pipe the data.
out - The stream to pipe the data to.

ProcessWriter

public ProcessWriter(java.io.InputStream in,
                     java.io.OutputStream out,
                     int blocksize)
Creates a writer to pipe data.
Parameters:
in - The stream from which to pipe the data.
out - The stream to pipe the data to.
blocksize - Size of the blocks in which data is piped
Method Detail

start

public void start()
Starts the piping process by creating the thread and running it.

run

public void run()
Performs the piping process.
Specified by:
run in interface java.lang.Runnable


MMBase 2002