You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2014/05/04 18:08:56 UTC
svn commit: r1592365 - in
/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv:
CSVFormat.java CSVParser.java CSVPrinter.java
Author: britter
Date: Sun May 4 16:08:56 2014
New Revision: 1592365
URL: http://svn.apache.org/r1592365
Log:
Fix JavaDoc errors
Modified:
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java
Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java?rev=1592365&r1=1592364&r2=1592365&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java (original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java Sun May 4 16:08:56 2014
@@ -36,7 +36,7 @@ import java.util.Set;
/**
* Specifies the format of a CSV file and parses input.
*
- * <h4>Using predefined formats</h4>
+ * <h2>Using predefined formats</h2>
*
* <p>
* You can use one of the predefined formats:
@@ -64,7 +64,7 @@ import java.util.Set;
*
* <pre>CSVParser parser = CSVFormat.parseFile(file, CSVFormat.EXCEL);</pre>
*
- * <h4>Defining formats</h4>
+ * <h2>Defining formats</h2>
*
* <p>
* You can extend a format by calling the {@code with} methods. For example:
@@ -76,7 +76,7 @@ import java.util.Set;
* .withIgnoreSurroundingSpaces(true);
* </pre>
*
- * <h4>Defining column names</h4>
+ * <h2>Defining column names</h2>
*
* <p>
* To define the column names you want to use to access records, write:
@@ -94,7 +94,7 @@ import java.util.Set;
* {@link #withSkipHeaderRecord(boolean)} with {@code true}.
* </p>
*
- * <h4>Parsing</h4>
+ * <h2>Parsing</h2>
*
* <p>
* You can use a format directly to parse a reader. For example, to parse an Excel file with columns header, write:
@@ -109,7 +109,7 @@ import java.util.Set;
* For other input types, like resources, files, and URLs, use the static methods on {@link CSVParser}.
* </p>
*
- * <h4>Referencing columns safely</h4>
+ * <h2>Referencing columns safely</h2>
*
* <p>
* If your source contains a header record, you can simplify your code and safely reference columns,
@@ -134,7 +134,7 @@ import java.util.Set;
* This makes your code impervious to changes in column order in the CSV file.
* </p>
*
- * <h4>Notes</h4>
+ * <h2>Notes</h2>
*
* <p>
* This class is immutable.
@@ -188,13 +188,18 @@ public final class CSVFormat implements
/**
* Excel file format (using a comma as the value delimiter). Note that the actual value delimiter used by Excel is
* locale dependent, it might be necessary to customize this format to accommodate to your regional settings.
- * <p/>
+ *
+ * <p>
* For example for parsing or generating a CSV file on a French system the following format will be used:
+ * </p>
*
* <pre>
* CSVFormat fmt = CSVFormat.newBuilder(EXCEL).withDelimiter(';');
* </pre>
+ *
+ * <p>
* Settings are:
+ * </p>
* <ul>
* <li>withDelimiter(',')</li>
* <li>withQuoteChar('"')</li>
Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java?rev=1592365&r1=1592364&r2=1592365&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java (original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java Sun May 4 16:08:56 2014
@@ -44,15 +44,15 @@ import java.util.NoSuchElementException;
*
* The parser works record wise. It is not possible to go back, once a record has been parsed from the input stream.
*
- * <h4>Creating instances</h4>
- * There are several static factory methods that can be used to create instances for various types of resources:
+ * <h2>Creating instances</h2>
* <p>
+ * There are several static factory methods that can be used to create instances for various types of resources:
+ * </p>
* <ul>
* <li>{@link #parse(java.io.File, CSVFormat)}</li>
* <li>{@link #parse(String, CSVFormat)}</li>
* <li>{@link #parse(java.net.URL, java.nio.charset.Charset, CSVFormat)}</li>
* </ul>
- * </p>
* <p>
* Alternatively parsers can also be created by passing a {@link Reader} directly to the sole constructor.
*
@@ -64,7 +64,7 @@ import java.util.NoSuchElementException;
* }
* </pre>
*
- * <h4>Parsing record wise</h4>
+ * <h2>Parsing record wise</h2>
* <p>
* To parse a CSV input from a file, you write:
* </p>
@@ -98,7 +98,7 @@ import java.util.NoSuchElementException;
* customising CSVFormats is available in {@link CSVFormat CSVFormat JavaDoc}.
* </p>
*
- * <h4>Parsing into memory</h4>
+ * <h2>Parsing into memory</h2>
* <p>
* If parsing record wise is not desired, the contents of the input can be read completely into memory.
* </p>
@@ -113,16 +113,14 @@ import java.util.NoSuchElementException;
* There are two constraints that have to be kept in mind:
* </p>
*
- * <p>
* <ol>
* <li>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.</li>
* <li>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.</li>
* </ol>
- * </p>
*
- * <h4>Notes</h4>
+ * <h2>Notes</h2>
* <p>
* Internal parser state is completely covered by the format and the reader-state.
* </p>
@@ -268,8 +266,10 @@ public final class CSVParser implements
/**
* Returns the current line number in the input stream.
- * <p/>
- * ATTENTION: If your CSV input has multi-line values, the returned number does not correspond to the record number.
+ *
+ * <p>
+ * <strong>ATTENTION:</strong> If your CSV input has multi-line values, the returned number does not correspond to the record number.
+ * </p>
*
* @return current line number
*/
@@ -290,8 +290,10 @@ public final class CSVParser implements
/**
* Returns the current record number in the input stream.
- * <p/>
- * ATTENTION: If your CSV input has multi-line values, the returned number does not correspond to the line number.
+ *
+ * <p>
+ * <strong>ATTENTION:</strong> If your CSV input has multi-line values, the returned number does not correspond to the line number.
+ * </p>
*
* @return current line number
*/
@@ -302,8 +304,10 @@ public final class CSVParser implements
/**
* Parses the CSV input according to the given format and returns the content as a list of
* {@link CSVRecord CSVRecords}.
- * <p/>
+ *
+ * <p>
* The returned content starts at the current parse-position in the stream.
+ * </p>
*
* @return list of {@link CSVRecord CSVRecords}, may be empty
* @throws IOException
@@ -316,11 +320,14 @@ public final class CSVParser implements
/**
* Parses the CSV input according to the given format and adds the content to the collection of {@link CSVRecord
* CSVRecords}.
- * <p/>
+ *
+ * <p>
* The returned content starts at the current parse-position in the stream.
- *
+ * </p>
+ *
* @param records
* The collection to add to.
+ * @param <T> the type of collection used.
* @return a collection of {@link CSVRecord CSVRecords}, may be empty
* @throws IOException
* on parse error or input read-failure
Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java?rev=1592365&r1=1592364&r2=1592365&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java (original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java Sun May 4 16:08:56 2014
@@ -44,9 +44,10 @@ public final class CSVPrinter implements
/**
* Creates a printer that will print values to the given stream following the CSVFormat.
- * <p/>
+ * <p>
* Currently, only a pure encapsulation format or a pure escaping format is supported. Hybrid formats
* (encapsulation and escaping with a different character) are not supported.
+ * </p>
*
* @param out
* stream to which to print. Must not be null.
@@ -275,10 +276,13 @@ public final class CSVPrinter implements
}
/**
- * Prints a comment on a new line among the delimiter separated values. Comments will always begin on a new line
- * and occupy a least one full line. The character specified to start comments and a space will be inserted at the
- * beginning of each new line in the comment.
- * <p/>
+ * Prints a comment on a new line among the delimiter separated values.
+ *
+ * <p>
+ * Comments will always begin on a new line and occupy a least one full line. The character specified to start
+ * comments and a space will be inserted at the beginning of each new line in the comment.
+ * </p>
+ *
* If comments are disabled in the current CSV format this method does nothing.
*
* @param comment