commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r987826 [38/48] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/src-html/org/apache/commons/csv/ css/ jacoco/ jacoco/.resources/ jac...
Date Mon, 09 May 2016 17:27:47 GMT
Modified: websites/production/commons/content/proper/commons-csv/user-guide.html
==============================================================================
--- websites/production/commons/content/proper/commons-csv/user-guide.html (original)
+++ websites/production/commons/content/proper/commons-csv/user-guide.html Mon May  9 17:27:44 2016
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 25 August 2015
+ | Generated by Apache Maven Doxia at 09 May 2016
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -8,18 +8,18 @@
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <meta name="author" content="Commons Documentation Team" />
-    <meta name="Date-Revision-yyyymmdd" content="20150825" />
+    <meta name="Date-Revision-yyyymmdd" content="20160509" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Commons CSV &#x2013; User Guide</title>
 
-	<link rel="stylesheet" href="./css/bootstrap.min.css" type="text/css" />
-	<link rel="stylesheet" href="./css/site.css" type="text/css" />
+  <link rel="stylesheet" href="./css/bootstrap.min.css" type="text/css" />
+  <link rel="stylesheet" href="./css/site.css" type="text/css" />
     <link rel="stylesheet" href="./css/print.css" media="print" />
 
-	<script type="text/javascript" src="./js/jquery.min.js"></script>
-	<script type="text/javascript" src="./js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="./js/prettify.min.js"></script>
-	<script type="text/javascript" src="./js/site.js"></script>
+  <script type="text/javascript" src="./js/jquery.min.js"></script>
+  <script type="text/javascript" src="./js/bootstrap.min.js"></script>
+  <script type="text/javascript" src="./js/prettify.min.js"></script>
+  <script type="text/javascript" src="./js/site.js"></script>
 
                             
 <link rel="stylesheet" href="./css/prettify.css" media="all" type="text/css"/>                                
@@ -29,225 +29,233 @@
           }</script>                  
       </head>
 
-	<body class="composite">
+  <body class="composite">
                           <a href="http://commons.apache.org/" id="bannerLeft" title="Apache Commons logo">
                                                                                         <img class="logo-left" src="./images/commons-logo.png"  alt="Apache Commons logo"/>
                 </a>
                                               <a href="index.html" id="bannerRight" title="Commons CSV&trade; logo">
                                                                                                 <img class="logo-right" src="images/logo.png"  alt="Commons CSV&trade; logo"/>
                 </a>
-      		<div class="clear"></div>
+          <div class="clear"></div>
 
-		<div class="navbar">
-			<div class="navbar-inner">
-				<div class="container-fluid">
-					<a class="brand" href="http://commons.apache.org/proper/commons-csv/">Apache Commons CSV &trade;</a>
-					<ul class="nav">      
+    <div class="navbar">
+      <div class="navbar-inner">
+        <div class="container-fluid">
+          <a class="brand" href="http://commons.apache.org/proper/commons-csv/">Apache Commons CSV &trade;</a>
+          <ul class="nav">      
                     
-            <li id="publishDate">Last Published: 25 August 2015</li>
-      <li class="divider">|</li> <li id="projectVersion">Version: 1.2</li>
+            <li id="publishDate">Last Published: 09 May 2016</li>
+      <li class="divider">|</li> <li id="projectVersion">Version: 1.3</li>
   </ul>
-                    <div class="pull-right">	<ul class="nav">
-						<li>
-		              <a href="http://www.apachecon.com/" class="externalLink" title="ApacheCon">
+                    <div class="pull-right">  <ul class="nav">
+            <li>
+                  <a href="http://www.apachecon.com/" class="externalLink" title="ApacheCon">
     ApacheCon</a>
-  		</li>
-					<li>
-		              <a href="http://www.apache.org" class="externalLink" title="Apache">
+      </li>
+          <li>
+                  <a href="http://www.apache.org" class="externalLink" title="Apache">
     Apache</a>
-  		</li>
-					<li>
-		              <a href="../../" title="Commons">
+      </li>
+          <li>
+                  <a href="../../" title="Commons">
     Commons</a>
-  		</li>
-		</ul>
+      </li>
+    </ul>
 </div>
-				</div>
-			</div>
-		</div>
-
-		<div class="container-fluid">
-			<table class="layout-table">
-				<tr>
-					<td class="sidebar">
-						<div class="well sidebar-nav">
-										<ul class="nav nav-list">
-		 		            						 <li class="nav-header">Commons CSV</li>
-																				<li class="none">
-		              <a href="index.html" title="Overview">
+        </div>
+      </div>
+    </div>
+
+    <div class="container-fluid">
+      <table class="layout-table">
+        <tr>
+          <td class="sidebar">
+            <div class="well sidebar-nav">
+                    <ul class="nav nav-list">
+                                  <li class="nav-header">Commons CSV</li>
+                                        <li class="none">
+                  <a href="index.html" title="Overview">
     Overview</a>
-  				</li>
- 														<li class="none">
-		              <a href="download_csv.cgi" title="Download">
+          </li>
+                             <li class="none">
+                  <a href="download_csv.cgi" title="Download">
     Download</a>
-  				</li>
- 															<li class="none active">
-		              <a href="user-guide.html" title="User Guide">
+          </li>
+                               <li class="none active">
+                  <a href="user-guide.html" title="User Guide">
     User Guide</a>
-  				</li>
- 														<li class="none">
-		              <a href="http://wiki.apache.org/commons/CSV" class="externalLink" title="Wiki">
+          </li>
+                             <li class="none">
+                  <a href="http://wiki.apache.org/commons/CSV" class="externalLink" title="Wiki">
     Wiki</a>
