edu.rice.cs.util
Class ReaderThread

java.lang.Object
  extended by java.lang.Thread
      extended by edu.rice.cs.util.ReaderThread
All Implemented Interfaces:
Runnable

 class ReaderThread
extends Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  int available
           
(package private)  byte[] buffer
           
(package private)  IOException exception
           
(package private)  JoinInputStream monitor
           
(package private)  int pos
           
(package private)  InputStream stream
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ReaderThread(JoinInputStream monitor, InputStream stream, int bufferSize)
           
 
Method Summary
(package private)  void close()
           
(package private)  int read()
           
(package private)  int read(byte[] b, int off, int len)
           
 void run()
           
 
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
 

Field Detail

available

volatile int available

pos

volatile int pos

buffer

volatile byte[] buffer

stream

volatile InputStream stream

exception

volatile IOException exception

monitor

volatile JoinInputStream monitor
Constructor Detail

ReaderThread

ReaderThread(JoinInputStream monitor,
             InputStream stream,
             int bufferSize)
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

read

int read()
   throws IOException
Throws:
IOException

read

int read(byte[] b,
         int off,
         int len)
   throws IOException
Throws:
IOException

close

void close()
     throws IOException
Throws:
IOException