org.deidentifier.arx.io

## Class CSVDataInput

- java.lang.Object
- - org.deidentifier.arx.io.CSVDataInput

    public class CSVDataInput
    extends java.lang.Object

This class implements a reader for CSV encoded information.

Author:
  Fabian Prasser, Florian Kohlmayer

### Constructor Summary

Constructors
Constructor and Description
`CSVDataInput(java.io.File file, java.nio.charset.Charset charset)` Instantiate.
`CSVDataInput(java.io.File file, java.nio.charset.Charset charset, char delimiter)` Instantiate.
`CSVDataInput(java.io.File file, java.nio.charset.Charset charset, char delimiter, char quote)` Instantiate.
`CSVDataInput(java.io.File file, java.nio.charset.Charset charset, char delimiter, char quote, char escape)` Instantiate.
`CSVDataInput(java.io.File file, java.nio.charset.Charset charset, char delimiter, char quote, char escape, char[] linebreak)` Instantiate.
`CSVDataInput(java.io.File file, java.nio.charset.Charset charset, char delimiter, char quote, char escape, char[] linebreak, CSVOptions options)` Instantiate.
`CSVDataInput(java.io.File file, java.nio.charset.Charset charset, CSVSyntax config)` Instantiate.
`CSVDataInput(java.io.File file, java.nio.charset.Charset charset, CSVSyntax config, CSVOptions options)` Instantiate.
`CSVDataInput(java.io.File file, java.nio.charset.Charset charset, CSVSyntax config, DataType<?>[] datatype)` Instatiate.
`CSVDataInput(java.io.InputStream stream, java.nio.charset.Charset charset)` Instantiate.
`CSVDataInput(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter)` Instantiate.
`CSVDataInput(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter, char quote)` Instantiate.
`CSVDataInput(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter, char quote, char escape)` Instantiate.
`CSVDataInput(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter, char quote, char escape, char[] linebreak)` Instantiate.
`CSVDataInput(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter, char quote, char escape, char[] linebreak, CSVOptions options)` Instantiate.
`CSVDataInput(java.io.InputStream stream, java.nio.charset.Charset charset, CSVSyntax config)` Instantiate.
`CSVDataInput(java.io.InputStream stream, java.nio.charset.Charset charset, CSVSyntax config, CSVOptions options)` Instantiate.
`CSVDataInput(java.io.InputStream stream, java.nio.charset.Charset charset, CSVSyntax config, DataType<?>[] datatypes)` Instantiate.
`CSVDataInput(java.io.InputStream stream, java.nio.charset.Charset charset, CSVSyntax config, DataType<?>[] datatypes, CSVOptions options)` Instantiate.
`CSVDataInput(java.io.Reader reader, char delimiter, char quote, char escape, char[] linebreak, DataType<?>[] datatypes)` Instantiate.
`CSVDataInput(java.io.Reader reader, char delimiter, char quote, char escape, char[] linebreak, DataType<?>[] datatypes, CSVOptions options)` Instantiate.
`CSVDataInput(java.lang.String filename, java.nio.charset.Charset charset)` Instantiate.
`CSVDataInput(java.lang.String filename, java.nio.charset.Charset charset, char delimiter)` Instantiate.
`CSVDataInput(java.lang.String filename, java.nio.charset.Charset charset, char delimiter, char quote)` Instantiate.
`CSVDataInput(java.lang.String filename, java.nio.charset.Charset charset, char delimiter, char quote, char escape)` Instantiate.
`CSVDataInput(java.lang.String filename, java.nio.charset.Charset charset, char delimiter, char quote, char escape, char[] linebreak)` Instantiate.
`CSVDataInput(java.lang.String filename, java.nio.charset.Charset charset, char delimiter, char quote, char escape, char[] linebreak, CSVOptions options)` Instantiate.
`CSVDataInput(java.lang.String filename, java.nio.charset.Charset charset, CSVSyntax config)` Instantiate.
`CSVDataInput(java.lang.String filename, java.nio.charset.Charset charset, CSVSyntax config, CSVOptions options)` Instantiate
`CSVDataInput(java.lang.String filename, java.nio.charset.Charset charset, CSVSyntax config, DataType<?>[] datatypes)` Instantiate.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()` Closes the reader.
`java.util.Iterator<java.lang.String[]>` `iterator()` Returns an iterator.
`java.util.Iterator<java.lang.String[]>` `iterator(boolean header)` Returns an iterator.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CSVDataInput

    public CSVDataInput(java.io.File file,
                        java.nio.charset.Charset charset)
                 throws java.io.IOException

Instantiate.

Parameters:
  `file` - the file
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.File file,
                        java.nio.charset.Charset charset,
                        char delimiter)
                 throws java.io.IOException

Instantiate.

Parameters:
  `file` - the file
  `delimiter` - the delimiter
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.File file,
                        java.nio.charset.Charset charset,
                        char delimiter,
                        char quote)
                 throws java.io.IOException

Instantiate.

Parameters:
  `file` - the file
  `delimiter` - the delimiter
  `quote` - the quote
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.File file,
                        java.nio.charset.Charset charset,
                        char delimiter,
                        char quote,
                        char escape)
                 throws java.io.IOException

Instantiate.

Parameters:
  `file` - the file
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.File file,
                        java.nio.charset.Charset charset,
                        char delimiter,
                        char quote,
                        char escape,
                        char[] linebreak)
                 throws java.io.IOException

Instantiate.

Parameters:
  `file` - the file
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
  `linebreak` - the linebreak
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.File file,
                        java.nio.charset.Charset charset,
                        char delimiter,
                        char quote,
                        char escape,
                        char[] linebreak,
                        CSVOptions options)
                 throws java.io.IOException

Instantiate.

Parameters:
  `file` - the file
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
  `linebreak` - the linebreak
  `options` -
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.File file,
                        java.nio.charset.Charset charset,
                        CSVSyntax config)
                 throws java.io.IOException

Instantiate.

Parameters:
  `file` - the file
  `config` - the config
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.File file,
                        java.nio.charset.Charset charset,
                        CSVSyntax config,
                        CSVOptions options)
                 throws java.io.IOException

Instantiate.

Parameters:
  `file` - the file
  `config` - the config
  `options` - the options
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.File file,
                        java.nio.charset.Charset charset,
                        CSVSyntax config,
                        DataType<?>[] datatype)
                 throws java.io.IOException

Instatiate.

Parameters:
  `file` -
  `config` -
  `datatype` -
Throws:
  `java.io.IOException`

#### CSVDataInput

    public CSVDataInput(java.io.InputStream stream,
                        java.nio.charset.Charset charset)
                 throws java.io.IOException

Instantiate.

Parameters:
  `stream` - the stream
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.InputStream stream,
                        java.nio.charset.Charset charset,
                        char delimiter)
                 throws java.io.IOException

Instantiate.

Parameters:
  `stream` - the stream
  `delimiter` - the delimiter
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.InputStream stream,
                        java.nio.charset.Charset charset,
                        char delimiter,
                        char quote)
                 throws java.io.IOException

Instantiate.

Parameters:
  `stream` - the stream
  `delimiter` - the delimiter
  `quote` - the quote
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.InputStream stream,
                        java.nio.charset.Charset charset,
                        char delimiter,
                        char quote,
                        char escape)
                 throws java.io.IOException

Instantiate.

Parameters:
  `stream` - the stream
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.InputStream stream,
                        java.nio.charset.Charset charset,
                        char delimiter,
                        char quote,
                        char escape,
                        char[] linebreak)
                 throws java.io.IOException

Instantiate.

Parameters:
  `stream` - the stream
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
  `linebreak` - the linebreak
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.InputStream stream,
                        java.nio.charset.Charset charset,
                        char delimiter,
                        char quote,
                        char escape,
                        char[] linebreak,
                        CSVOptions options)
                 throws java.io.IOException

Instantiate.

Parameters:
  `stream` - the stream
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
  `linebreak` - the linebreak
  `options` -
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.InputStream stream,
                        java.nio.charset.Charset charset,
                        CSVSyntax config)
                 throws java.io.IOException

Instantiate.

Parameters:
  `stream` - the stream
  `config` - the config
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.InputStream stream,
                        java.nio.charset.Charset charset,
                        CSVSyntax config,
                        CSVOptions options)
                 throws java.io.IOException

Instantiate.

Parameters:
  `stream` - the stream
  `config` - the config
  `options` - the options
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.InputStream stream,
                        java.nio.charset.Charset charset,
                        CSVSyntax config,
                        DataType<?>[] datatypes)
                 throws java.io.IOException

Instantiate.

Parameters:
  `stream` -
  `config` -
  `datatypes` -
Throws:
  `java.io.IOException`

#### CSVDataInput

    public CSVDataInput(java.io.InputStream stream,
                        java.nio.charset.Charset charset,
                        CSVSyntax config,
                        DataType<?>[] datatypes,
                        CSVOptions options)
                 throws java.io.IOException

Instantiate.

Parameters:
  `stream` -
  `config` -
  `datatypes` -
  `options` -
Throws:
  `java.io.IOException`

#### CSVDataInput

    public CSVDataInput(java.io.Reader reader,
                        char delimiter,
                        char quote,
                        char escape,
                        char[] linebreak,
                        DataType<?>[] datatypes)
                 throws java.io.IOException

Instantiate.

Parameters:
  `reader` - the reader
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
  `linebreak` - the linebreak
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.io.Reader reader,
                        char delimiter,
                        char quote,
                        char escape,
                        char[] linebreak,
                        DataType<?>[] datatypes,
                        CSVOptions options)
                 throws java.io.IOException

Instantiate.

Parameters:
  `reader` - the reader
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
  `linebreak` - the linebreak
  `options` - the options
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.lang.String filename,
                        java.nio.charset.Charset charset)
                 throws java.io.IOException

Instantiate.

Parameters:
  `filename` - the filename
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.lang.String filename,
                        java.nio.charset.Charset charset,
                        char delimiter)
                 throws java.io.IOException

Instantiate.

Parameters:
  `filename` - the filename
  `delimiter` - the delimiter
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.lang.String filename,
                        java.nio.charset.Charset charset,
                        char delimiter,
                        char quote)
                 throws java.io.IOException

Instantiate.

Parameters:
  `filename` - the filename
  `delimiter` - the delimiter
  `quote` - the quote
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.lang.String filename,
                        java.nio.charset.Charset charset,
                        char delimiter,
                        char quote,
                        char escape)
                 throws java.io.IOException

Instantiate.

Parameters:
  `filename` - the filename
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.lang.String filename,
                        java.nio.charset.Charset charset,
                        char delimiter,
                        char quote,
                        char escape,
                        char[] linebreak)
                 throws java.io.IOException

Instantiate.

Parameters:
  `filename` - the filename
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
  `linebreak` - the linebreak
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.lang.String filename,
                        java.nio.charset.Charset charset,
                        char delimiter,
                        char quote,
                        char escape,
                        char[] linebreak,
                        CSVOptions options)
                 throws java.io.IOException

Instantiate.

Parameters:
  `filename` - the filename
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
  `linebreak` - the linebreak
  `options` -
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.lang.String filename,
                        java.nio.charset.Charset charset,
                        CSVSyntax config)
                 throws java.io.IOException

Instantiate.

Parameters:
  `filename` - the filename
  `config` - the config
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### CSVDataInput

    public CSVDataInput(java.lang.String filename,
                        java.nio.charset.Charset charset,
                        CSVSyntax config,
                        CSVOptions options)
                 throws java.io.IOException

Instantiate

Parameters:
  `filename` -
  `charset` -
  `config` -
  `options` -
Throws:
  `java.io.IOException`

#### CSVDataInput

    public CSVDataInput(java.lang.String filename,
                        java.nio.charset.Charset charset,
                        CSVSyntax config,
                        DataType<?>[] datatypes)
                 throws java.io.IOException

Instantiate.

Parameters:
  `filename` -
  `config` -
  `datatypes` -
Throws:
  `java.io.IOException`

### Method Detail

#### close

    public void close()
               throws java.io.IOException

Closes the reader.

Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### iterator

    public java.util.Iterator<java.lang.String[]> iterator()

Returns an iterator. Assumes that the first line is the header. You must iterate trough all elements to prevent resource leaks!

Returns:
  the iterator

#### iterator

    public java.util.Iterator<java.lang.String[]> iterator(boolean header)

Returns an iterator. You must iterate trough all elements to prevent resource leaks!

Returns:
  the iterator