-  				</li>
- 								</ul>
-			<ul class="nav nav-list">
-		 		            									 <li class="nav-header"><i class="icon-cog"></i>Development</li>
-																				<li class="none">
-		              <a href="changes-report.html" title="History">
+          </li>
+                 </ul>
+      <ul class="nav nav-list">
+                                        <li class="nav-header"><i class="icon-cog"></i>Development</li>
+                                        <li class="none">
+                  <a href="changes-report.html" title="History">
     History</a>
-  				</li>
- 														<li class="none">
-		              <a href="mail-lists.html" title="Mailing Lists">
+          </li>
+                             <li class="none">
+                  <a href="mail-lists.html" title="Mailing Lists">
     Mailing Lists</a>
-  				</li>
- 														<li class="none">
-		              <a href="issue-tracking.html" title="Issue Tracking">
+          </li>
+                             <li class="none">
+                  <a href="issue-tracking.html" title="Issue Tracking">
     Issue Tracking</a>
-  				</li>
- 														<li class="none">
-		              <a href="team-list.html" title="Team">
+          </li>
+                             <li class="none">
+                  <a href="team-list.html" title="Team">
     Team</a>
-  				</li>
- 														<li class="none">
-		              <a href="source-repository.html" title="Source Repository">
+          </li>
+                             <li class="none">
+                  <a href="source-repository.html" title="Source Repository">
     Source Repository</a>
-  				</li>
- 														<li class="none">
-		              <a href="apidocs/index.html" title="Javadoc trunk">
+          </li>
+                             <li class="none">
+                  <a href="apidocs/index.html" title="Javadoc trunk">
     Javadoc trunk</a>
-  				</li>
- 														<li class="none">
-		              <a href="archives/1.2/apidocs/index.html" title="Javadoc 1.2">
+          </li>
+                             <li class="none">
+                  <a href="archives/1.3/apidocs/index.html" title="Javadoc 1.3">
+    Javadoc 1.3</a>
+          </li>
+                             <li class="none">
+                  <a href="archives/1.2/apidocs/index.html" title="Javadoc 1.2">
     Javadoc 1.2</a>
-  				</li>
- 														<li class="none">
-		              <a href="archives/1.1/apidocs/index.html" title="Javadoc 1.1">
+          </li>
+                             <li class="none">
+                  <a href="archives/1.1/apidocs/index.html" title="Javadoc 1.1">
     Javadoc 1.1</a>
-  				</li>
- 														<li class="none">
-		              <a href="archives/1.0/apidocs/index.html" title="Javadoc 1.0">
+          </li>
+                             <li class="none">
+                  <a href="archives/1.0/apidocs/index.html" title="Javadoc 1.0">
     Javadoc 1.0</a>
-  				</li>
- 								</ul>
-			<ul class="nav nav-list">
-		 		            						 <li class="nav-header">Site Archives</li>
-																				<li class="none">
-		              <a href="archives/1.2/index.html" title="CSV 1.2">
+          </li>
+                 </ul>
+      <ul class="nav nav-list">
+                                  <li class="nav-header">Site Archives</li>
+                                        <li class="none">
+                  <a href="archives/1.3/index.html" title="CSV 1.3">
+    CSV 1.3</a>
+          </li>
+                             <li class="none">
+                  <a href="archives/1.2/index.html" title="CSV 1.2">
     CSV 1.2</a>
-  				</li>
- 														<li class="none">
-		              <a href="archives/1.1/index.html" title="CSV 1.1">
+          </li>
+                             <li class="none">
+                  <a href="archives/1.1/index.html" title="CSV 1.1">
     CSV 1.1</a>
-  				</li>
- 														<li class="none">
-		              <a href="archives/1.0/index.html" title="CSV 1.0">
+          </li>
+                             <li class="none">
+                  <a href="archives/1.0/index.html" title="CSV 1.0">
     CSV 1.0</a>
-  				</li>
- 								</ul>
-			<ul class="nav nav-list">
-		 		            									 <li class="nav-header"><i class="icon-info-sign"></i>Project Documentation</li>
-																								                                                                                                                                                                                                              								<li class="collapsed">
-		              <a href="project-info.html" title="Project Information">
+          </li>
+                 </ul>
+      <ul class="nav nav-list">
+                                        <li class="nav-header"><i class="icon-info-sign"></i>Project Documentation</li>
+                                                                                                                                                                                                                                                                              <li class="collapsed">
+                  <a href="project-info.html" title="Project Information">
     Project Information</a>
-  									</li>
- 																		                                                                                                                                                                                                                                                                                      								<li class="collapsed">
-		              <a href="project-reports.html" title="Project Reports">
+                    </li>
+                                                                                                                                                                                                                                                                                                                                           <li class="collapsed">
+                  <a href="project-reports.html" title="Project Reports">
     Project Reports</a>
-  									</li>
- 								</ul>
-			<ul class="nav nav-list">
-		 		            						 <li class="nav-header">Commons</li>
-																				<li class="none">
-		              <a href="../../" title="Home">
+                    </li>
+                 </ul>
+      <ul class="nav nav-list">
+                                  <li class="nav-header">Commons</li>
+                                        <li class="none">
+                  <a href="../../" title="Home">
     Home</a>
-  				</li>
- 														<li class="none">
-		              <a href="http://www.apache.org/licenses/" class="externalLink" title="License">
+          </li>
+                             <li class="none">
+                  <a href="http://www.apache.org/licenses/" class="externalLink" title="License">
     License</a>
-  				</li>
- 																		                          								<li class="collapsed">
-		              <a href="../../components.html" title="Components">
+          </li>
+                                                                               <li class="collapsed">
+                  <a href="../../components.html" title="Components">
     Components</a>
-  									</li>
- 																		                          								<li class="collapsed">
-		              <a href="../../sandbox/index.html" title="Sandbox">
+                    </li>
+                                                                               <li class="collapsed">
+                  <a href="../../sandbox/index.html" title="Sandbox">
     Sandbox</a>
