Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHUNK_SIZE
The chunk size in kilobytes.
|
static double |
COMPATIBLE_METADATA_VERSION
The compatibility metadata package version.
|
static java.lang.String |
COMPATIBLE_MODE
The compatibility mode flag.
|
static java.lang.String |
COMPRESS_MODE
The compression mode flag.
|
static double |
CURRENT_METADATA_VERSION
The current metadata package version.
|
static java.lang.String[][] |
DEFAULTS
The property defaults array.
|
closed, DEFAULT_CHUNK_SIZE, sdid
info, isCanceled, variables, writeProgress, writeVariableName, writeVariables
Constructor and Description |
---|
CWHDFWriter(EarthDataInfo info,
double version,
java.lang.String file)
Constructs a CWHDF writer from the specified file.
|
CWHDFWriter(EarthDataInfo info,
java.lang.String file)
Constructs a CWHDF writer from the specified file.
|
CWHDFWriter(java.lang.String file)
Opens an existing CWHDF file using the specified file name.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Overrides the parent close to append the history before closing.
|
static java.lang.String |
getProperty(java.lang.String name)
Gets a property value from the system properties.
|
protected void |
setGlobalInfo()
Writes the earth data info metadata.
|
void |
setMetaVersion(double newVersion)
Sets the CoastWatch HDF metadata version.
|
protected void |
setVariableInfo(int sdsid,
DataVariable var)
Writes the data variable metadata.
|
void |
updateHistory(java.lang.String command,
java.lang.String[] argv)
Appends a command line to the file history attribute.
|
flush, getChunked, getChunkSize, getCompressed, getFilename, getSDID, getType, setAttribute, setAttributes, setChunkCompress, setChunked, setChunkSize, setCompressed, writeVariable
addVariable, cancel, finalize, getDestination, getProgress, getProgressLength, getProgressVariable
public static final double CURRENT_METADATA_VERSION
public static final double COMPATIBLE_METADATA_VERSION
public static final java.lang.String COMPATIBLE_MODE
public static final java.lang.String CHUNK_SIZE
public static final java.lang.String COMPRESS_MODE
public static final java.lang.String[][] DEFAULTS
public CWHDFWriter(java.lang.String file) throws hdf.hdflib.HDFException
file
- the HDF file name.hdf.hdflib.HDFException
- if an error occurred in an HDF routine.public CWHDFWriter(EarthDataInfo info, java.lang.String file) throws hdf.hdflib.HDFException, java.io.IOException, java.lang.ClassNotFoundException
info
- the earth data info object.file
- the new HDF file name.hdf.hdflib.HDFException
- if an error occurred in an HDF routine.java.io.IOException
- if an error occurred writing the file metadata.java.lang.ClassNotFoundException
- if the HDF attribute type is unknown.public CWHDFWriter(EarthDataInfo info, double version, java.lang.String file) throws hdf.hdflib.HDFException, java.io.IOException, java.lang.ClassNotFoundException
info
- the earth data info object.version
- the metadata version.file
- the new HDF file name.hdf.hdflib.HDFException
- if an error occurred in an HDF routine.java.io.IOException
- if an error occurred writing the file metadata.java.lang.ClassNotFoundException
- if the HDF attribute type is unknown.public static java.lang.String getProperty(java.lang.String name)
name
- the property name.public void setMetaVersion(double newVersion)
newVersion
- the CWHDF metadata version.public void updateHistory(java.lang.String command, java.lang.String[] argv) throws hdf.hdflib.HDFException, java.lang.ClassNotFoundException
command
- the command or program name.argv
- an array of command line arguments.hdf.hdflib.HDFException
- if an error occurred in an HDF routine.java.lang.ClassNotFoundException
- if the HDF attribute type is unknown.protected void setGlobalInfo() throws hdf.hdflib.HDFException, java.io.IOException, java.lang.ClassNotFoundException, java.io.UnsupportedEncodingException
HDFWriter
setGlobalInfo
in class HDFWriter
hdf.hdflib.HDFException
- if an error occurred in an HDF routine.java.io.IOException
- if an error occurred writing the file metadata.java.io.UnsupportedEncodingException
- if the transform class encoding
is not supported.java.lang.ClassNotFoundException
- if the HDF attribute type is unknown.protected void setVariableInfo(int sdsid, DataVariable var) throws hdf.hdflib.HDFException, java.io.IOException, java.lang.ClassNotFoundException
HDFWriter
setVariableInfo
in class HDFWriter
sdsid
- the variable HDF scientific dataset ID.var
- the variable for which to write info.hdf.hdflib.HDFException
- if an error occurred in an HDF routine.java.io.IOException
- if an error occurred writing the file metadata.java.lang.ClassNotFoundException
- if the HDF attribute type is unknown.