Package org.deltafi.common.io
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
-
Field Summary
Fields inherited from class java.io.PipedInputStream
buffer, in, out, PIPE_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a WriterPipedInputStream with a default buffer size.WriterPipedInputStream(int bufferSize) Creates a WriterPipedInputStream. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidrunPipeWriter(Writer writer, ExecutorService executorService) Writes bytes in a separate thread to be available to this WriterPipedInputStream.Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
WriterPipedInputStream
Creates a WriterPipedInputStream with a default buffer size.- Throws:
IOException
-
WriterPipedInputStream
Creates a WriterPipedInputStream.- Parameters:
bufferSize- the buffer size- Throws:
IOException
-
-
Method Details
-
runPipeWriter
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 WriterPipedInputStreamexecutorService- the ExecutorService used to submit the writing thread
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classPipedInputStream- Throws:
IOException
-