public class McIDASGridReader
extends java.lang.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(java.lang.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)
|
float[] |
readGrid(McIDASGridRecord gr)
Read the grid
|
int |
readInt(int word)
Read an integer
|
protected RandomAccessFile rf
protected boolean needToSwap
public McIDASGridReader()
public McIDASGridReader(java.lang.String filename)
throws java.io.IOException
filename - filenamejava.io.IOException - problem reading filepublic McIDASGridReader(RandomAccessFile raf) throws java.io.IOException
raf - RandomAccessFilejava.io.IOException - problem reading filepublic final void init(RandomAccessFile raf) throws java.io.IOException
raf - RandomAccessFile to read.java.io.IOException - problem reading filepublic final boolean init(RandomAccessFile raf, boolean fullCheck) throws java.io.IOException
fullCheck - for a full check reading gridsraf - RandomAccessFile to read.java.io.IOException - problem reading fileprotected boolean init()
throws java.io.IOException
java.io.IOException - problem reading the dataprotected boolean init(boolean fullCheck)
throws java.io.IOException
fullCheck - for a full check reading gridsjava.io.IOException - problem reading the datapublic float[] readGrid(McIDASGridRecord gr) throws java.io.IOException
gr - the grid recordjava.io.IOExceptionpublic GridIndex getGridIndex()
public int readInt(int word)
throws java.io.IOException
word - word in file (0 based) to readjava.io.IOException - problem reading file