-  									</li>
- 																		                          								<li class="collapsed">
-		              <a href="../../dormant/index.html" title="Dormant">
+                    </li>
+                                                                               <li class="collapsed">
+                  <a href="../../dormant/index.html" title="Dormant">
     Dormant</a>
-  									</li>
- 								</ul>
-			<ul class="nav nav-list">
-		 		            						 <li class="nav-header">General Information</li>
-																				<li class="none">
-		              <a href="../../security.html" title="Security">
+                    </li>
+                 </ul>
+      <ul class="nav nav-list">
+                                  <li class="nav-header">General Information</li>
+                                        <li class="none">
+                  <a href="../../security.html" title="Security">
     Security</a>
-  				</li>
- 														<li class="none">
-		              <a href="../../volunteering.html" title="Volunteering">
+          </li>
+                             <li class="none">
+                  <a href="../../volunteering.html" title="Volunteering">
     Volunteering</a>
-  				</li>
- 														<li class="none">
-		              <a href="../../patches.html" title="Contributing Patches">
+          </li>
+                             <li class="none">
+                  <a href="../../patches.html" title="Contributing Patches">
     Contributing Patches</a>
-  				</li>
- 														<li class="none">
-		              <a href="../../building.html" title="Building Components">
+          </li>
+                             <li class="none">
+                  <a href="../../building.html" title="Building Components">
     Building Components</a>
-  				</li>
- 														<li class="none">
-		              <a href="../../commons-parent-pom.html" title="Commons Parent Pom">
+          </li>
+                             <li class="none">
+                  <a href="../../commons-parent-pom.html" title="Commons Parent Pom">
     Commons Parent Pom</a>
-  				</li>
- 														<li class="none">
-		              <a href="../../build-plugin/index.html" title="Commons Build Plugin">
+          </li>
+                             <li class="none">
+                  <a href="../../build-plugin/index.html" title="Commons Build Plugin">
     Commons Build Plugin</a>
-  				</li>
- 														<li class="none">
-		              <a href="../../releases/index.html" title="Releasing Components">
+          </li>
+                             <li class="none">
+                  <a href="../../releases/index.html" title="Releasing Components">
     Releasing Components</a>
-  				</li>
- 														<li class="none">
-		              <a href="http://wiki.apache.org/commons/FrontPage" class="externalLink" title="Wiki">
+          </li>
+                             <li class="none">
+                  <a href="http://wiki.apache.org/commons/FrontPage" class="externalLink" title="Wiki">
     Wiki</a>
-  				</li>
- 								</ul>
-			<ul class="nav nav-list">
-		 		            						 <li class="nav-header">ASF</li>
-																				<li class="none">
-		              <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="How the ASF works">
+          </li>
+                 </ul>
+      <ul class="nav nav-list">
+                                  <li class="nav-header">ASF</li>
+                                        <li class="none">
+                  <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="How the ASF works">
     How the ASF works</a>
-  				</li>
- 														<li class="none">
-		              <a href="http://www.apache.org/foundation/getinvolved.html" class="externalLink" title="Get Involved">
+          </li>
+                             <li class="none">
+                  <a href="http://www.apache.org/foundation/getinvolved.html" class="externalLink" title="Get Involved">
     Get Involved</a>
-  				</li>
- 														<li class="none">
-		              <a href="http://www.apache.org/dev/" class="externalLink" title="Developer Resources">
+          </li>
+                             <li class="none">
+                  <a href="http://www.apache.org/dev/" class="externalLink" title="Developer Resources">
     Developer Resources</a>
-  				</li>
- 														<li class="none">
-		              <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">
+          </li>
+                             <li class="none">
+                  <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">
     Sponsorship</a>
-  				</li>
- 														<li class="none">
-		              <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks">
+          </li>
+                             <li class="none">
+                  <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks">
     Thanks</a>
-  				</li>
- 								</ul>
-							</div>
-						<div id="poweredBy">
-							                                                                                                      <a href="http://www.apache.org/events/current-event.html" title="ApacheCon" class="builtBy">
+          </li>
+                 </ul>
+              </div>
+            <div id="poweredBy">
+                                                                                                                    <a href="http://www.apache.org/events/current-event.html" title="ApacheCon" class="builtBy">
         <img class="builtBy"  alt="ApacheCon" src="http://www.apache.org/events/current-event-125x125.png"    />
       </a>
                                                                                                     <a href="http://maven.apache.org/" title="Maven" class="builtBy">
         <img class="builtBy"  alt="Maven" src="http://maven.apache.org/images/logos/maven-feather.png"    />
       </a>
-          						</div>
-					</td>
-					<td class="content">
-						<!-- Licensed to the Apache Software Foundation (ASF) under one or more
+                      </div>
+          </td>
+          <td class="content">
+            <!-- Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
@@ -261,32 +269,80 @@ distributed under the License is distrib
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License. -->
- 
-<!-- ================================================== -->
-<div class="section">
-<h2><a name="Parsing_an_Excel_CSV_File"></a>Parsing an Excel CSV File</h2>
   
