svn commit: r989468 - in /websites/staging/commons/trunk/content: ./ downloads/ gsoc/ gsoc/2010/ releases/
Author: buildbot Date: Sun May 29 02:50:29 2016 New Revision: 989468 Log: Staging update by buildbot for commons Modified: websites/staging/commons/trunk/content/ (props changed) websites/staging/commons/trunk/content/bugs.html websites/staging/commons/trunk/content/building.html websites/staging/commons/trunk/content/charter.html websites/staging/commons/trunk/content/commons-parent-pom.html websites/staging/commons/trunk/content/components.html websites/staging/commons/trunk/content/dormant.html websites/staging/commons/trunk/content/downloads/index.html websites/staging/commons/trunk/content/gsoc/2010/index.html websites/staging/commons/trunk/content/gsoc/index.html websites/staging/commons/trunk/content/index.html websites/staging/commons/trunk/content/mail-lists.html websites/staging/commons/trunk/content/new-sandbox-component.html websites/staging/commons/trunk/content/oldcharter.html websites/staging/commons/trunk/content/patches.html websites/staging/commons/trunk/content/project-info.html websites/staging/commons/trunk/content/releases/index.html websites/staging/commons/trunk/content/releases/moving-to-dormant.html websites/staging/commons/trunk/content/releases/prepare.html websites/staging/commons/trunk/content/releases/publish-site.html websites/staging/commons/trunk/content/releases/release.html websites/staging/commons/trunk/content/releases/versioning.html websites/staging/commons/trunk/content/sandbox.html websites/staging/commons/trunk/content/security.html websites/staging/commons/trunk/content/site-publish.html websites/staging/commons/trunk/content/svninfo.html websites/staging/commons/trunk/content/team-list.html websites/staging/commons/trunk/content/volunteering.html Propchange: websites/staging/commons/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Sun May 29 02:50:29 2016 @@ -1 +1 @@ -1745718 +1745964 Modified: websites/staging/commons/trunk/content/bugs.html == --- websites/staging/commons/trunk/content/bugs.html (original) +++ websites/staging/commons/trunk/content/bugs.html Sun May 29 02:50:29 2016 @@ -1,6 +1,6 @@ http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> @@ -8,7 +8,7 @@ - + Apache Commons On Reporting Bugs @@ -36,7 +36,7 @@ http://commons.apache.org/;>Apache Commons -Last Published: 27 May 2016 +Last Published: 29 May 2016 | Version: 18 Modified: websites/staging/commons/trunk/content/building.html == --- websites/staging/commons/trunk/content/building.html (original) +++ websites/staging/commons/trunk/content/building.html Sun May 29 02:50:29 2016 @@ -1,6 +1,6 @@ http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> @@ -8,7 +8,7 @@ - + Apache Commons Building Apache Commons Components @@ -36,7 +36,7 @@ http://commons.apache.org/;>Apache Commons -Last Published: 27 May 2016 +Last Published: 29 May 2016 | Version: 18 Modified: websites/staging/commons/trunk/content/charter.html == --- websites/staging/commons/trunk/content/charter.html (original) +++ websites/staging/commons/trunk/content/charter.html Sun May 29 02:50:29 2016 @@ -1,6 +1,6 @@ http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> @@ -8,7 +8,7 @@ - + Apache Commons Charter @@ -36,7 +36,7 @@ http://commons.apache.org/;>Apache Commons -Last Published: 27 May 2016 +Last Published: 29 May 2016 | Version: 18 Modified: websites/staging/commons/trunk/content/commons-parent-pom.html == --- websites/staging/commons/trunk/content/commons-parent-pom.html (original) +++ websites/staging/commons/trunk/content/commons-parent-pom.html Sun May 29 02:50:29 2016 @@ -1,13 +1,13 @@ http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> - + Apache Commons Apache Commons Parent pom.xml @@ -35,7 +35,7 @@ http://commons.apache.org/;>Apache Commons
svn commit: r989467 [34/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/CSVPrinterTest.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/CSVPrinterTest.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/CSVPrinterTest.html Sun May 29 02:48:43 2016 @@ -0,0 +1,963 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +CSVPrinterTest xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +14 * See the License for the specific language governing permissions and +15 * limitations under the License. +16 */ +17 +18 package org.apache.commons.csv; +19 +20 import static org.apache.commons.csv.Constants.CR; +21 import static org.junit.Assert.assertArrayEquals; +22 import static org.junit.Assert.assertEquals; +23 import static org.junit.Assert.assertFalse; +24 +25 import java.io.IOException; +26 import java.io.StringReader; +27 import java.io.StringWriter; +28 import java.sql.Connection; +29 import java.sql.DriverManager; +30 import java.sql.ResultSet; +31 import java.sql.SQLException; +32 import java.sql.Statement; +33 import java.util.Arrays; +34 import java.util.Date; +35 import java.util.Iterator; +36 import java.util.LinkedList; +37 import java.util.List; +38 import java.util.Random; +39 +40 import org.apache.commons.lang3.ObjectUtils; +41 import org.junit.Ignore; +42 import org.junit.Test; +43 +44 /** +45 * +46 * +47 * @version $Id: CSVPrinterTest.java 1743528 2016-05-12 16:59:59Z ggregory $ +48 */ +49 public class CSVPrinterTest { +50 +51 private static final int ITERATIONS_FOR_RANDOM_TEST = 5; +52 +53 private static String printable(final String s) { +54 final StringBuilder sb = new StringBuilder(); +55 for (int i = 0; i s.length(); i++) { +56 final char ch = s.charAt(i); +57 if (ch = ' ' || ch = 128) { +58 sb.append("(").append((int) ch).append(")"); +59 } else { +60 sb.append(ch); +61 } +62 } +63 return sb.toString(); +64 } +65 +66 private final String recordSeparator = CSVFormat.DEFAULT.getRecordSeparator(); +67 +68 private void doOneRandom(final CSVFormat format) throws Exception { +69 final Random r = new Random(); +70 +71 final int nLines = r.nextInt(4) + 1; +72 final int nCol = r.nextInt(3) + 1; +73 // nLines=1;nCol=2; +74 final String[][] lines = generateLines(nLines, nCol); +75 +76 final StringWriter sw = new StringWriter(); +77 final CSVPrinter printer = new CSVPrinter(sw, format); +78 +79 for (int i = 0; i nLines; i++) { +80 // for (int j=0; jlines[i].length; j++) System.out.println("### VALUE=:" + printable(lines[i][j])); +81 printer.printRecord((Object[]) lines[i]); +82 } +83 +84 printer.flush(); +85 printer.close(); +86 final String result = sw.toString(); +87 // System.out.println("### :" + printable(result)); +88 +89 final CSVParser parser = CSVParser.parse(result, format); +90 final ListCSVRecord parseResult = parser.getRecords(); +91 +92 final String[][] expected = lines.clone(); +93 for (int i = 0; i expected.length; i++) { +94 expected[i] = expectNulls(expected[i], format); +95 } +96 Utils.compare("Printer output :" + printable(result), expected, parseResult); +97 parser.close(); +98 } +99 +100 private void doRandom(final CSVFormat format, final int iter) throws Exception { +101 for (int i = 0; i iter; i++) { +102 doOneRandom(format); +103 } +104 } +105 +106 /** +107 * Converts an input CSV array into expected output values WRT NULLs. NULL strings are converted to
svn commit: r989467 [22/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVRecord.java.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVRecord.java.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVRecord.java.html Sun May 29 02:48:43 2016 @@ -0,0 +1,279 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>http://www.w3.org/1999/xhtml; lang="en">CSVRecord.javaSessionsApache Commons CSV org.apache.commons.csv CSVRecord.javaCSVRecord.j ava/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.commons.csv; + +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +/** + * A CSV record parsed from a CSV file. + * + * @version $Id: CSVRecord.java 1727809 2016-01-31 13:08:33Z sebb $ + */ +public final class CSVRecord implements Serializable, IterableString { + +private static final String[] EMPTY_STRING_ARRAY = new String[0]; + +private static final long serialVersionUID = 1L; + +private final long characterPosition; + +/** The accumulated comments (if any) */ +private final String comment; + +/** The column name to index mapping. */ +private final MapString, Integer mapping; + +/** The record number. */ +private final long recordNumber; + +/** The values of the record */ +private final String[] values; + +CSVRecord(final String[] values, final MapString, Integer mapping, final String comment, final long recordNumber, +final long characterPosition) { +this.recordNumber = recordNumber; + this.values = values != null ? values : EMPTY_STRING_ARRAY; +this.mapping = mapping; +this.comment = comment; +this.characterPosition = characterPosition; +} + +/** + * Returns a value by {@link Enum}. + * + * @param e + *an enum + * @return the String at the given enum String + */ +public String get(final Enum? e) { +return get(e.toString()); +} + +/** + * Returns a value by index. + * + * @param i + *a column index (0-based) + * @return the String at the given index + */ +public String get(final int i) { +return values[i]; +} + +/** + * Returns a value by name. + * + * @param name + *the name of the column to be retrieved. + * @return the column value, maybe null depending on {@link CSVFormat#getNullString()}. + * @throws IllegalStateException + * if no header mapping was provided + * @throws IllegalArgumentException + * if {@code name} is not mapped or if the record is inconsistent + * @see #isConsistent() + * @see CSVFormat#withNullString(String) + */ +public String get(final String name) { +if (mapping == null) { +throw new IllegalStateException( +No header mapping was specified, the record values can't be accessed by name); +} +final Integer index = mapping.get(name); +if (index == null) { +throw new IllegalArgumentException(String.format(Mapping for %s not found, expected one of %s, name, +mapping.keySet())); +} +try { +return values[index.intValue()]; +} catch (final ArrayIndexOutOfBoundsException e) { +throw new IllegalArgumentException(String.format( +Index for header '%s' is %d but CSVRecord only has %d values!, name, index, +Integer.valueOf(values.length))); +} +} + +/** + * 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. + * + * @return the position of this record in the source stream. + */ +public long getCharacterPosition()
svn commit: r989467 [8/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/common
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/src-html/org/apache/commons/csv/CSVFormat.Predefined.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/src-html/org/apache/commons/csv/CSVFormat.Predefined.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/src-html/org/apache/commons/csv/CSVFormat.Predefined.html Sun May 29 02:48:43 2016 @@ -0,0 +1,1839 @@ +http://www.w3.org/TR/html4/loose.dtd;> + + +Source code + + + + +001/* +002 * Licensed to the Apache Software Foundation (ASF) under one or more +003 * contributor license agreements. See the NOTICE file distributed with +004 * this work for additional information regarding copyright ownership. +005 * The ASF licenses this file to You under the Apache License, Version 2.0 +006 * (the "License"); you may not use this file except in compliance with +007 * the License. You may obtain a copy of the License at +008 * +009 * http://www.apache.org/licenses/LICENSE-2.0 +010 * +011 * Unless required by applicable law or agreed to in writing, software +012 * distributed under the License is distributed on an "AS IS" BASIS, +013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +014 * See the License for the specific language governing permissions and +015 * limitations under the License. +016 */ +017 +018package org.apache.commons.csv; +019 +020import static org.apache.commons.csv.Constants.BACKSLASH; +021import static org.apache.commons.csv.Constants.COMMA; +022import static org.apache.commons.csv.Constants.COMMENT; +023import static org.apache.commons.csv.Constants.CR; +024import static org.apache.commons.csv.Constants.CRLF; +025import static org.apache.commons.csv.Constants.DOUBLE_QUOTE_CHAR; +026import static org.apache.commons.csv.Constants.LF; +027import static org.apache.commons.csv.Constants.PIPE; +028import static org.apache.commons.csv.Constants.SP; +029import static org.apache.commons.csv.Constants.TAB; +030 +031import java.io.IOException; +032import java.io.Reader; +033import java.io.Serializable; +034import java.io.StringWriter; +035import java.sql.ResultSet; +036import java.sql.ResultSetMetaData; +037import java.sql.SQLException; +038import java.util.Arrays; +039import java.util.HashSet; +040import java.util.Set; +041 +042/** +043 * Specifies the format of a CSV file and parses input. +044 * +045 * h2Using predefined formats/h2 +046 * +047 * p +048 * You can use one of the predefined formats: +049 * /p +050 * +051 * ul +052 * li{@link #DEFAULT}/li +053 * li{@link #EXCEL}/li +054 * li{@link #MYSQL}/li +055 * li{@link #RFC4180}/li +056 * li{@link #TDF}/li +057 * /ul +058 * +059 * p +060 * For example: +061 * /p +062 * +063 * pre +064 * CSVParser parser = CSVFormat.EXCEL.parse(reader); +065 * /pre +066 * +067 * p +068 * The {@link CSVParser} provides static methods to parse other input types, for example: +069 * /p +070 * +071 * pre +072 * CSVParser parser = CSVParser.parse(file, StandardCharsets.US_ASCII, CSVFormat.EXCEL); +073 * /pre +074 * +075 * h2Defining formats/h2 +076 * +077 * p +078 * You can extend a format by calling the {@code with} methods. For example: +079 * /p +080 * +081 * pre +082 * CSVFormat.EXCEL.withNullString(quot;N/Aquot;).withIgnoreSurroundingSpaces(true); +083 * /pre +084 * +085 * h2Defining column names/h2 +086 * +087 * p +088 * To define the column names you want to use to access records, write: +089 * /p +090 * +091 * pre +092 * CSVFormat.EXCEL.withHeader(quot;Col1quot;, quot;Col2quot;, quot;Col3quot;); +093 * /pre +094 * +095 * p +096 * Calling {@link #withHeader(String...)} let's you use the given names to address values in a {@link CSVRecord}, and +097 * assumes that your CSV source does not contain a first record that also defines column names. +098 * +099 * If it does, then you are overriding this metadata with your names and you should skip the first record by calling +100 * {@link #withSkipHeaderRecord(boolean)} with {@code true}. +101 * /p +102 * +103 * h2Parsing/h2 +104 * +105 * p +106 * You can use a format directly to parse a reader. For example, to parse an Excel file with columns header, write: +107 * /p +108 * +109 * pre +110 * Reader in = ...; +111 * CSVFormat.EXCEL.withHeader(quot;Col1quot;, quot;Col2quot;, quot;Col3quot;).parse(in); +112 * /pre +113 * +114 * p +115 * For other input types, like resources, files, and URLs, use the static methods on {@link CSVParser}. +116 * /p +117 * +118 * h2Referencing columns safely/h2 +119 * +120 * p +121 * If your source contains a header record, you can simplify your code and safely reference columns, by using +122 * {@link #withHeader(String...)} with no arguments: +123 * /p +124 * +125 * pre +126 * CSVFormat.EXCEL.withHeader(); +127 * /pre +128 * +129 * p +130 * This causes the parser to read the
svn commit: r989467 [38/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/bugs/JiraCsv167Test.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/bugs/JiraCsv167Test.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/bugs/JiraCsv167Test.html Sun May 29 02:48:43 2016 @@ -0,0 +1,100 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +JiraCsv167Test xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +14 * See the License for the specific language governing permissions and +15 * limitations under the License. +16 */ +17 package org.apache.commons.csv.bugs; +18 +19 import java.io.BufferedReader; +20 import java.io.IOException; +21 import java.io.InputStream; +22 import java.io.InputStreamReader; +23 import java.io.Reader; +24 +25 import org.apache.commons.csv.CSVFormat; +26 import org.apache.commons.csv.CSVParser; +27 import org.apache.commons.csv.CSVRecord; +28 import org.apache.commons.csv.QuoteMode; +29 import org.junit.Assert; +30 import org.junit.Test; +31 +32 public class JiraCsv167Test { +33 +34 @Test +35 public void parse() throws IOException { +36 final BufferedReader br = new BufferedReader(getTestInput()); +37 String s = null; +38 int totcomment = 0; +39 int totrecs = 0; +40 boolean lastWasComment = false; +41 while((s=br.readLine()) != null) { +42 if (s.startsWith("#")) { +43 if (!lastWasComment) { // comments are merged +44 totcomment++; +45 } +46 lastWasComment = true; +47 } else { +48 totrecs++; +49 lastWasComment = false; +50 } +51 } +52 br.close(); +53 CSVFormat format = CSVFormat.DEFAULT; +54 // +55 format = format.withAllowMissingColumnNames(false); +56 format = format.withCommentMarker('#'); +57 format = format.withDelimiter(','); +58 format = format.withEscape(''); +59 format = format.withHeader("author", "title", "publishDate"); +60 format = format.withHeaderComments("headerComment"); +61 format = format.withNullString("NULL"); +62 format = format.withIgnoreEmptyLines(true); +63 format = format.withIgnoreSurroundingSpaces(true); +64 format = format.withQuote(''); +65 format = format.withQuoteMode(QuoteMode.ALL); +66 format = format.withRecordSeparator('\n'); +67 format = format.withSkipHeaderRecord(false); +68 // +69 final CSVParser parser = format.parse(getTestInput()); +70 int comments = 0; +71 int records = 0; +72 for (final CSVRecord csvRecord : parser) { +73 records++; +74 if (csvRecord.hasComment()) { +75 comments++; +76 } +77 } +78 // Comment lines are concatenated, in this example 4 lines become 2 comments. +79 Assert.assertEquals(totcomment, comments); +80 Assert.assertEquals(totrecs, records); // records includes the header +81 } +82 +83 private Reader getTestInput() { +84 final InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream("csv-167/sample1.csv"); +85 return new InputStreamReader(is); +86 } +87 } + + +Copyright 2016 http://www.apache.org/;>The Apache Software Foundation. All rights reserved. + + \ No newline at end of file Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/bugs/package-frame.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/bugs/package-frame.html
svn commit: r989467 [43/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/Lexer.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/Lexer.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/Lexer.html Sun May 29 02:48:43 2016 @@ -0,0 +1,455 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +Lexer xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +14 * See the License for the specific language governing permissions and +15 * limitations under the License. +16 */ +17 +18 package org.apache.commons.csv; +19 +20 import static org.apache.commons.csv.Constants.BACKSPACE; +21 import static org.apache.commons.csv.Constants.CR; +22 import static org.apache.commons.csv.Constants.END_OF_STREAM; +23 import static org.apache.commons.csv.Constants.FF; +24 import static org.apache.commons.csv.Constants.LF; +25 import static org.apache.commons.csv.Constants.TAB; +26 import static org.apache.commons.csv.Constants.UNDEFINED; +27 import static org.apache.commons.csv.Token.Type.COMMENT; +28 import static org.apache.commons.csv.Token.Type.EOF; +29 import static org.apache.commons.csv.Token.Type.EORECORD; +30 import static org.apache.commons.csv.Token.Type.INVALID; +31 import static org.apache.commons.csv.Token.Type.TOKEN; +32 +33 import java.io.Closeable; +34 import java.io.IOException; +35 +36 /** +37 * Lexical analyzer. +38 * +39 * @version $Id: Lexer.java 1742468 2016-05-05 20:02:35Z britter $ +40 */ +41 final class Lexer implements Closeable { +42 +43 /** +44 * Constant char to use for disabling comments, escapes and encapsulation. The value -2 is used because it +45 * won't be confused with an EOF signal (-1), and because the Unicode value {@code FFFE} would be encoded as two +46 * chars (using surrogates) and thus there should never be a collision with a real text char. +47 */ +48 private static final char DISABLED = '\ufffe'; +49 +50 private final char delimiter; +51 private final char escape; +52 private final char quoteChar; +53 private final char commentStart; +54 +55 private final boolean ignoreSurroundingSpaces; +56 private final boolean ignoreEmptyLines; +57 +58 /** The input stream */ +59 private final ExtendedBufferedReader reader; +60 +61 Lexer(final CSVFormat format, final ExtendedBufferedReader reader) { +62 this.reader = reader; +63 this.delimiter = format.getDelimiter(); +64 this.escape = mapNullToDisabled(format.getEscapeCharacter()); +65 this.quoteChar = mapNullToDisabled(format.getQuoteCharacter()); +66 this.commentStart = mapNullToDisabled(format.getCommentMarker()); +67 this.ignoreSurroundingSpaces = format.getIgnoreSurroundingSpaces(); +68 this.ignoreEmptyLines = format.getIgnoreEmptyLines(); +69 } +70 +71 /** +72 * Returns the next token. +73 * p +74 * A token corresponds to a term, a record change or an end-of-file indicator. +75 * /p +76 * +77 * @param token +78 *an existing Token object to reuse. The caller is responsible to initialize the Token. +79 * @return the next token found +80 * @throws java.io.IOException +81 * on stream access error +82 */ +83 Token nextToken(final Token token) throws IOException { +84 +85 // get the last read char (required for empty line detection) +86 int lastChar = reader.getLastChar(); +87 +88 // read the next char and set eol +89 int c = reader.read(); +90 /* +91 * Note: The following call will swallow LF if c == CR. But we don't need to know if the last char was CR or LF +92 * - they are equivalent here. +93 */ +94 boolean eol = readEndOfLine(c); +95 +96
svn commit: r989467 [26/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/js/prettify.js == --- websites/production/commons/content/proper/commons-csv/archives/1.4/js/prettify.js (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/js/prettify.js Sun May 29 02:48:43 2016 @@ -0,0 +1,640 @@ +/** + * + * Copyright (C) 2006 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function H() { +var x = navigator && navigator.userAgent +&& /\bMSIE 6\./.test(navigator.userAgent); +H = function() { +return x +}; +return x +} +(function() { +function x(b) { +b = b.split(/ /g); +var a = {}; +for ( var c = b.length; --c >= 0;) { +var d = b[c]; +if (d) +a[d] = null +} +return a +} +var y = "break continue do else for if return while ", U = y ++ "auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile ", D = U ++ "catch class delete false import new operator private protected public this throw true try ", I = D ++ "alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where ", J = D ++ "boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ", V = J ++ "as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ", K = D ++ "debugger eval export function get null set undefined var with Infinity NaN ", L = "caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ", M = y ++ "and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ", N = y ++ "alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ", O = y ++ "case done elif esac eval fi function in local set then until ", W = I ++ V + K + L + M + N + O; +function X(b) { +return b >= "a" && b <= "z" || b >= "A" && b <= "Z" +} +function u(b, a, c, d) { +b.unshift(c, d || 0); +try { +a.splice.apply(a, b) +} finally { +b.splice(0, 2) +} +} +var Y = (function() { +var b = [ "!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=", "&=", +"(", "*", "*=", "+=", ",", "-=", "->", "/", "/=", ":", "::", +";", "<", "<<", "<<=", "<=", "=", "==", "===", ">", ">=", ">>", +">>=", ">>>", ">>>=", "?", "@", "[", "^", "^=", "^^", "^^=", +"{", "|", "|=", "||", "||=", "~", "break", "case", "continue", +"delete", "do", "else", "finally", "instanceof", "return", +"throw", "try", "typeof" ], a = "(?:(?:(?:^|[^0-9.])\\.{1,3})|(?:(?:^|[^\\+])\\+)|(?:(?:^|[^\\-])-)"; +for ( var c = 0; c < b.length; ++c) { +var d = b[c]; +a += X(d.charAt(0)) ? "|\\b" + d : "|" ++ d.replace(/([^=<>:&])/g, "\\$1") +} +a += "|^)\\s*$"; +return new RegExp(a) +})(), P = /&/g, Q = //g, Z = /\"/g; +function $(b) { +return b.replace(P, "").replace(Q, "").replace(R, "") +.replace(Z, "") +} +function E(b) { +return b.replace(P, "").replace(Q, "").replace(R, "") +} +var aa = //g, ba = //g, ca = //g, da = //g, ea = //g, fa = //g; +function ga(b) { +var a = b.indexOf("&"); +if (a < 0) +return b; +for (--a; (a = b.indexOf("
svn commit: r989467 [21/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVParser$1.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVParser$1.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVParser$1.html Sun May 29 02:48:43 2016 @@ -0,0 +1 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>http://www.w3.org/1999/xhtml; lang="en">CSVParser.new Iterator() {...}SessionsApache Commons CSV org.apache.commons.csv CSVParser.new Iterator() {...}CSVParser.new Iterator() {...}ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsTotal6 of 6991%0 of 12100%01121905getNextRecord()40%n/a012301next()100%100%040901hasNext()100%100%040501{...}100%n/a010101remove()100%n/a010101Created with http://www.eclemma.org/jacoco;>JaCoCo 0.7.6.201602180812 \ No newline at end of file Added: websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVParser$2.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVParser$2.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVParser$2.html Sun May 29 02:48:43 2016 @@ -0,0 +1 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>http://www.w3.org/1999/xhtml; lang="en">CSVParser.new Object() {...}SessionsApache Commons CSV org.apache.commons.csv CSVParser.new Object() {...}CSVParser.new Object() {...}ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsTotal5 of 4088%0 of 0n/a010101static {...}88%n/a010101Created with http://www.eclemma.org/jacoco;>JaCoCo 0.7.6.201602180812 \ No newline at end of file Added: websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVParser.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVParser.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVParser.html Sun May 29 02:48:43 2016 @@ -0,0 +1 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>http://www.w3.org/1999/xhtml; lang="en">CSVParserSessionsApache Commons CSV org.apache.commons.csv CSVParserCSVParserElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsTotal29 of 43993%5 of 5691%545291 015nextRecord()79%88%21122701initializeHeader()100%92%21302201CSVParser(Reader, CSVFormat, long, long)100%n/a0101101< a href="CSVParser.java.html#L290" class="el_method">addRecordValue(boolean)100%100%060701parse(URL, Charset, CSVFormat)100%n/a0104< /td>01parse(File, Charset, CSVFormat)100%n/a010301getRecords()100%100%020401parse(String, CSVFormat)100%n/a010301getHeaderMap()100%100%020101CSVParser(Reader, CSVFormat)100%n/a010201close()100%50%120301iterator()100%n/a010101getCurrentLineNumber()100%n/a010101isClosed()100%n/a010101getRecordNumber()100%n/a010101Created with http://www.eclemma.org/jacoco;>JaCoCo 0.7.6.201602180812 \ No newline at end of file Added: websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVParser.java.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVParser.java.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVParser.java.html Sun May 29 02:48:43 2016 @@ -0,0 +1,539 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>http://www.w3.org/1999/xhtml; lang="en">CSVParser.javaSessionsApache Commons CSV org.apache.commons.csv CSVParser.javaCSVParser.j ava/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.commons.csv; +
svn commit: r989467 [36/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/LexerTest.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/LexerTest.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/LexerTest.html Sun May 29 02:48:43 2016 @@ -0,0 +1,409 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +LexerTest xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +14 * See the License for the specific language governing permissions and +15 * limitations under the License. +16 */ +17 +18 package org.apache.commons.csv; +19 +20 import static org.apache.commons.csv.Constants.BACKSPACE; +21 import static org.apache.commons.csv.Constants.CR; +22 import static org.apache.commons.csv.Constants.FF; +23 import static org.apache.commons.csv.Constants.LF; +24 import static org.apache.commons.csv.Constants.TAB; +25 import static org.apache.commons.csv.Token.Type.COMMENT; +26 import static org.apache.commons.csv.Token.Type.EOF; +27 import static org.apache.commons.csv.Token.Type.EORECORD; +28 import static org.apache.commons.csv.Token.Type.TOKEN; +29 import static org.apache.commons.csv.TokenMatchers.hasContent; +30 import static org.apache.commons.csv.TokenMatchers.matches; +31 import static org.junit.Assert.assertFalse; +32 import static org.junit.Assert.assertThat; +33 import static org.junit.Assert.assertTrue; +34 +35 import java.io.IOException; +36 import java.io.StringReader; +37 +38 import org.junit.Before; +39 import org.junit.Test; +40 +41 /** +42 * +43 * +44 * @version $Id: LexerTest.java 1621004 2014-08-28 00:28:02Z ggregory $ +45 */ +46 public class LexerTest { +47 +48 private CSVFormat formatWithEscaping; +49 +50 @Before +51 public void setUp() { +52 formatWithEscaping = CSVFormat.DEFAULT.withEscape(''); +53 } +54 +55 private Lexer getLexer(final String input, final CSVFormat format) { +56 return new Lexer(format, new ExtendedBufferedReader(new StringReader(input))); +57 } +58 +59 @Test +60 public void testSurroundingSpacesAreDeleted() throws IOException { +61 final String code = "noSpaces, leadingSpaces,trailingSpaces , surroundingSpaces , ,,"; +62 final Lexer parser = getLexer(code, CSVFormat.DEFAULT.withIgnoreSurroundingSpaces()); +63 assertThat(parser.nextToken(new Token()), matches(TOKEN, "noSpaces")); +64 assertThat(parser.nextToken(new Token()), matches(TOKEN, "leadingSpaces")); +65 assertThat(parser.nextToken(new Token()), matches(TOKEN, "trailingSpaces")); +66 assertThat(parser.nextToken(new Token()), matches(TOKEN, "surroundingSpaces")); +67 assertThat(parser.nextToken(new Token()), matches(TOKEN, "")); +68 assertThat(parser.nextToken(new Token()), matches(TOKEN, "")); +69 assertThat(parser.nextToken(new Token()), matches(EOF, "")); +70 } +71 +72 @Test +73 public void testSurroundingTabsAreDeleted() throws IOException { +74 final String code = "noTabs,\tleadingTab,trailingTab\t,\tsurroundingTabs\t,\t\t,,"; +75 final Lexer parser = getLexer(code, CSVFormat.DEFAULT.withIgnoreSurroundingSpaces()); +76 assertThat(parser.nextToken(new Token()), matches(TOKEN, "noTabs")); +77 assertThat(parser.nextToken(new Token()), matches(TOKEN, "leadingTab")); +78 assertThat(parser.nextToken(new Token()), matches(TOKEN, "trailingTab")); +79 assertThat(parser.nextToken(new Token()), matches(TOKEN, "surroundingTabs")); +80 assertThat(parser.nextToken(new Token()), matches(TOKEN, "")); +81 assertThat(parser.nextToken(new Token()), matches(TOKEN, "")); +82 assertThat(parser.nextToken(new Token()), matches(EOF, "")); +83 } +84 +85 @Test +86 public void
svn commit: r989467 [35/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/CSVRecordTest.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/CSVRecordTest.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/CSVRecordTest.html Sun May 29 02:48:43 2016 @@ -0,0 +1,207 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +CSVRecordTest xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +14 * See the License for the specific language governing permissions and +15 * limitations under the License. +16 */ +17 package org.apache.commons.csv; +18 +19 import static org.junit.Assert.assertEquals; +20 import static org.junit.Assert.assertFalse; +21 import static org.junit.Assert.assertNotNull; +22 import static org.junit.Assert.assertNull; +23 import static org.junit.Assert.assertTrue; +24 +25 import java.io.IOException; +26 import java.util.ArrayList; +27 import java.util.Collections; +28 import java.util.HashMap; +29 import java.util.Map; +30 import java.util.TreeMap; +31 import java.util.concurrent.ConcurrentHashMap; +32 +33 import org.junit.Assert; +34 import org.junit.Before; +35 import org.junit.Test; +36 +37 public class CSVRecordTest { +38 +39 private enum EnumFixture { UNKNOWN_COLUMN } +40 +41 private String[] values; +42 private CSVRecord record, recordWithHeader; +43 private MapString, Integer header; +44 +45 @Before +46 public void setUp() throws Exception { +47 values = new String[] { "A", "B", "C" }; +48 record = new CSVRecord(values, null, null, 0, -1); +49 header = new HashMapString, Integer(); +50 header.put("first", Integer.valueOf(0)); +51 header.put("second", Integer.valueOf(1)); +52 header.put("third", Integer.valueOf(2)); +53 recordWithHeader = new CSVRecord(values, header, null, 0, -1); +54 } +55 +56 @Test +57 public void testGetInt() { +58 assertEquals(values[0], record.get(0)); +59 assertEquals(values[1], record.get(1)); +60 assertEquals(values[2], record.get(2)); +61 } +62 +63 @Test +64 public void testGetString() { +65 assertEquals(values[0], recordWithHeader.get("first")); +66 assertEquals(values[1], recordWithHeader.get("second")); +67 assertEquals(values[2], recordWithHeader.get("third")); +68 } +69 +70 @Test(expected = IllegalArgumentException.class) +71 public void testGetStringInconsistentRecord() { +72 header.put("fourth", Integer.valueOf(4)); +73 recordWithHeader.get("fourth"); +74 } +75 +76 @Test(expected = IllegalStateException.class) +77 public void testGetStringNoHeader() { +78 record.get("first"); +79 } +80 +81 @Test(expected = IllegalArgumentException.class) +82 public void testGetUnmappedEnum() { +83 assertNull(recordWithHeader.get(EnumFixture.UNKNOWN_COLUMN)); +84 } +85 +86 @Test(expected = IllegalArgumentException.class) +87 public void testGetUnmappedName() { +88 assertNull(recordWithHeader.get("fourth")); +89 } +90 +91 @Test(expected = ArrayIndexOutOfBoundsException.class) +92 public void testGetUnmappedNegativeInt() { +93 assertNull(recordWithHeader.get(Integer.MIN_VALUE)); +94 } +95 +96 @Test(expected = ArrayIndexOutOfBoundsException.class) +97 public void testGetUnmappedPositiveInt() { +98 assertNull(recordWithHeader.get(Integer.MAX_VALUE)); +99 } +100 +101 @Test +102 public void testIsConsistent() { +103 assertTrue(record.isConsistent()); +104 assertTrue(recordWithHeader.isConsistent()); +105 +106 header.put("fourth", Integer.valueOf(4)); +107 assertFalse(recordWithHeader.isConsistent()); +108 }
svn commit: r989467 [41/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/CSVPrinter.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/CSVPrinter.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/CSVPrinter.html Sun May 29 02:48:43 2016 @@ -0,0 +1,354 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +CSVPrinter xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +14 * See the License for the specific language governing permissions and +15 * limitations under the License. +16 */ +17 +18 package org.apache.commons.csv; +19 +20 import static org.apache.commons.csv.Constants.CR; +21 import static org.apache.commons.csv.Constants.LF; +22 import static org.apache.commons.csv.Constants.SP; +23 +24 import java.io.Closeable; +25 import java.io.Flushable; +26 import java.io.IOException; +27 import java.sql.ResultSet; +28 import java.sql.SQLException; +29 +30 /** +31 * Prints values in a CSV format. +32 * +33 * @version $Id: CSVPrinter.java 1743430 2016-05-11 21:09:48Z ggregory $ +34 */ +35 public final class CSVPrinter implements Flushable, Closeable { +36 +37 /** The place that the values get written. */ +38 private final Appendable out; +39 private final CSVFormat format; +40 +41 /** True if we just began a new record. */ +42 private boolean newRecord = true; +43 +44 /** +45 * Creates a printer that will print values to the given stream following the CSVFormat. +46 * p +47 * Currently, only a pure encapsulation format or a pure escaping format is supported. Hybrid formats (encapsulation +48 * and escaping with a different character) are not supported. +49 * /p +50 * +51 * @param out +52 *stream to which to print. Must not be null. +53 * @param format +54 *the CSV format. Must not be null. +55 * @throws IOException +56 * thrown if the optional header cannot be printed. +57 * @throws IllegalArgumentException +58 * thrown if the parameters of the format are inconsistent or if either out or format are null. +59 */ +60 public CSVPrinter(final Appendable out, final CSVFormat format) throws IOException { +61 Assertions.notNull(out, "out"); +62 Assertions.notNull(format, "format"); +63 +64 this.out = out; +65 this.format = format; +66 // TODO: Is it a good idea to do this here instead of on the first call to a print method? +67 // It seems a pain to have to track whether the header has already been printed or not. +68 if (format.getHeaderComments() != null) { +69 for (final String line : format.getHeaderComments()) { +70 if (line != null) { +71 this.printComment(line); +72 } +73 } +74 } +75 if (format.getHeader() != null !format.getSkipHeaderRecord()) { +76 this.printRecord((Object[]) format.getHeader()); +77 } +78 } +79 +80 // == +81 // printing implementation +82 // == +83 +84 @Override +85 public void close() throws IOException { +86 if (out instanceof Closeable) { +87 ((Closeable) out).close(); +88 } +89 } +90 +91 /** +92 * Flushes the underlying stream. +93 * +94 * @throws IOException +95 * If an I/O error occurs +96 */ +97 @Override +98 public void flush() throws IOException { +99 if (out instanceof Flushable) { +100 ((Flushable) out).flush(); +101 } +102 } +103 +104 /** +105 * Gets the target Appendable. +106 * +107 *
svn commit: r989467 [40/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/CSVParser.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/CSVParser.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/CSVParser.html Sun May 29 02:48:43 2016 @@ -0,0 +1,551 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +CSVParser xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +14 * See the License for the specific language governing permissions and +15 * limitations under the License. +16 */ +17 +18 package org.apache.commons.csv; +19 +20 import java.io.Closeable; +21 import java.io.File; +22 import java.io.FileInputStream; +23 import java.io.IOException; +24 import java.io.InputStreamReader; +25 import java.io.Reader; +26 import java.io.StringReader; +27 import java.net.URL; +28 import java.nio.charset.Charset; +29 import java.util.ArrayList; +30 import java.util.Arrays; +31 import java.util.Iterator; +32 import java.util.LinkedHashMap; +33 import java.util.List; +34 import java.util.Map; +35 import java.util.NoSuchElementException; +36 import java.util.TreeMap; +37 +38 import static org.apache.commons.csv.Token.Type.*; +39 +40 /** +41 * Parses CSV files according to the specified format. +42 * +43 * Because CSV appears in many different dialects, the parser supports many formats by allowing the +44 * specification of a {@link CSVFormat}. +45 * +46 * The parser works record wise. It is not possible to go back, once a record has been parsed from the input stream. +47 * +48 * h2Creating instances/h2 +49 * p +50 * There are several static factory methods that can be used to create instances for various types of resources: +51 * /p +52 * ul +53 * li{@link #parse(java.io.File, Charset, CSVFormat)}/li +54 * li{@link #parse(String, CSVFormat)}/li +55 * li{@link #parse(java.net.URL, java.nio.charset.Charset, CSVFormat)}/li +56 * /ul +57 * p +58 * Alternatively parsers can also be created by passing a {@link Reader} directly to the sole constructor. +59 * +60 * For those who like fluent APIs, parsers can be created using {@link CSVFormat#parse(java.io.Reader)} as a shortcut: +61 * /p +62 * pre +63 * for(CSVRecord record : CSVFormat.EXCEL.parse(in)) { +64 * ... +65 * } +66 * /pre +67 * +68 * h2Parsing record wise/h2 +69 * p +70 * To parse a CSV input from a file, you write: +71 * /p +72 * +73 * pre +74 * File csvData = new File(quot;/path/to/csvquot;); +75 * CSVParser parser = CSVParser.parse(csvData, CSVFormat.RFC4180); +76 * for (CSVRecord csvRecord : parser) { +77 * ... +78 * } +79 * /pre +80 * +81 * p +82 * This will read the parse the contents of the file using the +83 * a href="http://tools.ietf.org/html/rfc4180; target="alexandria_uri">http://tools.ietf.org/html/rfc4180" target="_blank"RFC 4180/a format. +84 * /p +85 * +86 * p +87 * To parse CSV input in a format like Excel, you write: +88 * /p +89 * +90 * pre +91 * CSVParser parser = CSVParser.parse(csvData, CSVFormat.EXCEL); +92 * for (CSVRecord csvRecord : parser) { +93 * ... +94 * } +95 * /pre +96 * +97 * p +98 * If the predefined formats don't match the format at hands, custom formats can be defined. More information about +99 * customising CSVFormats is available in {@link CSVFormat CSVFormat JavaDoc}. +100 * /p +101 * +102 * h2Parsing into memory/h2 +103 * p +104 * If parsing record wise is not desired, the contents of the input can be read completely into memory. +105 * /p +106 * +107 * pre +108 * Reader in = new StringReader(quot;a;b\nc;dquot;); +109 * CSVParser parser = new CSVParser(in, CSVFormat.EXCEL); +110 * Listlt;CSVRecordgt; list = parser.getRecords(); +111 * /pre +112 * +113 * p +114 * There are two constraints that have to be kept in mind: +115 * /p
svn commit: r989467 [17/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/.resources/prettify.js == --- websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/.resources/prettify.js (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/.resources/prettify.js Sun May 29 02:48:43 2016 @@ -0,0 +1,1510 @@ +// Copyright (C) 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +/** + * @fileoverview + * some functions for browser-side pretty printing of code contained in html. + * + * + * For a fairly comprehensive set of languages see the + * http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs;>README + * file that came with this source. At a minimum, the lexer should work on a + * number of languages including C and friends, Java, Python, Bash, SQL, HTML, + * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk + * and a subset of Perl, but, because of commenting conventions, doesn't work on + * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class. + * + * Usage: + * include this source file in an html page via + * {@code } + * define style rules. See the example page for examples. + * mark the {@code } and {@code } tags in your source with + *{@code class=prettyprint.} + *You can also use the (html deprecated) {@code } tag, but the pretty + *printer needs to do more substantial DOM manipulations to support that, so + *some css styles may not be preserved. + * + * That's it. I wanted to keep the API as simple as possible, so there's no + * need to specify which language the code is in, but if you wish, you can add + * another class to the {@code } or {@code } element to specify the + * language, as in {@code }. Any class that + * starts with "lang-" followed by a file extension, specifies the file type. + * See the "lang-*.js" files in this directory for code that implements + * per-language file handlers. + * + * Change log: + * cbeust, 2006/08/22 + * + * Java annotations (start with "@") are now captured as literals ("lit") + * + * @requires console + */ + +// JSLint declarations +/*global console, document, navigator, setTimeout, window */ + +/** + * Split {@code prettyPrint} into multiple timeouts so as not to interfere with + * UI events. + * If set to {@code false}, {@code prettyPrint()} is synchronous. + */ +window['PR_SHOULD_USE_CONTINUATION'] = true; + +/** the number of characters between tab columns */ +window['PR_TAB_WIDTH'] = 8; + +/** Walks the DOM returning a properly escaped version of innerHTML. + * @param {Node} node + * @param {Array.} out output buffer that receives chunks of HTML. + */ +window['PR_normalizedHtml'] + +/** Contains functions for creating and registering new language handlers. + * @type {Object} + */ + = window['PR'] + +/** Pretty print a chunk of code. + * + * @param {string} sourceCodeHtml code as html + * @return {string} code as html, but prettier + */ + = window['prettyPrintOne'] +/** Find all the {@code } and {@code } tags in the DOM with + * {@code class=prettyprint} and prettify them. + * @param {Function?} opt_whenDone if specified, called when the last entry + * has been finished. + */ + = window['prettyPrint'] = void 0; + +/** browser detection. @extern @returns false if not IE, otherwise the major version. */ +window['_pr_isIE6'] = function () { + var ieVersion = navigator && navigator.userAgent && + navigator.userAgent.match(/\bMSIE ([678])\./); + ieVersion = ieVersion ? +ieVersion[1] : false; + window['_pr_isIE6'] = function () { return ieVersion; }; + return ieVersion; +}; + + +(function () { + // Keyword lists for various languages. + var FLOW_CONTROL_KEYWORDS = + "break continue do else for if return while "; + var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " + + "double enum extern float goto int long register short signed sizeof " + + "static struct switch typedef union unsigned void volatile "; + var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " + + "new operator private protected public this throw true try typeof "; + var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool " + + "concept concept_map const_cast constexpr decltype " + + "dynamic_cast explicit
svn commit: r989467 [20/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVFormat.java.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVFormat.java.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVFormat.java.html Sun May 29 02:48:43 2016 @@ -0,0 +1,1768 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>http://www.w3.org/1999/xhtml; lang="en">CSVFormat.javaSessionsApache Commons CSV org.apache.commons.csv CSVFormat.javaCSVFormat.j ava/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.commons.csv; + +import static org.apache.commons.csv.Constants.BACKSLASH; +import static org.apache.commons.csv.Constants.COMMA; +import static org.apache.commons.csv.Constants.COMMENT; +import static org.apache.commons.csv.Constants.CR; +import static org.apache.commons.csv.Constants.CRLF; +import static org.apache.commons.csv.Constants.DOUBLE_QUOTE_CHAR; +import static org.apache.commons.csv.Constants.LF; +import static org.apache.commons.csv.Constants.PIPE; +import static org.apache.commons.csv.Constants.SP; +import static org.apache.commons.csv.Constants.TAB; + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.StringWriter; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Specifies the format of a CSV file and parses input. + * + * h2Using predefined formats/h2 + * + * p + * You can use one of the predefined formats: + * /p + * + * ul + * li{@link #DEFAULT}/li + * li{@link #EXCEL}/li + * li{@link #MYSQL}/li + * li{@link #RFC4180}/li + * li{@link #TDF}/li + * /ul + * + * p + * For example: + * /p + * + * pre + * CSVParser parser = CSVFormat.EXCEL.parse(reader); + * /pre + * + * p + * The {@link CSVParser} provides static methods to parse other input types, for example: + * /p + * + * pre + * CSVParser parser = CSVParser.parse(file, StandardCharsets.US_ASCII, CSVFormat.EXCEL); + * /pre + * + * h2Defining formats/h2 + * + * p + * You can extend a format by calling the {@code with} methods. For example: + * /p + * + * pre + * CSVFormat.EXCEL.withNullString(quot;N/Aquot;).withIgnoreSurroundingSpaces(true); + * /pre + * + * h2Defining column names/h2 + * + * p + * To define the column names you want to use to access records, write: + * /p + * + * pre + * CSVFormat.EXCEL.withHeader(quot;Col1quot;, quot;Col2quot;, quot;Col3quot;); + * /pre + * + * p + * Calling {@link #withHeader(String...)} let's you use the given names to address values in a {@link CSVRecord}, and + * assumes that your CSV source does not contain a first record that also defines column names. + * + * If it does, then you are overriding this metadata with your names and you should skip the first record by calling + * {@link #withSkipHeaderRecord(boolean)} with {@code true}. + * /p + * + * h2Parsing/h2 + * + * p + * You can use a format directly to parse a reader. For example, to parse an Excel file with columns header, write: + * /p + * + * pre + * Reader in = ...; + * CSVFormat.EXCEL.withHeader(quot;Col1quot;, quot;Col2quot;, quot;Col3quot;).parse(in); + * /pre + * + * p + * For other input types, like resources, files, and URLs, use the static methods on {@link CSVParser}. + * /p + * + * h2Referencing columns safely/h2 + * + * p + * If your source contains a header record, you can simplify your code and safely reference columns, by using + * {@link #withHeader(String...)} with no arguments: + * /p + * + * pre + * CSVFormat.EXCEL.withHeader(); + * /pre + * + * p + * This causes the parser to read the first record and use its values as column names. + * + * Then, call one of the {@link CSVRecord} get method that takes a String column name argument: + * /p + * + * pre + * String value = record.get(quot;Col1quot;); + * /pre + * + * p + * This makes your code impervious to changes in column order in the CSV file. + * /p + * + * h2Notes/h2 + * + * p + *
svn commit: r989467 [10/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/src-html/org/apache/commons/csv/CSVParser.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/src-html/org/apache/commons/csv/CSVParser.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/src-html/org/apache/commons/csv/CSVParser.html Sun May 29 02:48:43 2016 @@ -0,0 +1,610 @@ +http://www.w3.org/TR/html4/loose.dtd;> + + +Source code + + + + +001/* +002 * Licensed to the Apache Software Foundation (ASF) under one or more +003 * contributor license agreements. See the NOTICE file distributed with +004 * this work for additional information regarding copyright ownership. +005 * The ASF licenses this file to You under the Apache License, Version 2.0 +006 * (the "License"); you may not use this file except in compliance with +007 * the License. You may obtain a copy of the License at +008 * +009 * http://www.apache.org/licenses/LICENSE-2.0 +010 * +011 * Unless required by applicable law or agreed to in writing, software +012 * distributed under the License is distributed on an "AS IS" BASIS, +013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +014 * See the License for the specific language governing permissions and +015 * limitations under the License. +016 */ +017 +018package org.apache.commons.csv; +019 +020import java.io.Closeable; +021import java.io.File; +022import java.io.FileInputStream; +023import java.io.IOException; +024import java.io.InputStreamReader; +025import java.io.Reader; +026import java.io.StringReader; +027import java.net.URL; +028import java.nio.charset.Charset; +029import java.util.ArrayList; +030import java.util.Arrays; +031import java.util.Iterator; +032import java.util.LinkedHashMap; +033import java.util.List; +034import java.util.Map; +035import java.util.NoSuchElementException; +036import java.util.TreeMap; +037 +038import static org.apache.commons.csv.Token.Type.*; +039 +040/** +041 * Parses CSV files according to the specified format. +042 * +043 * Because CSV appears in many different dialects, the parser supports many formats by allowing the +044 * specification of a {@link CSVFormat}. +045 * +046 * The parser works record wise. It is not possible to go back, once a record has been parsed from the input stream. +047 * +048 * h2Creating instances/h2 +049 * p +050 * There are several static factory methods that can be used to create instances for various types of resources: +051 * /p +052 * ul +053 * li{@link #parse(java.io.File, Charset, CSVFormat)}/li +054 * li{@link #parse(String, CSVFormat)}/li +055 * li{@link #parse(java.net.URL, java.nio.charset.Charset, CSVFormat)}/li +056 * /ul +057 * p +058 * Alternatively parsers can also be created by passing a {@link Reader} directly to the sole constructor. +059 * +060 * For those who like fluent APIs, parsers can be created using {@link CSVFormat#parse(java.io.Reader)} as a shortcut: +061 * /p +062 * pre +063 * for(CSVRecord record : CSVFormat.EXCEL.parse(in)) { +064 * ... +065 * } +066 * /pre +067 * +068 * h2Parsing record wise/h2 +069 * p +070 * To parse a CSV input from a file, you write: +071 * /p +072 * +073 * pre +074 * File csvData = new File(quot;/path/to/csvquot;); +075 * CSVParser parser = CSVParser.parse(csvData, CSVFormat.RFC4180); +076 * for (CSVRecord csvRecord : parser) { +077 * ... +078 * } +079 * /pre +080 * +081 * p +082 * This will read the parse the contents of the file using the +083 * a href="http://tools.ietf.org/html/rfc4180; target="_blank"RFC 4180/a format. +084 * /p +085 * +086 * p +087 * To parse CSV input in a format like Excel, you write: +088 * /p +089 * +090 * pre +091 * CSVParser parser = CSVParser.parse(csvData, CSVFormat.EXCEL); +092 * for (CSVRecord csvRecord : parser) { +093 * ... +094 * } +095 * /pre +096 * +097 * p +098 * If the predefined formats don't match the format at hands, custom formats can be defined. More information about +099 * customising CSVFormats is available in {@link CSVFormat CSVFormat JavaDoc}. +100 * /p +101 * +102 * h2Parsing into memory/h2 +103 * p +104 * If parsing record wise is not desired, the contents of the input can be read completely into memory. +105 * /p +106 * +107 * pre +108 * Reader in = new StringReader(quot;a;b\nc;dquot;); +109 * CSVParser parser = new CSVParser(in, CSVFormat.EXCEL); +110 * Listlt;CSVRecordgt; list = parser.getRecords(); +111 * /pre +112 * +113 * p +114 * There are two constraints that have to be kept in mind: +115 * /p +116 * +117 * ol +118 * liParsing into memory starts at the current position of the parser. If you have already parsed records from +119 * the input, those records will not end up in the in memory representation of your CSV data./li +120 * liParsing into memory may consume
svn commit: r989467 [1/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/common
Author: ggregory Date: Sun May 29 02:48:43 2016 New Revision: 989467 Log: Archive 1.4 site. Added: websites/production/commons/content/proper/commons-csv/archives/1.4/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/allclasses-frame.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/allclasses-noframe.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/constant-values.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/deprecated-list.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/help-doc.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/index-all.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/index.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/CSVFormat.Predefined.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/CSVFormat.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/CSVParser.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/CSVPrinter.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/CSVRecord.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/QuoteMode.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/class-use/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/class-use/CSVFormat.Predefined.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/class-use/CSVFormat.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/class-use/CSVParser.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/class-use/CSVPrinter.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/class-use/CSVRecord.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/class-use/QuoteMode.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/package-frame.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/package-summary.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/package-tree.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/package-use.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/overview-tree.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/package-list websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/resources/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/resources/background.gif (with props) websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/resources/tab.gif (with props) websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/resources/titlebar.gif (with props) websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/resources/titlebar_end.gif (with props) websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/serialized-form.html websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/src-html/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/src-html/org/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/src-html/org/apache/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/src-html/org/apache/commons/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/src-html/org/apache/commons/csv/ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/src-html/org/apache/commons/csv/CSVFormat.Predefined.html
svn commit: r989467 [6/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/common
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/class-use/CSVFormat.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/class-use/CSVFormat.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/class-use/CSVFormat.html Sun May 29 02:48:43 2016 @@ -0,0 +1,449 @@ +http://www.w3.org/TR/html4/loose.dtd;> + + + + +Uses of Class org.apache.commons.csv.CSVFormat (Apache Commons CSV 1.4 API) + + + + + + +JavaScript is disabled on your browser. + + + + + + + + +Package +Class +Use +Tree +Deprecated +Index +Help + + + + +Prev +Next + + +Frames +No Frames + + +All Classes + + + + + + + + + + +Uses of Classorg.apache.commons.csv.CSVFormat + + + + + + + + +Uses of CSVFormat in org.apache.commons.csv + +Fields in org.apache.commons.csv declared as CSVFormat + +Modifier and Type +Field and Description + + + +static CSVFormat +CSVFormat.DEFAULT +Standard comma separated format, as for RFC4180 but allowing empty lines. + + + +static CSVFormat +CSVFormat.EXCEL +Excel file format (using a comma as the value delimiter). + + + +static CSVFormat +CSVFormat.INFORMIX_UNLOAD +Default Informix CSV UNLOAD format used by the UNLOAD TO file_name operation. + + + +static CSVFormat +CSVFormat.INFORMIX_UNLOAD_CSV +Default Informix CSV UNLOAD format used by the UNLOAD TO file_name operation (escaping is disabled.) + + + +static CSVFormat +CSVFormat.MYSQL +Default MySQL format used by the SELECT INTO OUTFILE and LOAD DATA INFILE operations. + + + +static CSVFormat +CSVFormat.RFC4180 +Comma separated format as defined by http://tools.ietf.org/html/rfc4180;>RFC 4180. + + + +static CSVFormat +CSVFormat.TDF +Tab-delimited format. + + + + + +Methods in org.apache.commons.csv that return CSVFormat + +Modifier and Type +Method and Description + + + +CSVFormat +CSVFormat.Predefined.getFormat() +Gets the format. + + + +static CSVFormat +CSVFormat.newFormat(chardelimiter) +Creates a new CSV format with the specified delimiter. + + + +static CSVFormat +CSVFormat.valueOf(http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true; title="class or interface in java.lang">Stringformat) +Gets one of the predefined formats from CSVFormat.Predefined. + + + +CSVFormat +CSVFormat.withAllowMissingColumnNames() +Returns a new CSVFormat with the missing column names behavior of the format set to true + + + +CSVFormat +CSVFormat.withAllowMissingColumnNames(booleanallowMissingColumnNames) +Returns a new CSVFormat with the missing column names behavior of the format set to the given value. + + + +CSVFormat +CSVFormat.withCommentMarker(charcommentMarker) +Returns a new CSVFormat with the comment start marker of the format set to the specified character. + + + +CSVFormat +CSVFormat.withCommentMarker(http://docs.oracle.com/javase/7/docs/api/java/lang/Character.html?is-external=true; title="class or interface in java.lang">CharactercommentMarker) +Returns a new CSVFormat with the comment start marker of the format set to the specified character. + + + +CSVFormat +CSVFormat.withDelimiter(chardelimiter) +Returns a new CSVFormat with the delimiter of the format set to the specified character. + + + +CSVFormat +CSVFormat.withEscape(charescape) +Returns a new CSVFormat with the escape character of the format set to the specified character. + + + +CSVFormat +CSVFormat.withEscape(http://docs.oracle.com/javase/7/docs/api/java/lang/Character.html?is-external=true; title="class or interface in java.lang">Characterescape) +Returns a new CSVFormat with the escape character of the format set to the specified character. + + + +CSVFormat +CSVFormat.withFirstRecordAsHeader() +Returns a new CSVFormat using the first record as header. + + + +CSVFormat +CSVFormat.withHeader(http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true; title="class or interface in java.lang">Class? extends http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true; title="class or interface in java.lang">Enum?headerEnum) +Returns a new CSVFormat with the header of the format defined by the enum class. + + + +CSVFormat +CSVFormat.withHeader(http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html?is-external=true; title="class or interface in java.sql">ResultSetresultSet) +Returns a new CSVFormat with the header of the format set from the result set metadata. + + +
svn commit: r989467 [33/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/CSVParserTest.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/CSVParserTest.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/CSVParserTest.html Sun May 29 02:48:43 2016 @@ -0,0 +1,1046 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +CSVParserTest xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +14 * See the License for the specific language governing permissions and +15 * limitations under the License. +16 */ +17 +18 package org.apache.commons.csv; +19 +20 import static org.apache.commons.csv.Constants.CR; +21 import static org.apache.commons.csv.Constants.CRLF; +22 import static org.apache.commons.csv.Constants.LF; +23 import static org.junit.Assert.assertArrayEquals; +24 import static org.junit.Assert.assertEquals; +25 import static org.junit.Assert.assertFalse; +26 import static org.junit.Assert.assertNotNull; +27 import static org.junit.Assert.assertNull; +28 import static org.junit.Assert.assertTrue; +29 import static org.junit.Assert.fail; +30 +31 import java.io.File; +32 import java.io.IOException; +33 import java.io.InputStreamReader; +34 import java.io.PipedReader; +35 import java.io.PipedWriter; +36 import java.io.Reader; +37 import java.io.StringReader; +38 import java.io.StringWriter; +39 import java.net.URL; +40 import java.nio.charset.Charset; +41 import java.util.ArrayList; +42 import java.util.Iterator; +43 import java.util.List; +44 import java.util.Map; +45 import java.util.NoSuchElementException; +46 +47 import org.apache.commons.io.input.BOMInputStream; +48 import org.junit.Assert; +49 import org.junit.Ignore; +50 import org.junit.Test; +51 +52 /** +53 * CSVParserTest +54 * +55 * The test are organized in three different sections: The 'setter/getter' section, the lexer section and finally the +56 * parser section. In case a test fails, you should follow a top-down approach for fixing a potential bug (its likely +57 * that the parser itself fails if the lexer has problems...). +58 * +59 * @version $Id: CSVParserTest.java 1739694 2016-04-18 06:16:51Z ggregory $ +60 */ +61 public class CSVParserTest { +62 +63 private static final String CSV_INPUT = "a,b,c,d\n" + " a , b , 1 2 \n" + "\foo baar\, b,\n" +64 // + " \foo\n,,\n\\,,\n\\,d,e\n"; +65 + " \foo\n,,\n\\,,\n\\\,d,e\n"; // changed to use standard CSV escaping +66 +67 private static final String CSV_INPUT_1 = "a,b,c,d"; +68 +69 private static final String CSV_INPUT_2 = "a,b,1 2"; +70 +71 private static final String[][] RESULT = { { "a", "b", "c", "d" }, { "a", "b", "1 2" }, { "foo baar", "b", "" }, +72 { "foo\n,,\n\,,\n\", "d", "e" } }; +73 +74 @Test +75 public void testBackslashEscaping() throws IOException { +76 +77 // To avoid confusion over the need for escaping chars in java code, +78 // We will test with a forward slash as the escape char, and a single +79 // quote as the encapsulator. +80 +81 final String code = "one,two,three\n" // 0 +82 + "'',''\n" // 1) empty encapsulators +83 + "/',/'\n" // 2) single encapsulators +84 + "'/'','/''\n" // 3) single encapsulators encapsulated via escape +85 + ",\n" // 4) single encapsulators encapsulated via doubling +86 + "/,,/,\n" // 5) separator escaped +87 + "//,//\n" // 6) escape escaped +88 + "'//','//'\n" // 7) escape escaped in encapsulation +89 + " 8 , \quoted \\ /\ // string\ \n" // don't eat spaces +90 + "9, /\n \n" // escaped newline +91 + ""; +92 final String[][] res = { { "one",
svn commit: r989467 [12/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/checkstyle.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/checkstyle.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/checkstyle.html Sun May 29 02:48:43 2016 @@ -0,0 +1,368 @@ + + +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + + + + + +Commons CSV Checkstyle Results + + + + + + + + + + + + + +window.onload=function() { + prettyPrint(); + } + + + + http://commons.apache.org/; id="bannerLeft" title="Apache Commons logo"> + + + + + + + + + + + http://commons.apache.org/proper/commons-csv/;>Apache Commons CSV + + +Last Published: 28 May 2016 + | Version: 1.4 + + + + http://www.apachecon.com/; class="externalLink" title="ApacheCon"> +ApacheCon + + + http://www.apache.org; class="externalLink" title="Apache"> +Apache + + + +Commons + + + + + + + + + + + + + + Commons CSV + + +Overview + + + +Download + + + +User Guide + + + http://wiki.apache.org/commons/CSV; class="externalLink" title="Wiki"> +Wiki + + + +Development + + +History + + + +Mailing Lists + + + +Issue Tracking + + + +Team + + + +Source Repository + + + +Javadoc trunk + + + +Javadoc 1.4 + + + +Javadoc 1.3 + + + +Javadoc 1.2 + + + +Javadoc 1.1 + + + +Javadoc 1.0 + + + + Site Archives + + +CSV 1.4 + + + +CSV 1.3 + + + +CSV 1.2 + + + +CSV 1.1 + + + +CSV 1.0 + + + +Project Documentation + + +Project Information + + + +Project Reports + + + +Changes + + + +JIRA Report + + + +JavaDocs + + + +Source Xref + + + +Test Source Xref + + + +
svn commit: r989467 [19/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVFormat.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVFormat.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/org.apache.commons.csv/CSVFormat.html Sun May 29 02:48:43 2016 @@ -0,0 +1 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>http://www.w3.org/1999/xhtml; lang="en">CSVFormatSessionsApache Commons CSV org.apache.commons.csv CSVFormatCSVFormatElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsTotal175 of 2,11392%46 of 27383%3821030336072toString()56%65%73101trim(CharSequence)15%7%7881001hashCode()84%50%101101501equals(Object)89%81%72574501printAndQuote(Object, CharSequence, int, int, Appendable, boolean)94%98%12815301format(Object[])71%n/a012501validate()97%97%11712001toStringArray(Object[])94%83%140701isNullStringSet()71%50%120101withHeader(ResultSet)89%50%120101printAndEscape(CharSequence, int, int, Appendable)100%100%01002201static {...}100%n/a010701CSVFormat(char, Character, QuoteMode, Character, Character, boolean, boolean, String, String, Object[], String[], boolean, boolean, boolean, boolean, boolean)100%100%0201901print(Object, CharSequence, int, int, Appendable, boolean)100%100%0501001withCommentMarker(Character)100%100%020301withDelimiter(char)100%100%020301withEscape(Character)100%100%020301withQuote(Character)100%100%020301print(Object, Appendable, boolean)100%100%050601withAllowMissingColumnNames(boolean)100%n/a010101withHeader(String[])100%n/a010101withHeaderComments(Object[])100%n/a01class="ctr1" id="h21">01id="j21">01href="CSVFormat.java.html#L1533" >class="el_method">withIgnoreEmptyLines(boolean)id="b22">title="35" alt="35"/>100%id="d33"/>n/aid="f24">01id="h22">01id="j22">01href="CSVFormat.java.html#L1559" >class="el_method">withIgnoreHeaderCase(boolean)id="b23">title="35" alt="35"/>100%id="d3 4"/>n/a010101withIgnoreSurroundingSpaces(boolean)100%n/a010101withNullString(String)10 0%n/a010101withQuoteMode(QuoteMode)100%n/a010101withRecordSeparator(String)100%n/a010101withSkipHeaderRecord(boolean)100%n/a010101withTrailingDelimiter(boolean)100%n/a010101withTrim(boolean)100%n/a010101withHeader(Class)100%75%130701withHeader(ResultSetMetaData)100%75%130701printRecord(Appendable, Object[])100%100%030401newFormat(char)100%n/a010101println(Appendable)100%100%030501isLineBreak(char)100%100%030101isLineBreak(Character)100%100%030101getHeader()100%100%020101getHeaderComments()100%100%020101isCommentMarkerSet()100%100%020101isEscapeCharacterSet()100%100%020101isQuoteCharacterSet()100%100%020101parse(Reader)100%n/a010101print(Appendable)100%n/a010101withFirstRecordAsHeader()100%n/a010101withCommentMarker(char)100%n/a010101withEscape(char)100%n/a010101withQuote(char)100%n/a010101withRecordSeparator(char)100%n/a010101valueOf(String)100%n/a010101withAllowMissingColumnNames()100%n/a010101withIgnoreEmptyLines()100%n/a010101withIgnoreHeaderCase()100%n/a010101withIgnoreSurroundingSpaces()100%n/a010101withSkipHeaderRecord()100%n/a010101withTrailingDelimiter()100%n/a010101withTrim()100%n/a010101getAllowMissingColumnNames()100%n/a010101getCommentMarker()100%n/a010101getDelimiter()100%n/a010101 getEscapeCharacter()100%n/a010101getIgnoreEmptyLines()100%n/a010101getIgnoreHeaderCase()100%n/a010101getIgnoreSurroundingSpaces()100%n/a010101getNullString()100%n/a010101getQuoteCharacter()100%n/a010101< td id="a14">getQuoteMode()100%n/a010101getRecordSeparator()100%n/a010101getSkipHeaderRecord()100%n/a010101getTrailingDelimiter()100%n/a010101getTrim()100%n/a010101Created with http://www.eclemma.org/jacoco;>JaCoCo 0.7.6.201602180812 \ No newline at end of file
svn commit: r989467 [18/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/.sessions.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/.sessions.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/jacoco/.sessions.html Sun May 29 02:48:43 2016 @@ -0,0 +1 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>http://www.w3.org/1999/xhtml; lang="en">SessionsSessionsApache Commons CSV SessionsSessionsThis coverage report is based on execution data from the following sessions:SessionStart TimeDump TimeUS-L-GG02-f0849e64May 28, 2016 7:23:00 PMMay 28, 2016 7:23:06 PMExecution data for the following classes is considered in this report:ClassIdorg.apache.commons.csv.Assertions2a4ae97471f574e9org.apache.commons.csv.AssertionsTestf226ba7ca5eee753org.apache.commons.csv.CSVFileParserTest63a44c503f026bbforg.apache.commons.csv.CSVFileParserTest.145712f6222003ee2org.apache.commons.csv.CSVFormate6787c71d22cd389org.apache.commons.csv.CSVFormat.1db36e835d7a33d75org.apache.commons.csv.CSVFormat.Predefinedb8fe4167747514d8org.apache.commons.csv.CSVFormatPredefinedTestda5888908340242forg.apache.commons.csv.CSVFormatTest8eca35dd490cea87org.apache.commons.csv.CSVFormatTest.EmptyEnum787d03127060263aorg.apache.commons.csv.CSVFormatTest.Header7be4c49f43f5b474org.apache.commons.csv.CSVParser608c7cf5db67c628org.apache.commons.csv.CSVParser.1505d20fef981c926org.apache.commons.csv.CSVParser.207ce9f6406d9f26eorg.apache.commons.csv.CSVParserTest48b88ab439c2b887org.apache.commons.csv.CSVPrinterd69ada24fa62870aorg.apache.commons.csv.CSVPrinterTestfdfb295ca0d32d9aorg.apache.commons.csv.CSVRecord07f5cf03fc576c68org.apache.commons.csv.CSVRecordTest2358edcc22a7955forg.apache.commo ns.csv.CSVRecordTest.EnumFixture48a3e1a7165a5c94org.apache.commons.csv.Constants33aa5999a5848e6eorg.apache.commons.csv.ExtendedBufferedReader2e70459119eba5aaorg.apache.commons.csv.ExtendedBufferedReaderTest03227026d75cc462org.apache.commons.csv.Lexercee389f2ecb54a8aorg.apache.commons.csv.LexerTest05c29c95bdbf69e4org.apache.commons.csv.QuoteMode080f9d205621caedorg.apache.commons.csv.Token3fb3ea95be5f716aorg.apache.commons.csv.Token.Typed9d004d18fb29baforg.apache.commons.csv.TokenMatchersa9ebdbc181aa0519org.apache.commons.csv.TokenMatchers.12b4a3b76826cecf7org.apache.commons.csv.TokenMatchers.26bef091550cd0782org.apache.commons.csv.TokenMatchers.30f30bfaa864110adorg.apache.commons.csv.TokenMatchersTest8ab069525082eabeorg.apache.commons.csv.Utilse66d485f0e4b866eclass="el_class">org.apache.commons.csv.bugs.JiraCsv164Test723b0795b8ecd229 >class="el_class">org.apache.commons.csv.bugs.JiraCsv167Test3c9d114a59833919 >class="el_class">org.apache.commons.io.ByteOrderMarkb9cf5f6400f638c7 >class="el_class">org.apache.commons.io.input.BOMInputStreamb4fcc900b3ba350c >class="el_class">org.apache.commons.io.input.BOMInputStream.18433861cf39d6b38 >class="el_class">org.apache.commons.io.input.ProxyInputStream476a7e813cb989b9 >class="el_class">org.apache.commons.lang3.ObjectUtils0d0a39c5ae06c957 class="el_class">org.apache.commons.lang3.ObjectUtils.Null952f52ebd8ac68d0org.apache.maven.surefire.NonAbstractClassFilterfc97b6b24692a75aorg.apache.maven.surefire.booter.BaseProviderFactory1863c3f5bbbd786forg.apache.maven.surefire.booter.BiProperty3811df161ff4aaa9org.apache.maven.surefire.booter.BooterDeserializerc83397fbff06643dorg.apache.maven.surefire.booter.ClassLoaderConfigurationecd6032808102caeorg.apache.maven.surefire.booter.Classpath9fa80090913f56d2org.apache.maven.surefire.booter.ClasspathConfiguration119cb500297de47b< /tr>org.apache.maven.surefire.booter.Command6ecf946aa8d2df56org.apache.maven.surefire.booter.CommandReader1b895077377f24ceorg.apache.maven.surefire.booter.CommandReader.1606842280b6ff99borg.apache.maven.surefire.booter.CommandReader.CommandRunnablea7b877ee122885cdorg.apache.maven.surefire.booter.ForkedBooter8a17eb0b7b54baf7org.apache.maven.surefire.booter.ForkedBooter.18ade34fbe7fa4c9eorg.apache.maven.surefire.booter.ForkedBooter.236ee353e01c0e482org.apache.maven.surefire .booter.ForkedBooter.330e74f6bd08a5abforg.apache.maven.surefire.booter.ForkedBooter.4a02071697fadd7c1org.apache.maven.surefire.booter.ForkedBooter.5dffbe6c6c2234bf7org.apache.maven.surefire.booter.ForkingReporterFactoryf5ffc73889b06268org.apache.maven.surefire.booter.ForkingRunListener1a6b3fe387024e94org.apache.maven.surefire.booter.MasterProcessCommandc8c52c2b4f2fa353org.apache.maven.surefire.booter.PropertiesWrapperf976b7dccf0ef18aorg.apache.maven.surefire.booter.ProviderConfiguration
svn commit: r989467 [37/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/PerformanceTest.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/PerformanceTest.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/PerformanceTest.html Sun May 29 02:48:43 2016 @@ -0,0 +1,307 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +PerformanceTest xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +14 * See the License for the specific language governing permissions and +15 * limitations under the License. +16 */ +17 +18 package org.apache.commons.csv; +19 +20 import java.io.BufferedReader; +21 import java.io.File; +22 import java.io.FileInputStream; +23 import java.io.FileOutputStream; +24 import java.io.FileReader; +25 import java.io.IOException; +26 import java.io.InputStream; +27 import java.io.OutputStream; +28 import java.lang.reflect.Constructor; +29 import java.util.zip.GZIPInputStream; +30 +31 import org.apache.commons.io.IOUtils; +32 +33 /** +34 * Basic test harness. +35 * +36 * Requires test file to be downloaded separately. +37 * +38 * @version $Id: PerformanceTest.java 1582817 2014-03-28 16:44:41Z sebb $ +39 */ +40 @SuppressWarnings("boxing") +41 public class PerformanceTest { +42 +43 private static final String[] PROPS = { +44 "java.version", // Java Runtime Environment version +45 "java.vendor", // Java Runtime Environment vendor +46 //"java.vm.specification.version", // Java Virtual Machine specification version +47 //"java.vm.specification.vendor", // Java Virtual Machine specification vendor +48 //"java.vm.specification.name",// Java Virtual Machine specification name +49 "java.vm.version", // Java Virtual Machine implementation version +50 //"java.vm.vendor",// Java Virtual Machine implementation vendor +51 "java.vm.name", // Java Virtual Machine implementation name +52 //"java.specification.version",// Java Runtime Environment specification version +53 //"java.specification.vendor", // Java Runtime Environment specification vendor +54 //"java.specification.name", // Java Runtime Environment specification name +55 +56 "os.name", // Operating system name +57 "os.arch", // Operating system architecture +58 "os.version",// Operating system version +59 +60 }; +61 +62 private static int max = 10; +63 +64 private static int num = 0; // number of elapsed times recorded +65 private static long[] elapsedTimes = new long[max]; +66 +67 private static final CSVFormat format = CSVFormat.EXCEL; +68 +69 private static final File BIG_FILE = new File(System.getProperty("java.io.tmpdir"), "worldcitiespop.txt"); +70 +71 public static void main(final String [] args) throws Exception { +72 if (BIG_FILE.exists()) { +73 System.out.println(String.format("Found test fixture %s: %,d bytes.", BIG_FILE, BIG_FILE.length())); +74 } else { +75 System.out.println("Decompressing test fixture " + BIG_FILE + "..."); +76 final InputStream input = new GZIPInputStream(new FileInputStream("src/test/resources/perf/worldcitiespop.txt.gz")); +77 final OutputStream output = new FileOutputStream(BIG_FILE); +78 IOUtils.copy(input, output); +79 input.close(); +80 output.close(); +81 System.out.println(String.format("Decompressed test fixture %s: %,d bytes.", BIG_FILE, BIG_FILE.length())); +82 } +83 final int argc = args.length; +84 String tests[]; +85 if (argc 0) { +86
svn commit: r989467 [27/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/project-info.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/project-info.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/project-info.html Sun May 29 02:48:43 2016 @@ -0,0 +1,369 @@ + + +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + + + + + +Commons CSV Project Information + + + + + + + + + + + + + +window.onload=function() { + prettyPrint(); + } + + + + http://commons.apache.org/; id="bannerLeft" title="Apache Commons logo"> + + + + + + + + + + + http://commons.apache.org/proper/commons-csv/;>Apache Commons CSV + + +Last Published: 28 May 2016 + | Version: 1.4 + + + + http://www.apachecon.com/; class="externalLink" title="ApacheCon"> +ApacheCon + + + http://www.apache.org; class="externalLink" title="Apache"> +Apache + + + +Commons + + + + + + + + + + + + + + Commons CSV + + +Overview + + + +Download + + + +User Guide + + + http://wiki.apache.org/commons/CSV; class="externalLink" title="Wiki"> +Wiki + + + +Development + + +History + + + +Mailing Lists + + + +Issue Tracking + + + +Team + + + +Source Repository + + + +Javadoc trunk + + + +Javadoc 1.4 + + + +Javadoc 1.3 + + + +Javadoc 1.2 + + + +Javadoc 1.1 + + + +Javadoc 1.0 + + + + Site Archives + + +CSV 1.4 + + + +CSV 1.3 + + + +CSV 1.2 + + + +CSV 1.1 + + + +CSV 1.0 + + + +Project Documentation + + +Project Information + + + +About + + + +Summary + + + +Team + + + +Source Code Management + + + +Issue Management + + + +Mailing Lists + + + +Dependency Information + + + +Dependencies + + + +Dependency Convergence + + + +CI Management +
svn commit: r989467 [25/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/js/jquery.min.js == --- websites/production/commons/content/proper/commons-csv/archives/1.4/js/jquery.min.js (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/js/jquery.min.js Sun May 29 02:48:43 2016 @@ -0,0 +1,4 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p ;for(g=1;g0){if(c!=="border")for(;g
svn commit: r989467 [13/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/css/bootstrap-1.3.0.min.css == --- websites/production/commons/content/proper/commons-csv/archives/1.4/css/bootstrap-1.3.0.min.css (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/css/bootstrap-1.3.0.min.css Sun May 29 02:48:43 2016 @@ -0,0 +1,330 @@ +html,body{margin:0;padding:0;} +h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;} +table{border-collapse:collapse;border-spacing:0;} +ol,ul{list-style:none;} +q:before,q:after,blockquote:before,blockquote:after{content:"";} +html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} +a:focus{outline:thin dotted;} +a:hover,a:active{outline:0;} +article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} +audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} +audio:not([controls]){display:none;} +sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;} +sup{top:-0.5em;} +sub{bottom:-0.25em;} +img{border:0;-ms-interpolation-mode:bicubic;} +button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;} +button,input{line-height:normal;*overflow:visible;} +button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;} +button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;} +input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;} +input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;} +textarea{overflow:auto;vertical-align:top;} +html,body{background-color:#ff;} +body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#404040;} +.container{width:940px;margin-left:auto;margin-right:auto;zoom:1;}.container:before,.container:after{display:table;content:"";zoom:1;*display:inline;} +.container:after{clear:both;} +.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;*display:inline;} +.container-fluid:after{clear:both;} +.container-fluid>.sidebar{float:left;width:220px;} +.container-fluid>.content{margin-left:240px;} +a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;} +.pull-right{float:right;} +.pull-left{float:left;} +.hide{display:none;} +.show{display:block;} +.row{zoom:1;margin-left:-20px;}.row:before,.row:after{display:table;content:"";zoom:1;*display:inline;} +.row:after{clear:both;} +[class*="span"]{display:inline;float:left;margin-left:20px;} +.span1{width:40px;} +.span2{width:100px;} +.span3{width:160px;} +.span4{width:220px;} +.span5{width:280px;} +.span6{width:340px;} +.span7{width:400px;} +.span8{width:460px;} +.span9{width:520px;} +.span10{width:580px;} +.span11{width:640px;} +.span12{width:700px;} +.span13{width:760px;} +.span14{width:820px;} +.span15{width:880px;} +.span16{width:940px;} +.span17{width:1000px;} +.span18{width:1060px;} +.span19{width:1120px;} +.span20{width:1180px;} +.span21{width:1240px;} +.span22{width:1300px;} +.span23{width:1360px;} +.span24{width:1420px;} +.offset1{margin-left:80px;} +.offset2{margin-left:140px;} +.offset3{margin-left:200px;} +.offset4{margin-left:260px;} +.offset5{margin-left:320px;} +.offset6{margin-left:380px;} +.offset7{margin-left:440px;} +.offset8{margin-left:500px;} +.offset9{margin-left:560px;} +.offset10{margin-left:620px;} +.offset11{margin-left:680px;} +.offset12{margin-left:740px;} +.span-one-third{width:300px;} +.span-two-thirds{width:620px;} +.offset-one-third{margin-left:340px;} +.offset-two-thirds{margin-left:660px;} +p{font-size:13px;font-weight:normal;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;} +h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;} +h1{margin-bottom:18px;font-size:30px;line-height:36px;}h1 small{font-size:18px;} +h2{font-size:24px;line-height:36px;}h2 small{font-size:14px;} +h3,h4,h5,h6{line-height:36px;} +h3{font-size:18px;}h3 small{font-size:14px;} +h4{font-size:16px;}h4 small{font-size:12px;} +h5{font-size:14px;} +h6{font-size:13px;color:#bfbfbf;text-transform:uppercase;} +ul,ol{margin:0 0 18px 25px;} +ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} +ul{list-style:disc;} +ol{list-style:decimal;} +li{line-height:18px;color:#808080;}
svn commit: r989467 [39/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/CSVFormat.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/CSVFormat.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/CSVFormat.html Sun May 29 02:48:43 2016 @@ -0,0 +1,1780 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +CSVFormat xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +14 * See the License for the specific language governing permissions and +15 * limitations under the License. +16 */ +17 +18 package org.apache.commons.csv; +19 +20 import static org.apache.commons.csv.Constants.BACKSLASH; +21 import static org.apache.commons.csv.Constants.COMMA; +22 import static org.apache.commons.csv.Constants.COMMENT; +23 import static org.apache.commons.csv.Constants.CR; +24 import static org.apache.commons.csv.Constants.CRLF; +25 import static org.apache.commons.csv.Constants.DOUBLE_QUOTE_CHAR; +26 import static org.apache.commons.csv.Constants.LF; +27 import static org.apache.commons.csv.Constants.PIPE; +28 import static org.apache.commons.csv.Constants.SP; +29 import static org.apache.commons.csv.Constants.TAB; +30 +31 import java.io.IOException; +32 import java.io.Reader; +33 import java.io.Serializable; +34 import java.io.StringWriter; +35 import java.sql.ResultSet; +36 import java.sql.ResultSetMetaData; +37 import java.sql.SQLException; +38 import java.util.Arrays; +39 import java.util.HashSet; +40 import java.util.Set; +41 +42 /** +43 * Specifies the format of a CSV file and parses input. +44 * +45 * h2Using predefined formats/h2 +46 * +47 * p +48 * You can use one of the predefined formats: +49 * /p +50 * +51 * ul +52 * li{@link #DEFAULT}/li +53 * li{@link #EXCEL}/li +54 * li{@link #MYSQL}/li +55 * li{@link #RFC4180}/li +56 * li{@link #TDF}/li +57 * /ul +58 * +59 * p +60 * For example: +61 * /p +62 * +63 * pre +64 * CSVParser parser = CSVFormat.EXCEL.parse(reader); +65 * /pre +66 * +67 * p +68 * The {@link CSVParser} provides static methods to parse other input types, for example: +69 * /p +70 * +71 * pre +72 * CSVParser parser = CSVParser.parse(file, StandardCharsets.US_ASCII, CSVFormat.EXCEL); +73 * /pre +74 * +75 * h2Defining formats/h2 +76 * +77 * p +78 * You can extend a format by calling the {@code with} methods. For example: +79 * /p +80 * +81 * pre +82 * CSVFormat.EXCEL.withNullString(quot;N/Aquot;).withIgnoreSurroundingSpaces(true); +83 * /pre +84 * +85 * h2Defining column names/h2 +86 * +87 * p +88 * To define the column names you want to use to access records, write: +89 * /p +90 * +91 * pre +92 * CSVFormat.EXCEL.withHeader(quot;Col1quot;, quot;Col2quot;, quot;Col3quot;); +93 * /pre +94 * +95 * p +96 * Calling {@link #withHeader(String...)} let's you use the given names to address values in a {@link CSVRecord}, and +97 * assumes that your CSV source does not contain a first record that also defines column names. +98 * +99 * If it does, then you are overriding this metadata with your names and you should skip the first record by calling +100 * {@link #withSkipHeaderRecord(boolean)} with {@code true}. +101 * /p +102 * +103 * h2Parsing/h2 +104 * +105 * p +106 * You can use a format directly to parse a reader. For example, to parse an Excel file with columns header, write: +107 * /p +108 * +109 * pre +110 * Reader in = ...; +111 * CSVFormat.EXCEL.withHeader(quot;Col1quot;, quot;Col2quot;, quot;Col3quot;).parse(in); +112 * /pre +113 * +114 * p +115 * For other input types, like resources, files, and URLs, use the static methods on {@link CSVParser}. +116 * /p +117 * +118 * h2Referencing columns safely/h2 +119 * +120 * p +121 * If your source contains a header record, you can simplify your code and safely reference columns, by
svn commit: r989467 [4/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/common
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/CSVParser.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/CSVParser.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/CSVParser.html Sun May 29 02:48:43 2016 @@ -0,0 +1,625 @@ +http://www.w3.org/TR/html4/loose.dtd;> + + + + +CSVParser (Apache Commons CSV 1.4 API) + + + + + + +JavaScript is disabled on your browser. + + + + + + + + +Package +Class +Use +Tree +Deprecated +Index +Help + + + + +Prev Class +Next Class + + +Frames +No Frames + + +All Classes + + + + + + + +Summary: +Nested| +Field| +Constr| +Method + + +Detail: +Field| +Constr| +Method + + + + + + + + +org.apache.commons.csv +Class CSVParser + + + +http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true; title="class or interface in java.lang">java.lang.Object + + +org.apache.commons.csv.CSVParser + + + + + + + +All Implemented Interfaces: +http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true; title="class or interface in java.io">Closeable, http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true; title="class or interface in java.lang">AutoCloseable, http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true; title="class or interface in java.lang">IterableCSVRecord + + + +public final class CSVParser +extends http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true; title="class or interface in java.lang">Object +implements http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true; title="class or interface in java.lang">IterableCSVRecord, http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true; title="class or interface in java.io">Closeable +Parses CSV files according to the specified format. + + Because CSV appears in many different dialects, the parser supports many formats by allowing the + specification of a CSVFormat. + + The parser works record wise. It is not possible to go back, once a record has been parsed from the input stream. + + Creating instances + + There are several static factory methods that can be used to create instances for various types of resources: + + + parse(java.io.File, Charset, CSVFormat) + parse(String, CSVFormat) + parse(java.net.URL, java.nio.charset.Charset, CSVFormat) + + + Alternatively parsers can also be created by passing a http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true; title="class or interface in java.io">Reader directly to the sole constructor. + + For those who like fluent APIs, parsers can be created using CSVFormat.parse(java.io.Reader) as a shortcut: + + + for(CSVRecord record : CSVFormat.EXCEL.parse(in)) { + ... + } + + + Parsing record wise + + To parse a CSV input from a file, you write: + + + + File csvData = new File(/path/to/csv); + CSVParser parser = CSVParser.parse(csvData, CSVFormat.RFC4180); + for (CSVRecord csvRecord : parser) { + ... + } + + + + This will read the parse the contents of the file using the + http://tools.ietf.org/html/rfc4180; target="_blank">RFC 4180 format. + + + + To parse CSV input in a format like Excel, you write: + + + + CSVParser parser = CSVParser.parse(csvData, CSVFormat.EXCEL); + for (CSVRecord csvRecord : parser) { + ... + } + + + + If the predefined formats don't match the format at hands, custom formats can be defined. More information about + customising CSVFormats is available in CSVFormat JavaDoc. + + + Parsing into memory + + If parsing record wise is not desired, the contents of the input can be read completely into memory. + + + + Reader in = new StringReader(a;b\nc;d); + CSVParser parser = new CSVParser(in, CSVFormat.EXCEL); + ListCSVRecord list = parser.getRecords(); + + + + There are two constraints that have to be kept in mind: + + + + Parsing into memory starts at the current position of the parser. If you have already parsed records from + the input, those records will not end up in the in memory representation of your CSV data. + Parsing into memory may consume a lot of system resources depending on the input. For example if you're + parsing a 150MB file of CSV data the contents will be read completely into memory. + + + Notes + + Internal parser state is completely covered by
svn commit: r989467 [42/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/Constants.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/Constants.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/Constants.html Sun May 29 02:48:43 2016 @@ -0,0 +1,97 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +Constants xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +14 * See the License for the specific language governing permissions and +15 * limitations under the License. +16 */ +17 +18 package org.apache.commons.csv; +19 +20 /** +21 * Constants for this package. +22 * +23 * @version $Id: Constants.java 1742459 2016-05-05 19:43:57Z britter $ +24 */ +25 final class Constants { +26 +27 static final char BACKSLASH = ''; +28 +29 static final char BACKSPACE = '\b'; +30 +31 static final char COMMA = ','; +32 +33 /** +34 * Starts a comment, the remainder of the line is the comment. +35 */ +36 static final char COMMENT = '#'; +37 +38 static final char CR = '\r'; +39 +40 /** RFC 4180 defines line breaks as CRLF */ +41 static final String CRLF = "\r\n"; +42 +43 static final Character DOUBLE_QUOTE_CHAR = Character.valueOf(''); +44 +45 static final String EMPTY = ""; +46 +47 /** The end of stream symbol */ +48 static final int END_OF_STREAM = -1; +49 +50 static final char FF = '\f'; +51 +52 static final char LF = '\n'; +53 +54 /** +55 * Unicode line separator. +56 */ +57 static final String LINE_SEPARATOR = "\u2028"; +58 +59 /** +60 * Unicode next line. +61 */ +62 static final String NEXT_LINE = "\u0085"; +63 +64 /** +65 * Unicode paragraph separator. +66 */ +67 static final String PARAGRAPH_SEPARATOR = "\u2029"; +68 +69 static final char PIPE = '|'; +70 +71 /** ASCII record separator */ +72 static final char RS = 30; +73 +74 static final char SP = ' '; +75 +76 static final char TAB = '\t'; +77 +78 /** Undefined state for the lookahead char */ +79 static final int UNDEFINED = -2; +80 +81 /** ASCII unit separator */ +82 static final char US = 31; +83 +84 } + + +Copyright 2016 http://www.apache.org/;>The Apache Software Foundation. All rights reserved. + + \ No newline at end of file Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/ExtendedBufferedReader.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/ExtendedBufferedReader.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref/org/apache/commons/csv/ExtendedBufferedReader.html Sun May 29 02:48:43 2016 @@ -0,0 +1,206 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +ExtendedBufferedReader xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
svn commit: r989467 [32/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/CSVFormatTest.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/CSVFormatTest.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/xref-test/org/apache/commons/csv/CSVFormatTest.html Sun May 29 02:48:43 2016 @@ -0,0 +1,465 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + +CSVFormatTest xref + + + +View Javadoc +1 /* +2* Licensed to the Apache Software Foundation (ASF) under one or more +3* contributor license agreements. See the NOTICE file distributed with +4* this work for additional information regarding copyright ownership. +5* The ASF licenses this file to You under the Apache License, Version 2.0 +6* (the "License"); you may not use this file except in compliance with +7* the License. You may obtain a copy of the License at +8* +9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 +10 * +11 * Unless required by applicable law or agreed to in writing, software +12 * distributed under the License is distributed on an "AS IS" BASIS, +13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +14 * See the License for the specific language governing permissions and +15 * limitations under the License. +16 */ +17 +18 package org.apache.commons.csv; +19 +20 import static org.apache.commons.csv.CSVFormat.RFC4180; +21 import static org.apache.commons.csv.Constants.CR; +22 import static org.apache.commons.csv.Constants.CRLF; +23 import static org.apache.commons.csv.Constants.LF; +24 import static org.junit.Assert.assertArrayEquals; +25 import static org.junit.Assert.assertEquals; +26 import static org.junit.Assert.assertFalse; +27 import static org.junit.Assert.assertNotNull; +28 import static org.junit.Assert.assertNotSame; +29 import static org.junit.Assert.assertTrue; +30 +31 import java.io.ByteArrayInputStream; +32 import java.io.ByteArrayOutputStream; +33 import java.io.ObjectInputStream; +34 import java.io.ObjectOutputStream; +35 import java.util.Arrays; +36 +37 import org.junit.Assert; +38 import org.junit.Test; +39 +40 /** +41 * +42 * +43 * @version $Id: CSVFormatTest.java 1742178 2016-05-03 18:54:13Z britter $ +44 */ +45 public class CSVFormatTest { +46 +47 private static void assertNotEquals(final Object right, final Object left) { +48 assertFalse(right.equals(left)); +49 assertFalse(left.equals(right)); +50 } +51 +52 private static CSVFormat copy(final CSVFormat format) { +53 return format.withDelimiter(format.getDelimiter()); +54 } +55 +56 @Test(expected = IllegalArgumentException.class) +57 public void testDelimiterSameAsCommentStartThrowsException() { +58 CSVFormat.DEFAULT.withDelimiter('!').withCommentMarker('!'); +59 } +60 +61 @Test(expected = IllegalArgumentException.class) +62 public void testDelimiterSameAsEscapeThrowsException() { +63 CSVFormat.DEFAULT.withDelimiter('!').withEscape('!'); +64 } +65 +66 @Test(expected = IllegalArgumentException.class) +67 public void testDuplicateHeaderElements() { +68 CSVFormat.DEFAULT.withHeader("A", "A"); +69 } +70 +71 @Test +72 public void testEquals() { +73 final CSVFormat right = CSVFormat.DEFAULT; +74 final CSVFormat left = copy(right); +75 +76 assertFalse(right.equals(null)); +77 assertFalse(right.equals("A String Instance")); +78 +79 assertEquals(right, right); +80 assertEquals(right, left); +81 assertEquals(left, right); +82 +83 assertEquals(right.hashCode(), right.hashCode()); +84 assertEquals(right.hashCode(), left.hashCode()); +85 } +86 +87 @Test +88 public void testEqualsCommentStart() { +89 final CSVFormat right = CSVFormat.newFormat('\'') +90 .withQuote('') +91 .withCommentMarker('#') +92 .withQuoteMode(QuoteMode.ALL); +93 final CSVFormat left = right +94 .withCommentMarker('!'); +95 +96 assertNotEquals(right, left); +97 } +98 +99 @Test +100 public void testEqualsDelimiter() { +101 final CSVFormat right = CSVFormat.newFormat('!'); +102 final CSVFormat left = CSVFormat.newFormat('?'); +103 +104 assertNotEquals(right, left); +105 } +106 +107 @Test +108 public void testEqualsEscape() { +109 final CSVFormat right = CSVFormat.newFormat('\'') +110 .withQuote('')
svn commit: r989467 [24/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commo
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/jira-report.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/jira-report.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/jira-report.html Sun May 29 02:48:43 2016 @@ -0,0 +1,1153 @@ + + +http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + + + + + +Commons CSV JIRA Report + + + + + + + + + + + + + +window.onload=function() { + prettyPrint(); + } + + + + http://commons.apache.org/; id="bannerLeft" title="Apache Commons logo"> + + + + + + + + + + + http://commons.apache.org/proper/commons-csv/;>Apache Commons CSV + + +Last Published: 28 May 2016 + | Version: 1.4 + + + + http://www.apachecon.com/; class="externalLink" title="ApacheCon"> +ApacheCon + + + http://www.apache.org; class="externalLink" title="Apache"> +Apache + + + +Commons + + + + + + + + + + + + + + Commons CSV + + +Overview + + + +Download + + + +User Guide + + + http://wiki.apache.org/commons/CSV; class="externalLink" title="Wiki"> +Wiki + + + +Development + + +History + + + +Mailing Lists + + + +Issue Tracking + + + +Team + + + +Source Repository + + + +Javadoc trunk + + + +Javadoc 1.4 + + + +Javadoc 1.3 + + + +Javadoc 1.2 + + + +Javadoc 1.1 + + + +Javadoc 1.0 + + + + Site Archives + + +CSV 1.4 + + + +CSV 1.3 + + + +CSV 1.2 + + + +CSV 1.1 + + + +CSV 1.0 + + + +Project Documentation + + +Project Information + + + +Project Reports + + + +Changes + + + +JIRA Report + + + +JavaDocs + + + +Source Xref + + + +Test Source Xref + + + +
svn commit: r989467 [7/43] - in /websites/production/commons/content/proper/commons-csv/archives/1.4: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/common
Added: websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/package-use.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/package-use.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/package-use.html Sun May 29 02:48:43 2016 @@ -0,0 +1,158 @@ +http://www.w3.org/TR/html4/loose.dtd;> + + + + +Uses of Package org.apache.commons.csv (Apache Commons CSV 1.4 API) + + + + + + +JavaScript is disabled on your browser. + + + + + + + + +Package +Class +Use +Tree +Deprecated +Index +Help + + + + +Prev +Next + + +Frames +No Frames + + +All Classes + + + + + + + + + + +Uses of Packageorg.apache.commons.csv + + + + + + + +Classes in org.apache.commons.csv used by org.apache.commons.csv + +Class and Description + + + +CSVFormat +Specifies the format of a CSV file and parses input. + + + +CSVFormat.Predefined +Predefines formats. + + + +CSVParser +Parses CSV files according to the specified format. + + + +CSVPrinter +Prints values in a CSV format. + + + +CSVRecord +A CSV record parsed from a CSV file. + + + +QuoteMode +Defines quote behavior when printing. + + + + + + + + + + + + + + +Package +Class +Use +Tree +Deprecated +Index +Help + + + + +Prev +Next + + +Frames +No Frames + + +All Classes + + + + + + + + + +Copyright 2016 http://www.apache.org/;>The Apache Software Foundation. All rights reserved. + + \ No newline at end of file Added: websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/overview-tree.html == --- websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/overview-tree.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.4/apidocs/overview-tree.html Sun May 29 02:48:43 2016 @@ -0,0 +1,142 @@ +http://www.w3.org/TR/html4/loose.dtd;> + + + + +Class Hierarchy (Apache Commons CSV 1.4 API) + + + + + + +JavaScript is disabled on your browser. + + + + + + + + +Package +Class +Use +Tree +Deprecated +Index +Help + + + + +Prev +Next + + +Frames +No Frames + + +All Classes + + + + + + + + + + +Hierarchy For All Packages +Package Hierarchies: + +org.apache.commons.csv + + + +Class Hierarchy + +java.lang.http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true; title="class or interface in java.lang">Object + +org.apache.commons.csv.CSVFormat (implements java.io.http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true; title="class or interface in java.io">Serializable) +org.apache.commons.csv.CSVParser (implements java.io.http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true; title="class or interface in java.io">Closeable, java.lang.http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true; title="class or interface in java.lang">IterableT) +org.apache.commons.csv.CSVPrinter (implements java.io.http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true; title="class or interface in java.io">Closeable, java.io.http://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true; title="class or interface in java.io">Flushable) +org.apache.commons.csv.CSVRecord (implements java.lang.http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true; title="class or interface in java.lang">IterableT, java.io.http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true; title="class or interface in java.io">Serializable) + + + +Enum Hierarchy + +java.lang.http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true; title="class or interface in java.lang">Object +
svn commit: r989464 [36/46] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/resources/ apido
Modified: websites/production/commons/content/proper/commons-csv/taglist.html == --- websites/production/commons/content/proper/commons-csv/taglist.html (original) +++ websites/production/commons/content/proper/commons-csv/taglist.html Sun May 29 02:24:04 2016 @@ -1,430 +1,441 @@ - - -http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> - - - - - -Commons CSV Tag List report - - - - - - - - - - - - - -window.onload=function() { - prettyPrint(); - } - - - - http://commons.apache.org/; id="bannerLeft" title="Apache Commons logo"> - - - - - - - - - - - http://commons.apache.org/proper/commons-csv/;>Apache Commons CSV - - -Last Published: 09 May 2016 - | Version: 1.3 - - - - http://www.apachecon.com/; class="externalLink" title="ApacheCon"> -ApacheCon - - - http://www.apache.org; class="externalLink" title="Apache"> -Apache - - - -Commons - - - - - - - - - - - - - - Commons CSV - - -Overview - - - -Download - - - -User Guide - - - http://wiki.apache.org/commons/CSV; class="externalLink" title="Wiki"> -Wiki - - - -Development - - -History - - - -Mailing Lists - - - -Issue Tracking - - - -Team - - - -Source Repository - - - -Javadoc trunk - - - -Javadoc 1.3 - - - -Javadoc 1.2 - - - -Javadoc 1.1 - - - -Javadoc 1.0 - - - - Site Archives - - -CSV 1.3 - - - -CSV 1.2 - - - -CSV 1.1 - - - -CSV 1.0 - - - -Project Documentation - - -Project Information - - - -Project Reports - - - -Changes - - - -JIRA Report - - - -JavaDocs - - - -Source Xref - - - -Test Source Xref - - - -Surefire Report - - - -Rat Report - - - -Clirr - -
svn commit: r989464 [5/46] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/resources/ apidoc
Modified: websites/production/commons/content/proper/commons-csv/apidocs/org/apache/commons/csv/CSVParser.html == --- websites/production/commons/content/proper/commons-csv/apidocs/org/apache/commons/csv/CSVParser.html (original) +++ websites/production/commons/content/proper/commons-csv/apidocs/org/apache/commons/csv/CSVParser.html Sun May 29 02:24:04 2016 @@ -1,703 +1,625 @@ -http://www.w3.org/TR/html4/loose.dtd;> - - - - - -CSVParser (Apache Commons CSV 1.3 API) - - - - - -var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":9,"i8":9,"i9":9}; -var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; -var altColor = "altColor"; -var rowColor = "rowColor"; -var tableTab = "tableTab"; -var activeTableTab = "activeTableTab"; - - -JavaScript is disabled on your browser. - - - - - -Skip navigation links - - - - -Package -Class -Use -Tree -Deprecated -Index -Help - - - - -PrevClass -NextClass - - -Frames -NoFrames - - -AllClasses - - - - - - - -Summary: -Nested| -Field| -Constr| -Method - - -Detail: -Field| -Constr| -Method - - - - - - - - -org.apache.commons.csv -Class CSVParser - - - -http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true; title="class or interface in java.lang">java.lang.Object - - -org.apache.commons.csv.CSVParser - - - - - - - -All Implemented Interfaces: -http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true; title="class or interface in java.io">Closeable, http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true; title="class or interface in java.lang">AutoCloseable, http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true; title="class or interface in java.lang">IterableCSVRecord - - - -public final class CSVParser -extends http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true; title="class or interface in java.lang">Object -implements http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true; title="class or interface in java.lang">IterableCSVRecord, http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true; title="class or interface in java.io">Closeable -Parses CSV files according to the specified format. - - Because CSV appears in many different dialects, the parser supports many formats by allowing the - specification of a CSVFormat. - - The parser works record wise. It is not possible to go back, once a record has been parsed from the input stream. - - Creating instances - - There are several static factory methods that can be used to create instances for various types of resources: - - - parse(java.io.File, Charset, CSVFormat) - parse(String, CSVFormat) - parse(java.net.URL, java.nio.charset.Charset, CSVFormat) - - - Alternatively parsers can also be created by passing a http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true; title="class or interface in java.io">Reader directly to the sole constructor. - - For those who like fluent APIs, parsers can be created using CSVFormat.parse(java.io.Reader) as a shortcut: - - - for(CSVRecord record : CSVFormat.EXCEL.parse(in)) { - ... - } - - - Parsing record wise - - To parse a CSV input from a file, you write: - - - - File csvData = new File(/path/to/csv); - CSVParser parser = CSVParser.parse(csvData, CSVFormat.RFC4180); - for (CSVRecord csvRecord : parser) { - ... - } - - - - This will read the parse the contents of the file using the - http://tools.ietf.org/html/rfc4180; target="_blank">RFC 4180 format. - - - - To parse CSV input in a format like Excel, you write: - - - - CSVParser parser = CSVParser.parse(csvData, CSVFormat.EXCEL); - for (CSVRecord csvRecord : parser) { - ... - } - - - - If the predefined formats don't match the format at hands, custom formats can be defined. More information about - customising CSVFormats is available in CSVFormat JavaDoc. - - - Parsing into memory - - If parsing record wise is not desired, the contents of the input can be read completely into memory. - - - - Reader in = new StringReader(a;b\nc;d); - CSVParser parser = new CSVParser(in, CSVFormat.EXCEL); - ListCSVRecord list = parser.getRecords(); - - - - There are two constraints that have to be kept in mind: - - - - Parsing into memory starts at the current position of the parser. If you have
svn commit: r989464 [24/46] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/resources/ apido
Modified: websites/production/commons/content/proper/commons-csv/jacoco/jacoco.csv == --- websites/production/commons/content/proper/commons-csv/jacoco/jacoco.csv (original) +++ websites/production/commons/content/proper/commons-csv/jacoco/jacoco.csv Sun May 29 02:24:04 2016 @@ -1,16 +1,16 @@ -GROUP,PACKAGE,CLASS,INSTRUCTION_MISSED,INSTRUCTION_COVERED,BRANCH_MISSED,BRANCH_COVERED,LINE_MISSED,LINE_COVERED,COMPLEXITY_MISSED,COMPLEXITY_COVERED,METHOD_MISSED,METHOD_COVERED -Apache Commons CSV,org.apache.commons.csv,Constants,3,4,0,0,1,1,1,1,1,1 -Apache Commons CSV,org.apache.commons.csv,ExtendedBufferedReader,0,191,1,31,0,45,1,25,0,10 -Apache Commons CSV,org.apache.commons.csv,CSVPrinter.new Object() {...},4,29,0,0,0,1,0,1,0,1 -Apache Commons CSV,org.apache.commons.csv,CSVRecord,29,222,1,25,2,40,2,30,1,18 -Apache Commons CSV,org.apache.commons.csv,Token,17,23,0,0,1,7,1,2,1,2 -Apache Commons CSV,org.apache.commons.csv,Assertions,3,17,0,2,2,3,1,2,1,1 -Apache Commons CSV,org.apache.commons.csv,CSVParser,29,410,5,51,2,90,5,40,0,15 -Apache Commons CSV,org.apache.commons.csv,QuoteMode,5,53,0,0,0,5,1,3,1,3 -Apache Commons CSV,org.apache.commons.csv,CSVFormat.Predefined,0,101,0,0,0,12,0,5,0,5 -Apache Commons CSV,org.apache.commons.csv,Lexer,52,537,9,111,8,124,9,74,0,20 -Apache Commons CSV,org.apache.commons.csv,Token.Type,5,63,0,0,0,6,1,3,1,3 -Apache Commons CSV,org.apache.commons.csv,CSVFormat,122,1548,32,134,21,209,30,118,0,65 -Apache Commons CSV,org.apache.commons.csv,CSVParser.new Object() {...},5,35,0,0,0,1,0,1,0,1 -Apache Commons CSV,org.apache.commons.csv,CSVParser.new Iterator() {...},6,63,0,12,2,17,0,11,0,5 -Apache Commons CSV,org.apache.commons.csv,CSVPrinter,44,643,11,123,6,163,9,75,0,15 +GROUP,PACKAGE,CLASS,INSTRUCTION_MISSED,INSTRUCTION_COVERED,BRANCH_MISSED,BRANCH_COVERED,LINE_MISSED,LINE_COVERED,COMPLEXITY_MISSED,COMPLEXITY_COVERED,METHOD_MISSED,METHOD_COVERED +Apache Commons CSV,org.apache.commons.csv,CSVRecord,34,217,1,25,2,37,3,29,2,17 +Apache Commons CSV,org.apache.commons.csv,CSVFormat,175,1938,46,227,30,306,38,172,0,72 +Apache Commons CSV,org.apache.commons.csv,Lexer,52,537,9,111,8,124,9,74,0,20 +Apache Commons CSV,org.apache.commons.csv,CSVPrinter,32,266,10,35,5,68,8,27,0,12 +Apache Commons CSV,org.apache.commons.csv,Constants,3,4,0,0,1,1,1,1,1,1 +Apache Commons CSV,org.apache.commons.csv,CSVParser.new Iterator() {...},6,63,0,12,2,17,0,11,0,5 +Apache Commons CSV,org.apache.commons.csv,CSVParser,29,410,5,51,2,89,5,40,0,15 +Apache Commons CSV,org.apache.commons.csv,CSVParser.new Object() {...},5,35,0,0,0,1,0,1,0,1 +Apache Commons CSV,org.apache.commons.csv,QuoteMode,5,53,0,0,0,5,1,3,1,3 +Apache Commons CSV,org.apache.commons.csv,Token.Type,5,63,0,0,0,6,1,3,1,3 +Apache Commons CSV,org.apache.commons.csv,Token,17,23,0,0,1,7,1,2,1,2 +Apache Commons CSV,org.apache.commons.csv,CSVFormat.new Object() {...},4,29,0,0,0,1,0,1,0,1 +Apache Commons CSV,org.apache.commons.csv,Assertions,3,17,0,2,2,3,1,2,1,1 +Apache Commons CSV,org.apache.commons.csv,ExtendedBufferedReader,0,191,1,31,0,45,1,25,0,10 +Apache Commons CSV,org.apache.commons.csv,CSVFormat.Predefined,0,101,0,0,0,12,0,5,0,5 Modified: websites/production/commons/content/proper/commons-csv/jacoco/jacoco.xml == --- websites/production/commons/content/proper/commons-csv/jacoco/jacoco.xml (original) +++ websites/production/commons/content/proper/commons-csv/jacoco/jacoco.xml Sun May 29 02:24:04 2016 @@ -1 +1 @@ [... 5 lines stripped ...] Added: websites/production/commons/content/proper/commons-csv/jacoco/org.apache.commons.csv/CSVFormat$1.html == --- websites/production/commons/content/proper/commons-csv/jacoco/org.apache.commons.csv/CSVFormat$1.html (added) +++ websites/production/commons/content/proper/commons-csv/jacoco/org.apache.commons.csv/CSVFormat$1.html Sun May 29 02:24:04 2016 @@ -0,0 +1 @@ +http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>http://www.w3.org/1999/xhtml; lang="en">CSVFormat.new Object() {...}SessionsApache Commons CSV org.apache.commons.csv CSVFormat.new Object() {...}CSVFormat.new Object() {...}ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsTotal4 of 3388%0 of 0n/a010101static {...}88%n/a010101Created with http://www.eclemma.org/jacoco;>JaCoCo 0.7.6.201602180812 \ No newline at end of file Modified: websites/production/commons/content/proper/commons-csv/jacoco/org.apache.commons.csv/CSVFormat$Predefined.html == --- websites/production/commons/content/proper/commons-csv/jacoco/org.apache.commons.csv/CSVFormat$Predefined.html (original) +++ websites/production/commons/content/proper/commons-csv/jacoco/org.apache.commons.csv/CSVFormat$Predefined.html Sun May
svn commit: r989464 [26/46] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/resources/ apido
Modified: websites/production/commons/content/proper/commons-csv/jacoco/org.apache.commons.csv/CSVFormat.java.html == --- websites/production/commons/content/proper/commons-csv/jacoco/org.apache.commons.csv/CSVFormat.java.html (original) +++ websites/production/commons/content/proper/commons-csv/jacoco/org.apache.commons.csv/CSVFormat.java.html Sun May 29 02:24:04 2016 @@ -19,11 +19,13 @@ package org.apache.commons.csv; import static org.apache.commons.csv.Constants.BACKSLASH; import static org.apache.commons.csv.Constants.COMMA; +import static org.apache.commons.csv.Constants.COMMENT; import static org.apache.commons.csv.Constants.CR; import static org.apache.commons.csv.Constants.CRLF; import static org.apache.commons.csv.Constants.DOUBLE_QUOTE_CHAR; import static org.apache.commons.csv.Constants.LF; import static org.apache.commons.csv.Constants.PIPE; +import static org.apache.commons.csv.Constants.SP; import static org.apache.commons.csv.Constants.TAB; import java.io.IOException; @@ -144,7 +146,7 @@ import java.util.Set; * This class is immutable. * /p * - * @version $Id: CSVFormat.java 1742506 2016-05-06 07:07:43Z britter $ + * @version $Id: CSVFormat.java 1745258 2016-05-23 20:24:33Z ggregory $ */ public final class CSVFormat implements Serializable { @@ -153,50 +155,50 @@ public final class CSVFormat implements * * @since 1.2 */ -public enum Predefined { +public enum Predefined { /** * @see CSVFormat#DEFAULT */ -Default(CSVFormat.DEFAULT), +Default(CSVFormat.DEFAULT), /** * @see CSVFormat#EXCEL */ -Excel(CSVFormat.EXCEL), +Excel(CSVFormat.EXCEL), /** * @see CSVFormat#INFORMIX_UNLOAD * @since 1.3 */ - InformixUnload(CSVFormat.INFORMIX_UNLOAD), + InformixUnload(CSVFormat.INFORMIX_UNLOAD), /** * @see CSVFormat#INFORMIX_UNLOAD_CSV * @since 1.3 */ - InformixUnloadCsv(CSVFormat.INFORMIX_UNLOAD_CSV), + InformixUnloadCsv(CSVFormat.INFORMIX_UNLOAD_CSV), /** * @see CSVFormat#MYSQL */ -MySQL(CSVFormat.MYSQL), +MySQL(CSVFormat.MYSQL), /** * @see CSVFormat#RFC4180 */ -RFC4180(CSVFormat.RFC4180), +RFC4180(CSVFormat.RFC4180), /** * @see CSVFormat#TDF */ -TDF(CSVFormat.TDF); +TDF(CSVFormat.TDF); private final CSVFormat format; -Predefined(final CSVFormat format) { -this.format = format; -} +Predefined(final CSVFormat format) { +this.format = format; +} /** * Gets the format. @@ -204,7 +206,7 @@ public final class CSVFormat implements * @return the format. */ public CSVFormat getFormat() { -return format; +return format; } } @@ -223,7 +225,7 @@ public final class CSVFormat implements * * @see Predefined#Default */ -public static final CSVFormat DEFAULT = new CSVFormat(COMMA, DOUBLE_QUOTE_CHAR, null, null, null, false, true, CRLF, +public static final CSVFormat DEFAULT = new CSVFormat(COMMA, DOUBLE_QUOTE_CHAR, null, null, null, false, true, CRLF, null, null, null, false, false, false, false, false); /** @@ -255,7 +257,7 @@ public final class CSVFormat implements * * @see Predefined#Excel */ -public static final CSVFormat EXCEL = DEFAULT.withIgnoreEmptyLines(false).withAllowMissingColumnNames(); +public static final CSVFormat EXCEL = DEFAULT.withIgnoreEmptyLines(false).withAllowMissingColumnNames(); /** * Default Informix CSV UNLOAD format used by the {@code UNLOAD TO file_name} operation. @@ -281,11 +283,11 @@ public final class CSVFormat implements * http://www.ibm.com/support/knowledgecenter/SSBJG3_2.5.0/com.ibm.gen_busug.doc/c_fgl_InOutSql_UNLOAD.htm/a; * @since 1.3 */ -public static final CSVFormat INFORMIX_UNLOAD = DEFAULT.withDelimiter(PIPE).withEscape(BACKSLASH) - .withQuote(DOUBLE_QUOTE_CHAR).withRecordSeparator(LF); +public static final CSVFormat INFORMIX_UNLOAD = DEFAULT.withDelimiter(PIPE).withEscape(BACKSLASH) +.withQuote(DOUBLE_QUOTE_CHAR).withRecordSeparator(LF); /** - * Default Informix CSV UNLOAD format used by the {@code UNLOAD TO file_name} operation. + * Default Informix CSV UNLOAD format used by the {@code UNLOAD TO file_name} operation (escaping is disabled.) * * p * This is a comma-delimited format with a LF character as the line separator. Values are not quoted and special @@ -307,8 +309,8 @@ public final class CSVFormat implements *
svn commit: r989464 [25/46] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/resources/ apido
Modified: websites/production/commons/content/proper/commons-csv/jacoco/org.apache.commons.csv/CSVFormat.html == --- websites/production/commons/content/proper/commons-csv/jacoco/org.apache.commons.csv/CSVFormat.html (original) +++ websites/production/commons/content/proper/commons-csv/jacoco/org.apache.commons.csv/CSVFormat.html Sun May 29 02:24:04 2016 @@ -1 +1 @@ -http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>http://www.w3.org/1999/xhtml; lang="en">CSVFormatSessionsApache Commons CSV org.apache.commons.csv CSVFormatCSVFormatElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsTotal122 of 1,67093%32 of 16681%3014821230065toString()56%65%73101hashCode()84%50%101101501equals(Object)89%81%72574501format(Object[])71%n/a012501validate()97%97%11712101toStringArray(Object[])94%83%140701isNullStringSet()71%50%120101withHeader(ResultSet)89%50%120101static {...}100% n/a0101001CSVFormat(char, Character, QuoteMode, Character, Character, boolean, boolean, String, String, Object[], String[], boolean, boolean, boolean, boolean, boolean)100%100%0201901withCo mmentMarker(Character)100%100%020301withDelimiter(char)100%100%020< /td>301withEscape(Character)100%100%020301withQuote(Character)100%100%020301withAllowMissingColumnNames(boolean)100%n/a010101withHeader(String[])100%n/a010101withHeaderComments(Object[])100%n/a010101withIgnoreEmptyLines(boolean)100%n/a010101withIgnoreHeaderCase(boolean)100%n/a010101withIgnoreSurroundingSpaces(boolean)100%n/a010101withNullString(String)100%n/a010101withQuoteMode(QuoteMode)100%n/a010101withRecordSeparator(String)100%n/a010101withSkipHeaderRecord(boolean)100%n/a010101withTrailingDelimiter(boolean)100%n/a010101w ithTrim(boolean)100%n/a010101withHeader(Class)100%75%130701withHeader(ResultSetMetaData)100%75%130701newFormat(char)100%n/a010101isLineBreak(char)100%100%030101isLineBreak(Character)100%100%030101getHeader()100%100%020101getHeaderComments()100%100%020101isCommentMarkerSet()100%100%020101isEscapeCharacterSet()100%100%020101isQuoteCharacterSet()100%width="5" height="10" title="2" alt="2"/>id="e11">100%0id="g20">20id="i35">10id="k35">1class="el_method">parse(Reader)src="../.resources/greenbar.gif" width="3" height="10" title="6" >alt="6"/>100%id="d36"/>n/aid="f36">01id="h36">01id="j36">01href="CSVFormat.java.html#L860" >class="el_method">print(Appendable)src="../.resources/greenbar .gif" width="3" height="10" title="6" alt="6"/>100%n/a010101withFirstRecordAsHeader()100%n/a010101withCommentMarker(char)100%n/a010101withEscape(char)100%n/a010101withQuote(char)100%n/a010101withRecordSeparator(char)100%n/a010101valueOf(String)100%n/a010101withAllowMissingColumnNames()100%n/a010101withIgnoreEmptyLines()100%n/a010101withIgnoreHeaderCase()100%n/a010101withIgnoreSurroundingSpaces()100%n/a010101withSkipHeaderRecord()100%n/a010101withTrailingDelimiter()100%n/a010101withTrim()100%n/a010101getAllowMissingColumnNames()100%n/a010101getCommentMarker()100%n/a010101getDelimiter()100%n/a010101getEscapeCharacter()100%n/a010101getIgnoreEmptyLines()100%n/a010101getIgnoreHeaderCase()100%n/a010101getIgnoreSurroundingSpaces() 100%n/a010101getNullString()100%n/a010101getQuoteCharacter()100%n/a010101getQuoteMode()100%n/a010101getRecordSeparator()< td class="bar" id="b61">100%n/a010101getSkipHeaderRecord()100%n/a010101getTrailingDelimiter() 100%n/a010101getTrim()100%n/a010101Created with http://www.eclemma.org/j acoco">JaCoCo 0.7.6.201602180812 \ No newline at end of file +http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>http://www.w3.org/1999/xhtml; lang="en">CSVFormatSessionsApache Commons CSV org.apache.commons.csv CSVFormatCSVFormatElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsTotal175 of 2,11392%46 of 27383%3821030336072toString()56%65%73101trim(CharSequence)15%7%7881001hashCode()84%50%101101501equals(Object)89%81%72574501printAndQuote(Object, CharSequence, int, int, Appendable, boolean)94%98%12815301format(Object[])71%n/a012501validate()97%97%11712001toStringArray(Object[])94%83%140701isNullStringSet()71%50%120101withHeader(ResultSet)89%50%120101printAndEscape(CharSequence, int, int, Appendable)100%100%01002201static {...}100%n/a010701CSVFormat(char, Character, QuoteMode, Character, Character, boolean, boolean, String, String, Object[], String[], boolean, boolean, boolean, boolean, boolean)100%100%0201901print(Object, CharSequence, int, int, Appendable, boolean)100%100%0501001withCommentMarker(Character)100%100%020301withDelimiter(char)100%100%020301withEscape(Character)100%100%020301withQuote(Character)100%100%020301print(Object, Appendable, boolean)100%100%050601withAllowMissingColumnNames(boolean)100%n/a010101withHeader(String[])100%n/a010101withHeaderComments(Object[])100%n/a01class="ctr1" id="h21">01id="j21">01href="CSVFormat.java.html#L1533" >class="el_method">withIgnoreEmptyLines(boolean)id="b22">title="35"
svn commit: r989464 [46/46] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/resources/ apido
Modified: websites/production/commons/content/proper/commons-csv/xref/org/apache/commons/csv/ExtendedBufferedReader.html == --- websites/production/commons/content/proper/commons-csv/xref/org/apache/commons/csv/ExtendedBufferedReader.html (original) +++ websites/production/commons/content/proper/commons-csv/xref/org/apache/commons/csv/ExtendedBufferedReader.html Sun May 29 02:24:04 2016 @@ -1,206 +1,206 @@ -http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> -http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> - -ExtendedBufferedReader xref - - - -View Javadoc -1 /* -2* Licensed to the Apache Software Foundation (ASF) under one or more -3* contributor license agreements. See the NOTICE file distributed with -4* this work for additional information regarding copyright ownership. -5* The ASF licenses this file to You under the Apache License, Version 2.0 -6* (the "License"); you may not use this file except in compliance with -7* the License. You may obtain a copy of the License at -8* -9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 -10 * -11 * Unless required by applicable law or agreed to in writing, software -12 * distributed under the License is distributed on an "AS IS" BASIS, -13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -14 * See the License for the specific language governing permissions and -15 * limitations under the License. -16 */ -17 -18 package org.apache.commons.csv; -19 -20 import static org.apache.commons.csv.Constants.CR; -21 import static org.apache.commons.csv.Constants.END_OF_STREAM; -22 import static org.apache.commons.csv.Constants.LF; -23 import static org.apache.commons.csv.Constants.UNDEFINED; -24 -25 import java.io.BufferedReader; -26 import java.io.IOException; -27 import java.io.Reader; -28 -29 /** -30 * A special buffered reader which supports sophisticated read access. -31 * p -32 * In particular the reader supports a look-ahead option, which allows you to see the next char returned by -33 * {@link #read()}. This reader also tracks how many characters have been read with {@link #getPosition()}. -34 * /p -35 * -36 * @version $Id: ExtendedBufferedReader.java 1742468 2016-05-05 20:02:35Z britter $ -37 */ -38 final class ExtendedBufferedReader extends BufferedReader { -39 -40 /** The last char returned */ -41 private int lastChar = UNDEFINED; -42 -43 /** The count of EOLs (CR/LF/CRLF) seen so far */ -44 private long eolCounter; -45 -46 /** The position, which is number of characters read so far */ -47 private long position; -48 -49 private boolean closed; -50 -51 /** -52 * Created extended buffered reader using default buffer-size -53 */ -54 ExtendedBufferedReader(final Reader reader) { -55 super(reader); -56 } -57 -58 @Override -59 public int read() throws IOException { -60 final int current = super.read(); -61 if (current == CR || current == LF lastChar != CR) { -62 eolCounter++; -63 } -64 lastChar = current; -65 this.position++; -66 return lastChar; -67 } -68 -69 /** -70 * Returns the last character that was read as an integer (0 to 65535). This will be the last character returned by -71 * any of the read methods. This will not include a character read using the {@link #lookAhead()} method. If no -72 * character has been read then this will return {@link Constants#UNDEFINED}. If the end of the stream was reached -73 * on the last read then this will return {@link Constants#END_OF_STREAM}. -74 * -75 * @return the last character that was read -76 */ -77 int getLastChar() { -78 return lastChar; -79 } -80 -81 @Override -82 public int read(final char[] buf, final int offset, final int length) throws IOException { -83 if (length == 0) { -84 return 0; -85 } -86 -87 final int len = super.read(buf, offset, length); -88 -89 if (len 0) { -90 -91 for (int i = offset; i offset + len; i++) { -92 final char ch = buf[i]; -93 if (ch == LF) { -94 if (CR != (i 0 ? buf[i - 1] : lastChar)) { -95 eolCounter++; -96 } -97 } else if (ch == CR) { -98 eolCounter++; -99 } -100 } -101 -102 lastChar = buf[offset + len - 1]; -103 -104 } else if (len == -1) { -105 lastChar = END_OF_STREAM; -106 } -107 -108 position += len; -109 return len; -110 }
svn commit: r989464 [43/46] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/resources/ apido
Modified: websites/production/commons/content/proper/commons-csv/xref/org/apache/commons/csv/CSVFormat.html == --- websites/production/commons/content/proper/commons-csv/xref/org/apache/commons/csv/CSVFormat.html (original) +++ websites/production/commons/content/proper/commons-csv/xref/org/apache/commons/csv/CSVFormat.html Sun May 29 02:24:04 2016 @@ -1,1519 +1,1780 @@ -http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> -http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> - -CSVFormat xref - - - -View Javadoc -1 /* -2* Licensed to the Apache Software Foundation (ASF) under one or more -3* contributor license agreements. See the NOTICE file distributed with -4* this work for additional information regarding copyright ownership. -5* The ASF licenses this file to You under the Apache License, Version 2.0 -6* (the "License"); you may not use this file except in compliance with -7* the License. You may obtain a copy of the License at -8* -9* http://www.apache.org/licenses/LICENSE-2.; target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0 -10 * -11 * Unless required by applicable law or agreed to in writing, software -12 * distributed under the License is distributed on an "AS IS" BASIS, -13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -14 * See the License for the specific language governing permissions and -15 * limitations under the License. -16 */ -17 -18 package org.apache.commons.csv; -19 -20 import static org.apache.commons.csv.Constants.BACKSLASH; -21 import static org.apache.commons.csv.Constants.COMMA; -22 import static org.apache.commons.csv.Constants.CR; -23 import static org.apache.commons.csv.Constants.CRLF; -24 import static org.apache.commons.csv.Constants.DOUBLE_QUOTE_CHAR; -25 import static org.apache.commons.csv.Constants.LF; -26 import static org.apache.commons.csv.Constants.PIPE; -27 import static org.apache.commons.csv.Constants.TAB; -28 -29 import java.io.IOException; -30 import java.io.Reader; -31 import java.io.Serializable; -32 import java.io.StringWriter; -33 import java.sql.ResultSet; -34 import java.sql.ResultSetMetaData; -35 import java.sql.SQLException; -36 import java.util.Arrays; -37 import java.util.HashSet; -38 import java.util.Set; -39 -40 /** -41 * Specifies the format of a CSV file and parses input. -42 * -43 * h2Using predefined formats/h2 -44 * -45 * p -46 * You can use one of the predefined formats: -47 * /p -48 * -49 * ul -50 * li{@link #DEFAULT}/li -51 * li{@link #EXCEL}/li -52 * li{@link #MYSQL}/li -53 * li{@link #RFC4180}/li -54 * li{@link #TDF}/li -55 * /ul -56 * -57 * p -58 * For example: -59 * /p -60 * -61 * pre -62 * CSVParser parser = CSVFormat.EXCEL.parse(reader); -63 * /pre -64 * -65 * p -66 * The {@link CSVParser} provides static methods to parse other input types, for example: -67 * /p -68 * -69 * pre -70 * CSVParser parser = CSVParser.parse(file, StandardCharsets.US_ASCII, CSVFormat.EXCEL); -71 * /pre -72 * -73 * h2Defining formats/h2 -74 * -75 * p -76 * You can extend a format by calling the {@code with} methods. For example: -77 * /p -78 * -79 * pre -80 * CSVFormat.EXCEL.withNullString(quot;N/Aquot;).withIgnoreSurroundingSpaces(true); -81 * /pre -82 * -83 * h2Defining column names/h2 -84 * -85 * p -86 * To define the column names you want to use to access records, write: -87 * /p -88 * -89 * pre -90 * CSVFormat.EXCEL.withHeader(quot;Col1quot;, quot;Col2quot;, quot;Col3quot;); -91 * /pre -92 * -93 * p -94 * Calling {@link #withHeader(String...)} let's you use the given names to address values in a {@link CSVRecord}, and -95 * assumes that your CSV source does not contain a first record that also defines column names. -96 * -97 * If it does, then you are overriding this metadata with your names and you should skip the first record by calling -98 * {@link #withSkipHeaderRecord(boolean)} with {@code true}. -99 * /p -100 * -101 * h2Parsing/h2 -102 * -103 * p -104 * You can use a format directly to parse a reader. For example, to parse an Excel file with columns header, write: -105 * /p -106 * -107 * pre -108 * Reader in = ...; -109 * CSVFormat.EXCEL.withHeader(quot;Col1quot;, quot;Col2quot;, quot;Col3quot;).parse(in); -110 * /pre -111 * -112 * p -113 * For other input types, like resources, files, and URLs, use the static methods on {@link CSVParser}. -114 * /p -115 * -116 * h2Referencing columns safely/h2 -117 * -118 * p -119 * If your source contains a header record, you can simplify your code and safely reference columns, by using -120 * {@link #withHeader(String...)} with no arguments: -121 * /p -122 * -123 * pre -124 * CSVFormat.EXCEL.withHeader(); -125 * /pre
svn commit: r989464 [22/46] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/resources/ apido
Modified: websites/production/commons/content/proper/commons-csv/issue-tracking.html == --- websites/production/commons/content/proper/commons-csv/issue-tracking.html (original) +++ websites/production/commons/content/proper/commons-csv/issue-tracking.html Sun May 29 02:24:04 2016 @@ -1,430 +1,438 @@ - - -http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> - - - - - - -Commons CSV Commons CSV Issue tracking - - - - - - - - - - - - - -window.onload=function() { - prettyPrint(); - } - - - - http://commons.apache.org/; id="bannerLeft" title="Apache Commons logo"> - - - - - - - - - - - http://commons.apache.org/proper/commons-csv/;>Apache Commons CSV - - -Last Published: 09 May 2016 - | Version: 1.3 - - - - http://www.apachecon.com/; class="externalLink" title="ApacheCon"> -ApacheCon - - - http://www.apache.org; class="externalLink" title="Apache"> -Apache - - - -Commons - - - - - - - - - - - - - - Commons CSV - - -Overview - - - -Download - - - -User Guide - - - http://wiki.apache.org/commons/CSV; class="externalLink" title="Wiki"> -Wiki - - - -Development - - -History - - - -Mailing Lists - - - -Issue Tracking - - - -Team - - - -Source Repository - - - -Javadoc trunk - - - -Javadoc 1.3 - - - -Javadoc 1.2 - - - -Javadoc 1.1 - - - -Javadoc 1.0 - - - - Site Archives - - -CSV 1.3 - - - -CSV 1.2 - - - -CSV 1.1 - - - -CSV 1.0 - - - -Project Documentation - - -Project Information - - - -About - - - -Summary - - - -Team - - - -Source Code Management - - - -Issue Management - - - -Mailing Lists - - - -Dependency Information - - - -Dependencies - - - -Dependency Convergence - - - -CI Management - - - -Distribution Management - - - -
svn commit: r989464 [7/46] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/resources/ apidoc
Modified: websites/production/commons/content/proper/commons-csv/apidocs/org/apache/commons/csv/CSVRecord.html == --- websites/production/commons/content/proper/commons-csv/apidocs/org/apache/commons/csv/CSVRecord.html (original) +++ websites/production/commons/content/proper/commons-csv/apidocs/org/apache/commons/csv/CSVRecord.html Sun May 29 02:24:04 2016 @@ -1,39 +1,25 @@ http://www.w3.org/TR/html4/loose.dtd;> - + - -CSVRecord (Apache Commons CSV 1.3 API) +CSVRecord (Apache Commons CSV 1.4 API) - -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}; -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"; JavaScript is disabled on your browser. - + - -Skip navigation links - + @@ -48,15 +34,15 @@ var activeTableTab = "activeTableTab"; -PrevClass -NextClass +Prev Class +Next Class Frames -NoFrames +No Frames -AllClasses +All Classes