Class GeomReaderFactory


  • public final class GeomReaderFactory
    extends java.lang.Object
    This class returns a specific GeomReader object that can read in the specified file. This class implements a pluggable architecture. A new GeomReader class can be added by simply creating a subclass of GeomReader, 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 the GeomReader objects found by this factory.
      static GeomReader getReader​(java.io.File theFile)
      Method that attempts to find an GeomReader object that might be able to read the data in the specified file.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getReader

        public static GeomReader getReader​(java.io.File theFile)
                                    throws java.io.IOException
        Method that attempts to find an GeomReader 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 the GeomReader objects found by this factory.
        Returns:
        An array of GeomReader objects (can be null if static initialization failed).