Skip to content

Commit 87d5f87

Browse files
committed
CSVParser javadoc cleanup (and remove ref to M$ [sic])
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/csv/trunk@483683 13f79535-47bb-0310-9956-ffa450edef68
1 parent 68e75ee commit 87d5f87

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

src/java/org/apache/commons/csv/CSVParser.java

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,27 @@
1616
*/
1717
package org.apache.commons.csv;
1818

19-
import java.io.IOException;
20-
import java.io.InputStream;
21-
import java.io.InputStreamReader;
22-
import java.io.Reader;
19+
import java.io.*;
2320
import java.util.ArrayList;
2421

2522

2623
/**
27-
* Parses cvs files according to the specified configuration.
24+
* Parses CSV files according to the specified configuration.
2825
*
29-
* Because CSV appears in many different dialects the parser supports many
30-
* configuration settings. One of the most popular CSV format as supported
31-
* by the M$ corporation (excel-spreadsheets) are supported out-of-the-box
32-
* by the corresponding strategy setter (see {@link #setExcelStrategy()}).
26+
* Because CSV appears in many different dialects, the parser supports many
27+
* configuration settings by allowing the specification of a {@link CSVStrategy}.
3328
*
34-
* <p>Parsing of a csv-string having ';' as separator:</p>
29+
* <p>Parsing of a csv-string having tabs as separators,
30+
* '"' as an optional value encapsulator, and comments starting with '#':</p>
3531
* <pre>
3632
* String[][] data =
37-
* (new CSVParser(new StringReader("a;b\nc;d"),';')).getAllValues();
33+
* (new CSVParser(new StringReader("a\tb\nc\td"), new CSVStrategy('\t','"','#'))).getAllValues();
3834
* </pre>
3935
*
40-
* <p>The API allows chained method calls, if you like this coding style:</p>
36+
* <p>Parsing of a csv-string in Excel CSV format</p>
4137
* <pre>
42-
* String[][] data = (new CSVParser(new StringReader("a;b\nc;d"),';'))
43-
* .setExcelStrategy().setIgnoreEmptyLines(true).getAllValues();
38+
* String[][] data =
39+
* (new CSVParser(new StringReader("a;b\nc;d"), CSVStrategy.EXCEL_STRATEGY)).getAllValues();
4440
* </pre>
4541
*
4642
* <p>

0 commit comments

Comments
 (0)