By default, all parsers and writers have to handle, at least, the following format definitions:
Format#lineSeparator defaults to the system line separator
Format#lineSeparator will be replaced by this character.Format#lineSeparator.Format#normalizedNewline defaults to '\n'.
Format#comment defaults to '#'.
com.univocity.parsers.csv.CsvFormat , com.univocity.parsers.fixed.FixedWidthFormat
| Modifier and Type | Field and Description |
|---|---|
| private char | |
| private char[] | |
| private String | |
| private char | |
| private static final char[] | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected Format | |
| public char | |
| protected abstract TreeMap | |
| private static String | |
| public char[] | Returns: the sequence of 1 to 2 characters that identifies the end of a lineReturns the current line separator character sequence, which can contain 1 to 2 characters. |
| public String | Returns: the sequence of 1 to 2 characters that identifies the end of a lineReturns the current line separator sequence as a String of 1 to 2 characters. |
| public char | Returns: the normalized newline characterReturns the normalized newline character, which is automatically replaced by |
| public static char[] | Returns: a sequence of 1 to 2 characters used as the system's line ending.Returns the system's line separator sequence, which can contain 1 to 2 characters. |
| public boolean | Returns: true if the given character is the comment character, false otherwisethe character to be verified ch)Identifies whether or not a given character represents a comment |
| public boolean | Returns: true if the given character is the normalized newline character, false otherwisethe character to be verified ch)Compares the given character against the |
| public void | setComment(char
the comment character comment)Defines the character that represents a line comment when found in the beginning of a line of text. |
| public void | setLineSeparator(String
a sequence of 1 to 2 characters that identifies the end of a line lineSeparator)Defines the line separator sequence that should be used for parsing and writing. |
| public void | setLineSeparator(char[]
a sequence of 1 to 2 characters that identifies the end of a line lineSeparator)Defines the line separator sequence that should be used for parsing and writing. |
| public void | setNormalizedNewline(char
a single character used to represent a line separator. normalizedNewline)Sets the normalized newline character, which is automatically replaced by |
| public final String |
| comment | back to summary |
|---|---|
| private char comment | |
| lineSeparator | back to summary |
|---|---|
| private char[] lineSeparator | |
| lineSeparatorString | back to summary |
|---|---|
| private String lineSeparatorString | |
| normalizedNewline | back to summary |
|---|---|
| private char normalizedNewline | |
| systemLineSeparator | back to summary |
|---|---|
| private static final char[] systemLineSeparator | |
| systemLineSeparatorString | back to summary |
|---|---|
| private static final String systemLineSeparatorString | |
| Format | back to summary |
|---|---|
| protected Format() | |
| clone | back to summary |
|---|---|
| protected Format clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by | |
| getComment | back to summary |
|---|---|
| public char getComment() Returns the character that represents a line comment. Defaults to '#' Set it to '\0' to disable comment skipping.
| |
| getConfiguration | back to summary |
|---|---|
| protected abstract TreeMap | |
| getFormattedValue | back to summary |
|---|---|
| private static String getFormattedValue(Object value) | |
| getLineSeparator | back to summary |
|---|---|
| public char[] getLineSeparator() Returns the current line separator character sequence, which can contain 1 to 2 characters. Defaults to the system's line separator sequence (usually '\r\n' in Windows, '\r' in MacOS, and '\n' in Linux/Unix).
| |
| getLineSeparatorString | back to summary |
|---|---|
| public String getLineSeparatorString() Returns the current line separator sequence as a String of 1 to 2 characters. Defaults to the system's line separator sequence (usually "\r\n" in Windows, "\r" in MacOS, and "\n" in Linux/Unix).
| |
| getNormalizedNewline | back to summary |
|---|---|
| public char getNormalizedNewline() Returns the normalized newline character, which is automatically replaced by
| |
| getSystemLineSeparator | back to summary |
|---|---|
| public static char[] getSystemLineSeparator() Returns the system's line separator sequence, which can contain 1 to 2 characters.
| |
| isComment | back to summary |
|---|---|
| public boolean isComment(char ch) Identifies whether or not a given character represents a comment
| |
| isNewLine | back to summary |
|---|---|
| public boolean isNewLine(char ch) Compares the given character against the
| |
| setComment | back to summary |
|---|---|
| public void setComment(char comment) Defines the character that represents a line comment when found in the beginning of a line of text. Defaults to '#' Use '\0' to disable comment skipping.
| |
| setLineSeparator | back to summary |
|---|---|
| public void setLineSeparator(String lineSeparator) Defines the line separator sequence that should be used for parsing and writing.
| |
| setLineSeparator | back to summary |
|---|---|
| public void setLineSeparator(char[] lineSeparator) Defines the line separator sequence that should be used for parsing and writing.
| |
| setNormalizedNewline | back to summary |
|---|---|
| public void setNormalizedNewline(char normalizedNewline) Sets the normalized newline character, which is automatically replaced by
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object. | |