+    <!-- ================================================== -->
+
+    <h1>Apache Commons CSV User Guide</h1>
+
+    
+    
+<ul>
+<li><a href="#Parsing_files">Parsing files</a>
+<ul>
+<li><a href="#Example:_Parsing_an_Excel_CSV_File">Example: Parsing an Excel CSV File</a></li>
+<li><a href="#Handling_Byte_Order_Marks">Handling Byte Order Marks</a></li></ul></li>
+<li><a href="#Working_with_headers">Working with headers</a>
+<ul>
+<li><a href="#Accessing_column_values_by_index">Accessing column values by index</a></li>
+<li><a href="#Defining_a_header_manually">Defining a header manually</a></li>
+<li><a href="#Using_an_enum_to_define_a_header">Using an enum to define a header</a></li>
+<li><a href="#Header_auto_detection">Header auto detection</a></li>
+<li><a href="#Printing_with_headers">Printing with headers</a></li></ul></li></ul>
+
+    
+<div class="section">
+<h2><a name="Parsing_files"></a>Parsing files</h2>
+
+      Parsing files with Apache Commons CSV is relatively straight forward.
+      The CSVFormat class provides some commonly used CSV variants:
+      
+      
+<dl>
+        
+<dt>RFC-4180</dt>
+<dd>The format defined by <a class="externalLink" href="https://tools.ietf.org/html/rfc4180">RFC-4180</a></dd>
+        
+<dt>MYSQL</dt>
+<dd>The format used by MySQL data bases</dd>
+        
+<dt>TDF</dt>
+<dd>A tab delimited format</dd>
+        
+<dt>EXCEL</dt>
+<dd>The format used by Excel</dd>
+      </dl>
+
+      
+<div class="section">
+<h3><a name="Example:_Parsing_an_Excel_CSV_File"></a>Example: Parsing an Excel CSV File</h3>
+        
 <p>To parse an Excel CSV file, write:</p>
-  
+        
 <div class="source">
 <pre>Reader in = new FileReader(&quot;path/to/file.csv&quot;);
 Iterable&lt;CSVRecord&gt; records = CSVFormat.EXCEL.parse(in);
 for (CSVRecord record : records) {
     String lastName = record.get(&quot;Last Name&quot;);
     String firstName = record.get(&quot;First Name&quot;);
-}</pre></div>
-</div>
-
+}
+        </pre></div>
+      </div>
+      
 <div class="section">
-<h2><a name="Handling_Byte_Order_Marks"></a>Handling Byte Order Marks</h2>
-  
+<h3><a name="Handling_Byte_Order_Marks"></a>Handling Byte Order Marks</h3>
+        
 <p>
-    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.
-    You can use the 
-    <a class="externalLink" href="https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/input/BOMInputStream.html">BOMInputStream</a> 
-    class from <a class="externalLink" href="https://commons.apache.org/proper/commons-io/">Apache Commons IO</a> for example: 
-  </p>
-  
+          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.
+          You can use the
+          <a class="externalLink" href="https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/input/BOMInputStream.html">
+            BOMInputStream
+          </a>
+          class from
+          <a class="externalLink" href="https://commons.apache.org/proper/commons-io/">Apache Commons IO</a>
+          for example:
+        </p>
+        
 <div class="source">
 <pre>final URL url = ...;
 final Reader reader = new InputStreamReader(new BOMInputStream(url.openStream()), &quot;UTF-8&quot;);
@@ -299,56 +355,143 @@ try {
 } finally {
     parser.close();
     reader.close();
-}</pre></div>
-  
+}
+        </pre></div>
+        
 <p>
-    You might find it handy to create something like this:    
-  </p>
-  
+          You might find it handy to create something like this:
+        </p>
+        
 <div class="source">
 <pre>/**
- * Creates a reader capable of handling BOMs.
- */
+* Creates a reader capable of handling BOMs.
+*/
 public InputStreamReader newReader(final InputStream inputStream) {
     return new InputStreamReader(new BOMInputStream(inputStream), StandardCharsets.UTF_8);
-}</pre></div>
-</div>
+}
+        </pre></div>
+      </div>
+    </div>
 
+    
 <div class="section">
-<h2><a name="Printing_with_headers"></a>Printing with headers</h2>
-  
+<h2><a name="Working_with_headers"></a>Working with headers</h2>
+
+      Apache Commons CSV provides several ways to access record values.
+      The simplest way is to access values by their index in the record.
+      However, columns in CSV files often have a name, for example: ID, CustomerNo, Birthday, etc.
+      The CSVFormat class provides an API for specifing these <i>header</i> names and CSVRecord on
+      the other hand has methods to access values by their corresponding header name.
+
+      
+<div class="section">
+<h3><a name="Accessing_column_values_by_index"></a>Accessing column values by index</h3>
+        To access a record value by index, no special configuration of the CSVFormat is necessary:
+        
+<div class="source">
+<pre>Reader in = new FileReader(&quot;path/to/file.csv&quot;);
+Iterable&lt;CSVRecord&gt; records = CSVFormat.RFC4180.parse(in);
+for (CSVRecord record : records) {
+    String columnOne = record.get(0);
+    String columnTwo = record.get(1);
+}
+        </pre></div>
+      </div>
+      
+<div class="section">
+<h3><a name="Defining_a_header_manually"></a>Defining a header manually</h3>
+        Indices may not be the most intuitive way to access record values. For this reason it is possible to
+        assign names to each column in the file:
+        
+<div class="source">
+<pre>Reader in = new FileReader(&quot;path/to/file.csv&quot;);
+Iterable&lt;CSVRecord&gt; records = CSVFormat.RFC4180.withHeader(&quot;ID&quot;, &quot;CustomerNo&quot;, &quot;Name&quot;).parse(in);
+for (CSVRecord record : records) {
+    String id = record.get(&quot;ID&quot;);
+    String customerNo = record.get(&quot;CustomerNo&quot;);
+    String name = record.get(&quot;Name&quot;);
+}
+        </pre></div>
+        Note that column values can still be accessed using their index.
+      </div>
+      
+<div class="section">
+<h3><a name="Using_an_enum_to_define_a_header"></a>Using an enum to define a header</h3>
+        Using String values all over the code to reference columns can be error prone. For this reason,
+        it is possible to define an enum to specify header names. Note that the enum constant names are
+        used to access column values. This may lead to enums constant names which do not follow the Java
+        coding standard of defining constants in upper case with underscores:
+        
+<div class="source">
+<pre>public enum Headers {
+    ID, CustomerNo, Name
+}
+Reader in = new FileReader(&quot;path/to/file.csv&quot;);
+Iterable&lt;CSVRecord&gt; records = CSVFormat.RFC4180.withHeader(Headers.class).parse(in);
+for (CSVRecord record : records) {
+    String id = record.get(Headers.ID);
+    String customerNo = record.get(Headers.CustomerNo);
+    String name = record.get(Headers.Name);
+}
+        </pre></div>
+        Again it is possible to access values by their index and by using a String (for example &quot;CustomerNo&quot;).
+      </div>
+      
+<div class="section">
+<h3><a name="Header_auto_detection"></a>Header auto detection</h3>
+        Some CSV files define header names in their first record. If configured, Apache Commons CSV can parse
+        the header names from the first record:
+        
+<div class="source">
+<pre>Reader in = new FileReader(&quot;path/to/file.csv&quot;);
+Iterable&lt;CSVRecord&gt; records = CSVFormat.RFC4180.withFirstRowAsHeader().parse(in);
+for (CSVRecord record : records) {
+    String id = record.get(&quot;ID&quot;);
+    String customerNo = record.get(&quot;CustomerNo&quot;);
+    String name = record.get(&quot;Name&quot;);
+}
+        </pre></div>
+        This will use the values from the first record as header names and skip the first record when iterating.
+      </div>
+      
+<div class="section">
+<h3><a name="Printing_with_headers"></a>Printing with headers</h3>
+        
 <p>
