public class McIDASGridReader extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
needToSwap
swap flag
|
protected RandomAccessFile |
rf
The file
|
| Constructor and Description |
|---|
McIDASGridReader()
Bean ctor
|
McIDASGridReader(RandomAccessFile raf)
Create a McIDASGrid Reader from the file
|
McIDASGridReader(String filename)
Create a McIDASGrid Reader from the file
|
| Modifier and Type | Method and Description |
|---|---|
GridIndex |
getGridIndex()
to get the grid header corresponding to the last grid read
|
protected boolean |
init()
Initialize this reader.
|
protected boolean |
init(boolean fullCheck)
Initialize this reader.
|
void |
init(RandomAccessFile raf)
Initialize the file, read in all the metadata (ala DM_OPEN)
|
boolean |
init(RandomAccessFile raf,
boolean fullCheck)
Initialize the file, read in all the metadata (ala DM_OPEN)
|
static void |
main(String[] args)
for testing purposes
|
float[] |
readGrid(McIDASGridRecord gr)
Read the grid
|
int |
readInt(int word)
Read an integer
|
protected RandomAccessFile rf
protected boolean needToSwap
public McIDASGridReader()
public McIDASGridReader(String filename) throws IOException
filename - filenameIOException - problem reading filepublic McIDASGridReader(RandomAccessFile raf) throws IOException
raf - RandomAccessFileIOException - problem reading filepublic final void init(RandomAccessFile raf) throws IOException
raf - RandomAccessFile to read.IOException - problem reading filepublic final boolean init(RandomAccessFile raf, boolean fullCheck) throws IOException
fullCheck - for a full check reading gridsraf - RandomAccessFile to read.IOException - problem reading fileprotected boolean init()
throws IOException
IOException - problem reading the dataprotected boolean init(boolean fullCheck)
throws IOException
fullCheck - for a full check reading gridsIOException - problem reading the datapublic float[] readGrid(McIDASGridRecord gr)
gr - the grid recordpublic GridIndex getGridIndex()
public int readInt(int word)
throws IOException
word - word in file (0 based) to readIOException - problem reading filepublic static void main(String[] args) throws IOException
args - file nameIOException - problem reading fileCopyright © 1999-2013 UCAR/Unidata. All Rights Reserved.