public class IdfileReaderFactory extends Object
Modifier and Type | Method and Description |
---|---|
IdfileReader |
getFileReader(File aFile)
This method returns the proper identification file reader depending on
the format of the provided file.
|
static IdfileReaderFactory |
getInstance()
A static method to retrieve the instance of the factory.
|
static Class |
registerIdFileReader(Class aReader,
String aExtension)
This method registers a new IdfileReader Class, and the file extension it
can read from.
|
public static IdfileReaderFactory getInstance()
public static Class registerIdFileReader(Class aReader, String aExtension)
aReader
- Class of the IdfileReader to register.aExtension
- String with the extension of the file that this
IdfileReader implementation can read.public IdfileReader getFileReader(File aFile) throws SAXException, FileNotFoundException, IOException, OutOfMemoryError
aFile
- the file to parseSAXException
- if a SAXException occursFileNotFoundException
- if a FileNotFoundException occursIOException
- if an IOException occursOutOfMemoryError
- thrown if the parser runs out of memoryCopyright © 2016. All rights reserved.