public abstract class EarthDataWriter
extends java.lang.Object
EarthDataInfo
object DataVariable
objects to the contents Modifier and Type | Field and Description |
---|---|
protected EarthDataInfo |
info
Earth data info object.
|
protected boolean |
isCanceled
The canceled flag, true if the current flush is canceled.
|
protected java.util.List<DataVariable> |
variables
Earth data variables.
|
protected int |
writeProgress
The current variable progress as a value in the range [0..100].
|
protected java.lang.String |
writeVariableName
The name of the variable currently being written.
|
protected int |
writeVariables
The number of variables written so far during the current flush
operation.
|
Modifier | Constructor and Description |
---|---|
protected |
EarthDataWriter(java.lang.String destination)
Constructs a new earth data writer and initializes the
variables to an empty list.
|
Modifier and Type | Method and Description |
---|---|
void |
addVariable(DataVariable var)
Adds a data variable to the writer.
|
void |
cancel()
Cancels a flush operation in progress.
|
abstract void |
close()
Closes the writer and frees any resources.
|
protected void |
finalize()
Closes the resources associated with the data destination.
|
abstract void |
flush()
Flushes all unwritten data to the destination.
|
java.lang.String |
getDestination()
Gets the earth data destination.
|
int |
getProgress()
Gets the current flush progress.
|
int |
getProgressLength()
Gets the progress length.
|
java.lang.String |
getProgressVariable()
Gets the name of the current variable being written in a flush
operation.
|
protected EarthDataInfo info
protected java.util.List<DataVariable> variables
protected int writeVariables
protected int writeProgress
protected java.lang.String writeVariableName
protected boolean isCanceled
protected EarthDataWriter(java.lang.String destination)
destination
- the data destination.public java.lang.String getProgressVariable()
public int getProgressLength()
public int getProgress()
getProgressLength()
public void cancel()
flush()
method will not work.public java.lang.String getDestination()
public void addVariable(DataVariable var)
var
- the data variable to add.flush()
public abstract void flush() throws java.io.IOException
java.io.IOException
- if the data destination had I/O errors.public abstract void close() throws java.io.IOException
flush
method is called prior to closing.java.io.IOException
- if the data destination had I/O errors.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable