visad.data.netcdf
Class NetCDF
- java.lang.Object
-
- visad.data.FormNode
-
- visad.data.Form
-
- visad.data.netcdf.NetCDF
-
- All Implemented Interfaces:
- FormFileInformer
- Direct Known Subclasses:
- Plain
public abstract class NetCDF extends Form implements FormFileInformer
The NetCDF class provides an abstract class for the family of netCDF data forms for files in a local directory.
-
-
Constructor Summary
Constructors Constructor and Description NetCDF(java.lang.String name)Construct a netCDF data form.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description java.lang.String[]getDefaultSuffixes()Returns the path-component suffixes that identifies a dataset specification as being a netCDF dataset specification.booleanisThisType(byte[] block)Indicates if a given block of bytes is the start of a netCDF dataset.booleanisThisType(java.lang.String spec)Indicates if a dataset specification is consistent with a netCDF dataset specification.abstract DataImplopen(java.lang.String path)Open an existing file.-
Methods inherited from class visad.data.Form
getMathType
-
-
-
-
Constructor Detail
-
NetCDF
public NetCDF(java.lang.String name)
Construct a netCDF data form.- Parameters:
name- The name for the family of netCDF data forms.
-
-
Method Detail
-
open
public abstract DataImpl open(java.lang.String path) throws BadFormException, java.io.IOException, VisADException
Open an existing file.- Specified by:
openin classFormNode- Parameters:
path- The pathname of the file.- Throws:
BadFormException- netCDF couldn't handle VisAD object.VisADException- Couldn't create necessary VisAD object.java.io.IOException- I/O error.
-
isThisType
public boolean isThisType(java.lang.String spec)
Indicates if a dataset specification is consistent with a netCDF dataset specification.- Specified by:
isThisTypein interfaceFormFileInformer- Parameters:
spec- A dataset specification. NB: Not a URL.- Returns:
trueif and only if the dataset specification is consistent with a netCDF dataset specification.
-
isThisType
public boolean isThisType(byte[] block)
Indicates if a given block of bytes is the start of a netCDF dataset.- Specified by:
isThisTypein interfaceFormFileInformer- Parameters:
block- A block of data.- Returns:
- True if and only if the given block of bytes is the start of a netCDF dataset.
-
getDefaultSuffixes
public java.lang.String[] getDefaultSuffixes()
Returns the path-component suffixes that identifies a dataset specification as being a netCDF dataset specification. The suffixes don't have a leading period. The returned array can be safely modified.- Specified by:
getDefaultSuffixesin interfaceFormFileInformer- Returns:
- A freshly-allocated array with the relevant suffixes.
-
-
DMelt 3.0 © DataMelt by jWork.ORG