@@ -0,0 +1,1738 @@
+package io.github.benas.easybatch.core.util;%0A%0Aimport io.github.benas.easybatch.core.api.RecordReader;%0A%0Aimport java.util.Scanner;%0A%0A/**%0A * A convenient %7B@link RecordReader%7D that reads data from the standard input (useful for tests).%0A *%0A * @author benas (md.benhassine@gmail.com)%0A */%0Apublic class CliRecordReader implements RecordReader %7B%0A%0A    /**%0A     * The standard input scanner.%0A     */%0A    private Scanner scanner;%0A%0A    /**%0A     * The current record number.%0A     */%0A    private long recordNumber;%0A%0A    /**%0A     * The user input.%0A     */%0A    private String input;%0A%0A    /**%0A     * The word to type to terminate reading from the standard input.%0A     */%0A    private String terminationInput;%0A%0A    /**%0A     * Default constructor with default termination input equals to 'quit'.%0A     */%0A    public CliRecordReader() %7B%0A        this(%22quit%22);%0A    %7D%0A%0A    /**%0A     * Constructs a CliRecordReader instance with a termination word.%0A     * @param terminationInput the word to type to stop reading from the standard input.%0A     */%0A    public CliRecordReader(String terminationInput) %7B%0A        this.terminationInput = terminationInput;%0A    %7D%0A%0A    @Override%0A    public void open() throws Exception %7B%0A        scanner = new Scanner(System.in);%0A    %7D%0A%0A    @Override%0A    public boolean hasNextRecord() %7B%0A        return !(input != null && !input.isEmpty() && input.equalsIgnoreCase(terminationInput));%0A    %7D%0A%0A    @Override%0A    public StringRecord readNextRecord() %7B%0A        input = scanner.nextLine();%0A        return new StringRecord(++recordNumber, input);%0A    %7D%0A%0A    @Override%0A    public long getTotalRecords() %7B%0A        return 0; // total record cannot be calculated upfront%0A    %7D%0A%0A    @Override%0A    public void close() %7B%0A        scanner.close();%0A    %7D%0A%0A%7D%0A

add a convenient record reader that reads data from the standard input ( very useful for tests)