de.erichseifert.gral.io
Interface IOFactory<T>

Type Parameters:
T - Class of the objects produced by the factory.
All Known Implementing Classes:
AbstractIOFactory, DataReaderFactory, DataWriterFactory, DrawableWriterFactory

public interface IOFactory<T>

Interface for factories producing input or output classes. This is be used to create a extensible plug-in system for reading or writing.


Method Summary
 T get(String mimeType)
          Returns an object for reading or writing the specified format.
 List<IOCapabilities> getCapabilities()
          Returns a list of capabilities for all supported formats.
 IOCapabilities getCapabilities(String mimeType)
          Returns the capabilities for a specific format.
 String[] getSupportedFormats()
          Returns an array of Strings containing all supported formats.
 boolean isFormatSupported(String mimeType)
          Returns whether the specified MIME type is supported.
 

Method Detail

get

T get(String mimeType)
Returns an object for reading or writing the specified format.

Parameters:
mimeType - MIME type.
Returns:
Reader or writer for the specified MIME type.

getCapabilities

IOCapabilities getCapabilities(String mimeType)
Returns the capabilities for a specific format.

Parameters:
mimeType - MIME type of the format
Returns:
Capabilities for the specified format.

getCapabilities

List<IOCapabilities> getCapabilities()
Returns a list of capabilities for all supported formats.

Returns:
Supported capabilities.

getSupportedFormats

String[] getSupportedFormats()
Returns an array of Strings containing all supported formats.

Returns:
Supported formats.

isFormatSupported

boolean isFormatSupported(String mimeType)
Returns whether the specified MIME type is supported.

Parameters:
mimeType - MIME type.
Returns:
true if supported, otherwise false.


Copyright © 2009-2010. All Rights Reserved.