-    To print a CSV file with headers, you specify the headers in the format:
-  </p>
-  
+          To print a CSV file with headers, you specify the headers in the format:
+        </p>
+        
 <div class="source">
-<pre>final Appendable out = ...;  
-final CSVPrinter printer = CSVFormat.DEFAULT.withHeader(&quot;H1&quot;, &quot;H2&quot;).print(out)</pre></div>
-  
+<pre>final Appendable out = ...;
+          final CSVPrinter printer = CSVFormat.DEFAULT.withHeader(&quot;H1&quot;, &quot;H2&quot;).print(out)
+        </pre></div>
+        
 <p>
-    To print a CSV file with JDBC column labels, you specify the ResultSet in the format:
-  </p>
-  
+          To print a CSV file with JDBC column labels, you specify the ResultSet in the format:
+        </p>
+        
 <div class="source">
 <pre>final ResultSet resultSet = ...;
-final CSVPrinter printer = CSVFormat.DEFAULT.withHeader(resultSet).print(out)</pre></div>
-</div>
-<!-- ================================================== -->
-
+          final CSVPrinter printer = CSVFormat.DEFAULT.withHeader(resultSet).print(out)
+        </pre></div>
+      </div>
+    </div>
+    <!-- ================================================== -->
+  
 
-					</td>
-				</tr>
-			</table>
-		</div>
+          </td>
+        </tr>
+      </table>
+    </div>
 
-		<div class="footer">
-			<p>Copyright &copy;                    2015
+    <div class="footer">
+      <p>Copyright &copy;                    2016
                         <a href="http://www.apache.org/">The Apache Software Foundation</a>.
             All Rights Reserved.</p>
-                                                          				
+                                                                  
 <div class="center">Apache Commons, Apache Commons CSV, Apache, the Apache feather logo, and the Apache Commons project logos are trademarks of The Apache Software Foundation.
       All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div>
-                          		</div>
-	</body>
+                              </div>
+  </body>
 
 </html>
\ No newline at end of file

Modified: websites/production/commons/content/proper/commons-csv/xref-test/allclasses-frame.html
==============================================================================
--- websites/production/commons/content/proper/commons-csv/xref-test/allclasses-frame.html (original)
+++ websites/production/commons/content/proper/commons-csv/xref-test/allclasses-frame.html Mon May  9 17:27:44 2016
@@ -1,74 +1,86 @@
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xml:lang="en" lang="en">
-	<head>
-		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-		<title>All Classes</title>
-		<link rel="stylesheet" type="text/css" href="stylesheet.css" title="style" />
-    </head>
-    <body>
-
-		<h3>All Classes</h3>
-
-		<ul>
-						<li>
-				<a href="org/apache/commons/csv/AssertionsTest.html" target="classFrame">AssertionsTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/CSVBenchmark.html" target="classFrame">CSVBenchmark</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/CSVFileParserTest.html" target="classFrame">CSVFileParserTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/CSVFormatPredefinedTest.html" target="classFrame">CSVFormatPredefinedTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/CSVFormatTest.html" target="classFrame">CSVFormatTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/CSVParserTest.html" target="classFrame">CSVParserTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/CSVPrinterTest.html" target="classFrame">CSVPrinterTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/CSVRecordTest.html" target="classFrame">CSVRecordTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/FercGovTest.html" target="classFrame">ContractColumnNames</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/CSVBenchmark.html" target="classFrame">CountingReaderCallback</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/CSVRecordTest.html" target="classFrame">EnumFixture</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/ExtendedBufferedReaderTest.html" target="classFrame">ExtendedBufferedReaderTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/FercGovTest.html" target="classFrame">FercGovTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/LexerTest.html" target="classFrame">LexerTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/perf/PerformanceTest.html" target="classFrame">PerformanceTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/PerformanceTest.html" target="classFrame">Stats</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/TokenMatchers.html" target="classFrame">TokenMatchers</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/TokenMatchersTest.html" target="classFrame">TokenMatchersTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/csv/Utils.html" target="classFrame">Utils</a>
-			</li>
-			      </ul>
-
-    </body>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+		<title>All Classes</title>
+		<link rel="stylesheet" type="text/css" href="stylesheet.css" title="style" />
+    </head>
+    <body>
+
+		<h3>All Classes</h3>
+
+		<ul>
+						<li>
+				<a href="org/apache/commons/csv/AssertionsTest.html" target="classFrame">AssertionsTest</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/CSVBenchmark.html" target="classFrame">CSVBenchmark</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/CSVFileParserTest.html" target="classFrame">CSVFileParserTest</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/CSVFormatPredefinedTest.html" target="classFrame">CSVFormatPredefinedTest</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/CSVFormatTest.html" target="classFrame">CSVFormatTest</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/CSVParserTest.html" target="classFrame">CSVParserTest</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/CSVPrinterTest.html" target="classFrame">CSVPrinterTest</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/CSVRecordTest.html" target="classFrame">CSVRecordTest</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/FercGovTest.html" target="classFrame">ContractColumnNames</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/CSVBenchmark.html" target="classFrame">CountingReaderCallback</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/CSVFormatTest.html" target="classFrame">EmptyEnum</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/CSVRecordTest.html" target="classFrame">EnumFixture</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/ExtendedBufferedReaderTest.html" target="classFrame">ExtendedBufferedReaderTest</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/FercGovTest.html" target="classFrame">FercGovTest</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/CSVFormatTest.html" target="classFrame">Header</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/bugs/JiraCsv164Test.html" target="classFrame">JiraCsv164Test</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/bugs/JiraCsv167Test.html" target="classFrame">JiraCsv167Test</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/LexerTest.html" target="classFrame">LexerTest</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/perf/PerformanceTest.html" target="classFrame">PerformanceTest</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/PerformanceTest.html" target="classFrame">Stats</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/TokenMatchers.html" target="classFrame">TokenMatchers</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/TokenMatchersTest.html" target="classFrame">TokenMatchersTest</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/csv/Utils.html" target="classFrame">Utils</a>
+			</li>
+			      </ul>
+
+    </body>
   </html>
