Class NOWRadiosp

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

    public class NOWRadiosp
    extends ucar.nc2.iosp.AbstractIOServiceProvider
    Created by IntelliJ IDEA. User: yuanho Date: Feb 10, 2010 Time: 11:22:03 AM To change this template use File | Settings | File Templates.
    • Constructor Summary

      Constructors 
      Constructor Description
      NOWRadiosp()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static int bytesToInt​(byte a, byte b, boolean swapBytes)  
      static int bytesToInt​(short a, short b, boolean swapBytes)  
      String getFileTypeDescription()  
      String getFileTypeId()  
      boolean isValidFile​(ucar.unidata.io.RandomAccessFile raf)
      Check if the file is a NOWRad file
      void open​(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile file, ucar.nc2.util.CancelTask cancelTask)
      Open the file and read the header part
      void reacquire()  
      ucar.ma2.Array readData​(ucar.nc2.Variable v2, ucar.ma2.Section section)
      Read the data for each variable passed in
      byte[] readOneRowData​(byte[] ddata, int rLen, int xt)
      Read data from encoded values and run len into regular data array
      Object readOneScanData​(ByteBuffer bos, ucar.nc2.iosp.nowrad.NOWRadheader.Vinfo vinfo, String vName)
      Read one scan radar data
      • Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider

        build, buildFinish, close, getDetailInfo, getFileTypeVersion, getLastModified, getStructureIterator, isBuilder, readSection, readToByteChannel, readToOutputStream, release, sendIospMessage, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebug
    • Field Detail

      • fileUsed

        protected int fileUsed
      • recStart

        protected int recStart
      • debug

        protected boolean debug
      • debugSize

        protected boolean debugSize
      • debugSPIO

        protected boolean debugSPIO
      • showHeaderBytes

        protected boolean showHeaderBytes
      • dimHash

        protected HashMap dimHash
      • fill

        protected boolean fill
      • readonly

        protected boolean readonly
    • Constructor Detail

      • NOWRadiosp

        public NOWRadiosp()
    • Method Detail

      • isValidFile

        public boolean isValidFile​(ucar.unidata.io.RandomAccessFile raf)
        Check if the file is a NOWRad file
      • getFileTypeId

        public String getFileTypeId()
      • getFileTypeDescription

        public String getFileTypeDescription()
      • open

        public void open​(ucar.unidata.io.RandomAccessFile raf,
                         ucar.nc2.NetcdfFile file,
                         ucar.nc2.util.CancelTask cancelTask)
                  throws IOException
        Open the file and read the header part
        Specified by:
        open in interface ucar.nc2.iosp.IOServiceProvider
        Overrides:
        open in class ucar.nc2.iosp.AbstractIOServiceProvider
        Throws:
        IOException
      • readData

        public ucar.ma2.Array readData​(ucar.nc2.Variable v2,
                                       ucar.ma2.Section section)
                                throws IOException,
                                       ucar.ma2.InvalidRangeException
        Read the data for each variable passed in
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • readOneScanData

        public Object readOneScanData​(ByteBuffer bos,
                                      ucar.nc2.iosp.nowrad.NOWRadheader.Vinfo vinfo,
                                      String vName)
        Read one scan radar data
        Parameters:
        bos - Data buffer
        vinfo - variable info
        Returns:
        the data object of scan data
      • bytesToInt

        public static int bytesToInt​(short a,
                                     short b,
                                     boolean swapBytes)
      • bytesToInt

        public static int bytesToInt​(byte a,
                                     byte b,
                                     boolean swapBytes)
      • readOneRowData

        public byte[] readOneRowData​(byte[] ddata,
                                     int rLen,
                                     int xt)
        Read data from encoded values and run len into regular data array
        Parameters:
        ddata - is encoded data values
        Returns:
        the data array of row data
      • 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