public final class CSVPatch
extends java.lang.Object
Constructor and Description |
---|
CSVPatch(java.io.File fileToPatch,
java.io.File fileOfPairs,
char separatorChar,
char quoteChar,
char commentChar,
java.lang.String encoding,
int... colsToPatch)
patch a CSV fileToPatch, constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Simple command line interface to CSVPatch.
|
public CSVPatch(java.io.File fileToPatch, java.io.File fileOfPairs, char separatorChar, char quoteChar, char commentChar, java.lang.String encoding, int... colsToPatch) throws java.io.IOException
fileToPatch
- CSV fileToPatch to be packed to remove excess space and quotes.fileOfPairs
- CSV file of pairs from,to (extra cols ignored)separatorChar
- 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 input and output.colsToPatch
- list of columns that should be patched, 0-based.java.io.IOException
- if problems reading/writing fileToPatchpublic static void main(java.lang.String[] args)
args
- name of csv file to patch, from-to pairs file, columns to patch.