Author: britter
Date: Tue Jul 15 17:46:07 2014
New Revision: 1610770
URL: http://svn.apache.org/r1610770
Log:
Use 4 spaces indentation in examples
Modified:
commons/proper/csv/trunk/src/site/xdoc/user-guide.xml
Modified: commons/proper/csv/trunk/src/site/xdoc/user-guide.xml
URL:
http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/site/xdoc/user-guide.xml?rev=1610770&r1=1610769&r2=1610770&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/site/xdoc/user-guide.xml (original)
+++ commons/proper/csv/trunk/src/site/xdoc/user-guide.xml Tue Jul 15 17:46:07
2014
@@ -27,8 +27,8 @@ limitations under the License.
<source>Reader in = new FileReader("path/to/file.csv");
Iterable<CSVRecord> records = CSVFormat.EXCEL.parse(in);
for (CSVRecord record : records) {
- String lastName = record.get("Last Name");
- String firstName = record.get("First Name");
+ String lastName = record.get("Last Name");
+ String firstName = record.get("First Name");
}</source>
</section>
<section name="Handling Byte Order Marks">
@@ -42,13 +42,13 @@ for (CSVRecord record : records) {
final Reader reader = new InputStreamReader(new
BOMInputStream(url.openStream()), "UTF-8");
final CSVParser parser = new CSVParser(reader, CSVFormat.EXCEL.withHeader());
try {
- for (final CSVRecord record : parser) {
- final String string = record.get("SomeColumn");
- ...
- }
+ for (final CSVRecord record : parser) {
+ final String string = record.get("SomeColumn");
+ ...
+ }
} finally {
- parser.close();
- reader.close();
+ parser.close();
+ reader.close();
}</source>
</section>
<!-- ================================================== -->