visad.data.netcdf.in
Class InMemoryStrategy

java.lang.Object
  extended by visad.data.netcdf.in.Strategy
      extended by visad.data.netcdf.in.InMemoryStrategy

public class InMemoryStrategy
extends Strategy

An import strategy that attempts to read the entire netCDF dataset into memory.

Instances are immutable.

Author:
Steven R. Emmerson

Field Summary
 
Fields inherited from class visad.data.netcdf.in.Strategy
DEFAULT, IN_MEMORY, MERGED_FILE_FLAT_FIELDS, UNMERGED_FILE_FLAT_FIELDS
 
Method Summary
 DataImpl getData(NetcdfAdapter adapter)
          Returns a VisAD data object corresponding to the netCDF dataset.
static InMemoryStrategy instance()
          Returns an instance of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static InMemoryStrategy instance()
Returns an instance of this class.

Returns:
An instance of this class.

getData

public DataImpl getData(NetcdfAdapter adapter)
                 throws IOException,
                        VisADException,
                        RemoteException,
                        BadFormException,
                        OutOfMemoryError

Returns a VisAD data object corresponding to the netCDF dataset.

This implementation uses the data-merging of Merger.instance().

Specified by:
getData in class Strategy
Parameters:
adapter - The netCDF-to-VisAD adapter.
Returns:
The top-level, VisAD data object of the netCDF dataset.
Throws:
VisADException - if a problem occurs in core VisAD -- probably because a VisAD object couldn't be created.
IOException - if a data access I/O failure occurs.
BadFormException - if the netCDF dataset doesn't conform to conventions implicit in constructing View.
OutOfMemoryError - if the netCDF dataset couldn't be imported into memory.
RemoteException - if a Java RMI failure occurs.