public final class CSVDeEntify
extends java.lang.Object
Constructor and Description |
---|
CSVDeEntify(java.io.File file,
char separatorChar,
char quoteChar,
char commentChar,
java.lang.String encoding,
int... colsToStrip)
convert entities to UTF-8 in selected columns in a CSV file, constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Simple command line interface to strip entities from selected columns in a CSV file.
|
public CSVDeEntify(java.io.File file, char separatorChar, char quoteChar, char commentChar, java.lang.String encoding, int... colsToStrip) throws java.io.IOException
file
- CSV file to have entities strippedseparatorChar
- field separator character, usually ',' in North America, ';' in Europe and sometimes '\t' for
tab.quoteChar
- char to use to enclose fields containing a separator, usually '\"'. Use (char)0 if
you don't want a quote character.commentChar
- char to use to introduce comments. Use (char) 0 if none. Only one character allowed.encoding
- encoding of the input and output file.colsToStrip
- list of columns wanted to have entities stripped.java.io.IOException
- if problems reading/writing filepublic static void main(java.lang.String[] args)
args
- name of csv file to strip, followed by zero-based cols wanted in desired order.