E
- Element to be saved and parsed
public class IOFactory<E> extends Object
This class defines a standard way for getting reader and writer.
Modifier | Constructor and Description |
---|---|
protected |
IOFactory()
Basic constructor.
|
Modifier and Type | Method and Description |
---|---|
Reader<E> |
getReader(String extension)
Get the reader linked to an extension.
|
Writer<E> |
getWriter(String extension)
Get the writer linked to an extension.
|
Reader<E> |
registerReader(Reader<E> reader,
String extension)
Register a reader with an extension.
|
Writer<E> |
registerWriter(Writer<E> writer,
String extension)
Register a writer with an extension.
|
Reader<E> |
unregisterReader(String extension)
Unregister a reader extension.
|
Writer<E> |
unregisterWriter(String extension)
Unregister a writer extension.
|
public final Reader<E> registerReader(Reader<E> reader, String extension)
Register a reader with an extension.
reader
- The reader to registerextension
- The extension linked to the readerpublic final Writer<E> registerWriter(Writer<E> writer, String extension)
Register a writer with an extension.
writer
- The writer to registerextension
- The extension linked to the writerpublic final Reader<E> unregisterReader(String extension)
Unregister a reader extension.
extension
- The extension linked to a readerpublic final Writer<E> unregisterWriter(String extension)
Unregister a writer extension.
extension
- The extension linked to a writerpublic final Reader<E> getReader(String extension)
Get the reader linked to an extension.
extension
- The extension linked to a readerCopyright © 2010–2016 The Galactic Organization. All rights reserved.