de.erichseifert.gral.io.data
Class AbstractDataWriter

java.lang.Object
  extended by de.erichseifert.gral.io.IOCapabilitiesStorage
      extended by de.erichseifert.gral.io.data.AbstractDataWriter
All Implemented Interfaces:
DataWriter
Direct Known Subclasses:
CSVWriter, ImageWriter

public abstract class AbstractDataWriter
extends IOCapabilitiesStorage
implements DataWriter

Base implementation for classes that write data sources to output streams.


Constructor Summary
AbstractDataWriter(String mimeType)
          Initializes a new writer 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.DataWriter
write
 

Constructor Detail

AbstractDataWriter

public AbstractDataWriter(String mimeType)
Initializes a new writer 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: DataWriter
Returns the setting for the specified key.

Specified by:
getSetting in interface DataWriter
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: DataWriter
Sets the setting for the specified key.

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


Copyright © 2009-2010. All Rights Reserved.