Class StreamPollFeeder

  • All Implemented Interfaces:
    java.lang.Runnable

    class StreamPollFeeder
    extends java.lang.Thread
    Poll InputStream for available data and write the output to an OutputStream.
    • 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
      static int BUF_LEN  
      private boolean done  
      private java.lang.Throwable exception  
      private java.io.InputStream input  
      private java.lang.Object lock  
      private java.io.OutputStream output  
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      StreamPollFeeder​(java.io.InputStream input, java.io.OutputStream output)
      Create a new StreamPollFeeder
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void close()  
      java.lang.Throwable getException()  
      void run()  
      void waitUntilDone()  
      • 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

      • input

        private final java.io.InputStream input
      • output

        private final java.io.OutputStream output
      • exception

        private java.lang.Throwable exception
      • done

        private boolean done
      • lock

        private final java.lang.Object lock
    • Constructor Detail

      • StreamPollFeeder

        StreamPollFeeder​(java.io.InputStream input,
                         java.io.OutputStream output)
        Create a new StreamPollFeeder
        Parameters:
        input - Stream to read from
        output - Stream to write to
    • Method Detail

      • run

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

        private void close()
      • getException

        public java.lang.Throwable getException()
        Since:
        3.2.0
      • waitUntilDone

        public void waitUntilDone()