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
Base class for the builders of various incarnations of CSVReaders.
- Since:
- 5.5.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Localeprotected ICSVParserprotected booleanprotected final LineValidatorAggregatorprotected intprotected CSVReaderNullFieldIndicatorprivate final CSVParserBuilderprotected final Readerprotected RowProcessorprotected final RowValidatorAggregatorprotected intprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Tbuild()Must create the CSVReader type requested.protected ICSVParserUsed by unit tests.protected intUsed by unit tests.protected ICSVParserCreates a newICSVParserif the class doesn't already hold one.protected ReaderUsed by unit tests.protected intUsed by unit tests.booleanprotected booleanReturns if the reader built will keep or discard carriage returns.
-
Field Details
-
reader
-
lineValidatorAggregator
-
rowValidatorAggregator
-
parserBuilder
-
skipLines
protected int skipLines -
icsvParser
-
keepCR
protected boolean keepCR -
verifyReader
protected boolean verifyReader -
nullFieldIndicator
-
multilineLimit
protected int multilineLimit -
errorLocale
-
rowProcessor
-
-
Constructor Details
-
CSVReaderBaseBuilder
Base Constructor- Parameters:
reader- The reader to an underlying CSV source.
-
-
Method Details
-
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
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
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
- Returns:
- The locale for error messages
-
getLineValidatorAggregator
- Returns:
- The
LineValidatorAggregatorfor custom definedLineValidators.
-
getRowValidatorAggregator
- Returns:
- The
RowValidatorAggregatorfor the custom definedRowValidators.
-
build
Must create the CSVReader type requested.- Returns:
- A new instance of
CSVReaderor derived class
-