com.mindprod.csv
Class CSVChangeCase

java.lang.Object
  extended by com.mindprod.csv.CSVChangeCase

public final class CSVChangeCase
extends java.lang.Object

Change case on columns of a CSV file.

Use: java.exe com.mindprod.CSVChangeCase somefile.csv 0u 2l 4t

0-based list of column numbers, u=upper case l=lower case t=book title case

Since:
2011-02-17
Version:
1.1 2011-03-11 fix bug in selecting the correct translation letter.
Author:
Roedy Green, Canadian Mind Products

Constructor Summary
CSVChangeCase(java.io.File file, int[] colsToConvert, char[] typeOfConversionRequested, char separatorChar, char quoteChar, char commentChar, java.lang.String encoding)
          Change Case of a CSV file, constructor.
 
Method Summary
static void main(java.lang.String[] args)
          Simple command line interface to CSVChangeCase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVChangeCase

public CSVChangeCase(java.io.File file,
                     int[] colsToConvert,
                     char[] typeOfConversionRequested,
                     char separatorChar,
                     char quoteChar,
                     char commentChar,
                     java.lang.String encoding)
              throws java.io.IOException
Change Case of a CSV file, constructor. Just create. There are no methods to call.

Parameters:
file - CSV file to be packed to remove excess space and quotes.
colsToConvert - array of 0-based cols to sort on.
typeOfConversionRequested - array of chars with letters s i n x to tell how to sort each column.
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 for input and output.
Throws:
java.io.IOException - if problems reading/writing file
Method Detail

main

public static void main(java.lang.String[] args)
Simple command line interface to CSVChangeCase. Changes case of columns of one csv file whose name is on the command line. Must have extension .csv and select cols to change case on with form: 0u 2l 4t.

Parameters:
args - name of csv file to change case on