Package ucar.nc2.iosp.nowrad
Class NOWRadiosp
- java.lang.Object
-
- ucar.nc2.iosp.AbstractIOServiceProvider
-
- ucar.nc2.iosp.nowrad.NOWRadiosp
-
- All Implemented Interfaces:
ucar.nc2.iosp.IOServiceProvider
public class NOWRadiosp extends ucar.nc2.iosp.AbstractIOServiceProviderCreated by IntelliJ IDEA. User: yuanho Date: Feb 10, 2010 Time: 11:22:03 AM To change this template use File | Settings | File Templates.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleandebugprotected booleandebugSizeprotected booleandebugSPIOprotected HashMapdimHashprotected intfileUsedprotected booleanfillprotected NOWRadheaderheaderParserprotected booleanreadonlyprotected intrecStartprotected booleanshowHeaderBytes
-
Constructor Summary
Constructors Constructor Description NOWRadiosp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intbytesToInt(byte a, byte b, boolean swapBytes)static intbytesToInt(short a, short b, boolean swapBytes)StringgetFileTypeDescription()StringgetFileTypeId()booleanisValidFile(ucar.unidata.io.RandomAccessFile raf)Check if the file is a NOWRad filevoidopen(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile file, ucar.nc2.util.CancelTask cancelTask)Open the file and read the header partvoidreacquire()ucar.ma2.ArrayreadData(ucar.nc2.Variable v2, ucar.ma2.Section section)Read the data for each variable passed inbyte[]readOneRowData(byte[] ddata, int rLen, int xt)Read data from encoded values and run len into regular data arrayObjectreadOneScanData(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
-
headerParser
protected NOWRadheader headerParser
-
readonly
protected boolean readonly
-
-
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 IOExceptionOpen the file and read the header part- Specified by:
openin interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
openin classucar.nc2.iosp.AbstractIOServiceProvider- Throws:
IOException
-
readData
public ucar.ma2.Array readData(ucar.nc2.Variable v2, ucar.ma2.Section section) throws IOException, ucar.ma2.InvalidRangeExceptionRead the data for each variable passed in- Throws:
IOExceptionucar.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 buffervinfo- 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:
reacquirein interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
reacquirein classucar.nc2.iosp.AbstractIOServiceProvider- Throws:
IOException
-
-