AbstractWriter.
When writing to an output, the writer will obtain the RowWriterProcessor from CommonWriterSettings#getRowWriterProcessor(), and
invoke RowWriterProcessor#write(Object, NormalizedString[], int[]) to convert the input to an array of objects. This array of objects will in turn be handed to the writer to produce a record in the expected format.
univocity-parsers provides some useful default implementations of this interface in the package com., namely:
ObjectRowWriterProcessor: used for executing conversions of Object values on input rows using instances of Conversion before writing to the outputBeanWriterProcessor: used for converting javabeans annotated with the annotations provided in package com.univocity.parsers.annotations into an object row before writing to the outputcom.univocity.parsers.common.AbstractWriter , com.univocity.parsers.common.CommonWriterSettings
| Modifier and Type | Method and Description |
|---|---|
| public Object[] | Returns: an Object array that is suitable for writing. If null or an empty array is returned then the writer might either skip this value or write an empty record (ifCommonSettings#getSkipEmptyLines() is false)The original input record that must be converted into an Object array before writing to an output. input, NormalizedString[] All field names used to produce records in a given destination. May be null if no headers have been defined in headers, int[] CommonSettings#getHeaders()The indexes of the headers that are actually being written. May be null if no fields have been selected using indexesToWrite)CommonSettings#selectFields(String. or CommonSettings#selectIndexes(Integer.Converts the given input into an Object array that is suitable for writing. |
| write | back to summary |
|---|---|
| public Object[] write(T input, NormalizedString[] headers, int[] indexesToWrite) Converts the given input into an Object array that is suitable for writing. Used by format-specific writers that extend
| |