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 specificGeomReaderobject that can read in the specified file. This class implements a pluggable architecture. A newGeomReaderclass 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 theGeomReaderobjects found by this factory.static GeomReadergetReader(java.io.File theFile)Method that attempts to find anGeomReaderobject 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 anGeomReaderobject 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
nullif 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 theGeomReaderobjects found by this factory.- Returns:
- An array of GeomReader objects (can be
nullif static initialization failed).
-
-