CsvCallbackHandler implementation that returns the fields of each record as an array of Strings.
Example:
StringArrayHandler handler = StringArrayHandler.builder()
.fieldModifier(FieldModifiers.TRIM)
.build();
This implementation is stateful and must not be reused.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Access | Constructor and Description |
|---|---|
| private | StringArrayHandler(final int maxFields, final int maxFieldSize, final int maxRecordSize, final FieldModifier fieldModifier)
|
| Modifier and Type | Method and Description |
|---|---|
| public static StringArrayHandler. | |
| protected String[] | buildRecord()
Implements abstract de. Called at the end of each CSV record to build the actual record representation. |
| public static StringArrayHandler | |
| public static StringArrayHandler | Returns: the new instancethe configuration, must not be configurernullConstructs a new instance of this class with the given configuration. |
| StringArrayHandler | back to summary |
|---|---|
| private StringArrayHandler(final int maxFields, final int maxFieldSize, final int maxRecordSize, final FieldModifier fieldModifier) | |
| builder | back to summary |
|---|---|
| public static StringArrayHandler. Constructs a new builder instance for this class.
| |
| buildRecord | back to summary |
|---|---|
| protected String[] buildRecord() Implements abstract de. Doc from de. Called at the end of each CSV record to build the actual record representation.
| |
| of | back to summary |
|---|---|
| public static StringArrayHandler of() Constructs a new instance of this class with default settings.
| |
| of | back to summary |
|---|---|
| public static StringArrayHandler of(final Consumer<StringArrayHandler. Constructs a new instance of this class with the given configuration. This is an alternative to the builder pattern for convenience.
| |
StringArrayHandler.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public StringArrayHandler | |
| protected StringArrayHandler. | self()
Implements abstract de. Method to be implemented by subclasses to return the correct type. |
| StringArrayHandlerBuilder | back to summary |
|---|---|
| private StringArrayHandlerBuilder() | |
| build | back to summary |
|---|---|
| public StringArrayHandler build() Builds the
| |
| self | back to summary |
|---|---|
| protected StringArrayHandler. Implements abstract de. Method to be implemented by subclasses to return the correct type.
| |