diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index 271f4652a..987be2d15 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -1441,15 +1441,19 @@ public static CSVFormat valueOf(final String format) { return CSVFormat.Predefined.valueOf(format).getFormat(); } + /** How duplicate headers are handled. */ private final DuplicateHeaderMode duplicateHeaderMode; + /** Whether missing column names are allowed when parsing the header line. */ private final boolean allowMissingColumnNames; + /** Whether to flush on close. */ private final boolean autoFlush; /** Set to null if commenting is disabled. */ private final Character commentMarker; + /** The character delimiting the values (typically ";", "," or "\t"). */ private final String delimiter; /** Set to null if escaping is disabled. */ @@ -1461,12 +1465,13 @@ public static CSVFormat valueOf(final String format) { /** Array of header comment lines. */ private final String[] headerComments; + /** Whether empty lines between records are ignored when parsing input. */ private final boolean ignoreEmptyLines; /** Should ignore header names case. */ private final boolean ignoreHeaderCase; - /** TODO Should leading/trailing spaces be ignored around values?. */ + /** Should leading/trailing spaces be ignored around values?. */ private final boolean ignoreSurroundingSpaces; /** The string to be used for null values. */ @@ -1475,21 +1480,28 @@ public static CSVFormat valueOf(final String format) { /** Set to null if quoting is disabled. */ private final Character quoteCharacter; + /** Set to {@code quoteCharacter + nullString + quoteCharacter} */ private final String quotedNullString; + /** The quote policy output fields. */ private final QuoteMode quoteMode; /** For output. */ private final String recordSeparator; + /** Whether to skip the header record. */ private final boolean skipHeaderRecord; + /** Whether reading end-of-file is allowed even when input is malformed, helps Excel compatibility. */ private final boolean lenientEof; + /** Whether reading trailing data is allowed in records, helps Excel compatibility. */ private final boolean trailingData; + /** Whether to add a trailing delimiter. */ private final boolean trailingDelimiter; + /** Whether to trim leading and trailing blanks. */ private final boolean trim; private CSVFormat(final Builder builder) { diff --git a/src/main/java/org/apache/commons/csv/CSVRecord.java b/src/main/java/org/apache/commons/csv/CSVRecord.java index 0a084b015..1fac65843 100644 --- a/src/main/java/org/apache/commons/csv/CSVRecord.java +++ b/src/main/java/org/apache/commons/csv/CSVRecord.java @@ -42,6 +42,10 @@ public final class CSVRecord implements Serializable, Iterable { private static final long serialVersionUID = 1L; + /** + * 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. + */ private final long characterPosition; /** The accumulated comments (if any) */