Use 4 spaces indentation in examples
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1610770 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8fdcb3da11
commit
5e60966b56
|
@ -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>
|
||||
<!-- ================================================== -->
|
||||
|
|
Loading…
Reference in New Issue