Class LineSplitterBlock


  • public class LineSplitterBlock
    extends PipelineBlock<char[],​String>
    A PipelineBlock, which splits input stream of char[] into lines using the specified Pattern as line separator. Next block PipelineBlock.accept(Object, boolean) is invoked for each line. Leftover characters are remembered and used during processing the next input batch, unless isLastPortion flag is specified.
    • Constructor Detail

      • LineSplitterBlock

        public LineSplitterBlock​(Pattern delim)
        Creates line splitter block.
        Parameters:
        delim - The line separator pattern.
    • Method Detail

      • accept

        public void accept​(char[] chars,
                           boolean isLastPortion)
                    throws IgniteCheckedException
        Accepts a portion of input. isLastPortion parameter should be set if this is a last portion of the input. The method must not be called after the end of input: the call with isLastPortion == true is the last one.
        Specified by:
        accept in class PipelineBlock<char[],​String>
        Parameters:
        chars - Portion of input.
        isLastPortion - Is this the last portion.
        Throws:
        IgniteCheckedException - On error.