de.erichseifert.gral.io.data
Class DataReaderFactory
- java.lang.Object
-
- de.erichseifert.gral.io.AbstractIOFactory<DataReader>
-
- de.erichseifert.gral.io.data.DataReaderFactory
-
- All Implemented Interfaces:
- IOFactory<DataReader>
public final class DataReaderFactory extends AbstractIOFactory<DataReader>
A factory class that produces
DataReaderinstances for a specified format. The produced readers can be used to retrieve data from anInputStreamand to get aDataSourceinstance.Example usage:
DataReaderFactory factory = DataReaderFactory.getInstance(); DataReader reader = factory.get("text/csv"); DataSource = reader.read(new FileInputStream(filename), Double.class);
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description DataReaderget(java.lang.String mimeType)Returns an object for reading or writing the specified format.static DataReaderFactorygetInstance()Returns the instance of the factory.-
Methods inherited from class de.erichseifert.gral.io.AbstractIOFactory
getCapabilities, getCapabilities, getSupportedFormats, isFormatSupported
-
-
-
-
Method Detail
-
getInstance
public static DataReaderFactory getInstance()
Returns the instance of the factory.- Returns:
- Instance of the factory.
-
get
public DataReader get(java.lang.String mimeType)
Description copied from class:AbstractIOFactoryReturns an object for reading or writing the specified format.- Specified by:
getin interfaceIOFactory<DataReader>- Overrides:
getin classAbstractIOFactory<DataReader>- Parameters:
mimeType- MIME type.- Returns:
- Reader or writer for the specified MIME type.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG