- All Implemented Interfaces:
AutoCloseable
,Iterable<Record<String>>
,Iterator<Record<String>>
,org.refcodes.io.RowReader<String[]>
,org.refcodes.mixin.DelimiterAccessor
,org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<org.refcodes.textual.CsvMixin>
,org.refcodes.mixin.DelimiterAccessor.DelimiterMutator
,org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
,org.refcodes.mixin.TrimAccessor
,org.refcodes.mixin.TrimAccessor.TrimBuilder<org.refcodes.textual.CsvMixin>
,org.refcodes.mixin.TrimAccessor.TrimMutator
,org.refcodes.mixin.TrimAccessor.TrimProperty
,HeaderAccessor<String>
,RecordReader<String>
,Records<String>
,org.refcodes.textual.CsvEscapeModeAccessor
,org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeBuilder<org.refcodes.textual.CsvMixin>
,org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeMutator
,org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeProperty
,org.refcodes.textual.CsvMixin
THis implementation of the
CsvRecordReader
assumes that for ease of
use we just want to handle String
columns.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.textual.CsvEscapeModeAccessor
org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeBuilder<B extends org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeBuilder<?>>, org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeMutator, org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.DelimiterAccessor
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
Nested classes/interfaces inherited from interface org.refcodes.tabular.HeaderAccessor
HeaderAccessor.HeaderBuilder<T extends HeaderAccessor.HeaderBuilder<?>>, HeaderAccessor.HeaderMutator<T>, HeaderAccessor.HeaderProperty<T>
Nested classes/interfaces inherited from interface org.refcodes.mixin.TrimAccessor
org.refcodes.mixin.TrimAccessor.TrimBuilder<B extends org.refcodes.mixin.TrimAccessor.TrimBuilder<B>>, org.refcodes.mixin.TrimAccessor.TrimMutator, org.refcodes.mixin.TrimAccessor.TrimProperty
-
Constructor Summary
ConstructorDescriptionCsvStringRecordReader
(File aCsvFile) CsvStringRecordReader
(File aCsvFile, boolean isStrict) CsvStringRecordReader
(File aCsvFile, boolean isStrict, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(File aCsvFile, char aCsvSeparator) CsvStringRecordReader
(File aCsvFile, char aCsvSeparator, boolean isStrict) CsvStringRecordReader
(File aCsvFile, char aCsvSeparator, boolean isStrict, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(File aCsvFile, char aCsvSeparator, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(File aCsvFile, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(File aCsvFile, Charset aEncoding) CsvStringRecordReader
(File aCsvFile, Charset aEncoding, boolean isStrict) CsvStringRecordReader
(File aCsvFile, Charset aEncoding, boolean isStrict, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(File aCsvFile, Charset aEncoding, char aCsvSeparator) CsvStringRecordReader
(File aCsvFile, Charset aEncoding, char aCsvSeparator, boolean isStrict) CsvStringRecordReader
(File aCsvFile, Charset aEncoding, char aCsvSeparator, boolean isStrict, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(File aCsvFile, Charset aEncoding, char aCsvSeparator, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(File aCsvFile, Charset aEncoding, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(InputStream aCsvInputStream) CsvStringRecordReader
(InputStream aCsvInputStream, boolean isStrict) CsvStringRecordReader
(InputStream aCsvInputStream, boolean isStrict, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(InputStream aCsvInputStream, char aCsvDelimiter) CsvStringRecordReader
(InputStream aCsvInputStream, char aCsvDelimiter, boolean isStrict) CsvStringRecordReader
(InputStream aCsvInputStream, char aCsvDelimiter, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(InputStream aCsvInputStream, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(InputStream aCsvInputStream, Charset aEncoding) CsvStringRecordReader
(InputStream aCsvInputStream, Charset aEncoding, boolean isStrict) CsvStringRecordReader
(InputStream aCsvInputStream, Charset aEncoding, boolean isStrict, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(InputStream aCsvInputStream, Charset aEncoding, char aCsvDelimiter) CsvStringRecordReader
(InputStream aCsvInputStream, Charset aEncoding, char aCsvDelimiter, boolean isStrict) CsvStringRecordReader
(InputStream aCsvInputStream, Charset aEncoding, char aCsvDelimiter, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(InputStream aCsvInputStream, Charset aEncoding, String... aHeader) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, File aCsvFile) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, File aCsvFile, boolean isStrict) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, File aCsvFile, char aCsvSeparator) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, File aCsvFile, char aCsvSeparator, boolean isStrict) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, File aCsvFile, Charset aEncoding) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, File aCsvFile, Charset aEncoding, boolean isStrict) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, File aCsvFile, Charset aEncoding, char aCsvSeparator) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, File aCsvFile, Charset aEncoding, char aCsvSeparator, boolean isStrict) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, InputStream aCsvInputStream) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, InputStream aCsvInputStream, boolean isStrict) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, InputStream aCsvInputStream, char aCsvDelimiter) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, InputStream aCsvInputStream, Charset aEncoding) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, InputStream aCsvInputStream, Charset aEncoding, boolean isStrict) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(String[] aHeader, InputStream aCsvInputStream, Charset aEncoding, char aCsvDelimiter) Constructs aCsvStringRecordReader
with the given parameters.CsvStringRecordReader
(Header<String> aHeader, File aCsvFile) CsvStringRecordReader
(Header<String> aHeader, File aCsvFile, boolean isStrict) CsvStringRecordReader
(Header<String> aHeader, File aCsvFile, char aCsvSeparator) CsvStringRecordReader
(Header<String> aHeader, File aCsvFile, char aCsvSeparator, boolean isStrict) CsvStringRecordReader
(Header<String> aHeader, File aCsvFile, Charset aEncoding) CsvStringRecordReader
(Header<String> aHeader, File aCsvFile, Charset aEncoding, boolean isStrict) CsvStringRecordReader
(Header<String> aHeader, File aCsvFile, Charset aEncoding, char aCsvSeparator) CsvStringRecordReader
(Header<String> aHeader, File aCsvFile, Charset aEncoding, char aCsvSeparator, boolean isStrict) CsvStringRecordReader
(Header<String> aHeader, InputStream aCsvInputStream) CsvStringRecordReader
(Header<String> aHeader, InputStream aCsvInputStream, boolean isStrict) CsvStringRecordReader
(Header<String> aHeader, InputStream aCsvInputStream, char aCsvDelimiter) CsvStringRecordReader
(Header<String> aHeader, InputStream aCsvInputStream, Charset aEncoding) CsvStringRecordReader
(Header<String> aHeader, InputStream aCsvInputStream, Charset aEncoding, boolean isStrict) CsvStringRecordReader
(Header<String> aHeader, InputStream aCsvInputStream, Charset aEncoding, char aCsvDelimiter) -
Method Summary
Modifier and TypeMethodDescriptionwithCommentPrefixes
(String... aCommentPrefixes) withCsvEscapeMode
(org.refcodes.textual.CsvEscapeMode aCsvEscapeMode) withDelimiter
(char aCsvDelimiter) withTrim
(boolean isTrimRecords) Methods inherited from class org.refcodes.tabular.CsvRecordReader
clearCommentPrefixes, close, getCommentPrefixes, getCsvEscapeMode, getDelimiter, getErroneousRecordCount, getHeader, hasNext, isTrim, next, nextRaw, nextRow, readHeader, readHeader, readHeader, remove, setCommentPrefixes, setCsvEscapeMode, setDelimiter, setTrim, skipHeader
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeProperty
letCsvEscapeMode
Methods inherited from interface org.refcodes.textual.CsvMixin
isComment, toComment, uncomment
Methods inherited from interface org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
letDelimiter
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface java.util.Iterator
forEachRemaining
Methods inherited from interface org.refcodes.tabular.RecordReader
nextType, toHeader
Methods inherited from interface org.refcodes.mixin.TrimAccessor.TrimProperty
letTrim
-
Constructor Details
-
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, File aCsvFile, boolean isStrict) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, File aCsvFile, char aCsvSeparator, boolean isStrict) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, File aCsvFile, char aCsvSeparator) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, File aCsvFile, Charset aEncoding, boolean isStrict) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, File aCsvFile, Charset aEncoding, char aCsvSeparator, boolean isStrict) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, File aCsvFile, Charset aEncoding, char aCsvSeparator) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, File aCsvFile, Charset aEncoding) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, File aCsvFile) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, InputStream aCsvInputStream, boolean isStrict) throws IOException - Throws:
IOException
-
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, InputStream aCsvInputStream, char aCsvDelimiter) throws IOException - Throws:
IOException
-
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, InputStream aCsvInputStream, Charset aEncoding, boolean isStrict) throws IOException - Throws:
IOException
-
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, InputStream aCsvInputStream, Charset aEncoding, char aCsvDelimiter) throws IOException - Throws:
IOException
-
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, InputStream aCsvInputStream, Charset aEncoding) throws IOException - Throws:
IOException
-
CsvStringRecordReader
public CsvStringRecordReader(Header<String> aHeader, InputStream aCsvInputStream) throws IOException - Throws:
IOException
-
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, boolean isStrict, String... aHeader) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvFile
- The CSVFile
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 countCsvRecordReader.getErroneousRecordCount()
is incremented by each erroneousRecord
.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, char aCsvSeparator, boolean isStrict, String... aHeader) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvFile
- The CSVFile
which to parse.aCsvSeparator
- 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 countCsvRecordReader.getErroneousRecordCount()
is incremented by each erroneousRecord
.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, char aCsvSeparator, String... aHeader) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvFile
- The CSVFile
which to parse.aCsvSeparator
- The delimiter being expected for the CSV input stream.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, Charset aEncoding, boolean isStrict, String... aHeader) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvFile
- The CSVFile
which to parse.aEncoding
- TheCharset
for the character encoding to use.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 countCsvRecordReader.getErroneousRecordCount()
is incremented by each erroneousRecord
.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, Charset aEncoding, char aCsvSeparator, boolean isStrict, String... aHeader) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvFile
- The CSVFile
which to parse.aEncoding
- TheCharset
for the character encoding to use.aCsvSeparator
- 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 countCsvRecordReader.getErroneousRecordCount()
is incremented by each erroneousRecord
.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, Charset aEncoding, char aCsvSeparator, String... aHeader) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvFile
- The CSVFile
which to parse.aEncoding
- TheCharset
for the character encoding to use.aCsvSeparator
- The delimiter being expected for the CSV input stream.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, Charset aEncoding, String... aHeader) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvFile
- The CSVFile
which to parse.aEncoding
- TheCharset
for the character encoding to use.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, String... aHeader) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvFile
- The CSVFile
which to parse.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(InputStream aCsvInputStream, boolean isStrict, String... aHeader) throws IOException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvInputStream
- The CSVInputStream
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 countCsvRecordReader.getErroneousRecordCount()
is incremented by each erroneousRecord
.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
IOException
- in case there were problems working with the givenInputStream
.
-
CsvStringRecordReader
public CsvStringRecordReader(InputStream aCsvInputStream, char aCsvDelimiter, String... aHeader) throws IOException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvInputStream
- The CSVInputStream
which to parse.aCsvDelimiter
- The delimiter being expected for the CSV input stream.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
IOException
- in case there were problems working with the givenInputStream
.
-
CsvStringRecordReader
public CsvStringRecordReader(InputStream aCsvInputStream, Charset aEncoding, boolean isStrict, String... aHeader) throws IOException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvInputStream
- The CSVInputStream
which to parse.aEncoding
- TheCharset
for the character encoding to use.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 countCsvRecordReader.getErroneousRecordCount()
is incremented by each erroneousRecord
.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
IOException
- in case there were problems working with the givenInputStream
.
-
CsvStringRecordReader
public CsvStringRecordReader(InputStream aCsvInputStream, Charset aEncoding, char aCsvDelimiter, String... aHeader) throws IOException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvInputStream
- The CSVInputStream
which to parse.aEncoding
- the encodingaCsvDelimiter
- The delimiter being expected for the CSV input stream.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
IOException
- in case there were problems working with the givenInputStream
.
-
CsvStringRecordReader
public CsvStringRecordReader(InputStream aCsvInputStream, Charset aEncoding, String... aHeader) throws IOException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvInputStream
- The CSVInputStream
which to parse.aEncoding
- TheCharset
for the character encoding to use.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
IOException
- in case there were problems working with the givenInputStream
.
-
CsvStringRecordReader
Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aCsvInputStream
- The CSVInputStream
which to parse.aHeader
- TheString
elements representing theHeader
to use when parsing the input.- Throws:
IOException
- in case there were problems working with the givenInputStream
.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, File aCsvFile, boolean isStrict) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvFile
- The CSVFile
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 countCsvRecordReader.getErroneousRecordCount()
is incremented by each erroneousRecord
.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, File aCsvFile, char aCsvSeparator, boolean isStrict) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvFile
- The CSVFile
which to parse.aCsvSeparator
- 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 countCsvRecordReader.getErroneousRecordCount()
is incremented by each erroneousRecord
.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, File aCsvFile, char aCsvSeparator) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvFile
- The CSVFile
which to parse.aCsvSeparator
- The delimiter being expected for the CSV input stream.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, File aCsvFile, Charset aEncoding, boolean isStrict) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvFile
- The CSVFile
which to parse.aEncoding
- TheCharset
for the character encoding to use.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 countCsvRecordReader.getErroneousRecordCount()
is incremented by each erroneousRecord
.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, File aCsvFile, Charset aEncoding, char aCsvSeparator, boolean isStrict) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvFile
- The CSVFile
which to parse.aEncoding
- TheCharset
for the character encoding to use.aCsvSeparator
- 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 countCsvRecordReader.getErroneousRecordCount()
is incremented by each erroneousRecord
.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, File aCsvFile, Charset aEncoding, char aCsvSeparator) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvFile
- The CSVFile
which to parse.aEncoding
- TheCharset
for the character encoding to use.aCsvSeparator
- The delimiter being expected for the CSV input stream.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, File aCsvFile, Charset aEncoding) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvFile
- The CSVFile
which to parse.aEncoding
- TheCharset
for the character encoding to use.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, File aCsvFile) throws FileNotFoundException, IOException, ZipException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvFile
- The CSVFile
which to parse.- Throws:
FileNotFoundException
- the file not found exceptionIOException
- in case there were problems working with the givenFile
.ZipException
- thrown in case processing a ZIP compressed file encountered problems.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, InputStream aCsvInputStream, boolean isStrict) throws IOException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvInputStream
- The CSVInputStream
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 countCsvRecordReader.getErroneousRecordCount()
is incremented by each erroneousRecord
.- Throws:
IOException
- in case there were problems working with the givenInputStream
.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, InputStream aCsvInputStream, char aCsvDelimiter) throws IOException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvInputStream
- The CSVInputStream
which to parse.aCsvDelimiter
- The delimiter being expected for the CSV input stream.- Throws:
IOException
- in case there were problems working with the givenInputStream
.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, InputStream aCsvInputStream, Charset aEncoding, boolean isStrict) throws IOException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvInputStream
- The CSVInputStream
which to parse.aEncoding
- TheCharset
for the character encoding to use.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 countCsvRecordReader.getErroneousRecordCount()
is incremented by each erroneousRecord
.- Throws:
IOException
- in case there were problems working with the givenInputStream
.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, InputStream aCsvInputStream, Charset aEncoding, char aCsvDelimiter) throws IOException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvInputStream
- The CSVInputStream
which to parse.aEncoding
- the encodingaCsvDelimiter
- The delimiter being expected for the CSV input stream.- Throws:
IOException
- in case there were problems working with the givenInputStream
.
-
CsvStringRecordReader
public CsvStringRecordReader(String[] aHeader, InputStream aCsvInputStream, Charset aEncoding) throws IOException Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvInputStream
- The CSVInputStream
which to parse.aEncoding
- TheCharset
for the character encoding to use.- Throws:
IOException
- in case there were problems working with the givenInputStream
.
-
CsvStringRecordReader
Constructs aCsvStringRecordReader
with the given parameters. InternallyColumn
instances are generated according to the keys found in the CSV top line. TheColumn
instances are required to convert the CSV line values. If aHeader
is provided, then theHeader
is used for generating theColumn
instances instead of the top line of the CSV file.- Parameters:
aHeader
- TheString
elements representing theHeader
to use when parsing the input.aCsvInputStream
- The CSVInputStream
which to parse.- Throws:
IOException
- in case there were problems working with the givenInputStream
.
-
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, boolean isStrict) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, char aCsvSeparator, boolean isStrict) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, char aCsvSeparator) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
-
CsvStringRecordReader
- Throws:
IOException
-
CsvStringRecordReader
public CsvStringRecordReader(InputStream aCsvInputStream, char aCsvDelimiter, boolean isStrict) throws IOException - Throws:
IOException
-
CsvStringRecordReader
- Throws:
IOException
-
CsvStringRecordReader
- Throws:
IOException
-
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, Charset aEncoding, boolean isStrict) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, Charset aEncoding, char aCsvSeparator, boolean isStrict) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, Charset aEncoding, char aCsvSeparator) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(File aCsvFile, Charset aEncoding) throws FileNotFoundException, IOException, ZipException -
CsvStringRecordReader
public CsvStringRecordReader(InputStream aCsvInputStream, Charset aEncoding, boolean isStrict) throws IOException - Throws:
IOException
-
CsvStringRecordReader
public CsvStringRecordReader(InputStream aCsvInputStream, Charset aEncoding, char aCsvDelimiter, boolean isStrict) throws IOException - Throws:
IOException
-
CsvStringRecordReader
public CsvStringRecordReader(InputStream aCsvInputStream, Charset aEncoding, char aCsvDelimiter) throws IOException - Throws:
IOException
-
CsvStringRecordReader
- Throws:
IOException
-
-
Method Details
-
withTrim
- Specified by:
withTrim
in interfaceorg.refcodes.mixin.TrimAccessor.TrimBuilder<org.refcodes.textual.CsvMixin>
- Overrides:
withTrim
in classCsvRecordReader<String>
-
withCsvEscapeMode
- Specified by:
withCsvEscapeMode
in interfaceorg.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeBuilder<org.refcodes.textual.CsvMixin>
- Overrides:
withCsvEscapeMode
in classCsvRecordReader<String>
-
withDelimiter
- Specified by:
withDelimiter
in interfaceorg.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<org.refcodes.textual.CsvMixin>
- Overrides:
withDelimiter
in classCsvRecordReader<String>
-
withCommentPrefixes
- Specified by:
withCommentPrefixes
in interfaceorg.refcodes.textual.CsvMixin
- Overrides:
withCommentPrefixes
in classCsvRecordReader<String>
-