Package geomss.geom.reader
Class GeomReaderFactory
- java.lang.Object
-
- geomss.geom.reader.GeomReaderFactory
-
public final class GeomReaderFactory extends java.lang.Object
This class returns a specificGeomReader
object that can read in the specified file. This class implements a pluggable architecture. A newGeomReader
class can be added by simply creating a subclass ofGeomReader
, creating a "GeomReader.properties" file that refers to it, and putting that properties file somewhere in the Java search path. All "GeomReader.properties" files that are found are merged together to create a global list of reader/handler mappings.Modified by: Joseph A. Huwaldt
- Version:
- January 1, 2024
- Author:
- Joseph A. Huwaldt, Date: April 14, 2000
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GeomReader[]
getAllReaders()
Method that returns a list of all theGeomReader
objects found by this factory.static GeomReader
getReader(java.io.File theFile)
Method that attempts to find anGeomReader
object that might be able to read the data in the specified file.
-
-
-
Method Detail
-
getReader
public static GeomReader getReader(java.io.File theFile) throws java.io.IOException
Method that attempts to find anGeomReader
object that might be able to read the data in the specified file.- Parameters:
theFile
- The file to find a reader for. May not be null.- Returns:
- A reader that is appropriate for the specified file, or
null
if the user cancels the multiple reader selection dialog. - Throws:
java.io.IOException
- if an appropriate reader for the file could not be found.
-
getAllReaders
public static GeomReader[] getAllReaders()
Method that returns a list of all theGeomReader
objects found by this factory.- Returns:
- An array of GeomReader objects (can be
null
if static initialization failed).
-
-