CSVParser constructor with CSVStrategy: SANDBOX-180
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/csv/trunk@477503 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b73040f2bc
commit
ddda2af066
|
@ -153,8 +153,20 @@ public class CSVParser {
|
|||
* @param commentStart a Char used for comment identification
|
||||
*/
|
||||
public CSVParser(Reader input, char delimiter, char encapsulator, char commentStart) {
|
||||
this(input, new CSVStrategy(delimiter, encapsulator, commentStart));
|
||||
}
|
||||
|
||||
/**
|
||||
* Customized csv parser.
|
||||
*
|
||||
* The parser parses according to the given CSV strategy.
|
||||
*
|
||||
* @param input a Reader based on "csv-formatted" input
|
||||
* @param strategy the CSVStrategy used for CSV parsing
|
||||
*/
|
||||
public CSVParser(Reader input, CSVStrategy strategy) {
|
||||
this.in = new ExtendedBufferedReader(input);
|
||||
this.strategy = new CSVStrategy(delimiter, encapsulator, commentStart);
|
||||
this.strategy = strategy;
|
||||
}
|
||||
|
||||
// ======================================================
|
||||
|
|
Loading…
Reference in New Issue