| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final ICSVWriter | |
| private Locale | |
| private char | |
| private CsvExceptionHandler | |
| private final ListValuedMap | |
| private String | |
| private MappingStrategy | |
| private boolean | |
| private String | |
| private char | |
| private char | |
| private final Writer |
| Access | Constructor and Description |
|---|---|
| public | StatefulBeanToCsvBuilder(Writer
- the writer that will be used to output the csv version of the bean. writer)Default constructor - Being stateful the writer is required by the builder at the start and not added in later. |
| public | StatefulBeanToCsvBuilder(ICSVWriter
- the ICSVWriter that will be used to output the csv version of the bean. icsvWriter)Being stateful the writer is required by the builder at the start and not added in later. |
| Modifier and Type | Method and Description |
|---|---|
| public StatefulBeanToCsv | Returns: A newStatefulBeanToCsvBuilds a StatefulBeanToCsv from the information provided, filling in default values where none have been specified. |
| public StatefulBeanToCsvBuilder | Returns: thisWhether all outputs should be quoted applyQuotesToAll)Sets whether all outputs should be put in quotes. |
| public StatefulBeanToCsvBuilder | Returns: thisLocale for error messages. If null, the default locale
is used. errorLocale)Sets the locale to be used for all error messages. |
| public StatefulBeanToCsvBuilder | |
| public StatefulBeanToCsvBuilder | Returns: thisThe exception handler to be used. If exceptionHandler)null,
this method does nothing.Sets the handler for recoverable exceptions raised during processing of records. |
| public StatefulBeanToCsvBuilder | Returns: thisThe class opencsv will encounter the field in during
processing. In the case of inheritance, this may not be the
declaring class. type, Field The field opencsv is to ignore field)Adds a |
| public StatefulBeanToCsvBuilder | |
| public StatefulBeanToCsvBuilder | Returns: thisThe mapping strategy to be used for write operations mappingStrategy)Sets the mapping strategy for writing beans to a CSV destination. |
| public StatefulBeanToCsvBuilder | Returns: thiswhether the lines written are in the same
order they appeared in the input orderedResults)Sets whether results must be written in the same order in which they appear in the list of beans provided as input. |
| public StatefulBeanToCsvBuilder | Returns: thisThe name of the profile to be used profile)Selects a profile for deciding which configurations to use for the bean fields. |
| public StatefulBeanToCsvBuilder | |
| public StatefulBeanToCsvBuilder | |
| public StatefulBeanToCsvBuilder | Returns: thisWhether or not exceptions should be thrown while
writing a CSV file. If not, they may be retrieved later by calling
throwExceptions)com..Sets the handler for recoverable exceptions that arise during the processing of records. |
| applyQuotesToAll | back to summary |
|---|---|
| private boolean applyQuotesToAll | |
| csvWriter | back to summary |
|---|---|
| private final ICSVWriter csvWriter | |
| errorLocale | back to summary |
|---|---|
| private Locale errorLocale | |
| escapechar | back to summary |
|---|---|
| private char escapechar | |
| exceptionHandler | back to summary |
|---|---|
| private CsvExceptionHandler exceptionHandler | |
| ignoredFields | back to summary |
|---|---|
| private final ListValuedMap<Class<?>, Field> ignoredFields | |
| lineEnd | back to summary |
|---|---|
| private String lineEnd | |
| mappingStrategy | back to summary |
|---|---|
| private MappingStrategy<T> mappingStrategy | |
| orderedResults | back to summary |
|---|---|
| private boolean orderedResults | |
| profile | back to summary |
|---|---|
| private String profile | |
| quotechar | back to summary |
|---|---|
| private char quotechar | |
| separator | back to summary |
|---|---|
| private char separator | |
| writer | back to summary |
|---|---|
| private final Writer writer | |
| StatefulBeanToCsvBuilder | back to summary |
|---|---|
| public StatefulBeanToCsvBuilder(Writer writer) Default constructor - Being stateful the writer is required by the builder at the start and not added in later.
| |
| StatefulBeanToCsvBuilder | back to summary |
|---|---|
| public StatefulBeanToCsvBuilder(ICSVWriter icsvWriter) Being stateful the writer is required by the builder at the start and not added in later. By passing in the ICSVWriter you can create a writer with the desired ICSVParser to allow you to use the exact same parser for reading and writing.
| |
| build | back to summary |
|---|---|
| public StatefulBeanToCsv Builds a StatefulBeanToCsv from the information provided, filling in default values where none have been specified.
| |
| withApplyQuotesToAll | back to summary |
|---|---|
| public StatefulBeanToCsvBuilder Sets whether all outputs should be put in quotes.
Defaults to
| |
| withErrorLocale | back to summary |
|---|---|
| public StatefulBeanToCsvBuilder Sets the locale to be used for all error messages.
| |
| withEscapechar | back to summary |
|---|---|
public StatefulBeanToCsvBuilder
| |
| withExceptionHandler | back to summary |
|---|---|
| public StatefulBeanToCsvBuilder Sets the handler for recoverable exceptions raised during processing of records. If neither this method nor Please note that if both this method and
| |
| withIgnoreField | back to summary |
|---|---|
| public StatefulBeanToCsvBuilder Adds a May be called as many times as necessary.
| |
| withLineEnd | back to summary |
|---|---|
public StatefulBeanToCsvBuilder
| |
| withMappingStrategy | back to summary |
|---|---|
| public StatefulBeanToCsvBuilder Sets the mapping strategy for writing beans to a CSV destination. If the mapping strategy is set this way, it will always be used instead of automatic determination of an appropriate mapping strategy. It is perfectly legitimate to read a CSV source, take the mapping strategy from the read operation, and pass it in to this method for a write operation. This conserves some processing time, but, more importantly, preserves header ordering.
| |
| withOrderedResults | back to summary |
|---|---|
| public StatefulBeanToCsvBuilder Sets whether results must be written in the same order in which they appear in the list of beans provided as input.
| |
| withProfile | back to summary |
|---|---|
| public StatefulBeanToCsvBuilder Selects a profile for deciding which configurations to use for the bean fields.
| |
| withQuotechar | back to summary |
|---|---|
public StatefulBeanToCsvBuilder
| |
| withSeparator | back to summary |
|---|---|
public StatefulBeanToCsvBuilder
| |
| withThrowExceptions | back to summary |
|---|---|
| public StatefulBeanToCsvBuilder Sets the handler for recoverable exceptions that arise during the processing of records. This is a convenience function and is maintained for backwards
compatibility. Passing in Please note that if both this method and
| |