Skip to content

Commit 0c2cdca

Browse files
committed
Work some more on the website
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1609771 13f79535-47bb-0310-9956-ffa450edef68
1 parent f33baa4 commit 0c2cdca

2 files changed

Lines changed: 20 additions & 27 deletions

File tree

src/site/site.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<menu name="Commons CSV">
3030
<item name="Overview" href="/index.html"/>
3131
<item name="Download" href="/download_csv.cgi"/>
32+
<item name="User Guide" href="/user-guide.html"/>
3233
<item name="Wiki" href="http://wiki.apache.org/commons/CSV"/>
3334
</menu>
3435

src/site/xdoc/index.xml

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,38 +24,30 @@ limitations under the License.
2424
<!-- ================================================== -->
2525
<section name="Using Commons CSV">
2626
<p>Commons CSV reads and writes files in variations of the Comma Separated Value (CSV) format.</p>
27-
<p>To parse an Excel CSV file, write:</p>
28-
<source>Reader in = new FileReader(&quot;path/to/file.csv&quot;);
29-
Iterable&lt;CSVRecord&gt; records = CSVFormat.EXCEL.parse(in);
30-
for (CSVRecord record : records) {
31-
String lastName = record.get("Last Name");
32-
String firstName = record.get("First Name");
33-
}</source>
34-
<p>Other formats are available, please consult the Javadoc for <a href="apidocs/org/apache/commons/csv/CSVFormat.html">CSVFormat</a> and
35-
<a href="apidocs/org/apache/commons/csv/CSVParser.html">CSVParser</a>.
27+
<p>The most common CSV formats are predefined in the <a href="apidocs/org/apache/commons/csv/CSVFormat.html">CSVFormat</a> class:
28+
<ul>
29+
<li><a href="http://tools.ietf.org/html/rfc4180">RFC 4180</a></li>
30+
<li>MS Excel</li>
31+
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump-delimited-text.html">MySQL</a></li>
32+
<li><a href="http://en.wikipedia.org/wiki/Tab-separated_values">TDF</a></li>
33+
</ul>
3634
</p>
35+
<p>Custom formats can be created using a fluent style API.</p>
3736
</section>
38-
<section name="Handling Byte Order Marks">
37+
<!-- ================================================== -->
38+
<section name="Documentation">
39+
<p>
40+
The package descriptions in the <a href="javadocs/api-release/index.html">JavaDoc</a> give an overview of the available features
41+
and various <a href="project-reports.html">project reports</a> are provided.
42+
</p>
43+
<p>
44+
The JavaDoc API documents for the <a href="javadocs/api-1.0/index.html">current stable release 1.0</a> [Java 5.0+] can be viewed in a web browser.
45+
</p>
3946
<p>
40-
To handle files that start with a Byte Order Mark (BOM) like some Excel CSV files, you need an extra step to deal with these optional bytes.
41-
You can use the
42-
<a href="https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/input/BOMInputStream.html">BOMInputStream</a>
43-
class from <a href="https://commons.apache.org/proper/commons-io/">Apache Commons IO</a> for example:
47+
The <a href="source-repository.html">subversion repository</a> can be
48+
<a href="http://svn.apache.org/viewvc/commons/proper/csv/trunk/">browsed</a>, or you can browse/contribute via <a href="https://github.com/apache/commons-csv">GitHub</a>.
4449
</p>
45-
<source>final URL url = ...;
46-
final Reader reader = new InputStreamReader(new BOMInputStream(url.openStream()), "UTF-8");
47-
final CSVParser parser = new CSVParser(reader, CSVFormat.EXCEL.withHeader());
48-
try {
49-
for (final CSVRecord record : parser) {
50-
final String string = record.get("SomeColumn");
51-
...
52-
}
53-
} finally {
54-
parser.close();
55-
reader.close();
56-
}</source>
5750
</section>
58-
5951
<!-- ================================================== -->
6052
<section name="Release Information">
6153
<p>The latest stable release of csv is 1.0. You may: </p>

0 commit comments

Comments
 (0)