\ No newline at end of file

Modified: websites/production/commons/content/proper/commons-csv/xref-test/index.html
==============================================================================
--- websites/production/commons/content/proper/commons-csv/xref-test/index.html (original)
+++ websites/production/commons/content/proper/commons-csv/xref-test/index.html Mon May  9 17:27:44 2016
@@ -1,24 +1,24 @@
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-<html xml:lang="en" lang="en">
-<!-- this is a JXR report set -->
-	<head>
-		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-		<title>Apache Commons CSV 1.2 Reference</title>
-	</head>
-    <frameset cols="20%,80%">
-		<frameset rows="30%,70%">
-			<frame src="overview-frame.html" name="packageListFrame" />
-			<frame src="allclasses-frame.html" name="packageFrame" />
-		</frameset>
-		<frame src="overview-summary.html" name="classFrame" />
-        <noframes>
-            <body>
-                <h1>Frame Alert</h1>
-                <p>
-                    You don't have frames. Go <a href="overview-summary.html">here</a>
-                </p>
-            </body>
-        </noframes>
-    </frameset>
-</html>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xml:lang="en" lang="en">
+<!-- this is a JXR report set -->
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+		<title>Apache Commons CSV 1.3 Reference</title>
+	</head>
+    <frameset cols="20%,80%">
+		<frameset rows="30%,70%">
+			<frame src="overview-frame.html" name="packageListFrame" />
+			<frame src="allclasses-frame.html" name="packageFrame" />
+		</frameset>
+		<frame src="overview-summary.html" name="classFrame" />
+        <noframes>
+            <body>
+                <h1>Frame Alert</h1>
+                <p>
+                    You don't have frames. Go <a href="overview-summary.html">here</a>
+                </p>
+            </body>
+        </noframes>
+    </frameset>
+</html>

Modified: websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/AssertionsTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/AssertionsTest.html (original)
+++ websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/AssertionsTest.html Mon May  9 17:27:44 2016
@@ -44,6 +44,6 @@
 <a class="jxr_linenumber" name="L36" href="#L36">36</a>  }
 </pre>
 <hr/>
-<div id="footer">Copyright &#169; 2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
+<div id="footer">Copyright &#169; 2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
 </body>
 </html>
\ No newline at end of file

Modified: websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/CSVBenchmark.html
==============================================================================
--- websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/CSVBenchmark.html (original)
+++ websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/CSVBenchmark.html Mon May  9 17:27:44 2016
@@ -218,6 +218,6 @@
 <a class="jxr_linenumber" name="L210" href="#L210">210</a> }
 </pre>
 <hr/>
-<div id="footer">Copyright &#169; 2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
+<div id="footer">Copyright &#169; 2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
 </body>
 </html>
\ No newline at end of file

Modified: websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/CSVFileParserTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/CSVFileParserTest.html (original)
+++ websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/CSVFileParserTest.html Mon May  9 17:27:44 2016
@@ -87,10 +87,10 @@
 <a class="jxr_linenumber" name="L79" href="#L79">79</a>              }
 <a class="jxr_linenumber" name="L80" href="#L80">80</a>          };
 <a class="jxr_linenumber" name="L81" href="#L81">81</a>          <strong class="jxr_keyword">final</strong> File[] files = BASE.listFiles(filenameFilter);
-<a class="jxr_linenumber" name="L82" href="#L82">82</a>          <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> File f : files) {
-<a class="jxr_linenumber" name="L83" href="#L83">83</a>              list.add(<strong class="jxr_keyword">new</strong> Object[] {
-<a class="jxr_linenumber" name="L84" href="#L84">84</a>                  f
-<a class="jxr_linenumber" name="L85" href="#L85">85</a>              });
+<a class="jxr_linenumber" name="L82" href="#L82">82</a>          <strong class="jxr_keyword">if</strong> (files != <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="L83" href="#L83">83</a>              <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> File f : files) {
+<a class="jxr_linenumber" name="L84" href="#L84">84</a>                  list.add(<strong class="jxr_keyword">new</strong> Object[] { f });
+<a class="jxr_linenumber" name="L85" href="#L85">85</a>              }
 <a class="jxr_linenumber" name="L86" href="#L86">86</a>          }
 <a class="jxr_linenumber" name="L87" href="#L87">87</a>          <strong class="jxr_keyword">return</strong> list;
 <a class="jxr_linenumber" name="L88" href="#L88">88</a>      }
