- 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.CsvEscapeModePropertyNested 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.DelimiterPropertyNested 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
ConstructorsConstructorDescriptionCsvStringRecordReader(File aCsvFile) CsvStringRecordReader(File aCsvFile, boolean isStrict) CsvStringRecordReader(File aCsvFile, boolean isStrict, String... aHeader) Constructs aCsvStringRecordReaderwith 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 aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(File aCsvFile, char aCsvSeparator, String... aHeader) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(File aCsvFile, String... aHeader) Constructs aCsvStringRecordReaderwith 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 aCsvStringRecordReaderwith 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 aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(File aCsvFile, Charset aEncoding, char aCsvSeparator, String... aHeader) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(File aCsvFile, Charset aEncoding, String... aHeader) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(InputStream aCsvInputStream) CsvStringRecordReader(InputStream aCsvInputStream, boolean isStrict) CsvStringRecordReader(InputStream aCsvInputStream, boolean isStrict, String... aHeader) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(InputStream aCsvInputStream, char aCsvDelimiter) CsvStringRecordReader(InputStream aCsvInputStream, char aCsvDelimiter, boolean isStrict) CsvStringRecordReader(InputStream aCsvInputStream, char aCsvDelimiter, String... aHeader) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(InputStream aCsvInputStream, String... aHeader) Constructs aCsvStringRecordReaderwith 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 aCsvStringRecordReaderwith 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 aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(InputStream aCsvInputStream, Charset aEncoding, String... aHeader) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, File aCsvFile) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, File aCsvFile, boolean isStrict) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, File aCsvFile, char aCsvSeparator) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, File aCsvFile, char aCsvSeparator, boolean isStrict) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, File aCsvFile, Charset aEncoding) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, File aCsvFile, Charset aEncoding, boolean isStrict) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, File aCsvFile, Charset aEncoding, char aCsvSeparator) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, File aCsvFile, Charset aEncoding, char aCsvSeparator, boolean isStrict) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, InputStream aCsvInputStream) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, InputStream aCsvInputStream, boolean isStrict) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, InputStream aCsvInputStream, char aCsvDelimiter) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, InputStream aCsvInputStream, Charset aEncoding) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, InputStream aCsvInputStream, Charset aEncoding, boolean isStrict) Constructs aCsvStringRecordReaderwith the given parameters.CsvStringRecordReader(String[] aHeader, InputStream aCsvInputStream, Charset aEncoding, char aCsvDelimiter) Constructs aCsvStringRecordReaderwith 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, skipHeaderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeProperty
letCsvEscapeModeMethods inherited from interface org.refcodes.textual.CsvMixin
isComment, toComment, uncommentMethods inherited from interface org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
letDelimiterMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemainingMethods inherited from interface org.refcodes.tabular.RecordReader
nextType, toHeaderMethods 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvFile- The CSVFilewhich 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- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvFile- The CSVFilewhich 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- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvFile- The CSVFilewhich to parse.aCsvSeparator- The delimiter being expected for the CSV input stream.aHeader- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvFile- The CSVFilewhich to parse.aEncoding- TheCharsetfor 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- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvFile- The CSVFilewhich to parse.aEncoding- TheCharsetfor 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- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvFile- The CSVFilewhich to parse.aEncoding- TheCharsetfor the character encoding to use.aCsvSeparator- The delimiter being expected for the CSV input stream.aHeader- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvFile- The CSVFilewhich to parse.aEncoding- TheCharsetfor the character encoding to use.aHeader- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvFile- The CSVFilewhich to parse.aHeader- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvInputStream- The CSVInputStreamwhich 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- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvInputStream- The CSVInputStreamwhich to parse.aCsvDelimiter- The delimiter being expected for the CSV input stream.aHeader- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvInputStream- The CSVInputStreamwhich to parse.aEncoding- TheCharsetfor 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- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvInputStream- The CSVInputStreamwhich to parse.aEncoding- the encodingaCsvDelimiter- The delimiter being expected for the CSV input stream.aHeader- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvInputStream- The CSVInputStreamwhich to parse.aEncoding- TheCharsetfor the character encoding to use.aHeader- TheStringelements representing theHeaderto use when parsing the input.- Throws:
IOException- in case there were problems working with the givenInputStream.
-
CsvStringRecordReader
Constructs aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aCsvInputStream- The CSVInputStreamwhich to parse.aHeader- TheStringelements representing theHeaderto 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvFile- The CSVFilewhich 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvFile- The CSVFilewhich 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvFile- The CSVFilewhich 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvFile- The CSVFilewhich to parse.aEncoding- TheCharsetfor 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvFile- The CSVFilewhich to parse.aEncoding- TheCharsetfor 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvFile- The CSVFilewhich to parse.aEncoding- TheCharsetfor 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvFile- The CSVFilewhich to parse.aEncoding- TheCharsetfor 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvFile- The CSVFilewhich 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvInputStream- The CSVInputStreamwhich 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvInputStream- The CSVInputStreamwhich 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvInputStream- The CSVInputStreamwhich to parse.aEncoding- TheCharsetfor 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvInputStream- The CSVInputStreamwhich 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 aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvInputStream- The CSVInputStreamwhich to parse.aEncoding- TheCharsetfor the character encoding to use.- Throws:
IOException- in case there were problems working with the givenInputStream.
-
CsvStringRecordReader
Constructs aCsvStringRecordReaderwith the given parameters. InternallyColumninstances are generated according to the keys found in the CSV top line. TheColumninstances are required to convert the CSV line values. If aHeaderis provided, then theHeaderis used for generating theColumninstances instead of the top line of the CSV file.- Parameters:
aHeader- TheStringelements representing theHeaderto use when parsing the input.aCsvInputStream- The CSVInputStreamwhich 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:
withTrimin interfaceorg.refcodes.mixin.TrimAccessor.TrimBuilder<org.refcodes.textual.CsvMixin>- Overrides:
withTrimin classCsvRecordReader<String>
-
withCsvEscapeMode
- Specified by:
withCsvEscapeModein interfaceorg.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeBuilder<org.refcodes.textual.CsvMixin>- Overrides:
withCsvEscapeModein classCsvRecordReader<String>
-
withDelimiter
- Specified by:
withDelimiterin interfaceorg.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<org.refcodes.textual.CsvMixin>- Overrides:
withDelimiterin classCsvRecordReader<String>
-
withCommentPrefixes
- Specified by:
withCommentPrefixesin interfaceorg.refcodes.textual.CsvMixin- Overrides:
withCommentPrefixesin classCsvRecordReader<String>
-