public abstract class EcsvEncoder extends Object
| Modifier | Constructor and Description | 
|---|---|
protected  | 
EcsvEncoder(String datatype,
           String subtype)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static EcsvEncoder | 
createEncoder(ColumnInfo info,
             char delimiter)
Returns an encoder suitable for encoding data from a column with
 given metadata. 
 | 
abstract String | 
encode(Object value)
Formats a value of this encoder's datatype for insertion into
 the body of an ECSV file. 
 | 
String | 
getDatatype()
Returns the ECSV datatype handled by this encoder. 
 | 
String | 
getSubtype()
Returns the ECSV subtype for this decoder. 
 | 
static String | 
quoteString(String txt,
           char delimiter)
Returns a suitably escaped value of a string, ensuring that no
 ECSV control characters are present in the result. 
 | 
public abstract String encode(Object value)
value - typed value to encodepublic String getDatatype()
public String getSubtype()
public static EcsvEncoder createEncoder(ColumnInfo info, char delimiter)
info - column metadatadelimiter - delimiter value, must be comma or space,
                     required to determine quoting detailspublic static String quoteString(String txt, char delimiter)
txt - raw stringdelimiter - delimiter character to be avoided,
                     must be comma or spaceCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.