org.apache.any23.extractor.csv
Class CSVReaderBuilder

java.lang.Object
  extended by org.apache.any23.extractor.csv.CSVReaderBuilder

public class CSVReaderBuilder
extends Object

This class is responsible to build a reader first guessing the configuration from the file it self and then, if not successful, from the DefaultConfiguration.

Author:
Davide Palmisano ( dpalmisano@gmail.com ), Michele Mostarda ( michele.mostarda@gmail.com )

Field Summary
static char NULL_CHAR
           
 
Constructor Summary
CSVReaderBuilder()
           
 
Method Summary
static org.apache.commons.csv.CSVParser build(InputStream is)
          Builds a not null CSVParser guessing from the provided CSV file.
static boolean isCSV(InputStream is)
          Checks whether the given input stream is a CSV or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_CHAR

public static final char NULL_CHAR
See Also:
Constant Field Values
Constructor Detail

CSVReaderBuilder

public CSVReaderBuilder()
Method Detail

build

public static org.apache.commons.csv.CSVParser build(InputStream is)
                                              throws IOException
Builds a not null CSVParser guessing from the provided CSV file.

Parameters:
is - InputStream of the CSV file where guess the configuration.
Returns:
a CSVParser
Throws:
IOException

isCSV

public static boolean isCSV(InputStream is)
                     throws IOException
Checks whether the given input stream is a CSV or not.

Parameters:
is - input stream to be verified.
Returns:
Throws:
IOException


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.