Package org.pipecraft.pipes.terminal
Class WriterPipe
- java.lang.Object
-
- org.pipecraft.pipes.terminal.TerminalPipe
-
- org.pipecraft.pipes.terminal.WriterPipe
-
- All Implemented Interfaces:
Closeable,AutoCloseable,BasePipe
public class WriterPipe extends TerminalPipe
A terminal pipe writing textual items to a givenWriter, one item per line. Calling start() blocks until all data from the input pipe is written to the writer.- Author:
- Eyal Schneider
-
-
Constructor Summary
Constructors Constructor Description WriterPipe(Pipe<String> input, Writer w)ConstructorWriterPipe(Pipe<String> input, Writer w, int bufferSize)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidstart()Performs pre-processing prior to item flow throw the pipe.-
Methods inherited from class org.pipecraft.pipes.terminal.TerminalPipe
getProgress
-
-
-
-
Method Detail
-
close
public void close() throws IOException- Throws:
IOException
-
start
public void start() throws PipeException, InterruptedExceptionDescription copied from interface:BasePipePerforms pre-processing prior to item flow throw the pipe. Implementations must call the same method for all their input pipes before accessing their items. This is typically done here.- Throws:
PipeException- In case of pipe errors in this pipe or somewhere up-stream.InterruptedException- In case that the operation has been interrupted by another thread.
-
-