|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectGribFile
public final class GribFile
A class that represents a GRIB file. It consists of a number of records which are represented by GribRecord objects.
Nested Class Summary | |
---|---|
static class |
GribFile.AccessType
Access type enumeration. |
Field Summary | |
---|---|
static int |
DEF_RECORDS
Default number of records. |
Method Summary | |
---|---|
void |
addRecord(GribRecord rec)
|
void |
addRecord(GribRecord rec,
int pos)
addRecord |
static boolean |
canDecodeInput(Object input)
The goal of this method is to check the provided object to see if it can be decoded as a GribFile. |
void |
clean()
clean, cleans the GribFile from anything it contains. |
void |
dispose()
Release all the used resource for this grib file. |
boolean |
equals(Object obj)
DO NOT USE THIS ONE |
Object |
getOriginatingSource()
|
GribRecord |
getRecord(int i)
Get a specific GRIB record of this GRIB file as GribRecord object. |
int |
getRecordCount()
Get the number of records this GRIB file contains. |
static GribFile |
open(Object source,
GribFile.AccessType accessType)
|
void |
parseGribFile()
Parse a GribFile. |
boolean |
removeRecord(int pos)
This method is responsible for removing a record from the record map. |
void |
writeTo(OutputStream out)
writeTo |
Methods inherited from class Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEF_RECORDS
Method Detail |
---|
public void parseGribFile() throws IOException
IOException
- if stream can not be opened etc.
NotSupportedException
- DOCUMENT ME!
NoValidGribException
- if stream does not contain a valid GRIB filepublic GribRecord getRecord(int i) throws NoSuchElementException, IndexOutOfBoundsException
i
- number of GRIB record, first record is number 1
NoSuchElementException
- if record number does not exist
IndexOutOfBoundsException
- if JGrib doesn't yet support the operationpublic int getRecordCount()
public void writeTo(OutputStream out) throws NoSuchElementException, IOException
out
- OutputStream
NoSuchElementException
- DOCUMENT ME!
IOException
- DOCUMENT ME!public boolean equals(Object obj)
equals
in class Object
obj
- Object
public void clean()
public void addRecord(GribRecord rec)
public void addRecord(GribRecord rec, int pos)
rec
- GribRecordpos
- DOCUMENT ME!
IndexOutOfBoundsException
- DOCUMENT ME!public boolean removeRecord(int pos)
pos
- int The position of the record to be removed
public static boolean canDecodeInput(Object input)
input
- The provided object to be checked for decodeability.
public static GribFile open(Object source, GribFile.AccessType accessType) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public void dispose()
public Object getOriginatingSource()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |