|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IOServiceProviderWriter
This is really just an interface to Netcdf-3 file writing. However, we will probably add Netcf-4 writing, exen if its only through a JNI interface. For now, other parties are discourages from using this, as it will likely be refactored in 4.1.
| Method Summary | |
|---|---|
void |
create(java.lang.String filename,
NetcdfFile ncfile,
int extra,
long preallocateSize,
boolean largeFile)
Create new file, populate it from the objects in ncfile. |
void |
flush()
Flush all data buffers to disk. |
boolean |
rewriteHeader(boolean largeFile)
|
void |
setFill(boolean fill)
Set the fill flag. |
void |
updateAttribute(Variable v2,
Attribute att)
Update the value of an existing attribute. |
void |
writeData(Variable v2,
Section section,
Array values)
Write data into a variable. |
| Methods inherited from interface ucar.nc2.iosp.IOServiceProvider |
|---|
close, getDetailInfo, isValidFile, open, readData, readSection, readToByteChannel, sendIospMessage, sync, syncExtend, toStringDebug |
| Method Detail |
|---|
void create(java.lang.String filename,
NetcdfFile ncfile,
int extra,
long preallocateSize,
boolean largeFile)
throws java.io.IOException
filename - name of file to create.ncfile - get dimensions, attributes, and variables from here.extra - if > 0, pad header with extra bytespreallocateSize - if > 0, set length of file to this upon creation - this (usually) pre-allocates contiguous storage.largeFile - if want large file format
java.io.IOException - if I/O errorvoid setFill(boolean fill)
fill - set fill mode true or false
void writeData(Variable v2,
Section section,
Array values)
throws java.io.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().
java.io.IOException - if I/O error
InvalidRangeException - if invalid section
boolean rewriteHeader(boolean largeFile)
throws java.io.IOException
java.io.IOException
void updateAttribute(Variable v2,
Attribute att)
throws java.io.IOException
v2 - variable, or null for global attributeatt - replace with this value
java.io.IOException - if I/O error
void flush()
throws java.io.IOException
java.io.IOException - if I/O error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||