You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2013/03/21 16:20:21 UTC
svn commit: r855435 [31/45] - in
/websites/production/commons/content/proper/commons-csv: ./ apidocs/
apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/
apidocs/org/apache/commons/csv/writer/
apidocs/src-html/org/apache/commons/c...
Added: websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/PerformanceTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/PerformanceTest.html (added)
+++ websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/PerformanceTest.html Thu Mar 21 15:20:15 2013
@@ -0,0 +1,356 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT> /*<a name="line.1"></a>
+<FONT color="green">002</FONT> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a>
+<FONT color="green">003</FONT> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a>
+<FONT color="green">004</FONT> * this work for additional information regarding copyright ownership.<a name="line.4"></a>
+<FONT color="green">005</FONT> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a>
+<FONT color="green">006</FONT> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a>
+<FONT color="green">007</FONT> * the License. You may obtain a copy of the License at<a name="line.7"></a>
+<FONT color="green">008</FONT> *<a name="line.8"></a>
+<FONT color="green">009</FONT> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a>
+<FONT color="green">010</FONT> *<a name="line.10"></a>
+<FONT color="green">011</FONT> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a>
+<FONT color="green">012</FONT> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a>
+<FONT color="green">013</FONT> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a>
+<FONT color="green">014</FONT> * See the License for the specific language governing permissions and<a name="line.14"></a>
+<FONT color="green">015</FONT> * limitations under the License.<a name="line.15"></a>
+<FONT color="green">016</FONT> */<a name="line.16"></a>
+<FONT color="green">017</FONT> <a name="line.17"></a>
+<FONT color="green">018</FONT> package org.apache.commons.csv;<a name="line.18"></a>
+<FONT color="green">019</FONT> <a name="line.19"></a>
+<FONT color="green">020</FONT> import java.io.BufferedReader;<a name="line.20"></a>
+<FONT color="green">021</FONT> import java.io.File;<a name="line.21"></a>
+<FONT color="green">022</FONT> import java.io.FileInputStream;<a name="line.22"></a>
+<FONT color="green">023</FONT> import java.io.FileOutputStream;<a name="line.23"></a>
+<FONT color="green">024</FONT> import java.io.FileReader;<a name="line.24"></a>
+<FONT color="green">025</FONT> import java.io.IOException;<a name="line.25"></a>
+<FONT color="green">026</FONT> import java.io.InputStream;<a name="line.26"></a>
+<FONT color="green">027</FONT> import java.io.OutputStream;<a name="line.27"></a>
+<FONT color="green">028</FONT> import java.lang.reflect.Constructor;<a name="line.28"></a>
+<FONT color="green">029</FONT> import java.util.zip.GZIPInputStream;<a name="line.29"></a>
+<FONT color="green">030</FONT> <a name="line.30"></a>
+<FONT color="green">031</FONT> import org.apache.commons.io.IOUtils;<a name="line.31"></a>
+<FONT color="green">032</FONT> <a name="line.32"></a>
+<FONT color="green">033</FONT> /**<a name="line.33"></a>
+<FONT color="green">034</FONT> * Basic test harness.<a name="line.34"></a>
+<FONT color="green">035</FONT> *<a name="line.35"></a>
+<FONT color="green">036</FONT> * Requires test file to be downloaded separately.<a name="line.36"></a>
+<FONT color="green">037</FONT> *<a name="line.37"></a>
+<FONT color="green">038</FONT> * @version $Id$<a name="line.38"></a>
+<FONT color="green">039</FONT> */<a name="line.39"></a>
+<FONT color="green">040</FONT> @SuppressWarnings("boxing")<a name="line.40"></a>
+<FONT color="green">041</FONT> public class PerformanceTest {<a name="line.41"></a>
+<FONT color="green">042</FONT> <a name="line.42"></a>
+<FONT color="green">043</FONT> private static final String[] PROPS = {<a name="line.43"></a>
+<FONT color="green">044</FONT> "java.version", // Java Runtime Environment version<a name="line.44"></a>
+<FONT color="green">045</FONT> "java.vendor", // Java Runtime Environment vendor<a name="line.45"></a>
+<FONT color="green">046</FONT> // "java.vm.specification.version", // Java Virtual Machine specification version<a name="line.46"></a>
+<FONT color="green">047</FONT> // "java.vm.specification.vendor", // Java Virtual Machine specification vendor<a name="line.47"></a>
+<FONT color="green">048</FONT> // "java.vm.specification.name", // Java Virtual Machine specification name<a name="line.48"></a>
+<FONT color="green">049</FONT> "java.vm.version", // Java Virtual Machine implementation version<a name="line.49"></a>
+<FONT color="green">050</FONT> // "java.vm.vendor", // Java Virtual Machine implementation vendor<a name="line.50"></a>
+<FONT color="green">051</FONT> "java.vm.name", // Java Virtual Machine implementation name<a name="line.51"></a>
+<FONT color="green">052</FONT> // "java.specification.version", // Java Runtime Environment specification version<a name="line.52"></a>
+<FONT color="green">053</FONT> // "java.specification.vendor", // Java Runtime Environment specification vendor<a name="line.53"></a>
+<FONT color="green">054</FONT> // "java.specification.name", // Java Runtime Environment specification name<a name="line.54"></a>
+<FONT color="green">055</FONT> <a name="line.55"></a>
+<FONT color="green">056</FONT> "os.name", // Operating system name<a name="line.56"></a>
+<FONT color="green">057</FONT> "os.arch", // Operating system architecture<a name="line.57"></a>
+<FONT color="green">058</FONT> "os.version", // Operating system version<a name="line.58"></a>
+<FONT color="green">059</FONT> <a name="line.59"></a>
+<FONT color="green">060</FONT> };<a name="line.60"></a>
+<FONT color="green">061</FONT> <a name="line.61"></a>
+<FONT color="green">062</FONT> private static int max = 10;<a name="line.62"></a>
+<FONT color="green">063</FONT> <a name="line.63"></a>
+<FONT color="green">064</FONT> private static int num = 0; // number of elapsed times recorded<a name="line.64"></a>
+<FONT color="green">065</FONT> private static long[] elapsedTimes = new long[max];<a name="line.65"></a>
+<FONT color="green">066</FONT> <a name="line.66"></a>
+<FONT color="green">067</FONT> private static final CSVFormat format = CSVFormat.EXCEL;<a name="line.67"></a>
+<FONT color="green">068</FONT> <a name="line.68"></a>
+<FONT color="green">069</FONT> private static final File BIG_FILE = new File(System.getProperty("java.io.tmpdir"), "worldcitiespop.txt");<a name="line.69"></a>
+<FONT color="green">070</FONT> <a name="line.70"></a>
+<FONT color="green">071</FONT> public static void main(final String [] args) throws Exception {<a name="line.71"></a>
+<FONT color="green">072</FONT> if (BIG_FILE.exists()) {<a name="line.72"></a>
+<FONT color="green">073</FONT> System.out.println(String.format("Found test fixture %s: %,d bytes.", BIG_FILE, BIG_FILE.length()));<a name="line.73"></a>
+<FONT color="green">074</FONT> } else {<a name="line.74"></a>
+<FONT color="green">075</FONT> System.out.println("Decompressing test fixture " + BIG_FILE + "...");<a name="line.75"></a>
+<FONT color="green">076</FONT> final InputStream input = new GZIPInputStream(new FileInputStream("src/test/resources/perf/worldcitiespop.txt.gz"));<a name="line.76"></a>
+<FONT color="green">077</FONT> final OutputStream output = new FileOutputStream(BIG_FILE);<a name="line.77"></a>
+<FONT color="green">078</FONT> IOUtils.copy(input, output);<a name="line.78"></a>
+<FONT color="green">079</FONT> System.out.println(String.format("Decompressed test fixture %s: %,d bytes.", BIG_FILE, BIG_FILE.length())); <a name="line.79"></a>
+<FONT color="green">080</FONT> }<a name="line.80"></a>
+<FONT color="green">081</FONT> final int argc = args.length;<a name="line.81"></a>
+<FONT color="green">082</FONT> String tests[];<a name="line.82"></a>
+<FONT color="green">083</FONT> if (argc > 0) {<a name="line.83"></a>
+<FONT color="green">084</FONT> max=Integer.parseInt(args[0]);<a name="line.84"></a>
+<FONT color="green">085</FONT> }<a name="line.85"></a>
+<FONT color="green">086</FONT> if (argc > 1) {<a name="line.86"></a>
+<FONT color="green">087</FONT> tests = new String[argc-1];<a name="line.87"></a>
+<FONT color="green">088</FONT> for (int i = 1; i < argc; i++) {<a name="line.88"></a>
+<FONT color="green">089</FONT> tests[i-1]=args[i];<a name="line.89"></a>
+<FONT color="green">090</FONT> }<a name="line.90"></a>
+<FONT color="green">091</FONT> } else {<a name="line.91"></a>
+<FONT color="green">092</FONT> tests=new String[]{"file", "split", "extb", "exts", "csv", "lexreset", "lexnew"};<a name="line.92"></a>
+<FONT color="green">093</FONT> }<a name="line.93"></a>
+<FONT color="green">094</FONT> for(final String p : PROPS) {<a name="line.94"></a>
+<FONT color="green">095</FONT> System.out.println(p+"="+System.getProperty(p));<a name="line.95"></a>
+<FONT color="green">096</FONT> }<a name="line.96"></a>
+<FONT color="green">097</FONT> System.out.println("Max count: "+max+"\n");<a name="line.97"></a>
+<FONT color="green">098</FONT> <a name="line.98"></a>
+<FONT color="green">099</FONT> for(final String test : tests) {<a name="line.99"></a>
+<FONT color="green">100</FONT> if ("file".equals(test)) {<a name="line.100"></a>
+<FONT color="green">101</FONT> testReadBigFile(false);<a name="line.101"></a>
+<FONT color="green">102</FONT> } else if ("split".equals(test)) {<a name="line.102"></a>
+<FONT color="green">103</FONT> testReadBigFile(true);<a name="line.103"></a>
+<FONT color="green">104</FONT> } else if ("csv".equals(test)) {<a name="line.104"></a>
+<FONT color="green">105</FONT> testParseCommonsCSV();<a name="line.105"></a>
+<FONT color="green">106</FONT> } else if ("lexreset".equals(test)) {<a name="line.106"></a>
+<FONT color="green">107</FONT> testCSVLexer(false, test);<a name="line.107"></a>
+<FONT color="green">108</FONT> } else if ("lexnew".equals(test)) {<a name="line.108"></a>
+<FONT color="green">109</FONT> testCSVLexer(true, test);<a name="line.109"></a>
+<FONT color="green">110</FONT> } else if (test.startsWith("CSVLexer")) {<a name="line.110"></a>
+<FONT color="green">111</FONT> testCSVLexer(false, test);<a name="line.111"></a>
+<FONT color="green">112</FONT> } else if ("extb".equals(test)) {<a name="line.112"></a>
+<FONT color="green">113</FONT> testExtendedBuffer(false);<a name="line.113"></a>
+<FONT color="green">114</FONT> } else if ("exts".equals(test)) {<a name="line.114"></a>
+<FONT color="green">115</FONT> testExtendedBuffer(true);<a name="line.115"></a>
+<FONT color="green">116</FONT> } else {<a name="line.116"></a>
+<FONT color="green">117</FONT> System.out.println("Invalid test name: "+test);<a name="line.117"></a>
+<FONT color="green">118</FONT> }<a name="line.118"></a>
+<FONT color="green">119</FONT> }<a name="line.119"></a>
+<FONT color="green">120</FONT> }<a name="line.120"></a>
+<FONT color="green">121</FONT> <a name="line.121"></a>
+<FONT color="green">122</FONT> private static BufferedReader getReader() throws IOException {<a name="line.122"></a>
+<FONT color="green">123</FONT> return new BufferedReader(new FileReader(BIG_FILE));<a name="line.123"></a>
+<FONT color="green">124</FONT> }<a name="line.124"></a>
+<FONT color="green">125</FONT> <a name="line.125"></a>
+<FONT color="green">126</FONT> // Container for basic statistics<a name="line.126"></a>
+<FONT color="green">127</FONT> private static class Stats {<a name="line.127"></a>
+<FONT color="green">128</FONT> final int count;<a name="line.128"></a>
+<FONT color="green">129</FONT> final int fields;<a name="line.129"></a>
+<FONT color="green">130</FONT> Stats(final int c, final int f) {<a name="line.130"></a>
+<FONT color="green">131</FONT> count=c;<a name="line.131"></a>
+<FONT color="green">132</FONT> fields=f;<a name="line.132"></a>
+<FONT color="green">133</FONT> }<a name="line.133"></a>
+<FONT color="green">134</FONT> }<a name="line.134"></a>
+<FONT color="green">135</FONT> <a name="line.135"></a>
+<FONT color="green">136</FONT> // Display end stats; store elapsed for average<a name="line.136"></a>
+<FONT color="green">137</FONT> private static void show(final String msg, final Stats s, final long start) {<a name="line.137"></a>
+<FONT color="green">138</FONT> final long elapsed = System.currentTimeMillis() - start;<a name="line.138"></a>
+<FONT color="green">139</FONT> System.out.printf("%-20s: %5dms " + s.count + " lines "+ s.fields + " fields%n",msg,elapsed);<a name="line.139"></a>
+<FONT color="green">140</FONT> elapsedTimes[num++]=elapsed;<a name="line.140"></a>
+<FONT color="green">141</FONT> }<a name="line.141"></a>
+<FONT color="green">142</FONT> <a name="line.142"></a>
+<FONT color="green">143</FONT> // calculate and show average<a name="line.143"></a>
+<FONT color="green">144</FONT> private static void show(){<a name="line.144"></a>
+<FONT color="green">145</FONT> long tot = 0;<a name="line.145"></a>
+<FONT color="green">146</FONT> if (num > 1) {<a name="line.146"></a>
+<FONT color="green">147</FONT> for(int i=1; i < num; i++) { // skip first test<a name="line.147"></a>
+<FONT color="green">148</FONT> tot += elapsedTimes[i];<a name="line.148"></a>
+<FONT color="green">149</FONT> }<a name="line.149"></a>
+<FONT color="green">150</FONT> System.out.printf("%-20s: %5dms%n%n", "Average(not first)", tot/(num-1));<a name="line.150"></a>
+<FONT color="green">151</FONT> }<a name="line.151"></a>
+<FONT color="green">152</FONT> num=0; // ready for next set<a name="line.152"></a>
+<FONT color="green">153</FONT> }<a name="line.153"></a>
+<FONT color="green">154</FONT> <a name="line.154"></a>
+<FONT color="green">155</FONT> private static void testReadBigFile(final boolean split) throws Exception {<a name="line.155"></a>
+<FONT color="green">156</FONT> for (int i = 0; i < max; i++) {<a name="line.156"></a>
+<FONT color="green">157</FONT> final BufferedReader in = getReader();<a name="line.157"></a>
+<FONT color="green">158</FONT> final long t0 = System.currentTimeMillis();<a name="line.158"></a>
+<FONT color="green">159</FONT> final Stats s = readAll(in, split);<a name="line.159"></a>
+<FONT color="green">160</FONT> in.close();<a name="line.160"></a>
+<FONT color="green">161</FONT> show(split?"file+split":"file", s, t0);<a name="line.161"></a>
+<FONT color="green">162</FONT> }<a name="line.162"></a>
+<FONT color="green">163</FONT> show();<a name="line.163"></a>
+<FONT color="green">164</FONT> }<a name="line.164"></a>
+<FONT color="green">165</FONT> <a name="line.165"></a>
+<FONT color="green">166</FONT> private static Stats readAll(final BufferedReader in, final boolean split) throws IOException {<a name="line.166"></a>
+<FONT color="green">167</FONT> int count = 0;<a name="line.167"></a>
+<FONT color="green">168</FONT> int fields = 0;<a name="line.168"></a>
+<FONT color="green">169</FONT> String record;<a name="line.169"></a>
+<FONT color="green">170</FONT> while ((record=in.readLine()) != null) {<a name="line.170"></a>
+<FONT color="green">171</FONT> count++;<a name="line.171"></a>
+<FONT color="green">172</FONT> fields+= split ? record.split(",").length : 1;<a name="line.172"></a>
+<FONT color="green">173</FONT> }<a name="line.173"></a>
+<FONT color="green">174</FONT> return new Stats(count, fields);<a name="line.174"></a>
+<FONT color="green">175</FONT> }<a name="line.175"></a>
+<FONT color="green">176</FONT> <a name="line.176"></a>
+<FONT color="green">177</FONT> private static void testExtendedBuffer(final boolean makeString) throws Exception {<a name="line.177"></a>
+<FONT color="green">178</FONT> for (int i = 0; i < max; i++) {<a name="line.178"></a>
+<FONT color="green">179</FONT> final ExtendedBufferedReader in = new ExtendedBufferedReader(getReader());<a name="line.179"></a>
+<FONT color="green">180</FONT> final long t0 = System.currentTimeMillis();<a name="line.180"></a>
+<FONT color="green">181</FONT> int read;<a name="line.181"></a>
+<FONT color="green">182</FONT> int fields = 0;<a name="line.182"></a>
+<FONT color="green">183</FONT> int lines = 0;<a name="line.183"></a>
+<FONT color="green">184</FONT> if (makeString) {<a name="line.184"></a>
+<FONT color="green">185</FONT> StringBuilder sb = new StringBuilder();<a name="line.185"></a>
+<FONT color="green">186</FONT> while((read=in.read()) != -1) {<a name="line.186"></a>
+<FONT color="green">187</FONT> sb.append((char)read);<a name="line.187"></a>
+<FONT color="green">188</FONT> if (read == ',') { // count delimiters<a name="line.188"></a>
+<FONT color="green">189</FONT> sb.toString();<a name="line.189"></a>
+<FONT color="green">190</FONT> sb = new StringBuilder();<a name="line.190"></a>
+<FONT color="green">191</FONT> fields++;<a name="line.191"></a>
+<FONT color="green">192</FONT> } else if (read == '\n') {<a name="line.192"></a>
+<FONT color="green">193</FONT> sb.toString();<a name="line.193"></a>
+<FONT color="green">194</FONT> sb = new StringBuilder();<a name="line.194"></a>
+<FONT color="green">195</FONT> lines++;<a name="line.195"></a>
+<FONT color="green">196</FONT> }<a name="line.196"></a>
+<FONT color="green">197</FONT> }<a name="line.197"></a>
+<FONT color="green">198</FONT> } else {<a name="line.198"></a>
+<FONT color="green">199</FONT> while((read=in.read()) != -1) {<a name="line.199"></a>
+<FONT color="green">200</FONT> if (read == ',') { // count delimiters<a name="line.200"></a>
+<FONT color="green">201</FONT> fields++;<a name="line.201"></a>
+<FONT color="green">202</FONT> } else if (read == '\n') {<a name="line.202"></a>
+<FONT color="green">203</FONT> lines++;<a name="line.203"></a>
+<FONT color="green">204</FONT> }<a name="line.204"></a>
+<FONT color="green">205</FONT> }<a name="line.205"></a>
+<FONT color="green">206</FONT> }<a name="line.206"></a>
+<FONT color="green">207</FONT> fields += lines; // EOL is a delimiter too<a name="line.207"></a>
+<FONT color="green">208</FONT> in.close();<a name="line.208"></a>
+<FONT color="green">209</FONT> show("Extended"+(makeString?" toString":""), new Stats(lines, fields), t0);<a name="line.209"></a>
+<FONT color="green">210</FONT> }<a name="line.210"></a>
+<FONT color="green">211</FONT> show();<a name="line.211"></a>
+<FONT color="green">212</FONT> }<a name="line.212"></a>
+<FONT color="green">213</FONT> <a name="line.213"></a>
+<FONT color="green">214</FONT> private static void testParseCommonsCSV() throws Exception {<a name="line.214"></a>
+<FONT color="green">215</FONT> for (int i = 0; i < max; i++) {<a name="line.215"></a>
+<FONT color="green">216</FONT> final BufferedReader reader = getReader();<a name="line.216"></a>
+<FONT color="green">217</FONT> final CSVParser parser = new CSVParser(reader, format);<a name="line.217"></a>
+<FONT color="green">218</FONT> final long t0 = System.currentTimeMillis();<a name="line.218"></a>
+<FONT color="green">219</FONT> final Stats s = iterate(parser);<a name="line.219"></a>
+<FONT color="green">220</FONT> reader.close();<a name="line.220"></a>
+<FONT color="green">221</FONT> show("CSV", s, t0);<a name="line.221"></a>
+<FONT color="green">222</FONT> }<a name="line.222"></a>
+<FONT color="green">223</FONT> show();<a name="line.223"></a>
+<FONT color="green">224</FONT> }<a name="line.224"></a>
+<FONT color="green">225</FONT> <a name="line.225"></a>
+<FONT color="green">226</FONT> <a name="line.226"></a>
+<FONT color="green">227</FONT> private static Constructor<Lexer> getLexerCtor(final String clazz) throws Exception {<a name="line.227"></a>
+<FONT color="green">228</FONT> @SuppressWarnings("unchecked")<a name="line.228"></a>
+<FONT color="green">229</FONT> final Class<Lexer> lexer = (Class<Lexer>) Class.forName("org.apache.commons.csv."+clazz);<a name="line.229"></a>
+<FONT color="green">230</FONT> final Constructor<Lexer> ctor = lexer.getConstructor(new Class<?>[]{CSVFormat.class, ExtendedBufferedReader.class});<a name="line.230"></a>
+<FONT color="green">231</FONT> return ctor;<a name="line.231"></a>
+<FONT color="green">232</FONT> }<a name="line.232"></a>
+<FONT color="green">233</FONT> <a name="line.233"></a>
+<FONT color="green">234</FONT> private static void testCSVLexer(final boolean newToken, final String test) throws Exception {<a name="line.234"></a>
+<FONT color="green">235</FONT> Token token = new Token();<a name="line.235"></a>
+<FONT color="green">236</FONT> String dynamic = "";<a name="line.236"></a>
+<FONT color="green">237</FONT> for (int i = 0; i < max; i++) {<a name="line.237"></a>
+<FONT color="green">238</FONT> final ExtendedBufferedReader input = new ExtendedBufferedReader(getReader());<a name="line.238"></a>
+<FONT color="green">239</FONT> Lexer lexer = null;<a name="line.239"></a>
+<FONT color="green">240</FONT> if (test.startsWith("CSVLexer")) {<a name="line.240"></a>
+<FONT color="green">241</FONT> dynamic="!";<a name="line.241"></a>
+<FONT color="green">242</FONT> lexer = getLexerCtor(test).newInstance(new Object[]{format, input});<a name="line.242"></a>
+<FONT color="green">243</FONT> } else {<a name="line.243"></a>
+<FONT color="green">244</FONT> lexer = new CSVLexer(format, input);<a name="line.244"></a>
+<FONT color="green">245</FONT> }<a name="line.245"></a>
+<FONT color="green">246</FONT> int count = 0;<a name="line.246"></a>
+<FONT color="green">247</FONT> int fields = 0;<a name="line.247"></a>
+<FONT color="green">248</FONT> final long t0 = System.currentTimeMillis();<a name="line.248"></a>
+<FONT color="green">249</FONT> do {<a name="line.249"></a>
+<FONT color="green">250</FONT> if (newToken) {<a name="line.250"></a>
+<FONT color="green">251</FONT> token = new Token();<a name="line.251"></a>
+<FONT color="green">252</FONT> } else {<a name="line.252"></a>
+<FONT color="green">253</FONT> token.reset();<a name="line.253"></a>
+<FONT color="green">254</FONT> }<a name="line.254"></a>
+<FONT color="green">255</FONT> lexer.nextToken(token);<a name="line.255"></a>
+<FONT color="green">256</FONT> switch(token.type) {<a name="line.256"></a>
+<FONT color="green">257</FONT> case EOF:<a name="line.257"></a>
+<FONT color="green">258</FONT> break;<a name="line.258"></a>
+<FONT color="green">259</FONT> case EORECORD:<a name="line.259"></a>
+<FONT color="green">260</FONT> fields++;<a name="line.260"></a>
+<FONT color="green">261</FONT> count++;<a name="line.261"></a>
+<FONT color="green">262</FONT> break;<a name="line.262"></a>
+<FONT color="green">263</FONT> case INVALID:<a name="line.263"></a>
+<FONT color="green">264</FONT> throw new IOException("invalid parse sequence <"+token.content.toString()+">");<a name="line.264"></a>
+<FONT color="green">265</FONT> case TOKEN:<a name="line.265"></a>
+<FONT color="green">266</FONT> fields++;<a name="line.266"></a>
+<FONT color="green">267</FONT> break;<a name="line.267"></a>
+<FONT color="green">268</FONT> case COMMENT: // not really expecting these<a name="line.268"></a>
+<FONT color="green">269</FONT> break;<a name="line.269"></a>
+<FONT color="green">270</FONT> }<a name="line.270"></a>
+<FONT color="green">271</FONT> <a name="line.271"></a>
+<FONT color="green">272</FONT> } while (!token.type.equals(Token.Type.EOF));<a name="line.272"></a>
+<FONT color="green">273</FONT> final Stats s = new Stats(count, fields);<a name="line.273"></a>
+<FONT color="green">274</FONT> input.close();<a name="line.274"></a>
+<FONT color="green">275</FONT> show(lexer.getClass().getSimpleName()+dynamic+" "+(newToken ? "new" : "reset"), s, t0);<a name="line.275"></a>
+<FONT color="green">276</FONT> }<a name="line.276"></a>
+<FONT color="green">277</FONT> show();<a name="line.277"></a>
+<FONT color="green">278</FONT> }<a name="line.278"></a>
+<FONT color="green">279</FONT> <a name="line.279"></a>
+<FONT color="green">280</FONT> private static Stats iterate(final Iterable<CSVRecord> it) {<a name="line.280"></a>
+<FONT color="green">281</FONT> int count = 0;<a name="line.281"></a>
+<FONT color="green">282</FONT> int fields = 0;<a name="line.282"></a>
+<FONT color="green">283</FONT> for (final CSVRecord record : it) {<a name="line.283"></a>
+<FONT color="green">284</FONT> count++;<a name="line.284"></a>
+<FONT color="green">285</FONT> fields+=record.size();<a name="line.285"></a>
+<FONT color="green">286</FONT> }<a name="line.286"></a>
+<FONT color="green">287</FONT> return new Stats(count, fields);<a name="line.287"></a>
+<FONT color="green">288</FONT> }<a name="line.288"></a>
+<FONT color="green">289</FONT> <a name="line.289"></a>
+<FONT color="green">290</FONT> }<a name="line.290"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file
Propchange: websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/PerformanceTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/PerformanceTest.html
------------------------------------------------------------------------------
svn:keywords = Id
Added: websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/Utils.html
==============================================================================
--- websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/Utils.html (added)
+++ websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/Utils.html Thu Mar 21 15:20:15 2013
@@ -0,0 +1,128 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT> /*<a name="line.1"></a>
+<FONT color="green">002</FONT> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a>
+<FONT color="green">003</FONT> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a>
+<FONT color="green">004</FONT> * this work for additional information regarding copyright ownership.<a name="line.4"></a>
+<FONT color="green">005</FONT> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a>
+<FONT color="green">006</FONT> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a>
+<FONT color="green">007</FONT> * the License. You may obtain a copy of the License at<a name="line.7"></a>
+<FONT color="green">008</FONT> *<a name="line.8"></a>
+<FONT color="green">009</FONT> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a>
+<FONT color="green">010</FONT> *<a name="line.10"></a>
+<FONT color="green">011</FONT> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a>
+<FONT color="green">012</FONT> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a>
+<FONT color="green">013</FONT> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a>
+<FONT color="green">014</FONT> * See the License for the specific language governing permissions and<a name="line.14"></a>
+<FONT color="green">015</FONT> * limitations under the License.<a name="line.15"></a>
+<FONT color="green">016</FONT> *<a name="line.16"></a>
+<FONT color="green">017</FONT> */<a name="line.17"></a>
+<FONT color="green">018</FONT> <a name="line.18"></a>
+<FONT color="green">019</FONT> package org.apache.commons.csv;<a name="line.19"></a>
+<FONT color="green">020</FONT> <a name="line.20"></a>
+<FONT color="green">021</FONT> import java.util.List;<a name="line.21"></a>
+<FONT color="green">022</FONT> <a name="line.22"></a>
+<FONT color="green">023</FONT> import org.junit.Assert;<a name="line.23"></a>
+<FONT color="green">024</FONT> <a name="line.24"></a>
+<FONT color="green">025</FONT> /**<a name="line.25"></a>
+<FONT color="green">026</FONT> * Utility methods for test cases<a name="line.26"></a>
+<FONT color="green">027</FONT> * <a name="line.27"></a>
+<FONT color="green">028</FONT> * @version $Id$<a name="line.28"></a>
+<FONT color="green">029</FONT> */<a name="line.29"></a>
+<FONT color="green">030</FONT> public class Utils {<a name="line.30"></a>
+<FONT color="green">031</FONT> <a name="line.31"></a>
+<FONT color="green">032</FONT> private Utils() {<a name="line.32"></a>
+<FONT color="green">033</FONT> }<a name="line.33"></a>
+<FONT color="green">034</FONT> <a name="line.34"></a>
+<FONT color="green">035</FONT> /**<a name="line.35"></a>
+<FONT color="green">036</FONT> * Checks if the two 2d arrays have identical contents.<a name="line.36"></a>
+<FONT color="green">037</FONT> *<a name="line.37"></a>
+<FONT color="green">038</FONT> * @param message the message to be displayed<a name="line.38"></a>
+<FONT color="green">039</FONT> * @param expected the 2d array of expected results<a name="line.39"></a>
+<FONT color="green">040</FONT> * @param actual the 2d array of actual results<a name="line.40"></a>
+<FONT color="green">041</FONT> */<a name="line.41"></a>
+<FONT color="green">042</FONT> public static void compare(final String message, final String[][] expected, final String[][] actual) {<a name="line.42"></a>
+<FONT color="green">043</FONT> Assert.assertEquals(message+" - outer array size", expected.length, actual.length);<a name="line.43"></a>
+<FONT color="green">044</FONT> for(int i = 0; i < expected.length; i++) {<a name="line.44"></a>
+<FONT color="green">045</FONT> Assert.assertArrayEquals(message+" (entry "+i+")",expected[i], actual[i]);<a name="line.45"></a>
+<FONT color="green">046</FONT> }<a name="line.46"></a>
+<FONT color="green">047</FONT> }<a name="line.47"></a>
+<FONT color="green">048</FONT> <a name="line.48"></a>
+<FONT color="green">049</FONT> /**<a name="line.49"></a>
+<FONT color="green">050</FONT> * Checks if the 2d array has the same contents as the list of records.<a name="line.50"></a>
+<FONT color="green">051</FONT> *<a name="line.51"></a>
+<FONT color="green">052</FONT> * @param message the message to be displayed<a name="line.52"></a>
+<FONT color="green">053</FONT> * @param expected the 2d array of expected results<a name="line.53"></a>
+<FONT color="green">054</FONT> * @param actual the List of {@link CSVRecord} entries, each containing an array of values<a name="line.54"></a>
+<FONT color="green">055</FONT> */<a name="line.55"></a>
+<FONT color="green">056</FONT> public static void compare(final String message, final String[][] expected, final List<CSVRecord> actual) {<a name="line.56"></a>
+<FONT color="green">057</FONT> Assert.assertEquals(message+" - outer array size", expected.length, actual.size());<a name="line.57"></a>
+<FONT color="green">058</FONT> for(int i = 0; i < expected.length; i++) {<a name="line.58"></a>
+<FONT color="green">059</FONT> Assert.assertArrayEquals(message+" (entry "+i+")",expected[i], actual.get(i).values());<a name="line.59"></a>
+<FONT color="green">060</FONT> }<a name="line.60"></a>
+<FONT color="green">061</FONT> }<a name="line.61"></a>
+<FONT color="green">062</FONT> }<a name="line.62"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file
Propchange: websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/Utils.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/Utils.html
------------------------------------------------------------------------------
svn:keywords = Id
Added: websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/perf/PerformanceTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/perf/PerformanceTest.html (added)
+++ websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/perf/PerformanceTest.html Thu Mar 21 15:20:15 2013
@@ -0,0 +1,195 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT> /*<a name="line.1"></a>
+<FONT color="green">002</FONT> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a>
+<FONT color="green">003</FONT> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a>
+<FONT color="green">004</FONT> * this work for additional information regarding copyright ownership.<a name="line.4"></a>
+<FONT color="green">005</FONT> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a>
+<FONT color="green">006</FONT> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a>
+<FONT color="green">007</FONT> * the License. You may obtain a copy of the License at<a name="line.7"></a>
+<FONT color="green">008</FONT> *<a name="line.8"></a>
+<FONT color="green">009</FONT> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a>
+<FONT color="green">010</FONT> *<a name="line.10"></a>
+<FONT color="green">011</FONT> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a>
+<FONT color="green">012</FONT> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a>
+<FONT color="green">013</FONT> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a>
+<FONT color="green">014</FONT> * See the License for the specific language governing permissions and<a name="line.14"></a>
+<FONT color="green">015</FONT> * limitations under the License.<a name="line.15"></a>
+<FONT color="green">016</FONT> */<a name="line.16"></a>
+<FONT color="green">017</FONT> <a name="line.17"></a>
+<FONT color="green">018</FONT> package org.apache.commons.csv.perf;<a name="line.18"></a>
+<FONT color="green">019</FONT> <a name="line.19"></a>
+<FONT color="green">020</FONT> import java.io.BufferedReader;<a name="line.20"></a>
+<FONT color="green">021</FONT> import java.io.File;<a name="line.21"></a>
+<FONT color="green">022</FONT> import java.io.FileInputStream;<a name="line.22"></a>
+<FONT color="green">023</FONT> import java.io.FileNotFoundException;<a name="line.23"></a>
+<FONT color="green">024</FONT> import java.io.FileOutputStream;<a name="line.24"></a>
+<FONT color="green">025</FONT> import java.io.FileReader;<a name="line.25"></a>
+<FONT color="green">026</FONT> import java.io.IOException;<a name="line.26"></a>
+<FONT color="green">027</FONT> import java.io.InputStream;<a name="line.27"></a>
+<FONT color="green">028</FONT> import java.io.OutputStream;<a name="line.28"></a>
+<FONT color="green">029</FONT> import java.io.Reader;<a name="line.29"></a>
+<FONT color="green">030</FONT> import java.util.zip.GZIPInputStream;<a name="line.30"></a>
+<FONT color="green">031</FONT> <a name="line.31"></a>
+<FONT color="green">032</FONT> import org.apache.commons.csv.CSVFormat;<a name="line.32"></a>
+<FONT color="green">033</FONT> import org.apache.commons.csv.CSVRecord;<a name="line.33"></a>
+<FONT color="green">034</FONT> import org.apache.commons.io.IOUtils;<a name="line.34"></a>
+<FONT color="green">035</FONT> import org.junit.BeforeClass;<a name="line.35"></a>
+<FONT color="green">036</FONT> import org.junit.Test;<a name="line.36"></a>
+<FONT color="green">037</FONT> <a name="line.37"></a>
+<FONT color="green">038</FONT> /**<a name="line.38"></a>
+<FONT color="green">039</FONT> * Tests performance.<a name="line.39"></a>
+<FONT color="green">040</FONT> * <a name="line.40"></a>
+<FONT color="green">041</FONT> * To run this test, use: mvn test -Dtest=PeformanceTest<a name="line.41"></a>
+<FONT color="green">042</FONT> * <a name="line.42"></a>
+<FONT color="green">043</FONT> * @version $Id$<a name="line.43"></a>
+<FONT color="green">044</FONT> */<a name="line.44"></a>
+<FONT color="green">045</FONT> public class PerformanceTest {<a name="line.45"></a>
+<FONT color="green">046</FONT> <a name="line.46"></a>
+<FONT color="green">047</FONT> private final int max = 10;<a name="line.47"></a>
+<FONT color="green">048</FONT> <a name="line.48"></a>
+<FONT color="green">049</FONT> private static final File BIG_FILE = new File(System.getProperty("java.io.tmpdir"), "worldcitiespop.txt");<a name="line.49"></a>
+<FONT color="green">050</FONT> <a name="line.50"></a>
+<FONT color="green">051</FONT> @BeforeClass<a name="line.51"></a>
+<FONT color="green">052</FONT> public static void setUpClass() throws FileNotFoundException, IOException {<a name="line.52"></a>
+<FONT color="green">053</FONT> if (BIG_FILE.exists()) {<a name="line.53"></a>
+<FONT color="green">054</FONT> System.out.println(String.format("Found test fixture %s: %,d bytes.", BIG_FILE, BIG_FILE.length()));<a name="line.54"></a>
+<FONT color="green">055</FONT> return;<a name="line.55"></a>
+<FONT color="green">056</FONT> }<a name="line.56"></a>
+<FONT color="green">057</FONT> System.out.println("Decompressing test fixture " + BIG_FILE + "...");<a name="line.57"></a>
+<FONT color="green">058</FONT> final InputStream input = new GZIPInputStream(new FileInputStream("src/test/resources/perf/worldcitiespop.txt.gz"));<a name="line.58"></a>
+<FONT color="green">059</FONT> final OutputStream output = new FileOutputStream(BIG_FILE);<a name="line.59"></a>
+<FONT color="green">060</FONT> IOUtils.copy(input, output);<a name="line.60"></a>
+<FONT color="green">061</FONT> System.out.println(String.format("Decompressed test fixture %s: %,d bytes.", BIG_FILE, BIG_FILE.length()));<a name="line.61"></a>
+<FONT color="green">062</FONT> }<a name="line.62"></a>
+<FONT color="green">063</FONT> <a name="line.63"></a>
+<FONT color="green">064</FONT> private BufferedReader getBufferedReader() throws IOException {<a name="line.64"></a>
+<FONT color="green">065</FONT> return new BufferedReader(new FileReader(BIG_FILE));<a name="line.65"></a>
+<FONT color="green">066</FONT> }<a name="line.66"></a>
+<FONT color="green">067</FONT> <a name="line.67"></a>
+<FONT color="green">068</FONT> private long parse(final Reader in, final boolean traverseColumns) throws IOException {<a name="line.68"></a>
+<FONT color="green">069</FONT> final CSVFormat format = CSVFormat.newBuilder().withIgnoreSurroundingSpaces(false).build();<a name="line.69"></a>
+<FONT color="green">070</FONT> long recordCount = 0;<a name="line.70"></a>
+<FONT color="green">071</FONT> for (final CSVRecord record : format.parse(in)) {<a name="line.71"></a>
+<FONT color="green">072</FONT> recordCount++;<a name="line.72"></a>
+<FONT color="green">073</FONT> if (traverseColumns) {<a name="line.73"></a>
+<FONT color="green">074</FONT> for (final String value : record) {<a name="line.74"></a>
+<FONT color="green">075</FONT> // do nothing for now<a name="line.75"></a>
+<FONT color="green">076</FONT> }<a name="line.76"></a>
+<FONT color="green">077</FONT> }<a name="line.77"></a>
+<FONT color="green">078</FONT> }<a name="line.78"></a>
+<FONT color="green">079</FONT> return recordCount;<a name="line.79"></a>
+<FONT color="green">080</FONT> }<a name="line.80"></a>
+<FONT color="green">081</FONT> <a name="line.81"></a>
+<FONT color="green">082</FONT> private void println(final String s) {<a name="line.82"></a>
+<FONT color="green">083</FONT> System.out.println(s);<a name="line.83"></a>
+<FONT color="green">084</FONT> }<a name="line.84"></a>
+<FONT color="green">085</FONT> <a name="line.85"></a>
+<FONT color="green">086</FONT> private long readAll(final BufferedReader in) throws IOException {<a name="line.86"></a>
+<FONT color="green">087</FONT> long count = 0;<a name="line.87"></a>
+<FONT color="green">088</FONT> while (in.readLine() != null) {<a name="line.88"></a>
+<FONT color="green">089</FONT> count++;<a name="line.89"></a>
+<FONT color="green">090</FONT> }<a name="line.90"></a>
+<FONT color="green">091</FONT> return count;<a name="line.91"></a>
+<FONT color="green">092</FONT> }<a name="line.92"></a>
+<FONT color="green">093</FONT> <a name="line.93"></a>
+<FONT color="green">094</FONT> public long testParseBigFile(final boolean traverseColumns) throws Exception {<a name="line.94"></a>
+<FONT color="green">095</FONT> final long startMillis = System.currentTimeMillis();<a name="line.95"></a>
+<FONT color="green">096</FONT> final long count = this.parse(this.getBufferedReader(), traverseColumns);<a name="line.96"></a>
+<FONT color="green">097</FONT> final long totalMillis = System.currentTimeMillis() - startMillis;<a name="line.97"></a>
+<FONT color="green">098</FONT> this.println(String.format("File parsed in %,d milliseconds with Commons CSV: %,d lines.", totalMillis, count));<a name="line.98"></a>
+<FONT color="green">099</FONT> return totalMillis;<a name="line.99"></a>
+<FONT color="green">100</FONT> }<a name="line.100"></a>
+<FONT color="green">101</FONT> <a name="line.101"></a>
+<FONT color="green">102</FONT> @Test<a name="line.102"></a>
+<FONT color="green">103</FONT> public void testParseBigFileRepeat() throws Exception {<a name="line.103"></a>
+<FONT color="green">104</FONT> long bestTime = Long.MAX_VALUE;<a name="line.104"></a>
+<FONT color="green">105</FONT> for (int i = 0; i < this.max; i++) {<a name="line.105"></a>
+<FONT color="green">106</FONT> bestTime = Math.min(this.testParseBigFile(false), bestTime);<a name="line.106"></a>
+<FONT color="green">107</FONT> }<a name="line.107"></a>
+<FONT color="green">108</FONT> this.println(String.format("Best time out of %,d is %,d milliseconds.", this.max, bestTime));<a name="line.108"></a>
+<FONT color="green">109</FONT> }<a name="line.109"></a>
+<FONT color="green">110</FONT> <a name="line.110"></a>
+<FONT color="green">111</FONT> @Test<a name="line.111"></a>
+<FONT color="green">112</FONT> public void testReadBigFile() throws Exception {<a name="line.112"></a>
+<FONT color="green">113</FONT> long bestTime = Long.MAX_VALUE;<a name="line.113"></a>
+<FONT color="green">114</FONT> for (int i = 0; i < this.max; i++) {<a name="line.114"></a>
+<FONT color="green">115</FONT> final BufferedReader in = this.getBufferedReader();<a name="line.115"></a>
+<FONT color="green">116</FONT> final long startMillis = System.currentTimeMillis();<a name="line.116"></a>
+<FONT color="green">117</FONT> long count = 0;<a name="line.117"></a>
+<FONT color="green">118</FONT> try {<a name="line.118"></a>
+<FONT color="green">119</FONT> count = this.readAll(in);<a name="line.119"></a>
+<FONT color="green">120</FONT> } finally {<a name="line.120"></a>
+<FONT color="green">121</FONT> in.close();<a name="line.121"></a>
+<FONT color="green">122</FONT> }<a name="line.122"></a>
+<FONT color="green">123</FONT> final long totalMillis = System.currentTimeMillis() - startMillis;<a name="line.123"></a>
+<FONT color="green">124</FONT> bestTime = Math.min(totalMillis, bestTime);<a name="line.124"></a>
+<FONT color="green">125</FONT> this.println(String.format("File read in %,d milliseconds: %,d lines.", totalMillis, count));<a name="line.125"></a>
+<FONT color="green">126</FONT> }<a name="line.126"></a>
+<FONT color="green">127</FONT> this.println(String.format("Best time out of %,d is %,d milliseconds.", this.max, bestTime));<a name="line.127"></a>
+<FONT color="green">128</FONT> }<a name="line.128"></a>
+<FONT color="green">129</FONT> }<a name="line.129"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file
Propchange: websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/perf/PerformanceTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: websites/production/commons/content/proper/commons-csv/testapidocs/src-html/org/apache/commons/csv/perf/PerformanceTest.html
------------------------------------------------------------------------------
svn:keywords = Id
Modified: websites/production/commons/content/proper/commons-csv/testapidocs/stylesheet.css
==============================================================================
--- websites/production/commons/content/proper/commons-csv/testapidocs/stylesheet.css (original)
+++ websites/production/commons/content/proper/commons-csv/testapidocs/stylesheet.css Thu Mar 21 15:20:15 2013
@@ -26,4 +26,3 @@ h1 { font-size: 145% }
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
-
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 Thu Mar 21 15:20:15 2013
@@ -1,35 +1,65 @@
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
-<html xml:lang="en" lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
- <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/CSVFormatTest.html" target="classFrame">CSVFormatTest</a>
- </li>
- <li>
- <a href="org/apache/commons/csv/CSVLexerTest.html" target="classFrame">CSVLexerTest</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/CharBufferTest.html" target="classFrame">CharBufferTest</a>
- </li>
- <li>
- <a href="org/apache/commons/csv/ExtendedBufferedReaderTest.html" target="classFrame">ExtendedBufferedReaderTest</a>
- </li>
- </ul>
-
- </body>
- </html>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "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/CSVFileParserTest.html" target="classFrame">CSVFileParserTest</a>
+ </li>
+ <li>
+ <a href="org/apache/commons/csv/CSVFormatBuilderTest.html" target="classFrame">CSVFormatBuilderTest</a>
+ </li>
+ <li>
+ <a href="org/apache/commons/csv/CSVFormatTest.html" target="classFrame">CSVFormatTest</a>
+ </li>
+ <li>
+ <a href="org/apache/commons/csv/CSVLexer1.html" target="classFrame">CSVLexer1</a>
+ </li>
+ <li>
+ <a href="org/apache/commons/csv/CSVLexer1306663.html" target="classFrame">CSVLexer1306663</a>
+ </li>
+ <li>
+ <a href="org/apache/commons/csv/CSVLexer1306667.html" target="classFrame">CSVLexer1306667</a>
+ </li>
+ <li>
+ <a href="org/apache/commons/csv/CSVLexer3.html" target="classFrame">CSVLexer3</a>
+ </li>
+ <li>
+ <a href="org/apache/commons/csv/CSVLexerTest.html" target="classFrame">CSVLexerTest</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/CSVLexer3.html" target="classFrame">CharType</a>
+ </li>
+ <li>
+ <a href="org/apache/commons/csv/ExtendedBufferedReaderTest.html" target="classFrame">ExtendedBufferedReaderTest</a>
+ </li>
+ <li>
+ <a href="org/apache/commons/csv/perf/PerformanceTest.html" target="classFrame">PerformanceTest</a>
+ </li>
+ <li>
+ <a href="org/apache/commons/csv/CSVLexer3.html" target="classFrame">State</a>
+ </li>
+ <li>
+ <a href="org/apache/commons/csv/PerformanceTest.html" target="classFrame">Stats</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 Thu Mar 21 15:20:15 2013
@@ -1,24 +1,23 @@
-
-<!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">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
- <title>Commons CSV 1.0-SNAPSHOT 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">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <title>Commons CSV 1.0-SNAPSHOT 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>
Added: 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 (added)
+++ websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/CSVFileParserTest.html Thu Mar 21 15:20:15 2013
@@ -0,0 +1,140 @@
+<!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>CSVFileParserTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../testapidocs/org/apache/commons/csv/CSVFileParserTest.html">View Javadoc</a></div><pre>
+
+<a class="jxr_linenumber" name="1" href="#1">1</a> <em class="jxr_comment">/*</em>
+<a class="jxr_linenumber" name="2" href="#2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em>
+<a class="jxr_linenumber" name="3" href="#3">3</a> <em class="jxr_comment"> * contributor license agreements. See the NOTICE file distributed with</em>
+<a class="jxr_linenumber" name="4" href="#4">4</a> <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em>
+<a class="jxr_linenumber" name="5" href="#5">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="6" href="#6">6</a> <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em>
+<a class="jxr_linenumber" name="7" href="#7">7</a> <em class="jxr_comment"> * the License. You may obtain a copy of the License at</em>
+<a class="jxr_linenumber" name="8" href="#8">8</a> <em class="jxr_comment"> *</em>
+<a class="jxr_linenumber" name="9" href="#9">9</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a class="jxr_linenumber" name="10" href="#10">10</a> <em class="jxr_comment"> *</em>
+<a class="jxr_linenumber" name="11" href="#11">11</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a class="jxr_linenumber" name="12" href="#12">12</a> <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a class="jxr_linenumber" name="13" href="#13">13</a> <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a class="jxr_linenumber" name="14" href="#14">14</a> <em class="jxr_comment"> * See the License for the specific language governing permissions and</em>
+<a class="jxr_linenumber" name="15" href="#15">15</a> <em class="jxr_comment"> * limitations under the License.</em>
+<a class="jxr_linenumber" name="16" href="#16">16</a> <em class="jxr_comment"> */</em>
+<a class="jxr_linenumber" name="17" href="#17">17</a>
+<a class="jxr_linenumber" name="18" href="#18">18</a> <strong class="jxr_keyword">package</strong> org.apache.commons.csv;
+<a class="jxr_linenumber" name="19" href="#19">19</a>
+<a class="jxr_linenumber" name="20" href="#20">20</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertEquals;
+<a class="jxr_linenumber" name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertNotNull;
+<a class="jxr_linenumber" name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertTrue;
+<a class="jxr_linenumber" name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.fail;
+<a class="jxr_linenumber" name="24" href="#24">24</a>
+<a class="jxr_linenumber" name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> java.io.BufferedReader;
+<a class="jxr_linenumber" name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> java.io.File;
+<a class="jxr_linenumber" name="27" href="#27">27</a> <strong class="jxr_keyword">import</strong> java.io.FileNotFoundException;
+<a class="jxr_linenumber" name="28" href="#28">28</a> <strong class="jxr_keyword">import</strong> java.io.FileReader;
+<a class="jxr_linenumber" name="29" href="#29">29</a> <strong class="jxr_keyword">import</strong> java.io.FilenameFilter;
+<a class="jxr_linenumber" name="30" href="#30">30</a> <strong class="jxr_keyword">import</strong> java.io.IOException;
+<a class="jxr_linenumber" name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> java.util.ArrayList;
+<a class="jxr_linenumber" name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> java.util.Collection;
+<a class="jxr_linenumber" name="33" href="#33">33</a> <strong class="jxr_keyword">import</strong> java.util.List;
+<a class="jxr_linenumber" name="34" href="#34">34</a>
+<a class="jxr_linenumber" name="35" href="#35">35</a> <strong class="jxr_keyword">import</strong> org.apache.commons.csv.CSVFormat.CSVFormatBuilder;
+<a class="jxr_linenumber" name="36" href="#36">36</a> <strong class="jxr_keyword">import</strong> org.junit.Test;
+<a class="jxr_linenumber" name="37" href="#37">37</a> <strong class="jxr_keyword">import</strong> org.junit.runner.RunWith;
+<a class="jxr_linenumber" name="38" href="#38">38</a> <strong class="jxr_keyword">import</strong> org.junit.runners.Parameterized;
+<a class="jxr_linenumber" name="39" href="#39">39</a> <strong class="jxr_keyword">import</strong> org.junit.runners.Parameterized.Parameters;
+<a class="jxr_linenumber" name="40" href="#40">40</a>
+<a class="jxr_linenumber" name="41" href="#41">41</a> <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="42" href="#42">42</a> <em class="jxr_javadoccomment"> * Parse tests using test files</em>
+<a class="jxr_linenumber" name="43" href="#43">43</a> <em class="jxr_javadoccomment"> *</em>
+<a class="jxr_linenumber" name="44" href="#44">44</a> <em class="jxr_javadoccomment"> * @version $Id$</em>
+<a class="jxr_linenumber" name="45" href="#45">45</a> <em class="jxr_javadoccomment"> */</em>
+<a class="jxr_linenumber" name="46" href="#46">46</a> @RunWith(Parameterized.<strong class="jxr_keyword">class</strong>)
+<a class="jxr_linenumber" name="47" href="#47">47</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../org/apache/commons/csv/CSVFileParserTest.html">CSVFileParserTest</a> {
+<a class="jxr_linenumber" name="48" href="#48">48</a>
+<a class="jxr_linenumber" name="49" href="#49">49</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> File BASE = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"src/test/resources/CSVFileParser"</span>);
+<a class="jxr_linenumber" name="50" href="#50">50</a>
+<a class="jxr_linenumber" name="51" href="#51">51</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> BufferedReader testData;
+<a class="jxr_linenumber" name="52" href="#52">52</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> String testName;
+<a class="jxr_linenumber" name="53" href="#53">53</a>
+<a class="jxr_linenumber" name="54" href="#54">54</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/commons/csv/CSVFileParserTest.html">CSVFileParserTest</a>(<strong class="jxr_keyword">final</strong> File file) <strong class="jxr_keyword">throws</strong> FileNotFoundException
+<a class="jxr_linenumber" name="55" href="#55">55</a> {
+<a class="jxr_linenumber" name="56" href="#56">56</a> <strong class="jxr_keyword">this</strong>.testName = file.getName();
+<a class="jxr_linenumber" name="57" href="#57">57</a> <strong class="jxr_keyword">this</strong>.testData = <strong class="jxr_keyword">new</strong> BufferedReader(<strong class="jxr_keyword">new</strong> FileReader(file));
+<a class="jxr_linenumber" name="58" href="#58">58</a> }
+<a class="jxr_linenumber" name="59" href="#59">59</a>
+<a class="jxr_linenumber" name="60" href="#60">60</a> <strong class="jxr_keyword">private</strong> String readTestData() <strong class="jxr_keyword">throws</strong> IOException {
+<a class="jxr_linenumber" name="61" href="#61">61</a> String line;
+<a class="jxr_linenumber" name="62" href="#62">62</a> <strong class="jxr_keyword">do</strong> {
+<a class="jxr_linenumber" name="63" href="#63">63</a> line = testData.readLine();
+<a class="jxr_linenumber" name="64" href="#64">64</a> } <strong class="jxr_keyword">while</strong> (line != <strong class="jxr_keyword">null</strong> && line.startsWith(<span class="jxr_string">"#"</span>));
+<a class="jxr_linenumber" name="65" href="#65">65</a> <strong class="jxr_keyword">return</strong> line;
+<a class="jxr_linenumber" name="66" href="#66">66</a> }
+<a class="jxr_linenumber" name="67" href="#67">67</a>
+<a class="jxr_linenumber" name="68" href="#68">68</a> @Parameters
+<a class="jxr_linenumber" name="69" href="#69">69</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> Collection<Object[]> generateData()
+<a class="jxr_linenumber" name="70" href="#70">70</a> {
+<a class="jxr_linenumber" name="71" href="#71">71</a> <strong class="jxr_keyword">final</strong> List<Object[]> list = <strong class="jxr_keyword">new</strong> ArrayList<Object[]>();
+<a class="jxr_linenumber" name="72" href="#72">72</a>
+<a class="jxr_linenumber" name="73" href="#73">73</a> <strong class="jxr_keyword">final</strong> FilenameFilter filenameFilter = <strong class="jxr_keyword">new</strong> FilenameFilter() {
+<a class="jxr_linenumber" name="74" href="#74">74</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> accept(<strong class="jxr_keyword">final</strong> File dir, <strong class="jxr_keyword">final</strong> String name) {
+<a class="jxr_linenumber" name="75" href="#75">75</a> <strong class="jxr_keyword">return</strong> name.startsWith(<span class="jxr_string">"test"</span>) && name.endsWith(<span class="jxr_string">".txt"</span>);
+<a class="jxr_linenumber" name="76" href="#76">76</a> }
+<a class="jxr_linenumber" name="77" href="#77">77</a> };
+<a class="jxr_linenumber" name="78" href="#78">78</a> <strong class="jxr_keyword">final</strong> File[] files = BASE.listFiles(filenameFilter);
+<a class="jxr_linenumber" name="79" href="#79">79</a> <strong class="jxr_keyword">for</strong>(<strong class="jxr_keyword">final</strong> File f : files){
+<a class="jxr_linenumber" name="80" href="#80">80</a> list.add(<strong class="jxr_keyword">new</strong> Object[]{f});
+<a class="jxr_linenumber" name="81" href="#81">81</a> }
+<a class="jxr_linenumber" name="82" href="#82">82</a> <strong class="jxr_keyword">return</strong> list;
+<a class="jxr_linenumber" name="83" href="#83">83</a> }
+<a class="jxr_linenumber" name="84" href="#84">84</a>
+<a class="jxr_linenumber" name="85" href="#85">85</a> @Test
+<a class="jxr_linenumber" name="86" href="#86">86</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testCSVFile() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="87" href="#87">87</a> String line = readTestData();
+<a class="jxr_linenumber" name="88" href="#88">88</a> assertNotNull(<span class="jxr_string">"file must contain config line"</span>, line);
+<a class="jxr_linenumber" name="89" href="#89">89</a> <strong class="jxr_keyword">final</strong> String[] split = line.split(<span class="jxr_string">" "</span>);
+<a class="jxr_linenumber" name="90" href="#90">90</a> assertTrue(testName+<span class="jxr_string">" require 1 param"</span>, split.length >= 1);
+<a class="jxr_linenumber" name="91" href="#91">91</a> <em class="jxr_comment">// first line starts with csv data file name</em>
+<a class="jxr_linenumber" name="92" href="#92">92</a> <strong class="jxr_keyword">final</strong> BufferedReader csvFile = <strong class="jxr_keyword">new</strong> BufferedReader(<strong class="jxr_keyword">new</strong> FileReader(<strong class="jxr_keyword">new</strong> File(BASE, split[0])));
+<a class="jxr_linenumber" name="93" href="#93">93</a> <strong class="jxr_keyword">final</strong> CSVFormatBuilder builder = CSVFormat.newBuilder(',').withQuoteChar('"');
+<a class="jxr_linenumber" name="94" href="#94">94</a> CSVFormat fmt = builder.build();
+<a class="jxr_linenumber" name="95" href="#95">95</a> <strong class="jxr_keyword">boolean</strong> checkComments = false;
+<a class="jxr_linenumber" name="96" href="#96">96</a> <strong class="jxr_keyword">for</strong>(<strong class="jxr_keyword">int</strong> i=1; i < split.length; i++) {
+<a class="jxr_linenumber" name="97" href="#97">97</a> <strong class="jxr_keyword">final</strong> String option = split[i];
+<a class="jxr_linenumber" name="98" href="#98">98</a> <strong class="jxr_keyword">final</strong> String[] option_parts = option.split(<span class="jxr_string">"="</span>,2);
+<a class="jxr_linenumber" name="99" href="#99">99</a> <strong class="jxr_keyword">if</strong> (<span class="jxr_string">"IgnoreEmpty"</span>.equalsIgnoreCase(option_parts[0])){
+<a class="jxr_linenumber" name="100" href="#100">100</a> fmt = builder.withIgnoreEmptyLines(Boolean.parseBoolean(option_parts[1])).build();
+<a class="jxr_linenumber" name="101" href="#101">101</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (<span class="jxr_string">"IgnoreSpaces"</span>.equalsIgnoreCase(option_parts[0])) {
+<a class="jxr_linenumber" name="102" href="#102">102</a> fmt = builder.withIgnoreSurroundingSpaces(Boolean.parseBoolean(option_parts[1])).build();
+<a class="jxr_linenumber" name="103" href="#103">103</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (<span class="jxr_string">"CommentStart"</span>.equalsIgnoreCase(option_parts[0])) {
+<a class="jxr_linenumber" name="104" href="#104">104</a> fmt = builder.withCommentStart(option_parts[1].charAt(0)).build();
+<a class="jxr_linenumber" name="105" href="#105">105</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (<span class="jxr_string">"CheckComments"</span>.equalsIgnoreCase(option_parts[0])) {
+<a class="jxr_linenumber" name="106" href="#106">106</a> checkComments = <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="107" href="#107">107</a> } <strong class="jxr_keyword">else</strong> {
+<a class="jxr_linenumber" name="108" href="#108">108</a> fail(testName+<span class="jxr_string">" unexpected option: "</span>+option);
+<a class="jxr_linenumber" name="109" href="#109">109</a> }
+<a class="jxr_linenumber" name="110" href="#110">110</a> }
+<a class="jxr_linenumber" name="111" href="#111">111</a> line = readTestData(); <em class="jxr_comment">// get string version of format</em>
+<a class="jxr_linenumber" name="112" href="#112">112</a> assertEquals(testName+<span class="jxr_string">" Expected format "</span>, line, fmt.toString());
+<a class="jxr_linenumber" name="113" href="#113">113</a>
+<a class="jxr_linenumber" name="114" href="#114">114</a> <em class="jxr_comment">// Now parse the file and compare against the expected results</em>
+<a class="jxr_linenumber" name="115" href="#115">115</a> <strong class="jxr_keyword">for</strong>(<strong class="jxr_keyword">final</strong> CSVRecord rec : fmt.parse(csvFile)) {
+<a class="jxr_linenumber" name="116" href="#116">116</a> String parsed = rec.toString();
+<a class="jxr_linenumber" name="117" href="#117">117</a> <strong class="jxr_keyword">if</strong> (checkComments) {
+<a class="jxr_linenumber" name="118" href="#118">118</a> <strong class="jxr_keyword">final</strong> String comment = rec.getComment().replace(<span class="jxr_string">"\n"</span>, <span class="jxr_string">"\\n"</span>);
+<a class="jxr_linenumber" name="119" href="#119">119</a> <strong class="jxr_keyword">if</strong> (comment != <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="120" href="#120">120</a> parsed += <span class="jxr_string">"#"</span> + comment;
+<a class="jxr_linenumber" name="121" href="#121">121</a> }
+<a class="jxr_linenumber" name="122" href="#122">122</a> }
+<a class="jxr_linenumber" name="123" href="#123">123</a> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> count = rec.size();
+<a class="jxr_linenumber" name="124" href="#124">124</a> assertEquals(testName, readTestData(), count+<span class="jxr_string">":"</span>+parsed);
+<a class="jxr_linenumber" name="125" href="#125">125</a> }
+<a class="jxr_linenumber" name="126" href="#126">126</a> }
+<a class="jxr_linenumber" name="127" href="#127">127</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
Propchange: websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/CSVFileParserTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: websites/production/commons/content/proper/commons-csv/xref-test/org/apache/commons/csv/CSVFileParserTest.html
------------------------------------------------------------------------------
svn:keywords = Id