commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r477503 - /jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java
Date Tue, 21 Nov 2006 04:44:08 GMT
Author: yonik
Date: Mon Nov 20 20:44:08 2006
New Revision: 477503

URL: http://svn.apache.org/viewvc?view=rev&rev=477503
Log:
CSVParser constructor with CSVStrategy: SANDBOX-180

Modified:
    jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java

Modified: jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java?view=diff&rev=477503&r1=477502&r2=477503
==============================================================================
--- jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java (original)
+++ jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java Mon Nov
20 20:44:08 2006
@@ -153,8 +153,20 @@
    * @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;
   }
   
   // ======================================================



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message