Added: dev/commons/csv/1.8-RC2/site/apidocs/org/apache/commons/csv/CSVPrinter.html ============================================================================== --- dev/commons/csv/1.8-RC2/site/apidocs/org/apache/commons/csv/CSVPrinter.html (added) +++ dev/commons/csv/1.8-RC2/site/apidocs/org/apache/commons/csv/CSVPrinter.html Sun Feb 2 01:23:05 2020 @@ -0,0 +1,674 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>CSVPrinter (Apache Commons CSV 1.8 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="CSVPrinter (Apache Commons CSV 1.8 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../org/apache/commons/csv/package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/CSVPrinter.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/csv/CSVParser.html" title="class in org.apache.commons.csv"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/csv/CSVRecord.html" title="class in org.apache.commons.csv"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/csv/CSVPrinter.html" target="_top">Frames</a></li> +<li><a href="CSVPrinter.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.csv</div> +<h2 title="Class CSVPrinter" class="title">Class CSVPrinter</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.csv.CSVPrinter</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd> +</dl> +<hr> +<br> +<pre>public final class <span class="typeNameLabel">CSVPrinter</span> +extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></pre> +<div class="block">Prints values in a <a href="../../../../org/apache/commons/csv/CSVFormat.html" title="class in org.apache.commons.csv"><code>CSV format</code></a>. + + <p>Values can be appended to the output by calling the <a href="../../../../org/apache/commons/csv/CSVPrinter.html#print-java.lang.Object-"><code>print(Object)</code></a> method. + Values are printed according to <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true#valueOf-java.lang.Object-" title="class or interface in java.lang"><code>String.valueOf(Object)</code></a>. + To complete a record the <a href="../../../../org/apache/commons/csv/CSVPrinter.html#println--"><code>println()</code></a> method has to be called. + Comments can be appended by calling <a href="../../../../org/apache/commons/csv/CSVPrinter.html#printComment-java.lang.String-"><code>printComment(String)</code></a>. + However a comment will only be written to the output if the <a href="../../../../org/apache/commons/csv/CSVFormat.html" title="class in org.apache.commons.csv"><code>CSVFormat</code></a> supports comments. + </p> + + <p>The printer also supports appending a complete record at once by calling <a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecord-java.lang.Object...-"><code>printRecord(Object...)</code></a> + or <a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecord-java.lang.Iterable-"><code>printRecord(Iterable)</code></a>. + Furthermore <a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecords-java.lang.Object...-"><code>printRecords(Object...)</code></a>, <a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecords-java.lang.Iterable-"><code>printRecords(Iterable)</code></a> and <a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecords-java.sql.ResultSet-"><code>printRecords(ResultSet)</code></a> + methods can be used to print several records at once. + </p> + + <p>Example:</p> + + <pre> + try (CSVPrinter printer = new CSVPrinter(new FileWriter("csv.txt"), CSVFormat.EXCEL)) { + printer.printRecord("id", "userName", "firstName", "lastName", "birthday"); + printer.printRecord(1, "john73", "John", "Doe", LocalDate.of(1973, 9, 15)); + printer.println(); + printer.printRecord(2, "mary", "Mary", "Meyer", LocalDate.of(1985, 3, 29)); + } catch (IOException ex) { + ex.printStackTrace(); + } + </pre> + + <p>This code will write the following to csv.txt:</p> + <pre> + id,userName,firstName,lastName,birthday + 1,john73,John,Doe,1973-09-15 + + 2,mary,Mary,Meyer,1985-03-29 + </pre></div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#CSVPrinter-java.lang.Appendable-org.apache.commons.csv.CSVFormat-">CSVPrinter</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a> out, + <a href="../../../../org/apache/commons/csv/CSVFormat.html" title="class in org.apache.commons.csv">CSVFormat</a> format)</code> +<div class="block">Creates a printer that will print values to the given stream following the CSVFormat.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#close--">close</a></span>()</code> </td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#close-boolean-">close</a></span>(boolean flush)</code> +<div class="block">Closes the underlying stream with an optional flush first.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#flush--">flush</a></span>()</code> +<div class="block">Flushes the underlying stream.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#getOut--">getOut</a></span>()</code> +<div class="block">Gets the target Appendable.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#print-java.lang.Object-">print</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> +<div class="block">Prints the string as the next value on the line.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#printComment-java.lang.String-">printComment</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> comment)</code> +<div class="block">Prints a comment on a new line among the delimiter separated values.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#println--">println</a></span>()</code> +<div class="block">Outputs the record separator.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecord-java.lang.Iterable-">printRecord</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><?> values)</code> +<div class="block">Prints the given values a single record of delimiter separated values followed by the record separator.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecord-java.lang.Object...-">printRecord</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... values)</code> +<div class="block">Prints the given values a single record of delimiter separated values followed by the record separator.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecords-java.lang.Iterable-">printRecords</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><?> values)</code> +<div class="block">Prints all the objects in the given collection handling nested collections/arrays as records.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecords-java.lang.Object...-">printRecords</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... values)</code> +<div class="block">Prints all the objects in the given array handling nested collections/arrays as records.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecords-java.sql.ResultSet-">printRecords</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html?is-external=true" title="class or interface in java.sql">ResultSet</a> resultSet)</code> +<div class="block">Prints all the objects in the given JDBC result set.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/ja va/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="CSVPrinter-java.lang.Appendable-org.apache.commons.csv.CSVFormat-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>CSVPrinter</h4> +<pre>public CSVPrinter(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a> out, + <a href="../../../../org/apache/commons/csv/CSVFormat.html" title="class in org.apache.commons.csv">CSVFormat</a> format) + throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Creates a printer that will print values to the given stream following the CSVFormat. + <p> + Currently, only a pure encapsulation format or a pure escaping format is supported. Hybrid formats (encapsulation + and escaping with a different character) are not supported. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>out</code> - stream to which to print. Must not be null.</dd> +<dd><code>format</code> - the CSV format. Must not be null.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - thrown if the optional header cannot be printed.</dd> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - thrown if the parameters of the format are inconsistent or if either out or format are null.</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="close--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>close</h4> +<pre>public void close() + throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io">close</a></code> in interface <code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true#close--" title="class or interface in java.lang">close</a></code> in interface <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> +</dl> +</li> +</ul> +<a name="close-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>close</h4> +<pre>public void close(boolean flush) + throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Closes the underlying stream with an optional flush first.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>flush</code> - whether to flush before the actual close.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.6</dd> +</dl> +</li> +</ul> +<a name="flush--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>flush</h4> +<pre>public void flush() + throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Flushes the underlying stream.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Flushable.html?is-external=true#flush--" title="class or interface in java.io">flush</a></code> in interface <code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a></code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs</dd> +</dl> +</li> +</ul> +<a name="getOut--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getOut</h4> +<pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a> getOut()</pre> +<div class="block">Gets the target Appendable.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the target Appendable.</dd> +</dl> +</li> +</ul> +<a name="print-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>print</h4> +<pre>public void print(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value) + throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Prints the string as the next value on the line. The value will be escaped or encapsulated as needed.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>value</code> - value to be output.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs</dd> +</dl> +</li> +</ul> +<a name="printComment-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>printComment</h4> +<pre>public void printComment(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> comment) + throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Prints a comment on a new line among the delimiter separated values. + + <p> + Comments will always begin on a new line and occupy at least one full line. The character specified to start + comments and a space will be inserted at the beginning of each new line in the comment. + </p> + + <p> + If comments are disabled in the current CSV format this method does nothing. + </p> + + <p>This method detects line breaks inside the comment string and inserts <a href="../../../../org/apache/commons/csv/CSVFormat.html#getRecordSeparator--"><code>CSVFormat.getRecordSeparator()</code></a> + to start a new line of the comment. Note that this might produce unexpected results for formats that do not use + line breaks as record separator.</p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>comment</code> - the comment to output</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs</dd> +</dl> +</li> +</ul> +<a name="println--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>println</h4> +<pre>public void println() + throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Outputs the record separator.</div> +<dl> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs</dd> +</dl> +</li> +</ul> +<a name="printRecord-java.lang.Iterable-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>printRecord</h4> +<pre>public void printRecord(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><?> values) + throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Prints the given values a single record of delimiter separated values followed by the record separator. + + <p> + The values will be quoted if needed. Quotes and newLine characters will be escaped. This method adds the record + separator to the output after printing the record, so there is no need to call <a href="../../../../org/apache/commons/csv/CSVPrinter.html#println--"><code>println()</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>values</code> - values to output.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs</dd> +</dl> +</li> +</ul> +<a name="printRecord-java.lang.Object...-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>printRecord</h4> +<pre>public void printRecord(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... values) + throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Prints the given values a single record of delimiter separated values followed by the record separator. + + <p> + The values will be quoted if needed. Quotes and newLine characters will be escaped. This method adds the record + separator to the output after printing the record, so there is no need to call <a href="../../../../org/apache/commons/csv/CSVPrinter.html#println--"><code>println()</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>values</code> - values to output.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs</dd> +</dl> +</li> +</ul> +<a name="printRecords-java.lang.Iterable-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>printRecords</h4> +<pre>public void printRecords(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><?> values) + throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Prints all the objects in the given collection handling nested collections/arrays as records. + + <p> + If the given collection only contains simple objects, this method will print a single record like + <a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecord-java.lang.Iterable-"><code>printRecord(Iterable)</code></a>. If the given collections contains nested collections/arrays those nested elements + will each be printed as records using <a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecord-java.lang.Object...-"><code>printRecord(Object...)</code></a>. + </p> + + <p> + Given the following data structure: + </p> + + <pre> + <code> + List<String[]> data = ... + data.add(new String[]{ "A", "B", "C" }); + data.add(new String[]{ "1", "2", "3" }); + data.add(new String[]{ "A1", "B2", "C3" }); + </code> + </pre> + + <p> + Calling this method will print: + </p> + + <pre> + <code> + A, B, C + 1, 2, 3 + A1, B2, C3 + </code> + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>values</code> - the values to print.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs</dd> +</dl> +</li> +</ul> +<a name="printRecords-java.lang.Object...-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>printRecords</h4> +<pre>public void printRecords(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... values) + throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Prints all the objects in the given array handling nested collections/arrays as records. + + <p> + If the given array only contains simple objects, this method will print a single record like + <a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecord-java.lang.Object...-"><code>printRecord(Object...)</code></a>. If the given collections contains nested collections/arrays those nested + elements will each be printed as records using <a href="../../../../org/apache/commons/csv/CSVPrinter.html#printRecord-java.lang.Object...-"><code>printRecord(Object...)</code></a>. + </p> + + <p> + Given the following data structure: + </p> + + <pre> + <code> + String[][] data = new String[3][] + data[0] = String[]{ "A", "B", "C" }; + data[1] = new String[]{ "1", "2", "3" }; + data[2] = new String[]{ "A1", "B2", "C3" }; + </code> + </pre> + + <p> + Calling this method will print: + </p> + + <pre> + <code> + A, B, C + 1, 2, 3 + A1, B2, C3 + </code> + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>values</code> - the values to print.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs</dd> +</dl> +</li> +</ul> +<a name="printRecords-java.sql.ResultSet-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>printRecords</h4> +<pre>public void printRecords(<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html?is-external=true" title="class or interface in java.sql">ResultSet</a> resultSet) + throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a>, + <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Prints all the objects in the given JDBC result set.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>resultSet</code> - result set the values to print.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs</dd> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if a database access error occurs</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../org/apache/commons/csv/package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/CSVPrinter.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/csv/CSVParser.html" title="class in org.apache.commons.csv"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/csv/CSVRecord.html" title="class in org.apache.commons.csv"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/csv/CSVPrinter.html" target="_top">Frames</a></li> +<li><a href="CSVPrinter.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html>
Added: dev/commons/csv/1.8-RC2/site/apidocs/org/apache/commons/csv/CSVRecord.html ============================================================================== --- dev/commons/csv/1.8-RC2/site/apidocs/org/apache/commons/csv/CSVRecord.html (added) +++ dev/commons/csv/1.8-RC2/site/apidocs/org/apache/commons/csv/CSVRecord.html Sun Feb 2 01:23:05 2020 @@ -0,0 +1,630 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>CSVRecord (Apache Commons CSV 1.8 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="CSVRecord (Apache Commons CSV 1.8 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../org/apache/commons/csv/package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/CSVRecord.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/csv/CSVPrinter.html" title="class in org.apache.commons.csv"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/csv/QuoteMode.html" title="enum in org.apache.commons.csv"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/csv/CSVRecord.html" target="_top">Frames</a></li> +<li><a href="CSVRecord.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.csv</div> +<h2 title="Class CSVRecord" class="title">Class CSVRecord</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.csv.CSVRecord</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></dd> +</dl> +<hr> +<br> +<pre>public final class <span class="typeNameLabel">CSVRecord</span> +extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></pre> +<div class="block">A CSV record parsed from a CSV file. + + <p> + Note: Support for <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io"><code>Serializable</code></a> is scheduled to be removed in version 2.0. + In version 1.8 the mapping between the column header and the column index was + removed from the serialised state. The class maintains serialization compatibility + with versions pre-1.8 for the record values; these must be accessed by index + following deserialization. There will be loss of any functionally linked to the header + mapping when transferring serialised forms pre-1.8 to 1.8 and vice versa. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../serialized-form.html#org.apache.commons.csv.CSVRecord">Serialized Form</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#get-java.lang.Enum-">get</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a><?> e)</code> +<div class="block">Returns a value by <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><code>Enum</code></a>.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#get-int-">get</a></span>(int i)</code> +<div class="block">Returns a value by index.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#get-java.lang.String-">get</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Returns a value by name.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#getCharacterPosition--">getCharacterPosition</a></span>()</code> +<div class="block">Returns the start position of this record as a character position in the source stream.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#getComment--">getComment</a></span>()</code> +<div class="block">Returns the comment for this record, if any.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code><a href="../../../../org/apache/commons/csv/CSVParser.html" title="class in org.apache.commons.csv">CSVParser</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#getParser--">getParser</a></span>()</code> +<div class="block">Returns the parser.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#getRecordNumber--">getRecordNumber</a></span>()</code> +<div class="block">Returns the number of this record in the parsed CSV file.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#hasComment--">hasComment</a></span>()</code> +<div class="block">Checks whether this record has a comment, false otherwise.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#isConsistent--">isConsistent</a></span>()</code> +<div class="block">Tells whether the record size matches the header size.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#isMapped-java.lang.String-">isMapped</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Checks whether a given column is mapped, i.e.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#isSet-int-">isSet</a></span>(int index)</code> +<div class="block">Checks whether a column with given index has a value.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#isSet-java.lang.String-">isSet</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Checks whether a given columns is mapped and has a value.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#iterator--">iterator</a></span>()</code> +<div class="block">Returns an iterator over the values of this record.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#size--">size</a></span>()</code> +<div class="block">Returns the number of values in this record.</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#toMap--">toMap</a></span>()</code> +<div class="block">Copies this record into a new Map of header name to record value.</div> +</td> +</tr> +<tr id="i15" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/csv/CSVRecord.html#toString--">toString</a></span>()</code> +<div class="block">Returns a string representation of the contents of this record.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/ja va/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Iterable"> +<!-- --> +</a> +<h3>Methods inherited from interface java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a></h3> +<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true#forEach-java.util.function.Consumer-" title="class or interface in java.lang">forEach</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true#spliterator--" title="class or interface in java.lang">spliterator</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="get-java.lang.Enum-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>get</h4> +<pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> get(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a><?> e)</pre> +<div class="block">Returns a value by <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><code>Enum</code></a>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>e</code> - an enum</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the String at the given enum String</dd> +</dl> +</li> +</ul> +<a name="get-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>get</h4> +<pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> get(int i)</pre> +<div class="block">Returns a value by index.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>i</code> - a column index (0-based)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the String at the given index</dd> +</dl> +</li> +</ul> +<a name="get-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>get</h4> +<pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> get(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Returns a value by name. + + <p> + Note: This requires a field mapping obtained from the original parser. + A check using <a href="../../../../org/apache/commons/csv/CSVRecord.html#isMapped-java.lang.String-"><code>isMapped(String)</code></a> should be used to determine if a + mapping exists from the provided <code>name</code> to a field index. In this case an + exception will only be thrown if the record does not contain a field corresponding + to the mapping, that is the record length is not consistent with the mapping size. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - the name of the column to be retrieved.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the column value, maybe null depending on <a href="../../../../org/apache/commons/csv/CSVFormat.html#getNullString--"><code>CSVFormat.getNullString()</code></a>.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if no header mapping was provided</dd> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>name</code> is not mapped or if the record is inconsistent</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../org/apache/commons/csv/CSVRecord.html#isMapped-java.lang.String-"><code>isMapped(String)</code></a>, +<a href="../../../../org/apache/commons/csv/CSVRecord.html#isConsistent--"><code>isConsistent()</code></a>, +<a href="../../../../org/apache/commons/csv/CSVRecord.html#getParser--"><code>getParser()</code></a>, +<a href="../../../../org/apache/commons/csv/CSVFormat.html#withNullString-java.lang.String-"><code>CSVFormat.withNullString(String)</code></a></dd> +</dl> +</li> +</ul> +<a name="getCharacterPosition--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getCharacterPosition</h4> +<pre>public long getCharacterPosition()</pre> +<div class="block">Returns the start position of this record as a character position in the source stream. This may or may not + correspond to the byte position depending on the character set.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the position of this record in the source stream.</dd> +</dl> +</li> +</ul> +<a name="getComment--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getComment</h4> +<pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getComment()</pre> +<div class="block">Returns the comment for this record, if any. + Note that comments are attached to the following record. + If there is no following record (i.e. the comment is at EOF) + the comment will be ignored.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the comment for this record, or null if no comment for this record is available.</dd> +</dl> +</li> +</ul> +<a name="getParser--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getParser</h4> +<pre>public <a href="../../../../org/apache/commons/csv/CSVParser.html" title="class in org.apache.commons.csv">CSVParser</a> getParser()</pre> +<div class="block">Returns the parser. + + <p> + Note: The parser is not part of the serialized state of the record. A null check + should be used when the record may have originated from a serialized form. + </p></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the parser.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="getRecordNumber--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getRecordNumber</h4> +<pre>public long getRecordNumber()</pre> +<div class="block">Returns the number of this record in the parsed CSV file. + + <p> + <strong>ATTENTION:</strong> If your CSV input has multi-line values, the returned number does not correspond to + the current line number of the parser that created this record. + </p></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the number of this record.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../org/apache/commons/csv/CSVParser.html#getCurrentLineNumber--"><code>CSVParser.getCurrentLineNumber()</code></a></dd> +</dl> +</li> +</ul> +<a name="hasComment--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hasComment</h4> +<pre>public boolean hasComment()</pre> +<div class="block">Checks whether this record has a comment, false otherwise. + Note that comments are attached to the following record. + If there is no following record (i.e. the comment is at EOF) + the comment will be ignored.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>true if this record has a comment, false otherwise</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.3</dd> +</dl> +</li> +</ul> +<a name="isConsistent--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isConsistent</h4> +<pre>public boolean isConsistent()</pre> +<div class="block">Tells whether the record size matches the header size. + + <p> + Returns true if the sizes for this record match and false if not. Some programs can export files that fail this + test but still produce parsable files. + </p></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>true of this record is valid, false if not</dd> +</dl> +</li> +</ul> +<a name="isMapped-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isMapped</h4> +<pre>public boolean isMapped(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Checks whether a given column is mapped, i.e. its name has been defined to the parser.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - the name of the column to be retrieved.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>whether a given column is mapped.</dd> +</dl> +</li> +</ul> +<a name="isSet-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isSet</h4> +<pre>public boolean isSet(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Checks whether a given columns is mapped and has a value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - the name of the column to be retrieved.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>whether a given columns is mapped and has a value</dd> +</dl> +</li> +</ul> +<a name="isSet-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isSet</h4> +<pre>public boolean isSet(int index)</pre> +<div class="block">Checks whether a column with given index has a value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>index</code> - a column index (0-based)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>whether a column with given index has a value</dd> +</dl> +</li> +</ul> +<a name="iterator--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>iterator</h4> +<pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> iterator()</pre> +<div class="block">Returns an iterator over the values of this record.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true#iterator--" title="class or interface in java.lang">iterator</a></code> in interface <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>an iterator over the values of this record.</dd> +</dl> +</li> +</ul> +<a name="size--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>size</h4> +<pre>public int size()</pre> +<div class="block">Returns the number of values in this record.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the number of values.</dd> +</dl> +</li> +</ul> +<a name="toMap--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>toMap</h4> +<pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> toMap()</pre> +<div class="block">Copies this record into a new Map of header name to record value.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new Map. The map is empty if the record has no headers.</dd> +</dl> +</li> +</ul> +<a name="toString--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>toString</h4> +<pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre> +<div class="block">Returns a string representation of the contents of this record. The result is constructed by comment, mapping, + recordNumber and by passing the internal values array to <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html?is-external=true#toString-java.lang.Object:A-" title="class or interface in java.util"><code>Arrays.toString(Object[])</code></a>.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a String representation of this record.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../org/apache/commons/csv/package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/CSVRecord.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/csv/CSVPrinter.html" title="class in org.apache.commons.csv"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/csv/QuoteMode.html" title="enum in org.apache.commons.csv"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/csv/CSVRecord.html" target="_top">Frames</a></li> +<li><a href="CSVRecord.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html>