@Deprecated public class FileWriter2 extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FileWriter2.ChunkingIndex
Deprecated.
TODO use ucar.nc2.writer.FileWriter
|
static class |
FileWriter2.N3StructureStrategy
Deprecated.
TODO use ucar.nc2.writer.FileWriter
|
Constructor and Description |
---|
FileWriter2(NetcdfFile fileIn,
String fileOutName,
NetcdfFileWriter.Version version,
ucar.nc2.write.Nc4Chunking chunker)
Deprecated.
Use this constructor to copy entire file.
|
FileWriter2(NetcdfFileWriter fileWriter)
Deprecated.
Use this constructor to copy specific variables to new file.
|
Modifier and Type | Method and Description |
---|---|
Variable |
addVariable(Variable oldVar)
Deprecated.
Specify which variable will get written
|
double |
copyVarData(List<Variable> oldVars,
Structure recordVar,
CancelTask cancel)
Deprecated.
Write data from varList into new file.
|
NetcdfFileWriter |
getNetcdfFileWriter()
Deprecated.
|
static void |
main(String[] arg)
Deprecated.
Better to use ucar.nc.dataset.NetcdfDataset main program instead.
|
static void |
setDebugFlags(DebugFlags debugFlags)
Deprecated.
Set debugging flags
|
void |
setN3StructureStrategy(FileWriter2.N3StructureStrategy n3StructureStrategy)
Deprecated.
|
NetcdfFile |
write()
Deprecated.
|
NetcdfFile |
write(CancelTask cancel)
Deprecated.
Write the input file to the output file.
|
public FileWriter2(NetcdfFile fileIn, String fileOutName, NetcdfFileWriter.Version version, ucar.nc2.write.Nc4Chunking chunker) throws IOException
fileIn
- copy this filefileOutName
- to this output fileversion
- output file versionchunker
- chunking strategy (netcdf4 only)IOException
- on read/write errorpublic FileWriter2(NetcdfFileWriter fileWriter)
fileWriter
- this encapsolates new file.public static void setDebugFlags(DebugFlags debugFlags)
debugFlags
- debug flagspublic void setN3StructureStrategy(FileWriter2.N3StructureStrategy n3StructureStrategy)
public NetcdfFileWriter getNetcdfFileWriter()
public Variable addVariable(Variable oldVar)
oldVar
- add this variable, and all parent groupspublic NetcdfFile write() throws IOException
IOException
public NetcdfFile write(CancelTask cancel) throws IOException
cancel
- allow user to cancel; may be null.IOException
public double copyVarData(List<Variable> oldVars, Structure recordVar, CancelTask cancel) throws IOException
oldVars
- list of variables from the original file, with data in themrecordVar
- the record variable from the original file, or null means dont use record variablescancel
- allow user to cancel, may be null.IOException
- if I/O errorpublic static void main(String[] arg) throws IOException
ucar.nc2.FileWriter -in fileIn -out fileOut.
where:
arg
- -in fileIn -out fileOut [-netcdf4]IOException
- on read or write error