Package ucar.nc2.iosp.mcidas
Class AreaServiceProvider
- java.lang.Object
-
- ucar.nc2.iosp.AbstractIOServiceProvider
-
- ucar.nc2.iosp.mcidas.AreaServiceProvider
-
- All Implemented Interfaces:
ucar.nc2.iosp.IOServiceProvider
public class AreaServiceProvider extends ucar.nc2.iosp.AbstractIOServiceProviderIOServiceProvider for McIDAS AREA files
-
-
Field Summary
Fields Modifier and Type Field Description protected AreaReaderareaReaderAREA file reader
-
Constructor Summary
Constructors Constructor Description AreaServiceProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()StringgetFileTypeDescription()StringgetFileTypeId()booleanisValidFile(ucar.unidata.io.RandomAccessFile raf)Is this a valid file?voidopen(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask)Open the service provider for reading.voidreacquire()ucar.ma2.ArrayreadData(ucar.nc2.Variable v2, ucar.ma2.Section section)Read the data for the variablevoidrelease()-
Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
build, buildFinish, getDetailInfo, getFileTypeVersion, getLastModified, getStructureIterator, isBuilder, readSection, readToByteChannel, readToOutputStream, sendIospMessage, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebug
-
-
-
-
Field Detail
-
areaReader
protected AreaReader areaReader
AREA file reader
-
-
Method Detail
-
isValidFile
public boolean isValidFile(ucar.unidata.io.RandomAccessFile raf) throws IOExceptionIs this a valid file?- Parameters:
raf- RandomAccessFile to check- Returns:
- true if a valid McIDAS AREA file
- Throws:
IOException- problem reading file
-
getFileTypeId
public String getFileTypeId()
-
getFileTypeDescription
public String getFileTypeDescription()
-
open
public void open(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask) throws IOExceptionOpen the service provider for reading.- Specified by:
openin interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
openin classucar.nc2.iosp.AbstractIOServiceProvider- Parameters:
raf- file to read fromncfile- netCDF file we are writing to (memory)cancelTask- task for cancelling- Throws:
IOException- problem reading file
-
readData
public ucar.ma2.Array readData(ucar.nc2.Variable v2, ucar.ma2.Section section) throws IOException, ucar.ma2.InvalidRangeExceptionRead the data for the variable- Parameters:
v2- Variable to readsection- section information- Returns:
- Array of data
- Throws:
IOException- problem reading from fileucar.ma2.InvalidRangeException- invalid Range
-
close
public void close() throws IOException- Specified by:
closein interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
closein classucar.nc2.iosp.AbstractIOServiceProvider- Throws:
IOException
-
release
public void release() throws IOException- Specified by:
releasein interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
releasein classucar.nc2.iosp.AbstractIOServiceProvider- Throws:
IOException
-
reacquire
public void reacquire() throws IOException- Specified by:
reacquirein interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
reacquirein classucar.nc2.iosp.AbstractIOServiceProvider- Throws:
IOException
-
-