Package org.apache.any23.extractor.csv

## Class CSVReaderBuilder

- java.lang.Object
- - 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 )

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CSVReaderBuilder()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `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`

- - ### 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` - if there is an error building the parser

    - #### 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:
        `true` if the given `is` input stream contains a CSV content. `false` otherwise.
      Throws:
        `IOException` - if there is an error processing the input stream