Class WriterPipedInputStream

java.lang.Object
java.io.InputStream
java.io.PipedInputStream
org.deltafi.common.io.WriterPipedInputStream
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
FlowFileInputStream

public class WriterPipedInputStream extends PipedInputStream
  • Constructor Details

    • WriterPipedInputStream

      public WriterPipedInputStream() throws IOException
      Creates a WriterPipedInputStream with a default buffer size.
      Throws:
      IOException
    • WriterPipedInputStream

      public WriterPipedInputStream(int bufferSize) throws IOException
      Creates a WriterPipedInputStream.
      Parameters:
      bufferSize - the buffer size
      Throws:
      IOException
  • Method Details

    • runPipeWriter

      public void runPipeWriter(Writer writer, ExecutorService executorService)
      Writes bytes in a separate thread to be available to this WriterPipedInputStream.
      Parameters:
      writer - the Writer that will write bytes to be available to this WriterPipedInputStream
      executorService - the ExecutorService used to submit the writing thread
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class PipedInputStream
      Throws:
      IOException