public class SelectiveCsvEncoder extends DefaultCsvEncoder
Constructor and Description |
---|
SelectiveCsvEncoder(boolean[] columnsToEncode)
Constructs a new SelectiveCsvEncoder that encodes columns if the element representing that column in the
supplied array is true.
|
SelectiveCsvEncoder(int... columnsToEncode)
Constructs a new SelectiveCsvEncoder that encodes columns by column number.
|
Modifier and Type | Method and Description |
---|---|
String |
encode(String input,
CsvContext context,
CsvPreference preference)
Encodes a String to be written to a CSV file.
|
public SelectiveCsvEncoder(int... columnsToEncode)
columnsToEncode
- the column numbers to encodepublic SelectiveCsvEncoder(boolean[] columnsToEncode)
columnsToEncode
- boolean array representing columns to encode (true indicates a column should be encoded).public String encode(String input, CsvContext context, CsvPreference preference)
encode
in interface CsvEncoder
encode
in class DefaultCsvEncoder
input
- the String to be encodedcontext
- the contextpreference
- the CSV preferencesCopyright © 2007–2015 Super CSV. All rights reserved.