Class AreaServiceProvider

  • All Implemented Interfaces:
    ucar.nc2.iosp.IOServiceProvider

    public class AreaServiceProvider
    extends ucar.nc2.iosp.AbstractIOServiceProvider
    IOServiceProvider for McIDAS AREA files
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected AreaReader areaReader
      AREA file reader
      • Fields inherited from class ucar.nc2.iosp.AbstractIOServiceProvider

        location, ncfile, raf, rafOrder
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      String getFileTypeDescription()  
      String getFileTypeId()  
      boolean isValidFile​(ucar.unidata.io.RandomAccessFile raf)
      Is this a valid file?
      void open​(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask)
      Open the service provider for reading.
      void reacquire()  
      ucar.ma2.Array readData​(ucar.nc2.Variable v2, ucar.ma2.Section section)
      Read the data for the variable
      void release()  
      • 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
    • Constructor Detail

      • AreaServiceProvider

        public AreaServiceProvider()
    • Method Detail

      • isValidFile

        public boolean isValidFile​(ucar.unidata.io.RandomAccessFile raf)
                            throws IOException
        Is 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 IOException
        Open the service provider for reading.
        Specified by:
        open in interface ucar.nc2.iosp.IOServiceProvider
        Overrides:
        open in class ucar.nc2.iosp.AbstractIOServiceProvider
        Parameters:
        raf - file to read from
        ncfile - 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.InvalidRangeException
        Read the data for the variable
        Parameters:
        v2 - Variable to read
        section - section information
        Returns:
        Array of data
        Throws:
        IOException - problem reading from file
        ucar.ma2.InvalidRangeException - invalid Range
      • close

        public void close()
                   throws IOException
        Specified by:
        close in interface ucar.nc2.iosp.IOServiceProvider
        Overrides:
        close in class ucar.nc2.iosp.AbstractIOServiceProvider
        Throws:
        IOException
      • release

        public void release()
                     throws IOException
        Specified by:
        release in interface ucar.nc2.iosp.IOServiceProvider
        Overrides:
        release in class ucar.nc2.iosp.AbstractIOServiceProvider
        Throws:
        IOException
      • reacquire

        public void reacquire()
                       throws IOException
        Specified by:
        reacquire in interface ucar.nc2.iosp.IOServiceProvider
        Overrides:
        reacquire in class ucar.nc2.iosp.AbstractIOServiceProvider
        Throws:
        IOException