de.erichseifert.gral.io.data
Interface DataReader

All Known Implementing Classes:
AbstractDataReader, CSVReader, ImageReader

public interface DataReader

Interface that provides a function to retrieve a DataSource.


Method Summary
<T> T
getSetting(String key)
          Returns the setting for the specified key.
 DataSource read(InputStream input, Class<? extends Number>... types)
          Returns a DataSource that was imported.
<T> void
setSetting(String key, T value)
          Sets the setting for the specified key.
 

Method Detail

read

DataSource read(InputStream input,
                Class<? extends Number>... types)
                throws IOException,
                       ParseException
Returns a DataSource that was imported.

Parameters:
input - Input to be read.
types - Number types for the columns of the DataSource.
Returns:
DataSource Imported data.
Throws:
IOException - when experiencing an error during file operations.
ParseException - when the file format is not valid.

getSetting

<T> T getSetting(String key)
Returns the setting for the specified key.

Type Parameters:
T - return type
Parameters:
key - key of the setting
Returns:
the value of the setting

setSetting

<T> void setSetting(String key,
                    T value)
Sets the setting for the specified key.

Type Parameters:
T - value type
Parameters:
key - key of the setting
value - value of the setting


Copyright © 2009-2010. All Rights Reserved.