public class EarthDataReaderFactory
extends java.lang.Object
addReader()
method, or by adding the class name
to the reader.properties
resource file.Constructor and Description |
---|
EarthDataReaderFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
addReader(java.lang.Class readerClass)
Adds a new reader to the list.
|
static EarthDataReader |
create(java.lang.String file)
Creates an earth data reader object.
|
static void |
setVerbose(boolean flag)
Sets the verbose mode.
|
public static void addReader(java.lang.Class readerClass)
java.io.IOException
if an error is encountered
reading the initial parts of the file, and/or if the file format
is not recognized. By convention, the reader should have a
constructor that takes a single String
parameter as
the file name.readerClass
- the new reader class to add to the list.public static void setVerbose(boolean flag)
flag
- the verbose flag.public static EarthDataReader create(java.lang.String file) throws java.io.IOException
file
- the file name. The file will be opened using the
different earth data reader classes in the list until the
correct constructor is found.java.io.IOException
- if the reader could not be created. Either
the file was not found, or the format was not recognized by any
reader.