ptolemy.domains.ptinyos.kernel
Class PtinyOSDirector._StreamReaderThread

java.lang.Object
  extended by java.lang.Thread
      extended by ptolemy.domains.ptinyos.kernel.PtinyOSDirector._StreamReaderThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
PtinyOSDirector

private class PtinyOSDirector._StreamReaderThread
extends java.lang.Thread

Private class that reads a stream in a thread.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  java.io.InputStream _inputStream
          Stream from which to read.
private  java.lang.String _name
          Name of the input stream.
private  java.io.OutputStream _outputStream
          Stream to which to write the redirected input.
private  java.io.StringWriter _stringWriter
          StringWriter that is written to
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PtinyOSDirector._StreamReaderThread(java.io.InputStream inputStream, java.lang.String name, java.io.OutputStream redirect, java.io.StringWriter stringWriter)
          Create a _StreamReaderThread.
PtinyOSDirector._StreamReaderThread(java.io.InputStream inputStream, java.lang.String name, java.io.StringWriter stringWriter)
          Create a _StreamReaderThread.
 
Method Summary
 void run()
          Read lines from the input stream and redirect them to the output stream (if it exists), and to the debugging output.
 
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

_inputStream

private java.io.InputStream _inputStream
Stream from which to read.


_name

private java.lang.String _name
Name of the input stream.


_outputStream

private java.io.OutputStream _outputStream
Stream to which to write the redirected input.


_stringWriter

private java.io.StringWriter _stringWriter
StringWriter that is written to

Constructor Detail

PtinyOSDirector._StreamReaderThread

PtinyOSDirector._StreamReaderThread(java.io.InputStream inputStream,
                                    java.lang.String name,
                                    java.io.StringWriter stringWriter)
Create a _StreamReaderThread.

Parameters:
inputStream - The stream to read from.
name - The name of this _StreamReaderThread.
stringWriter - The StringWriter that is written.

PtinyOSDirector._StreamReaderThread

PtinyOSDirector._StreamReaderThread(java.io.InputStream inputStream,
                                    java.lang.String name,
                                    java.io.OutputStream redirect,
                                    java.io.StringWriter stringWriter)
Create a _StreamReaderThread.

Parameters:
inputStream - The stream to read from.
name - The name of this _StreamReaderThread.
redirect - The name of the output stream to redirect the inputStream to.
stringWriter - The StringWriter that is written.
Method Detail

run

public void run()
Read lines from the input stream and redirect them to the output stream (if it exists), and to the debugging output.

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