Class StreamConsumer

java.lang.Object
se.thinkcode.stream.StreamConsumer
All Implemented Interfaces:
Runnable

public class StreamConsumer extends Object implements Runnable
  • Constructor Details

    • StreamConsumer

      public StreamConsumer(InputStream inputStream, OutputStream outputStream)
      Create a new stream consumer.
      Parameters:
      inputStream - input stream to read data from
      outputStream - output stream to write data to.
  • Method Details

    • run

      public void run()
      Copies data from the input stream to the output stream. Terminates as soon as the input stream is closed or an error occurs.
      Specified by:
      run in interface Runnable
    • stopProcessing

      public void stopProcessing()