de.erichseifert.gral.io.data
Class AbstractDataReader

java.lang.Object
  extended by de.erichseifert.gral.io.IOCapabilitiesStorage
      extended by de.erichseifert.gral.io.data.AbstractDataReader
All Implemented Interfaces:
DataReader
Direct Known Subclasses:
CSVReader, ImageReader

public abstract class AbstractDataReader
extends IOCapabilitiesStorage
implements DataReader

Base implementation for classes that read data sources from input streams.


Constructor Summary
AbstractDataReader(String mimeType)
          Initializes a new reader with MIME type information.
 
Method Summary
 String getMimeType()
          Returns the MIME type.
<T> T
getSetting(String key)
          Returns the setting for the specified key.
<T> void
setSetting(String key, T value)
          Sets the setting for the specified key.
 
Methods inherited from class de.erichseifert.gral.io.IOCapabilitiesStorage
getCapabilities
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.erichseifert.gral.io.data.DataReader
read
 

Constructor Detail

AbstractDataReader

public AbstractDataReader(String mimeType)
Initializes a new reader with MIME type information.

Parameters:
mimeType - MIME type
Method Detail

getMimeType

public String getMimeType()
Returns the MIME type.

Returns:
MIME type string.

getSetting

public <T> T getSetting(String key)
Description copied from interface: DataReader
Returns the setting for the specified key.

Specified by:
getSetting in interface DataReader
Type Parameters:
T - return type
Parameters:
key - key of the setting
Returns:
the value of the setting

setSetting

public <T> void setSetting(String key,
                           T value)
Description copied from interface: DataReader
Sets the setting for the specified key.

Specified by:
setSetting in interface DataReader
Type Parameters:
T - value type
Parameters:
key - key of the setting
value - value of the setting


Copyright © 2009-2010. All Rights Reserved.