ucar.nc2.dataset
Interface ProxyReader

All Known Implementing Classes:
Aggregation, Aggregation.DatasetProxyReader, AggregationExisting, AggregationFmr, AggregationFmrc, AggregationFmrcSingle, AggregationNew, AggregationUnion

public interface ProxyReader

An object that knows how to read the data for a Variable.

Author:
caron

Method Summary
 Array read(Variable mainv, CancelTask cancelTask)
          Read all the data for a Variable.
 Array read(Variable mainv, CancelTask cancelTask, java.util.List section)
          Read a section of the data for a Variable and return a memory resident Array.
 

Method Detail

read

Array read(Variable mainv,
           CancelTask cancelTask)
           throws java.io.IOException
Read all the data for a Variable. The Array has the same element type and shape as the Variable.

Parameters:
mainv - the Variable
cancelTask - allow user to cancel, may be null.
Returns:
memory resident Array containing the data. Will have same shape as the Variable.
Throws:
java.io.IOException - on error

read

Array read(Variable mainv,
           CancelTask cancelTask,
           java.util.List section)
           throws java.io.IOException,
                  InvalidRangeException
Read a section of the data for a Variable and return a memory resident Array. The Array has the same element type as the Variable, and the requested shape. Note that this does not do rank reduction, so the returned Array has the same rank as the Variable. Use Array.reduce() for rank reduction.

Parameters:
mainv - the Variable
cancelTask - allow user to cancel, may be null.
section - list of Range specifying the section of data to read. Must be null or same rank as variable. If list is null, assume all data. Each Range corresponds to a Dimension. If the Range object is null, it means use the entire dimension.
Returns:
memory resident Array containing the data. Will have same shape as the Variable.
Throws:
java.io.IOException - on error
InvalidRangeException - if section is incorrect rank or shape.