public class NOWRadiosp extends AbstractIOServiceProvider
IOServiceProvider.SortGroup
Modifier and Type | Field and Description |
---|---|
protected boolean |
debug |
protected boolean |
debugSize |
protected boolean |
debugSPIO |
protected java.util.HashMap |
dimHash |
protected int |
fileUsed |
protected boolean |
fill |
protected NOWRadheader |
headerParser |
protected boolean |
readonly |
protected int |
recStart |
protected boolean |
showHeaderBytes |
location, ncfile, raf, rafOrder
Constructor and Description |
---|
NOWRadiosp() |
Modifier and Type | Method and Description |
---|---|
static int |
bytesToInt(byte a,
byte b,
boolean swapBytes) |
static int |
bytesToInt(short a,
short b,
boolean swapBytes) |
java.lang.String |
getFileTypeDescription()
Get a human-readable description for this file type.
|
java.lang.String |
getFileTypeId()
Get a unique id for this file type.
|
boolean |
isValidFile(RandomAccessFile raf)
Check if the file is a NOWRad file
|
void |
open(RandomAccessFile raf,
NetcdfFile file,
CancelTask cancelTask)
Open the file and read the header part
|
void |
reacquire()
Reacquire any resources like file handles
Used when reactivating in cache.
|
Array |
readData(Variable v2,
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
|
java.lang.Object |
readOneScanData(java.nio.ByteBuffer bos,
ucar.nc2.iosp.nowrad.NOWRadheader.Vinfo vinfo,
java.lang.String vName)
Read one scan radar data
|
build, buildFinish, close, getDetailInfo, getFileTypeVersion, getLastModified, getStructureIterator, isBuilder, readSection, readToByteChannel, readToOutputStream, release, sendIospMessage, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebug
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareTo, getSortGroup
protected int fileUsed
protected int recStart
protected boolean debug
protected boolean debugSize
protected boolean debugSPIO
protected boolean showHeaderBytes
protected java.util.HashMap dimHash
protected boolean fill
protected NOWRadheader headerParser
protected boolean readonly
public boolean isValidFile(RandomAccessFile raf)
raf
- RandomAccessFilepublic java.lang.String getFileTypeId()
IOServiceProvider
public java.lang.String getFileTypeDescription()
IOServiceProvider
public void open(RandomAccessFile raf, NetcdfFile file, CancelTask cancelTask) throws java.io.IOException
open
in interface IOServiceProvider
open
in class AbstractIOServiceProvider
raf
- the file to work on, it has already passed the isValidFile() test.file
- add objects to this empty NetcdfFilecancelTask
- used to monitor user cancellation; may be null.java.io.IOException
- if read errorpublic Array readData(Variable v2, Section section) throws java.io.IOException, InvalidRangeException
v2
- a top-level Variablesection
- the section of data to read. There must be a Range for each Dimension in the variable, in order.
Note: no nulls allowed.
IOSP may not modify.java.io.IOException
- if read errorInvalidRangeException
- if invalid sectionRange
public java.lang.Object readOneScanData(java.nio.ByteBuffer bos, ucar.nc2.iosp.nowrad.NOWRadheader.Vinfo vinfo, java.lang.String vName)
bos
- Data buffervinfo
- variable infopublic static int bytesToInt(short a, short b, boolean swapBytes)
public static int bytesToInt(byte a, byte b, boolean swapBytes)
public byte[] readOneRowData(byte[] ddata, int rLen, int xt)
ddata
- is encoded data valuespublic void reacquire() throws java.io.IOException
IOServiceProvider
reacquire
in interface IOServiceProvider
reacquire
in class AbstractIOServiceProvider
java.io.IOException