|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.nc2.iosp.AbstractIOServiceProvider
ucar.nc2.iosp.grib.GribServiceProvider
public abstract class GribServiceProvider
Superclass for grib1 and grib2 iosp.
| Nested Class Summary | |
|---|---|
static class |
GribServiceProvider.IndexExtendMode
|
| Field Summary | |
|---|---|
static boolean |
addLatLon
|
static GribServiceProvider.IndexExtendMode |
extendMode
|
protected FmrcCoordSys |
fmrcCoordSys
|
static boolean |
forceNewIndex
|
protected NetcdfFile |
ncfile
|
protected RandomAccessFile |
raf
|
static GribServiceProvider.IndexExtendMode |
syncMode
|
static boolean |
useMaximalCoordSys
|
| Constructor Summary | |
|---|---|
GribServiceProvider()
|
|
| Method Summary | |
|---|---|
protected abstract float[] |
_readData(long offset1,
long offset2,
int decimalScale,
boolean bmsExists)
|
void |
close()
Close the file. |
java.lang.String |
getDetailInfo()
Show debug / underlying implementation details |
protected ucar.grib.Index |
getIndex(int edition,
java.lang.String location)
Open the index file. |
boolean |
isMissingXY(Variable v2,
int timeIdx,
int levIdx)
|
protected abstract void |
open(ucar.grib.Index index,
CancelTask cancelTask)
|
void |
open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
Open existing file, and populate ncfile with it. |
Array |
readData(Variable v2,
Section section)
Read data from a top level Variable and return a memory resident Array. |
void |
readLevel(Variable v2,
int timeIdx,
Range levelRange,
Range yRange,
Range xRange,
IndexIterator ii)
|
void |
readXY(Variable v2,
int timeIdx,
int levIdx,
Range yRange,
Range xRange,
IndexIterator ii)
|
java.lang.Object |
sendIospMessage(java.lang.Object special)
A way to communicate arbitrary information to an iosp. |
static void |
setDebugFlags(DebugFlags debugFlag)
|
static void |
setExtendIndex(boolean b)
|
static void |
setIndexAlwaysInCache(boolean b)
Set disk cache policy for index files. |
static void |
setIndexExtendMode(GribServiceProvider.IndexExtendMode mode)
|
static void |
setIndexSyncMode(GribServiceProvider.IndexExtendMode mode)
|
boolean |
sync()
Check if file has changed, and reread metadata if needed. |
java.lang.String |
toStringDebug(java.lang.Object o)
Debug info for this object. |
static void |
useMaximalCoordSys(boolean b)
|
| Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider |
|---|
createValidNetcdfObjectName, getStructureIterator, readSection, readToByteChannel, syncExtend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ucar.nc2.iosp.IOServiceProvider |
|---|
isValidFile |
| Field Detail |
|---|
protected NetcdfFile ncfile
protected RandomAccessFile raf
protected FmrcCoordSys fmrcCoordSys
public static boolean addLatLon
public static boolean forceNewIndex
public static boolean useMaximalCoordSys
public static GribServiceProvider.IndexExtendMode extendMode
public static GribServiceProvider.IndexExtendMode syncMode
| Constructor Detail |
|---|
public GribServiceProvider()
| Method Detail |
|---|
public static void useMaximalCoordSys(boolean b)
public static void setIndexExtendMode(GribServiceProvider.IndexExtendMode mode)
public static void setIndexSyncMode(GribServiceProvider.IndexExtendMode mode)
public static void setExtendIndex(boolean b)
public static void setIndexAlwaysInCache(boolean b)
b - set to this valuepublic static void setDebugFlags(DebugFlags debugFlag)
protected abstract void open(ucar.grib.Index index,
CancelTask cancelTask)
throws java.io.IOException
java.io.IOException
public void open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
throws java.io.IOException
IOServiceProvider
raf - the file to work on, it has already passed the isValidFile() test.ncfile - add objects to this empty NetcdfFilecancelTask - used to monitor user cancellation; may be null.
java.io.IOException - if read errorpublic java.lang.String toStringDebug(java.lang.Object o)
IOServiceProvider
toStringDebug in interface IOServiceProvidertoStringDebug in class AbstractIOServiceProvidero - which object
protected ucar.grib.Index getIndex(int edition,
java.lang.String location)
throws java.io.IOException
edition - which grib editionlocation - location of the file. The index file has ".gbx" appended.
java.io.IOException - on io error
public boolean sync()
throws java.io.IOException
IOServiceProvider
sync in interface IOServiceProvidersync in class AbstractIOServiceProviderjava.io.IOException - if read error
public Array readData(Variable v2,
Section section)
throws java.io.IOException,
InvalidRangeException
IOServiceProvider
v2 - a top-level Variablesection - the section of data to read.
There must be a Range for each Dimension in the variable, in order.
Note: no nulls allowed. IOSP may not modify.
java.io.IOException - if read error
InvalidRangeException - if invalid sectionRange
public void readLevel(Variable v2,
int timeIdx,
Range levelRange,
Range yRange,
Range xRange,
IndexIterator ii)
throws java.io.IOException,
InvalidRangeException
java.io.IOException
InvalidRangeException
public void readXY(Variable v2,
int timeIdx,
int levIdx,
Range yRange,
Range xRange,
IndexIterator ii)
throws java.io.IOException,
InvalidRangeException
java.io.IOException
InvalidRangeException
public boolean isMissingXY(Variable v2,
int timeIdx,
int levIdx)
throws InvalidRangeException
InvalidRangeException
protected abstract float[] _readData(long offset1,
long offset2,
int decimalScale,
boolean bmsExists)
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
IOServiceProvider
java.io.IOException - if read errorpublic java.lang.Object sendIospMessage(java.lang.Object special)
IOServiceProvider
sendIospMessage in interface IOServiceProvidersendIospMessage in class AbstractIOServiceProviderspecial - opaque message.
public java.lang.String getDetailInfo()
IOServiceProvider
getDetailInfo in interface IOServiceProvidergetDetailInfo in class AbstractIOServiceProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||