|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.nc2.N3iosp
public abstract class N3iosp
IOServiceProvider implementation abstract base class to read/write "version 3" netcdf files. AKA "file format version 1" files.
concrete class| Field Summary | |
|---|---|
static java.lang.String |
FillValue
|
static byte |
NC_FILL_BYTE
|
static char |
NC_FILL_CHAR
|
static double |
NC_FILL_DOUBLE
|
static float |
NC_FILL_FLOAT
|
static int |
NC_FILL_INT
|
static short |
NC_FILL_SHORT
|
| Constructor Summary | |
|---|---|
N3iosp()
|
|
| Method Summary | |
|---|---|
void |
close()
Close the file. |
void |
create(java.lang.String filename,
NetcdfFile ncfile,
boolean fill)
Create new file, populate it from the objects in ncfile. |
void |
flush()
Flush all data buffers to disk. |
java.lang.String |
getDetailInfo()
Show debug / underlying implementation details |
boolean |
isValidFile(RandomAccessFile raf)
Check if this is a valid file for this IOServiceProvider. |
void |
open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
Open existing file, and populate ncfile with it. |
Array |
readData(Variable v2,
java.util.List sectionList)
Read data from a top level Variable and return a memory resident Array. |
Array |
readNestedData(Variable v2,
java.util.List sectionList)
Read data from a Variable that is nested in the record Structure. |
void |
setProperties(java.util.List iospProperties)
|
static void |
setProperty(java.lang.String name,
java.lang.String value)
Set a static property. |
void |
setSpecial(java.lang.Object special)
A way to communicate arbitrary information to an iosp. |
boolean |
sync()
Check if file has changed, and reread metadata if needed. |
boolean |
syncExtend()
Extend the file if needed in a way that is compatible with the current metadata. |
java.lang.String |
toStringDebug(java.lang.Object o)
Debug info for this object. |
void |
writeData(Variable v2,
java.util.List sectionList,
Array values)
Write data into a variable. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte NC_FILL_BYTE
public static final char NC_FILL_CHAR
public static final short NC_FILL_SHORT
public static final int NC_FILL_INT
public static final float NC_FILL_FLOAT
public static final double NC_FILL_DOUBLE
public static final java.lang.String FillValue
| Constructor Detail |
|---|
public N3iosp()
| Method Detail |
|---|
public static void setProperty(java.lang.String name,
java.lang.String value)
name - property namevalue - property value
public boolean isValidFile(RandomAccessFile raf)
throws java.io.IOException
IOServiceProvider
isValidFile in interface IOServiceProviderraf - RandomAccessFile
java.io.IOExceptionpublic java.lang.String getDetailInfo()
IOServiceProvider
getDetailInfo in interface IOServiceProviderpublic void setSpecial(java.lang.Object special)
IOServiceProvider
setSpecial in interface IOServiceProviderspecial - opaque special settings.public void setProperties(java.util.List iospProperties)
public void open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
throws java.io.IOException
IOServiceProvider
open in interface IOServiceProviderraf - the file to work on, it has already passed the isValidFile() test.ncfile - add objects to this NetcdfFilecancelTask - used to monito user cancellation; may be null.
java.io.IOException
public Array readData(Variable v2,
java.util.List sectionList)
throws java.io.IOException,
InvalidRangeException
IOServiceProvider
readData in interface IOServiceProviderv2 - a top-level VariablesectionList - List of type Range specifying the section of data to read.
There must be a Range for each Dimension in the variable, in order.
Note: no nulls.
java.io.IOException
InvalidRangeExceptionRange
public Array readNestedData(Variable v2,
java.util.List sectionList)
throws java.io.IOException,
InvalidRangeException
readNestedData in interface IOServiceProviderv2 - a nested Variable.sectionList - List of type Range specifying the section of data to read. There must be a Range for each
Dimension in each parent, as well as in the Variable itself. Must be in order from outer to inner.
java.io.IOException
InvalidRangeException
public void create(java.lang.String filename,
NetcdfFile ncfile,
boolean fill)
throws java.io.IOException
IOServiceProviderWriter
create in interface IOServiceProviderWriterfilename - name of file to create.ncfile - get dimensions, attributes, and variables from here.fill - if true, write fill value into all variables.
java.io.IOException
public void writeData(Variable v2,
java.util.List sectionList,
Array values)
throws java.io.IOException,
InvalidRangeException
IOServiceProviderWriter
writeData in interface IOServiceProviderWriterv2 - variable to write; must already exist.sectionList - List of type Range specifying the section of data to write.
There must be a Range for each Dimension in the variable, in order.
The shape must match the shape of values.values - data to write. The shape must match the shape of Range list.
java.io.IOException
InvalidRangeException
public boolean syncExtend()
throws java.io.IOException
IOServiceProvider
syncExtend in interface IOServiceProviderjava.io.IOException
public boolean sync()
throws java.io.IOException
IOServiceProvider
sync in interface IOServiceProviderjava.io.IOException
public void flush()
throws java.io.IOException
IOServiceProviderWriter
flush in interface IOServiceProviderWriterjava.io.IOException
public void close()
throws java.io.IOException
IOServiceProvider
close in interface IOServiceProviderjava.io.IOExceptionpublic java.lang.String toStringDebug(java.lang.Object o)
toStringDebug in interface IOServiceProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||