Class TxtFileWriterPipe

    • Constructor Detail

      • TxtFileWriterPipe

        public TxtFileWriterPipe​(Pipe<String> input,
                                 File f,
                                 Charset charset,
                                 FileWriteOptions options)
        Constructor
        Parameters:
        input - The input pipe
        f - The text file to write to, one item per line
        charset - The charset to use
        options - The file writing options
      • TxtFileWriterPipe

        public TxtFileWriterPipe​(Pipe<String> input,
                                 File f,
                                 Charset charset)
        Constructor Uses default file write options.
        Parameters:
        input - The input pipe
        f - The text file to write to. If exists, the file is being overwritten.
        charset - The charset to use
      • TxtFileWriterPipe

        public TxtFileWriterPipe​(Pipe<String> input,
                                 File f)
        Constructor Uses default file write options and UTF8 charset encoding.
        Parameters:
        input - The input pipe
        f - The text file to write to. If exists, the file is being overwritten.
      • TxtFileWriterPipe

        public TxtFileWriterPipe​(Pipe<String> input,
                                 File f,
                                 FileWriteOptions options)
        Constructor Uses UTF8 charset encoding.
        Parameters:
        input - The input pipe
        f - The text file to write to. If exists, the file is being overwritten.
        options - The file writing options
    • Method Detail

      • start

        public void start()
                   throws PipeException,
                          InterruptedException
        Description copied from interface: BasePipe
        Performs 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.