Class CsvInputStreamRecordsImpl<T>

    • Constructor Detail

      • CsvInputStreamRecordsImpl

        public CsvInputStreamRecordsImpl​(Header<T> aHeader,
                                         java.io.InputStream aCsvInputStream)
                                  throws java.io.IOException
        Constructs a CsvInputStreamRecordsImpl with the given parameters. Internally Column instances are generated according to the keys found in the CSV top line. The Column instances are required to convert the CSV line values. If a Header is provided, then the Header is used for generating the Column instances instead of the top line of the CSV file.
        Parameters:
        aHeader - The Header to use when parsing the lines retrieved from the InputStream.
        aCsvInputStream - The CSV InputStream which to parse.
        Throws:
        java.io.IOException - in case there were problems working with the given InputStream.
      • CsvInputStreamRecordsImpl

        public CsvInputStreamRecordsImpl​(Header<T> aHeader,
                                         java.io.InputStream aCsvInputStream,
                                         boolean isStrict)
                                  throws java.io.IOException
        Constructs a CsvInputStreamRecordsImpl with the given parameters. Internally Column instances are generated according to the keys found in the CSV top line. The Column instances are required to convert the CSV line values. If a Header is provided, then the Header is used for generating the Column instances instead of the top line of the CSV file.
        Parameters:
        aHeader - The Header to use when parsing the lines retrieved from the InputStream.
        aCsvInputStream - The CSV InputStream which to parse.
        isStrict - When true, then parsing will abort with an exception in case of parsing problems, else parsing is gracefully continued and erroneous records are skipped. The error count getErroneousRecordCount() is incremented by each erroneous Record.
        Throws:
        java.io.IOException - in case there were problems working with the given InputStream.
      • CsvInputStreamRecordsImpl

        public CsvInputStreamRecordsImpl​(Header<T> aHeader,
                                         java.io.InputStream aCsvInputStream,
                                         char aCsvDelimiter)
                                  throws java.io.IOException
        Constructs a CsvInputStreamRecordsImpl with the given parameters. Internally Column instances are generated according to the keys found in the CSV top line. The Column instances are required to convert the CSV line values. If a Header is provided, then the Header is used for generating the Column instances instead of the top line of the CSV file.
        Parameters:
        aHeader - The Header to use when parsing the lines retrieved from the InputStream.
        aCsvInputStream - The CSV InputStream which to parse.
        aCsvDelimiter - The delimiter being expected for the CSV input stream.
        Throws:
        java.io.IOException - in case there were problems working with the given InputStream.
      • CsvInputStreamRecordsImpl

        public CsvInputStreamRecordsImpl​(Header<T> aHeader,
                                         java.io.InputStream aCsvInputStream,
                                         char aCsvDelimiter,
                                         boolean isStrict)
                                  throws java.io.IOException
        Constructs a CsvInputStreamRecordsImpl with the given parameters. Internally Column instances are generated according to the keys found in the CSV top line. The Column instances are required to convert the CSV line values. If a Header is provided, then the Header is used for generating the Column instances instead of the top line of the CSV file.
        Parameters:
        aHeader - The Header to use when parsing the lines retrieved from the InputStream.
        aCsvInputStream - The CSV InputStream which to parse.
        aCsvDelimiter - The delimiter being expected for the CSV input stream.
        isStrict - When true, then parsing will abort with an exception in case of parsing problems, else parsing is gracefully continued and erroneous records are skipped. The error count getErroneousRecordCount() is incremented by each erroneous Record.
        Throws:
        java.io.IOException - in case there were problems working with the given InputStream.
      • CsvInputStreamRecordsImpl

        public CsvInputStreamRecordsImpl​(ColumnFactory<T> aColumnFactory,
                                         java.io.InputStream aCsvInputStream)
                                  throws java.io.IOException
        Constructs a CsvInputStreamRecordsImpl with the given parameters. This constructor supports a ColumnFactory for creating Column instance according to the keys found in the CSV top line. The Column instances are required to convert the CSV line values from the storage format to the actual required type.
        Parameters:
        aColumnFactory - A ColumnFactory to be used to generate Column instances from the top line of the CSF file, required for parsing the CSV lines and converting them to Record instances.
        aCsvInputStream - The CSV InputStream which to parse.
        Throws:
        java.io.IOException - in case there were problems working with the given InputStream.
      • CsvInputStreamRecordsImpl

        public CsvInputStreamRecordsImpl​(ColumnFactory<T> aColumnFactory,
                                         java.io.InputStream aCsvInputStream,
                                         boolean isStrict)
                                  throws java.io.IOException
        Constructs a CsvInputStreamRecordsImpl with the given parameters. This constructor supports a ColumnFactory for creating Column instance according to the keys found in the CSV top line. The Column instances are required to convert the CSV line values from the storage format to the actual required type.
        Parameters:
        aColumnFactory - A ColumnFactory to be used to generate Column instances from the top line of the CSF file, required for parsing the CSV lines and converting them to Record instances.
        aCsvInputStream - The CSV InputStream which to parse.
        isStrict - When true, then parsing will abort with an exception in case of parsing problems, else parsing is gracefully continued and erroneous records are skipped. The error count getErroneousRecordCount() is incremented by each erroneous Record.
        Throws:
        java.io.IOException - in case there were problems working with the given InputStream.
      • CsvInputStreamRecordsImpl

        public CsvInputStreamRecordsImpl​(ColumnFactory<T> aColumnFactory,
                                         java.io.InputStream aCsvInputStream,
                                         char aCsvDelimiter)
                                  throws java.io.IOException
        Constructs a CsvInputStreamRecordsImpl with the given parameters. This constructor supports a ColumnFactory for creating Column instance according to the keys found in the CSV top line. The Column instances are required to convert the CSV line values from the storage format to the actual required type.
        Parameters:
        aColumnFactory - A ColumnFactory to be used to generate Column instances from the top line of the CSF file, required for parsing the CSV lines and converting them to Record instances.
        aCsvInputStream - The CSV InputStream which to parse.
        aCsvDelimiter - The delimiter being expected for the CSV input stream.
        Throws:
        java.io.IOException - in case there were problems working with the given InputStream.
      • CsvInputStreamRecordsImpl

        public CsvInputStreamRecordsImpl​(ColumnFactory<T> aColumnFactory,
                                         java.io.InputStream aCsvInputStream,
                                         char aCsvDelimiter,
                                         boolean isStrict)
                                  throws java.io.IOException
        Constructs a CsvInputStreamRecordsImpl with the given parameters. This constructor supports a ColumnFactory for creating Column instance according to the keys found in the CSV top line. The Column instances are required to convert the CSV line values from the storage format to the actual required type.
        Parameters:
        aColumnFactory - A ColumnFactory to be used to generate Column instances from the top line of the CSF file, required for parsing the CSV lines and converting them to Record instances.
        aCsvInputStream - The CSV InputStream which to parse.
        aCsvDelimiter - The delimiter being expected for the CSV input stream.
        isStrict - When true, then parsing will abort with an exception in case of parsing problems, else parsing is gracefully continued and erroneous records are skipped. The error count getErroneousRecordCount() is incremented by each erroneous Record.
        Throws:
        java.io.IOException - in case there were problems working with the given InputStream.
      • CsvInputStreamRecordsImpl

        protected CsvInputStreamRecordsImpl​(Header<T> aHeader,
                                            ColumnFactory<T> aColumnFactory,
                                            java.io.InputStream aCsvInputStream,
                                            char aCsvDelimiter,
                                            boolean isStrict)
                                     throws java.io.IOException
        Constructs a CsvInputStreamRecordsImpl with the given parameters. This constructor supports a ColumnFactory for creating Column instance according to the keys found in the CSV top line. The Column instances are required to convert the CSV line values from the storage format to the actual required type. If a Header is provided, then the Header is used for generating the Column instances instead of the top line of the CSV file.
        Parameters:
        aHeader - The Header to use when parsing the lines retrieved from the InputStream.
        aColumnFactory - A ColumnFactory to be used to generate Column instances from the top line of the CSF file, required for parsing the CSV lines and converting them to Record instances.
        aCsvInputStream - The CSV InputStream which to parse.
        aCsvDelimiter - The delimiter being expected for the CSV input stream.
        isStrict - When true, then parsing will abort with an exception in case of parsing problems, else parsing is gracefully continued and erroneous records are skipped. The error count getErroneousRecordCount() is incremented by each erroneous Record.
        Throws:
        java.io.IOException - in case there were problems working with the given InputStream.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<T>
      • next

        public Record<T> next()
        Next.
        Specified by:
        next in interface java.util.Iterator<T>
        Returns:
        the record
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<T>