Package com.opencsv
Class CSVReaderBaseBuilder<T>
- java.lang.Object
-
- com.opencsv.CSVReaderBaseBuilder<T>
-
- Type Parameters:
T- The type pf the CSVReader class to return
- Direct Known Subclasses:
CSVReaderBuilder,CSVReaderHeaderAwareBuilder
public abstract class CSVReaderBaseBuilder<T> extends java.lang.ObjectBase class for the builders of various incarnations of CSVReaders.- Since:
- 5.5.2
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.LocaleerrorLocaleprotected ICSVParsericsvParserprotected booleankeepCRprotected LineValidatorAggregatorlineValidatorAggregatorprotected intmultilineLimitprotected CSVReaderNullFieldIndicatornullFieldIndicatorprivate CSVParserBuilderparserBuilderprotected java.io.Readerreaderprotected RowProcessorrowProcessorprotected RowValidatorAggregatorrowValidatorAggregatorprotected intskipLinesprotected booleanverifyReader
-
Constructor Summary
Constructors Modifier Constructor Description protectedCSVReaderBaseBuilder(java.io.Reader reader)Base Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Tbuild()Must create the CSVReader type requested.protected ICSVParsergetCsvParser()Used by unit tests.java.util.LocalegetErrorLocale()LineValidatorAggregatorgetLineValidatorAggregator()protected intgetMultilineLimit()Used by unit tests.protected ICSVParsergetOrCreateCsvParser()Creates a newICSVParserif the class doesn't already hold one.protected java.io.ReadergetReader()Used by unit tests.RowValidatorAggregatorgetRowValidatorAggregator()protected intgetSkipLines()Used by unit tests.booleanisVerifyReader()protected booleankeepCarriageReturn()Returns if the reader built will keep or discard carriage returns.
-
-
-
Field Detail
-
reader
protected final java.io.Reader reader
-
lineValidatorAggregator
protected final LineValidatorAggregator lineValidatorAggregator
-
rowValidatorAggregator
protected final RowValidatorAggregator rowValidatorAggregator
-
parserBuilder
private final CSVParserBuilder parserBuilder
-
skipLines
protected int skipLines
-
icsvParser
protected ICSVParser icsvParser
-
keepCR
protected boolean keepCR
-
verifyReader
protected boolean verifyReader
-
nullFieldIndicator
protected CSVReaderNullFieldIndicator nullFieldIndicator
-
multilineLimit
protected int multilineLimit
-
errorLocale
protected java.util.Locale errorLocale
-
rowProcessor
protected RowProcessor rowProcessor
-
-
Method Detail
-
getReader
protected java.io.Reader getReader()
Used by unit tests.- Returns:
- The reader.
-
getSkipLines
protected int getSkipLines()
Used by unit tests.- Returns:
- The set number of lines to skip
-
getCsvParser
protected ICSVParser getCsvParser()
Used by unit tests.- Returns:
- The CSVParser used by the builder.
-
getMultilineLimit
protected int getMultilineLimit()
Used by unit tests.- Returns:
- The upper limit on lines in multiline records.
-
keepCarriageReturn
protected boolean keepCarriageReturn()
Returns if the reader built will keep or discard carriage returns.- Returns:
trueif the reader built will keep carriage returns,falseotherwise
-
getOrCreateCsvParser
protected ICSVParser getOrCreateCsvParser()
Creates a newICSVParserif the class doesn't already hold one.- Returns:
- The injected
ICSVParseror a default parser.
-
isVerifyReader
public boolean isVerifyReader()
- Returns:
- The flag indicating whether the reader should be verified before each read.
-
getErrorLocale
public java.util.Locale getErrorLocale()
- Returns:
- The locale for error messages
-
getLineValidatorAggregator
public LineValidatorAggregator getLineValidatorAggregator()
- Returns:
- The
LineValidatorAggregatorfor custom definedLineValidators.
-
getRowValidatorAggregator
public RowValidatorAggregator getRowValidatorAggregator()
- Returns:
- The
RowValidatorAggregatorfor the custom definedRowValidators.
-
-