|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectucar.netcdf.AbstractNetcdf
ucar.netcdf.NetcdfFile
public class NetcdfFile
A concrete implementation of the Netcdf interface, this class provides connection to NetCDF version 1 files.
Constructors for creating new files and opening existing ones.
Netcdf| Constructor Summary | |
|---|---|
NetcdfFile(java.io.File file,
boolean readonly)
Open existing netcdf version 1 file. |
|
NetcdfFile(java.io.File file,
boolean clobber,
boolean fill,
Schema template)
Create a new netcdf version 1 file from a Schema template. |
|
NetcdfFile(java.lang.String path,
boolean ro)
Open existing netcdf version 1 file. |
|
NetcdfFile(java.lang.String path,
boolean clobber,
boolean fill,
Schema template)
Create a new netcdf version 1 file from a Schema template. |
|
NetcdfFile(java.net.URL url)
Open existing, read-only netcdf file through a URL. |
|
| Method Summary | |
|---|---|
void |
close()
Close this netcdf file. |
protected void |
finalize()
Ensures that the close method of this file is called when there are no more references to it. |
void |
flush()
Flush anything written to disk. |
java.io.File |
getFile()
Useful for identifying this instance among others. |
boolean |
getFill()
Get the current "fill mode". |
java.lang.String |
getName()
Useful for identifying this instance among others. |
protected Accessor |
ioFactory(ProtoVariable proto)
Used when creating variables to populate this. |
void |
setFill(boolean pleaseFill)
Sets the "fill mode" to the argument. |
void |
toCdl(java.lang.StringBuffer buf)
Format as CDL. |
UnlimitedDimension |
unlimitedDimension()
Deprecated. |
| Methods inherited from class ucar.netcdf.AbstractNetcdf |
|---|
add, contains, contains, get, getAttribute, getAttributes, getDimensions, initHashtable, iterator, putAttribute, putDimension, size, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NetcdfFile(java.io.File file,
boolean clobber,
boolean fill,
Schema template)
throws java.io.IOException
file - the file name as File objectclobber - if true, overwrite existingfill - if false, suppress variable pre filltemplate - the Schema used as construction template. May be empty,
shouldn't be null.
java.io.IOExceptionsetFill(boolean),
Netcdf
public NetcdfFile(java.lang.String path,
boolean clobber,
boolean fill,
Schema template)
throws java.io.IOException
path - the file name as a Stringclobber - if true, overwrite existingfill - if false, suppress variable pre filltemplate - the Schema used as construction template. May be empty,
shouldn't be null.
java.io.IOExceptionsetFill(boolean),
Netcdf
public NetcdfFile(java.io.File file,
boolean readonly)
throws java.io.IOException
file - the file name as File objectreadonly - if true, open read only,
else open for read and write.
java.io.IOException
public NetcdfFile(java.lang.String path,
boolean ro)
throws java.io.IOException
path - the file name as a Stringreadonly - if true, open read only,
else open for read and write.
java.io.IOException
public NetcdfFile(java.net.URL url)
throws java.io.FileNotFoundException,
java.io.IOException
Modified from ncBrowse (Donald Denbo).
url - the URL of the netCDF dataset.
java.io.FileNotFoundException - if the URL specifies a file that doesn't
exist.
java.io.IOException - if an I/O failure occurs.| Method Detail |
|---|
public void close()
throws java.io.IOException
java.io.IOExceptionRandomAccessFile.close()
public void flush()
throws java.io.IOException
java.io.IOExceptionRandomAccessFile.flush()public final java.io.File getFile()
public final java.lang.String getName()
public void setFill(boolean pleaseFill)
pleaseFill - true to fill.getFill()public final boolean getFill()
setFill(boolean)public final UnlimitedDimension unlimitedDimension()
public void toCdl(java.lang.StringBuffer buf)
toCdl in class AbstractNetcdfbuf - StringBuffer into which to writeprotected Accessor ioFactory(ProtoVariable proto)
AbstractNetcdf
ioFactory in class AbstractNetcdf
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - The lack of covariance for exception specifications
dictates the specificed type;
it can actually only be IOException thrown
by RandomAccessFile.close.close()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||