org.jplate.tabular.util
Class Rfc4180CsvUtil

java.lang.Object
  extended by org.jplate.tabular.util.Rfc4180CsvUtil

public class Rfc4180CsvUtil
extends java.lang.Object

RFC 4180 CSV related utilities.

Modifications:
    $Date: 2008-12-02 12:32:45 -0500 (Tue, 02 Dec 2008) $
    $Revision: 479 $
    $Author: sfloess $
    $HeadURL: https://jplate.svn.sourceforge.net/svnroot/jplate/trunk/src/dev/java/org/jplate/tabular/util/Rfc4180CsvUtil.java $
    


Constructor Summary
private Rfc4180CsvUtil()
          Default constructor not allowed.
 
Method Summary
static java.util.List<java.util.List<java.lang.String>> getAsList(java.io.File file)
          Create a List of RFC 4180 compliant CSV parsed data contained in file.
static java.util.List<java.util.List<java.lang.String>> getAsList(java.io.InputStream inputStream)
          Create a List of RFC 4180 compliant CSV parsed data contained in inputStream.
static java.util.List<java.util.List<java.lang.String>> getAsList(java.io.Reader reader)
          Create a List of RFC 4180 compliant CSV parsed data contained in reader.
static java.util.List<java.util.List<java.lang.String>> getAsList(java.lang.String string)
          Create a List of RFC 4180 compliant CSV parsed data contained in string.
static TableIfc getAsTable(java.io.File file)
          Create a TableIfc of RFC 4180 compliant CSV parsed data contained in file.
static TableIfc getAsTable(java.io.InputStream inputStream)
          Create a TableIfc of RFC 4180 compliant CSV parsed data contained in inputStream.
static TableIfc getAsTable(java.io.Reader reader)
          Create a TableIfc of RFC 4180 compliant CSV parsed data contained in reader.
static TableIfc getAsTable(java.lang.String string)
          Create a TableIfc of RFC 4180 compliant CSV parsed data contained in string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rfc4180CsvUtil

private Rfc4180CsvUtil()
Default constructor not allowed.

Throws:
java.lang.UnsupportedOperationException - If this constructor is called.
Method Detail

getAsList

public static java.util.List<java.util.List<java.lang.String>> getAsList(java.io.InputStream inputStream)
                                                                  throws TabularException
Create a List of RFC 4180 compliant CSV parsed data contained in inputStream.

Parameters:
inputStream - A stream RFC 4180 compliant CSV data.
Returns:
A list of CSV records and fields.
Throws:
TabularException - If any problems arise getting CSV releated data from inputStream.

getAsList

public static java.util.List<java.util.List<java.lang.String>> getAsList(java.io.Reader reader)
                                                                  throws TabularException
Create a List of RFC 4180 compliant CSV parsed data contained in reader.

Parameters:
reader - Contains data to be parsed.
Returns:
A list of CSV records and fields.
Throws:
TabularException - If any problems arise parsing from reader.

getAsList

public static java.util.List<java.util.List<java.lang.String>> getAsList(java.lang.String string)
                                                                  throws TabularException
Create a List of RFC 4180 compliant CSV parsed data contained in string.

Parameters:
string - A string containing data to be parsed.
Returns:
A list of CSV records and fields.
Throws:
TabularException - if any problems arise parsing from string.

getAsList

public static java.util.List<java.util.List<java.lang.String>> getAsList(java.io.File file)
                                                                  throws TabularException
Create a List of RFC 4180 compliant CSV parsed data contained in file.

Parameters:
file - is the file containing data to be parsed.
Returns:
A list of CSV records and fields.
Throws:
TabularException - if any problems arise parsing from file.

getAsTable

public static TableIfc getAsTable(java.io.InputStream inputStream)
                           throws TabularException
Create a TableIfc of RFC 4180 compliant CSV parsed data contained in inputStream.

Parameters:
inputStream - A stream RFC 4180 compliant CSV data.
Returns:
A table of CSV records and fields.
Throws:
TabularException - If any problems arise getting CSV releated data from inputStream.

getAsTable

public static TableIfc getAsTable(java.io.Reader reader)
                           throws TabularException
Create a TableIfc of RFC 4180 compliant CSV parsed data contained in reader.

Parameters:
reader - Contains data to be parsed.
Returns:
A table of CSV records and fields.
Throws:
TabularException - If any problems arise parsing from reader.

getAsTable

public static TableIfc getAsTable(java.lang.String string)
                           throws TabularException
Create a TableIfc of RFC 4180 compliant CSV parsed data contained in string.

Parameters:
string - A string containing data to be parsed.
Returns:
A table of CSV records and fields.
Throws:
TabularException - if any problems arise parsing from string.

getAsTable

public static TableIfc getAsTable(java.io.File file)
                           throws TabularException
Create a TableIfc of RFC 4180 compliant CSV parsed data contained in file.

Parameters:
file - is the file containing data to be parsed.
Returns:
A table of CSV records and fields.
Throws:
TabularException - if any problems arise parsing from file.