de.erichseifert.gral.io.data
Interface DataReader
-
- All Known Implementing Classes:
- AbstractDataReader, AudioReader, CSVReader, ImageReader
public interface DataReaderInterface that provides a function to retrieve a data source.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description <T> TgetSetting(java.lang.String key)Returns the setting for the specified key.DataSourceread(java.io.InputStream input, java.lang.Class<? extends java.lang.Comparable<?>>... types)Returns a data source that contains the imported data.<T> voidsetSetting(java.lang.String key, T value)Sets the setting for the specified key.
-
-
-
Method Detail
-
read
DataSource read(java.io.InputStream input, java.lang.Class<? extends java.lang.Comparable<?>>... types) throws java.io.IOException
Returns a data source that contains the imported data.- Parameters:
input- Input to be read.types- Types for the columns of the data source.- Returns:
- Imported data.
- Throws:
java.io.IOException- when the file format is not valid or when experiencing an error during file operations.
-
getSetting
<T> T getSetting(java.lang.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(java.lang.String key, T value)Sets the setting for the specified key.- Type Parameters:
T- value type- Parameters:
key- key of the settingvalue- value of the setting
-
-
DataMelt 3.0 © DataMelt by jWork.ORG