TUM CCSM Commons

edu.tum.cs.commons.io
Class StreamDrainerThread

java.lang.Object
  extended by java.lang.Thread
      extended by edu.tum.cs.commons.io.StreamDrainerThread
All Implemented Interfaces:
java.lang.Runnable

public class StreamDrainerThread
extends java.lang.Thread

A thread to drain an input stream. Read content is discarded.

Version:
$Rev: 26283 $
Author:
Elmar Juergens, Florian Deissenboeck, $Author: juergens $
Rating:
GREEN Hash: 540B98ECCE4EE60DC5A69D0C6A03DB2C

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
StreamDrainerThread(java.io.InputStream input)
          Create a new reader that immediately starts to drain the content of this stream .
 
Method Summary
 void run()
          Reads content from the stream as long as the stream is not empty.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
 

Constructor Detail

StreamDrainerThread

public StreamDrainerThread(java.io.InputStream input)
Create a new reader that immediately starts to drain the content of this stream . This call is non- blocking

Parameters:
input - Stream to read from.
Method Detail

run

public void run()
Reads content from the stream as long as the stream is not empty.

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

TUM CCSM Commons

TUM CCSM Commons - 2.7