T
- The type of objects which should be produced by this factorypublic abstract class AbstractIOFactory<T> extends Object implements IOFactory<T>
IOFactory
which provides basic
functionality.Modifier | Constructor and Description |
---|---|
protected |
AbstractIOFactory(String propFileName)
Constructor that creates a new instance and initializes it with the name
of the corresponding properties file(s).
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected Class<? extends T> |
getTypeClass(String type)
Returns the type of factory products for a specified format.
|
boolean |
isFormatSupported(String mimeType)
Returns whether the specified MIME type is supported.
|
protected AbstractIOFactory(String propFileName) throws IOException
propFileName
- File name of the properties file(s)IOException
- if reading the properties file(s) failedpublic IOCapabilities getCapabilities(String mimeType)
getCapabilities
in interface IOFactory<T>
mimeType
- MIME type of the formatpublic List<IOCapabilities> getCapabilities()
getCapabilities
in interface IOFactory<T>
public String[] getSupportedFormats()
getSupportedFormats
in interface IOFactory<T>
public boolean isFormatSupported(String mimeType)
isFormatSupported
in interface IOFactory<T>
mimeType
- MIME type.true
if supported, otherwise false
.protected Class<? extends T> getTypeClass(String type)
type
- Format.Copyright © 2009-2013. All Rights Reserved.