T
- The type of objects which should be produced by this factorypublic abstract class AbstractIOFactory<T> extends java.lang.Object implements IOFactory<T>
IOFactory
which provides basic
functionality.Modifier | Constructor and Description |
---|---|
protected |
AbstractIOFactory(java.lang.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(java.lang.String mimeType)
Returns an object for reading or writing the specified format.
|
java.util.List<IOCapabilities> |
getCapabilities()
Returns a list of capabilities for all supported formats.
|
IOCapabilities |
getCapabilities(java.lang.String mimeType)
Returns the capabilities for a specific format.
|
java.lang.String[] |
getSupportedFormats()
Returns an array of Strings containing all supported formats.
|
protected java.lang.Class<? extends T> |
getTypeClass(java.lang.String type)
Returns the type of factory products for a specified format.
|
boolean |
isFormatSupported(java.lang.String mimeType)
Returns whether the specified MIME type is supported.
|
protected AbstractIOFactory(java.lang.String propFileName) throws java.io.IOException
propFileName
- File name of the properties file(s)java.io.IOException
- if reading the properties file(s) failedpublic IOCapabilities getCapabilities(java.lang.String mimeType)
getCapabilities
in interface IOFactory<T>
mimeType
- MIME type of the formatpublic java.util.List<IOCapabilities> getCapabilities()
getCapabilities
in interface IOFactory<T>
public java.lang.String[] getSupportedFormats()
getSupportedFormats
in interface IOFactory<T>
public boolean isFormatSupported(java.lang.String mimeType)
isFormatSupported
in interface IOFactory<T>
mimeType
- MIME type.true
if supported, otherwise false
.protected java.lang.Class<? extends T> getTypeClass(java.lang.String type)
type
- Format.