|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.beanio.stream.csv.CsvParserConfiguration
public class CsvParserConfiguration
Stores configuration settings for parsing CSV formatted streams.
Constructor Summary | |
---|---|
CsvParserConfiguration()
Constructs a new CsvParserConfiguration. |
Method Summary | |
---|---|
String[] |
getComments()
Returns the array of comment prefixes. |
char |
getDelimiter()
Returns the field delimiter. |
Character |
getEscape()
Returns the escape character. |
String |
getLineSeparator()
Deprecated. |
char |
getQuote()
Returns the character to use for a quotation mark. |
String |
getRecordTerminator()
Returns the text used to terminate a record. |
boolean |
isAlwaysQuote()
Returns true if fields should always be quoted when marshalled. |
boolean |
isCommentEnabled()
Returns whether one or more comment prefixes have been configured. |
boolean |
isEscapeEnabled()
Returns whether escaping is enabled. |
boolean |
isMultilineEnabled()
Returns whether a record may span multiple lines (when quoted). |
boolean |
isUnquotedQuotesAllowed()
Returns whether quotes are allowed to appear in an unquoted field. |
boolean |
isWhitespaceAllowed()
Returns whether to ignore unquoted whitespace. |
void |
setAlwaysQuote(boolean alwaysQuote)
Set to true to quote every field when marshalled. |
void |
setComments(String[] comments)
Sets the array of comment prefixes. |
void |
setDelimiter(char c)
Sets the field delimiter. |
void |
setEscape(Character c)
Sets the escape character. |
void |
setLineSeparator(String lineSeparator)
Deprecated. |
void |
setMultilineEnabled(boolean multilineEnabled)
Sets whether a record may span multiple lines (when quoted). |
void |
setQuote(char quote)
Sets the character to use for a quotation mark. |
void |
setRecordTerminator(String recordTerminator)
Sets the text used to terminate a record. |
void |
setUnquotedQuotesAllowed(boolean unquotedQuotesAllowed)
Sets whether quotes are allowed to appear in an unquoted field. |
void |
setWhitespaceAllowed(boolean whitespaceAllowed)
Sets whether unquoted whitespace is ignored. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CsvParserConfiguration()
Method Detail |
---|
public void setDelimiter(char c)
c
- the character used to delimit fieldspublic char getDelimiter()
public char getQuote()
public void setQuote(char quote)
quote
- the new quotation mark characterpublic void setEscape(Character c)
c
- new escape characterpublic Character getEscape()
public boolean isEscapeEnabled()
getEscape()
public boolean isMultilineEnabled()
public void setMultilineEnabled(boolean multilineEnabled)
multilineEnabled
- set to true true to allow records to
span multiple linespublic boolean isWhitespaceAllowed()
"Field1", "Field2" ^ Unquoted whitespace here
public void setWhitespaceAllowed(boolean whitespaceAllowed)
whitespaceAllowed
- set to true to ignore unquoted
whitespacepublic boolean isUnquotedQuotesAllowed()
Field1,Field"2,Field3
public void setUnquotedQuotesAllowed(boolean unquotedQuotesAllowed)
unquotedQuotesAllowed
- set to true if quotes may appear in
an unquoted fieldpublic String[] getComments()
public void setComments(String[] comments)
comments
- the array of comment prefixespublic boolean isCommentEnabled()
public boolean isAlwaysQuote()
public void setAlwaysQuote(boolean alwaysQuote)
alwaysQuote
- set to true to quote every field regardless
of contentpublic String getRecordTerminator()
public void setRecordTerminator(String recordTerminator)
recordTerminator
- the record termination textpublic String getLineSeparator()
public void setLineSeparator(String lineSeparator)
lineSeparator
- the line separation text
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |