public class Nidsiosp extends AbstractIOServiceProvider
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
debug |
protected boolean |
debugSize |
protected boolean |
debugSPIO |
protected HashMap |
dimHash |
protected int |
fileUsed |
protected boolean |
fill |
protected ucar.nc2.iosp.nids.Nidsheader |
headerParser |
protected boolean |
readonly |
protected int |
recStart |
protected boolean |
showHeaderBytes |
raf| Constructor and Description |
|---|
Nidsiosp() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the file.
|
short |
convertunsignedByte2Short(byte b) |
void |
flush() |
String |
getFileTypeDescription()
Get a human-readable description for this file type.
|
String |
getFileTypeId()
Get a unique id for this file type.
|
float |
getHexDecodeValue(short val) |
boolean |
isValidFile(RandomAccessFile raf)
checking the file
|
static void |
main(String[] args) |
void |
open(RandomAccessFile raf,
NetcdfFile file,
CancelTask cancelTask)
Open the file and read the header part
|
ArrayStructure |
readCircleStructData(String name,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data
|
byte[] |
readCompData(long hoff,
long doff)
Read compressed data
|
byte[] |
readCompData1(byte[] uncomp,
long hoff,
long doff) |
Array |
readData(Variable v2,
Section section)
Read the data for each variable passed in
|
Object |
readDistance(ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) |
ArrayStructure |
readGraphicSymbolData(String name,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read graphic sysmbol structure data
|
ArrayStructure |
readLinkedVectorData(String name,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read linked vector sturcture data
|
Array |
readNestedCircleStructData(String name,
String memberName,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
List section)
Read nested data
|
Array |
readNestedData(Variable v2,
Section section)
Read nested structure data
|
Array |
readNestedDataUnlinkVector(String name,
String memberName,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
List section)
Read nested data
|
Array |
readNestedGraphicSymbolData(String name,
StructureMembers.Member m,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
List section)
Read nested graphic symbolic structure data
|
Array |
readNestedLinkedVectorData(String name,
String memberName,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
List section)
Read nested structure data
|
Array |
readNestedTextStringData(String name,
String memberName,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
List section)
Read nested data
|
Array |
readNestedVectorArrowData(String name,
String memberName,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
List section)
Read nested data
|
Array |
readNestedWindBarbData(String name,
String memberName,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
List section)
Read nested data
|
Object |
readOneArrayData(ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
String vName) |
Object |
readOneArrayData1(ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data
|
byte[] |
readOneBeamData(byte[] ddata,
int rLen,
int xt,
int level)
read one radial beam data
|
short[] |
readOneBeamShortData(byte[] ddata,
int rLen,
int xt,
int level)
read one radial beam data
|
byte[] |
readOneRowData(byte[] ddata,
int rLen,
int xt)
Read data from encoded values and run len into regular data array
|
short[] |
readOneRowData1(byte[] ddata,
int rLen,
int xt)
Read data from encoded values and run len into regular data array
|
short[] |
readOneRowData2(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.nids.Nidsheader.Vinfo vinfo,
String vName)
Read one scan radar data
|
Object |
readOneScanGenericData(ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
String vName)
Read one scan radar data
|
Object |
readRadialDataAzi(ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) |
Object |
readRadialDataEle(ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
read radail elevation array
|
Object |
readRadialDataGate(ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) |
Object |
readRadialDataLatLonAlt(double t,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
read radial data
|
Object |
readTabAlphaNumData(ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data
|
ArrayStructure |
readTextStringData(String name,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data
|
byte[] |
readUCompData(long hoff,
long doff)
Read uncompressed data
|
ArrayStructure |
readUnlinkedVectorData(String name,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data
|
ArrayStructure |
readVectorArrowData(String name,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data
|
ArrayStructure |
readWindBarbData(String name,
ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
List sList)
Read data
|
static int |
unsignedByteToInt(byte b) |
getDetailInfo, getFileTypeVersion, getStructureIterator, readSection, readToByteChannel, readToOutputStream, sendIospMessage, streamToByteChannel, sync, syncExtend, toStringDebugprotected boolean readonly
protected ucar.nc2.iosp.nids.Nidsheader headerParser
protected int fileUsed
protected int recStart
protected boolean debug
protected boolean debugSize
protected boolean debugSPIO
protected boolean showHeaderBytes
protected boolean fill
protected HashMap dimHash
public boolean isValidFile(RandomAccessFile raf)
raf - public String getFileTypeId()
IOServiceProviderpublic String getFileTypeDescription()
IOServiceProviderpublic void open(RandomAccessFile raf, NetcdfFile file, CancelTask cancelTask) throws IOException
open in interface IOServiceProvideropen in class AbstractIOServiceProviderraf - file - cancelTask - IOExceptionpublic Array readNestedData(Variable v2, Section section) throws IOException, InvalidRangeException
v2 - section - IOExceptionInvalidRangeExceptionpublic Array readData(Variable v2, Section section) throws IOException, InvalidRangeException
v2 - section - IOExceptionInvalidRangeExceptionRangepublic Array readNestedGraphicSymbolData(String name, StructureMembers.Member m, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List section) throws IOException, InvalidRangeException
name - Variable name,m - Structure mumber name,bos - data buffer,vinfo - variable info,section - variable sectionIOExceptionInvalidRangeExceptionpublic ArrayStructure readGraphicSymbolData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
name - Variable namebos - data buffer,vinfo - variable info,IOExceptionInvalidRangeExceptionpublic Array readNestedLinkedVectorData(String name, String memberName, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List section) throws IOException, InvalidRangeException
name - Variable name,memberName - mumber name,bos - data buffer,vinfo - variable info,section - variable sectionIOExceptionInvalidRangeExceptionpublic ArrayStructure readLinkedVectorData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
name - Variable name,bos - data buffer,vinfo - variable info,IOExceptionInvalidRangeExceptionpublic Array readNestedCircleStructData(String name, String memberName, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List section) throws IOException, InvalidRangeException
name - Variable name,memberName - Structure mumber name,bos - Data buffer,vinfo - variable info,section - variable sectionIOExceptionInvalidRangeExceptionpublic ArrayStructure readCircleStructData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
name - Variable name,bos - Data buffer,vinfo - variable info,IOExceptionInvalidRangeExceptionpublic Object readTabAlphaNumData(ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
bos - Data buffer,vinfo - variable info,IOExceptionInvalidRangeExceptionpublic Object readOneScanGenericData(ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, String vName) throws IOException, InvalidRangeException
bos - Data buffervinfo - variable infoIOExceptionInvalidRangeExceptionpublic Object readOneScanData(ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, String vName) throws IOException, InvalidRangeException
bos - Data buffervinfo - variable infoIOExceptionInvalidRangeExceptionpublic float getHexDecodeValue(short val)
public byte[] readOneBeamData(byte[] ddata,
int rLen,
int xt,
int level)
throws IOException,
InvalidRangeException
ddata - rLen - xt - level - IOExceptionInvalidRangeExceptionpublic short[] readOneBeamShortData(byte[] ddata,
int rLen,
int xt,
int level)
throws IOException,
InvalidRangeException
ddata - rLen - xt - level - IOExceptionInvalidRangeExceptionpublic Array readNestedWindBarbData(String name, String memberName, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List section) throws IOException, InvalidRangeException
name - Variable name,memberName - Structure mumber name,bos - Data buffer,vinfo - variable info,section - variable sectionIOExceptionInvalidRangeExceptionpublic ArrayStructure readWindBarbData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List sList) throws IOException, InvalidRangeException
name - Variable name,bos - Data buffer,vinfo - variable info,IOExceptionInvalidRangeExceptionpublic Array readNestedVectorArrowData(String name, String memberName, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List section) throws IOException, InvalidRangeException
name - Variable name,memberName - Structure mumber name,bos - Data buffer,vinfo - variable info,section - variable sectionIOExceptionInvalidRangeExceptionpublic ArrayStructure readVectorArrowData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
name - Variable name,bos - Data buffer,vinfo - variable info,IOExceptionInvalidRangeExceptionpublic Array readNestedTextStringData(String name, String memberName, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List section) throws IOException, InvalidRangeException
name - Variable name,memberName - Structure mumber name,bos - Data buffer,vinfo - variable info,section - variable sectionIOExceptionInvalidRangeExceptionpublic ArrayStructure readTextStringData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
name - Variable name,bos - Data buffer,vinfo - variable infoIOExceptionInvalidRangeExceptionpublic Array readNestedDataUnlinkVector(String name, String memberName, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List section) throws IOException, InvalidRangeException
name - Variable name,memberName - Structure mumber name,bos - Data buffer,vinfo - variable info,section - variable sectionIOExceptionInvalidRangeExceptionpublic ArrayStructure readUnlinkedVectorData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
name - Variable name,bos - Data buffer,vinfo - variable info,IOExceptionInvalidRangeExceptionpublic Object readOneArrayData(ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, String vName) throws IOException, InvalidRangeException
IOExceptionInvalidRangeExceptionpublic Object readOneArrayData1(ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
bos - is data buffervinfo - is variable infoIOExceptionInvalidRangeExceptionpublic short[] readOneRowData1(byte[] ddata,
int rLen,
int xt)
throws IOException,
InvalidRangeException
ddata - is encoded data valuesIOExceptionInvalidRangeExceptionpublic short[] readOneRowData2(byte[] ddata,
int rLen,
int xt)
throws IOException,
InvalidRangeException
ddata - is encoded data valuesIOExceptionInvalidRangeExceptionpublic byte[] readOneRowData(byte[] ddata,
int rLen,
int xt)
throws IOException,
InvalidRangeException
ddata - is encoded data valuesIOExceptionInvalidRangeExceptionpublic Object readRadialDataEle(ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
bos - vinfo - IOExceptionInvalidRangeExceptionpublic Object readRadialDataLatLonAlt(double t, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
t - vinfo - IOExceptionInvalidRangeExceptionpublic Object readRadialDataAzi(ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
IOExceptionInvalidRangeExceptionpublic Object readDistance(ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
IOExceptionInvalidRangeExceptionpublic Object readRadialDataGate(ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo) throws IOException, InvalidRangeException
IOExceptionInvalidRangeExceptionpublic byte[] readCompData1(byte[] uncomp,
long hoff,
long doff)
throws IOException
IOExceptionpublic byte[] readCompData(long hoff,
long doff)
throws IOException
hoff - header offsetdoff - data offsetIOExceptionpublic byte[] readUCompData(long hoff,
long doff)
throws IOException
hoff - header offsetdoff - data offsetIOExceptionpublic short convertunsignedByte2Short(byte b)
public static int unsignedByteToInt(byte b)
public void flush()
throws IOException
IOExceptionpublic void close()
throws IOException
IOServiceProviderclose in interface IOServiceProviderclose in class AbstractIOServiceProviderIOException - if read errorpublic static void main(String[] args) throws Exception, IOException, InstantiationException, IllegalAccessException
Copyright © 1999-2012 UCAR/Unidata. All Rights Reserved.