Class CoderThread

  • All Implemented Interfaces:
    java.lang.Runnable

    public class CoderThread
    extends java.lang.Thread
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.PipedInputStream inSink  
      private java.io.PipedOutputStream outSink  
      private java.lang.Throwable throwable  
      private java.lang.Runnable workhorse  
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      CoderThread​(Coder coder, java.io.InputStream in)  
      CoderThread​(Coder coder, java.io.OutputStream out)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void checkForException()  
      protected boolean close​(java.io.Closeable closeable)  
      protected boolean flush​(java.io.Flushable flushable)  
      java.io.PipedInputStream getInputStreamSink()  
      java.io.PipedOutputStream getOutputStreamSink()  
      java.lang.Throwable getThrowable()  
      void run()  
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • inSink

        private final java.io.PipedInputStream inSink
      • outSink

        private final java.io.PipedOutputStream outSink
      • workhorse

        private final java.lang.Runnable workhorse
      • throwable

        private java.lang.Throwable throwable
    • Constructor Detail

      • CoderThread

        public CoderThread​(Coder coder,
                           java.io.InputStream in)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • CoderThread

        public CoderThread​(Coder coder,
                           java.io.OutputStream out)
                    throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • getThrowable

        public java.lang.Throwable getThrowable()
      • checkForException

        public void checkForException()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • getInputStreamSink

        public java.io.PipedInputStream getInputStreamSink()
      • getOutputStreamSink

        public java.io.PipedOutputStream getOutputStreamSink()
      • flush

        protected boolean flush​(java.io.Flushable flushable)
      • close

        protected boolean close​(java.io.Closeable closeable)