@@ -185,6 +185,6 @@
 <a class="jxr_linenumber" name="L177" href="#L177">177</a> }
 </pre>
 <hr/>
-<div id="footer">Copyright &#169; 2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
+<div id="footer">Copyright &#169; 2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
 </body>
 </html>
\ No newline at end of file

Modified: websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/CSVFormatPredefinedTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/CSVFormatPredefinedTest.html (original)
+++ websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/CSVFormatPredefinedTest.html Mon May  9 17:27:44 2016
@@ -1,70 +1,70 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-<title>CSVFormatPredefinedTest xref</title>
-<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
-</head>
-<body>
-<div id="overview"><a href="../../../../../testapidocs/org/apache/commons/csv/CSVFormatPredefinedTest.html">View Javadoc</a></div><pre>
-<a class="jxr_linenumber" name="L1" href="#L1">1</a>   <em class="jxr_comment">/*</em>
-<a class="jxr_linenumber" name="L2" href="#L2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em>
-<a class="jxr_linenumber" name="L3" href="#L3">3</a>   <em class="jxr_comment"> * contributor license agreements.  See the NOTICE file distributed with</em>
-<a class="jxr_linenumber" name="L4" href="#L4">4</a>   <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em>
-<a class="jxr_linenumber" name="L5" href="#L5">5</a>   <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em>
-<a class="jxr_linenumber" name="L6" href="#L6">6</a>   <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em>
-<a class="jxr_linenumber" name="L7" href="#L7">7</a>   <em class="jxr_comment"> * the License.  You may obtain a copy of the License at</em>
-<a class="jxr_linenumber" name="L8" href="#L8">8</a>   <em class="jxr_comment"> *</em>
-<a class="jxr_linenumber" name="L9" href="#L9">9</a>   <em class="jxr_comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em>
-<a class="jxr_linenumber" name="L10" href="#L10">10</a>  <em class="jxr_comment"> *</em>
-<a class="jxr_linenumber" name="L11" href="#L11">11</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em>
-<a class="jxr_linenumber" name="L12" href="#L12">12</a>  <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
-<a class="jxr_linenumber" name="L13" href="#L13">13</a>  <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
-<a class="jxr_linenumber" name="L14" href="#L14">14</a>  <em class="jxr_comment"> * See the License for the specific language governing permissions and</em>
-<a class="jxr_linenumber" name="L15" href="#L15">15</a>  <em class="jxr_comment"> * limitations under the License.</em>
-<a class="jxr_linenumber" name="L16" href="#L16">16</a>  <em class="jxr_comment"> */</em>
-<a class="jxr_linenumber" name="L17" href="#L17">17</a>  
-<a class="jxr_linenumber" name="L18" href="#L18">18</a>  <strong class="jxr_keyword">package</strong> org.apache.commons.csv;
-<a class="jxr_linenumber" name="L19" href="#L19">19</a>  
-<a class="jxr_linenumber" name="L20" href="#L20">20</a>  <strong class="jxr_keyword">import</strong> org.junit.Assert;
-<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
-<a class="jxr_linenumber" name="L22" href="#L22">22</a>  
-<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <em class="jxr_javadoccomment"> * Tests {@link CSVFormat.Predefined}.</em>
-<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <em class="jxr_javadoccomment"> */</em>
-<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../org/apache/commons/csv/CSVFormatPredefinedTest.html">CSVFormatPredefinedTest</a> {
-<a class="jxr_linenumber" name="L27" href="#L27">27</a>  
-<a class="jxr_linenumber" name="L28" href="#L28">28</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> test(<strong class="jxr_keyword">final</strong> CSVFormat format, <strong class="jxr_keyword">final</strong> String enumName) {
-<a class="jxr_linenumber" name="L29" href="#L29">29</a>          Assert.assertEquals(format, CSVFormat.Predefined.valueOf(enumName).getFormat());
-<a class="jxr_linenumber" name="L30" href="#L30">30</a>          Assert.assertEquals(format, CSVFormat.valueOf(enumName));
-<a class="jxr_linenumber" name="L31" href="#L31">31</a>      }
-<a class="jxr_linenumber" name="L32" href="#L32">32</a>  
-<a class="jxr_linenumber" name="L33" href="#L33">33</a>      @Test
-<a class="jxr_linenumber" name="L34" href="#L34">34</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testDefault() {
-<a class="jxr_linenumber" name="L35" href="#L35">35</a>          test(CSVFormat.DEFAULT, <span class="jxr_string">"Default"</span>);
-<a class="jxr_linenumber" name="L36" href="#L36">36</a>      }
-<a class="jxr_linenumber" name="L37" href="#L37">37</a>  
-<a class="jxr_linenumber" name="L38" href="#L38">38</a>      @Test
-<a class="jxr_linenumber" name="L39" href="#L39">39</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testExcel() {
-<a class="jxr_linenumber" name="L40" href="#L40">40</a>          test(CSVFormat.EXCEL, <span class="jxr_string">"Excel"</span>);
-<a class="jxr_linenumber" name="L41" href="#L41">41</a>      }
-<a class="jxr_linenumber" name="L42" href="#L42">42</a>  
-<a class="jxr_linenumber" name="L43" href="#L43">43</a>      @Test
-<a class="jxr_linenumber" name="L44" href="#L44">44</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testMySQL() {
-<a class="jxr_linenumber" name="L45" href="#L45">45</a>          test(CSVFormat.MYSQL, <span class="jxr_string">"MySQL"</span>);
-<a class="jxr_linenumber" name="L46" href="#L46">46</a>      }
-<a class="jxr_linenumber" name="L47" href="#L47">47</a>  
-<a class="jxr_linenumber" name="L48" href="#L48">48</a>      @Test
-<a class="jxr_linenumber" name="L49" href="#L49">49</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testRFC4180() {
-<a class="jxr_linenumber" name="L50" href="#L50">50</a>          test(CSVFormat.RFC4180, <span class="jxr_string">"RFC4180"</span>);
-<a class="jxr_linenumber" name="L51" href="#L51">51</a>      }
-<a class="jxr_linenumber" name="L52" href="#L52">52</a>  
-<a class="jxr_linenumber" name="L53" href="#L53">53</a>      @Test
-<a class="jxr_linenumber" name="L54" href="#L54">54</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testTDF() {
-<a class="jxr_linenumber" name="L55" href="#L55">55</a>          test(CSVFormat.TDF, <span class="jxr_string">"TDF"</span>);
-<a class="jxr_linenumber" name="L56" href="#L56">56</a>      }
-<a class="jxr_linenumber" name="L57" href="#L57">57</a>  }
-</pre>
-<hr/>
-<div id="footer">Copyright &#169; 2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<title>CSVFormatPredefinedTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../testapidocs/org/apache/commons/csv/CSVFormatPredefinedTest.html">View Javadoc</a></div><pre>
+<a class="jxr_linenumber" name="L1" href="#L1">1</a>   <em class="jxr_comment">/*</em>
+<a class="jxr_linenumber" name="L2" href="#L2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em>
+<a class="jxr_linenumber" name="L3" href="#L3">3</a>   <em class="jxr_comment"> * contributor license agreements.  See the NOTICE file distributed with</em>
+<a class="jxr_linenumber" name="L4" href="#L4">4</a>   <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em>
+<a class="jxr_linenumber" name="L5" href="#L5">5</a>   <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em>
+<a class="jxr_linenumber" name="L6" href="#L6">6</a>   <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em>
+<a class="jxr_linenumber" name="L7" href="#L7">7</a>   <em class="jxr_comment"> * the License.  You may obtain a copy of the License at</em>
+<a class="jxr_linenumber" name="L8" href="#L8">8</a>   <em class="jxr_comment"> *</em>
+<a class="jxr_linenumber" name="L9" href="#L9">9</a>   <em class="jxr_comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em>
+<a class="jxr_linenumber" name="L10" href="#L10">10</a>  <em class="jxr_comment"> *</em>
+<a class="jxr_linenumber" name="L11" href="#L11">11</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a class="jxr_linenumber" name="L12" href="#L12">12</a>  <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a class="jxr_linenumber" name="L13" href="#L13">13</a>  <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a class="jxr_linenumber" name="L14" href="#L14">14</a>  <em class="jxr_comment"> * See the License for the specific language governing permissions and</em>
+<a class="jxr_linenumber" name="L15" href="#L15">15</a>  <em class="jxr_comment"> * limitations under the License.</em>
+<a class="jxr_linenumber" name="L16" href="#L16">16</a>  <em class="jxr_comment"> */</em>
+<a class="jxr_linenumber" name="L17" href="#L17">17</a>  
+<a class="jxr_linenumber" name="L18" href="#L18">18</a>  <strong class="jxr_keyword">package</strong> org.apache.commons.csv;
+<a class="jxr_linenumber" name="L19" href="#L19">19</a>  
+<a class="jxr_linenumber" name="L20" href="#L20">20</a>  <strong class="jxr_keyword">import</strong> org.junit.Assert;
+<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <em class="jxr_javadoccomment"> * Tests {@link CSVFormat.Predefined}.</em>
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <em class="jxr_javadoccomment"> */</em>
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../org/apache/commons/csv/CSVFormatPredefinedTest.html">CSVFormatPredefinedTest</a> {
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> test(<strong class="jxr_keyword">final</strong> CSVFormat format, <strong class="jxr_keyword">final</strong> String enumName) {
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>          Assert.assertEquals(format, CSVFormat.Predefined.valueOf(enumName).getFormat());
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>          Assert.assertEquals(format, CSVFormat.valueOf(enumName));
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>      }
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>  
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>      @Test
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testDefault() {
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>          test(CSVFormat.DEFAULT, <span class="jxr_string">"Default"</span>);
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>      }
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>  
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>      @Test
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testExcel() {
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>          test(CSVFormat.EXCEL, <span class="jxr_string">"Excel"</span>);
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>      }
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>  
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>      @Test
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testMySQL() {
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>          test(CSVFormat.MYSQL, <span class="jxr_string">"MySQL"</span>);
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>      }
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>  
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>      @Test
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testRFC4180() {
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>          test(CSVFormat.RFC4180, <span class="jxr_string">"RFC4180"</span>);
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>      }
+<a class="jxr_linenumber" name="L52" href="#L52">52</a>  
+<a class="jxr_linenumber" name="L53" href="#L53">53</a>      @Test
+<a class="jxr_linenumber" name="L54" href="#L54">54</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testTDF() {
+<a class="jxr_linenumber" name="L55" href="#L55">55</a>          test(CSVFormat.TDF, <span class="jxr_string">"TDF"</span>);
+<a class="jxr_linenumber" name="L56" href="#L56">56</a>      }
+<a class="jxr_linenumber" name="L57" href="#L57">57</a>  }
+</pre>
+<hr/>
+<div id="footer">Copyright &#169; 2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
+</body>
 </html>
\ No newline at end of file



Mime
View raw message