public interface IospFileWriter extends Closeable
| Modifier and Type | Method and Description |
|---|---|
int |
appendStructureData(Structure s,
StructureData sdata)
Deprecated.
will change to using ucar.array in ver7.
|
NetcdfFile |
create(String filename,
Group.Builder rootGroup,
int extra,
long preallocateSize,
boolean largeFile)
Create new file, populate it from the objects in rootGroup.
|
NetcdfFile |
getOutputFile() |
void |
openForWriting(String location,
Group.Builder rootGroup,
CancelTask cancelTask)
Open existing file, populate rootGroup.
|
void |
setFill(boolean fill)
Set the fill flag.
|
void |
updateAttribute(Group g,
Attribute att) |
void |
updateAttribute(Variable v2,
Attribute att)
TODO review this
Update the value of an existing attribute.
|
void |
writeData(Variable v2,
Section section,
Array values)
Deprecated.
will change to using ucar.array in ver7.
|
NetcdfFile create(String filename, Group.Builder rootGroup, int extra, long preallocateSize, boolean largeFile) throws IOException
filename - name of file to create.rootGroup - has the metadata of the file to be created. It is then modified, do not reuse.extra - if > 0, pad header with extra bytes (netcdf3 only).preallocateSize - if > 0, set length of file to this upon creation - this (usually) pre-allocates contiguous
storage.largeFile - if want large file format (netcdf3 only).IOExceptionvoid openForWriting(String location, Group.Builder rootGroup, CancelTask cancelTask) throws IOException
location - the existing filerootGroup - has the metadata of the file to be created. It is then modified, do not reuse.IOException - if I/O errorNetcdfFile getOutputFile()
void setFill(boolean fill)
fill - set fill mode true or false@Deprecated void writeData(Variable v2, Section section, Array values) throws IOException, InvalidRangeException
v2 - variable to write; must already exist.section - 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.
The origin and stride indicate where the data is placed into the stored Variable array.values - data to write. The shape must match section.getShape().IOException - if I/O errorInvalidRangeException - if invalid section@Deprecated int appendStructureData(Structure s, StructureData sdata) throws IOException, InvalidRangeException
s - belongs to this structuresdata - the stuctureData to appendIOExceptionInvalidRangeExceptionvoid updateAttribute(Variable v2, Attribute att) throws IOException
v2 - variable, or null for global attributeatt - replace with this valueIOExceptionvoid updateAttribute(Group g, Attribute att) throws IOException
IOException