Remove trailing white spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458683 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dca481f79c
commit
374cd7b16d
|
@ -129,7 +129,7 @@ public class CSVFormat implements Serializable {
|
|||
*
|
||||
* @param delimiter
|
||||
* the char used for value separation, must not be a line break character
|
||||
* @return a new CSV format builder.
|
||||
* @return a new CSV format builder.
|
||||
* @throws IllegalArgumentException if the delimiter is a line break character
|
||||
*/
|
||||
public static CSVFormatBuilder newBuilder(final char delimiter) {
|
||||
|
|
|
@ -26,8 +26,8 @@ import static org.apache.commons.csv.Token.Type.TOKEN;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
final class CSVLexer extends Lexer {
|
||||
|
|
|
@ -65,7 +65,7 @@ import java.util.NoSuchElementException;
|
|||
* <p>
|
||||
* see <a href="package-summary.html">package documentation</a> for more details
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CSVParser implements Iterable<CSVRecord> {
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.sql.SQLException;
|
|||
|
||||
/**
|
||||
* Prints values in a CSV format.
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CSVPrinter implements Flushable, Closeable {
|
||||
|
@ -48,7 +48,7 @@ public class CSVPrinter implements Flushable, Closeable {
|
|||
* <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.
|
||||
*
|
||||
*
|
||||
* @param out
|
||||
* stream to which to print.
|
||||
* @param format
|
||||
|
@ -75,7 +75,7 @@ public class CSVPrinter implements Flushable, Closeable {
|
|||
|
||||
/**
|
||||
* Flushes the underlying stream.
|
||||
*
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public void flush() throws IOException {
|
||||
|
@ -87,7 +87,7 @@ public class CSVPrinter implements Flushable, Closeable {
|
|||
/**
|
||||
* Prints a single line of delimiter separated values. The values will be quoted if needed. Quotes and newLine
|
||||
* characters will be escaped.
|
||||
*
|
||||
*
|
||||
* @param values
|
||||
* values to output.
|
||||
*/
|
||||
|
@ -101,7 +101,7 @@ public class CSVPrinter implements Flushable, Closeable {
|
|||
/**
|
||||
* Prints a single line of delimiter separated values. The values will be quoted if needed. Quotes and newLine
|
||||
* characters will be escaped.
|
||||
*
|
||||
*
|
||||
* @param values
|
||||
* values to output.
|
||||
*/
|
||||
|
@ -118,7 +118,7 @@ public class CSVPrinter implements Flushable, Closeable {
|
|||
* beginning of each new line in the comment.
|
||||
* <p/>
|
||||
* If comments are disabled in the current CSV format this method does nothing.
|
||||
*
|
||||
*
|
||||
* @param comment
|
||||
* the comment to output
|
||||
*/
|
||||
|
@ -297,7 +297,7 @@ public class CSVPrinter implements Flushable, Closeable {
|
|||
out.append(value, start, end);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// we hit something that needed encapsulation
|
||||
out.append(quoteChar);
|
||||
|
||||
|
@ -324,7 +324,7 @@ public class CSVPrinter implements Flushable, Closeable {
|
|||
|
||||
/**
|
||||
* Prints the string as the next value on the line. The value will be escaped or encapsulated as needed.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* value to be output.
|
||||
* @throws IOException
|
||||
|
@ -338,7 +338,7 @@ public class CSVPrinter implements Flushable, Closeable {
|
|||
|
||||
/**
|
||||
* Prints all the objects in the given array.
|
||||
*
|
||||
*
|
||||
* @param values
|
||||
* the values to print.
|
||||
* @throws IOException
|
||||
|
@ -358,7 +358,7 @@ public class CSVPrinter implements Flushable, Closeable {
|
|||
|
||||
/**
|
||||
* Prints all the objects in the given collection.
|
||||
*
|
||||
*
|
||||
* @param values
|
||||
* the values to print.
|
||||
* @throws IOException
|
||||
|
@ -378,7 +378,7 @@ public class CSVPrinter implements Flushable, Closeable {
|
|||
|
||||
/**
|
||||
* Prints all the objects in the given JDBC result set.
|
||||
*
|
||||
*
|
||||
* @param resultSet result set
|
||||
* the values to print.
|
||||
* @throws IOException
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* A CSV record
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CSVRecord implements Serializable, Iterable<String> {
|
||||
|
@ -41,7 +41,7 @@ public class CSVRecord implements Serializable, Iterable<String> {
|
|||
|
||||
/** The accumulated comments (if any) */
|
||||
private final String comment;
|
||||
|
||||
|
||||
/** The record number. */
|
||||
private final long recordNumber;
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class CSVRecord implements Serializable, Iterable<String> {
|
|||
|
||||
/**
|
||||
* Checks whether a given column is mapped.
|
||||
*
|
||||
*
|
||||
* @param name
|
||||
* the name of the column to be retrieved.
|
||||
* @return whether a given columns is mapped.
|
||||
|
@ -89,10 +89,10 @@ public class CSVRecord implements Serializable, Iterable<String> {
|
|||
public boolean isMapped(final String name) {
|
||||
return mapping != null ? mapping.containsKey(name) : false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks whether a given columns is mapped and has a value.
|
||||
*
|
||||
*
|
||||
* @param name
|
||||
* the name of the column to be retrieved.
|
||||
* @return whether a given columns is mapped.
|
||||
|
@ -100,7 +100,7 @@ public class CSVRecord implements Serializable, Iterable<String> {
|
|||
public boolean isSet(final String name) {
|
||||
return isMapped(name) && mapping.get(name).intValue() < values.length;
|
||||
}
|
||||
|
||||
|
||||
public Iterator<String> iterator() {
|
||||
return Arrays.asList(values).iterator();
|
||||
}
|
||||
|
|
|
@ -19,19 +19,19 @@ package org.apache.commons.csv;
|
|||
|
||||
/**
|
||||
* Constants for this package.
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
final class Constants {
|
||||
|
||||
|
||||
static final char BACKSPACE = '\b';
|
||||
static final char COMMA = ',';
|
||||
|
||||
|
||||
/**
|
||||
* Starts a comment, the remainder of the line is the comment.
|
||||
*/
|
||||
static final char COMMENT = '#';
|
||||
|
||||
|
||||
static final char CR = '\r';
|
||||
static final Character DOUBLE_QUOTE_CHAR = Character.valueOf('"');
|
||||
static final char BACKSLASH = '\\';
|
||||
|
@ -40,13 +40,13 @@ final class Constants {
|
|||
static final char SP = ' ';
|
||||
static final char TAB = '\t';
|
||||
static final String EMPTY = "";
|
||||
|
||||
|
||||
/** The end of stream symbol */
|
||||
static final int END_OF_STREAM = -1;
|
||||
|
||||
/** Undefined state for the lookahead char */
|
||||
static final int UNDEFINED = -2;
|
||||
|
||||
|
||||
/** According to RFC 4180, line breaks are delimited by CRLF */
|
||||
static final String CRLF = "\r\n";
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.io.Reader;
|
|||
* <p>
|
||||
* In particular the reader supports a look-ahead option, which allows you to see the next char returned by
|
||||
* {@link #read()}.
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
final class ExtendedBufferedReader extends BufferedReader {
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.io.IOException;
|
|||
|
||||
/**
|
||||
* Abstract lexer class; contains common utility routines shared by lexers
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
abstract class Lexer {
|
||||
|
|
|
@ -23,7 +23,7 @@ import static org.apache.commons.csv.Token.Type.INVALID;
|
|||
* Internal token representation.
|
||||
* <p/>
|
||||
* It is used as contract between the lexer and the parser.
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
final class Token {
|
||||
|
|
Loading…
Reference in New Issue