ZetaGrid v1.9

zeta
Class PipeStream

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--zeta.PipeStream
All Implemented Interfaces:
java.lang.Runnable

public class PipeStream
extends java.lang.Thread

Transfers every line from an input stream to an output of another stream.


Field Summary
private static java.lang.String newLine
          Line separator.
private  java.io.OutputStream out
          The output stream.
private  java.io.BufferedReader reader
          Buffered reader of the input stream.
private  boolean stopped
          true, if the transfer should stopped.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PipeStream(java.io.InputStream in, java.io.OutputStream out)
           
 
Method Summary
 void close()
          Closes the input and output stream and releases any system resources associated with the stream.
 void run()
          Starts the transfer.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stopped

private boolean stopped
true, if the transfer should stopped.


reader

private java.io.BufferedReader reader
Buffered reader of the input stream.


out

private java.io.OutputStream out
The output stream.


newLine

private static java.lang.String newLine
Line separator.

Constructor Detail

PipeStream

public PipeStream(java.io.InputStream in,
                  java.io.OutputStream out)
Parameters:
in - input stream
out - output stream
Method Detail

close

public void close()
Closes the input and output stream and releases any system resources associated with the stream.


run

public void run()
Starts the transfer.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

ZetaGrid v1.9

For further technical papers, see ZetaGrid Technical Documentation.
 
Copyright © 2001,2002 Sebastian Wedeniwski. All Rights Reserved.