public class SigmetIOServiceProvider extends AbstractIOServiceProvider
| Modifier and Type | Field and Description |
|---|---|
static Map<String,Number> |
recHdr |
raf| Constructor and Description |
|---|
SigmetIOServiceProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the file.
|
void |
doNetcdfFileCoordinate(NetcdfFile ncfile,
int[] bst,
short[] yr,
short[] m,
short[] dda,
ArrayList<Variable> varList,
Map<String,Number> recHdr)
Fill all of the variables/attributes in the ncfile
|
String |
getDetailInfo()
Show debug / underlying implementation details
|
String |
getFileTypeDescription()
Get a human-readable description for this file type.
|
String |
getFileTypeId()
Get a unique id for this file type.
|
String |
getFileTypeVersion()
Get the version of this file type.
|
ArrayList<Variable> |
init(RandomAccessFile raf,
NetcdfFile ncfile,
Map<String,String> hdrNames)
Define Dimensions, Variables, Attributes in ncfile
|
boolean |
isValidFile(RandomAccessFile raf)
Check if this is a valid SIGMET-IRIS file for this IOServiceProvider.
|
static void |
main(String[] args) |
void |
open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
Open existing file, and populate ncfile with it.
|
Array |
readData(Variable v2,
Section section)
Read data from a top level Variable and return a memory resident Array.
|
Array |
readData1(Variable v2,
Section section)
Read data from a top level Variable and return a memory resident Array.
|
Array |
readFloatData(LayoutRegular index,
Variable v2)
Read data from a top level Variable of FLOAT data type and return a memory resident Array.
|
Array |
readIntData(LayoutRegular index,
Variable v2)
Read data from a top level Variable of INTEGER data type and return a memory resident Array.
|
Array |
readNestedData(Variable v2,
List section) |
static Map<String,Number> |
readRecordsHdr(RandomAccessFile raf)
Read some global data from SIGMET file.
|
Map<String,String> |
readStnNames(RandomAccessFile raf)
Read StationName strings
|
long |
readToByteChannel11(Variable v2,
Section section,
WritableByteChannel channel)
Read data from a top level Variable and send data to a WritableByteChannel.
|
void |
setSpecial(Object special) |
String |
toStringDebug(Object o)
Debug info for this object.
|
getStructureIterator, readSection, readToByteChannel, readToOutputStream, sendIospMessage, streamToByteChannel, sync, syncExtendpublic static void main(String[] args)
public String getFileTypeDescription()
IOServiceProviderpublic String getFileTypeVersion()
IOServiceProvidergetFileTypeVersion in interface IOServiceProvidergetFileTypeVersion in class AbstractIOServiceProviderpublic String getFileTypeId()
IOServiceProviderpublic boolean isValidFile(RandomAccessFile raf)
raf - RandomAccessFilepublic void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws IOException
open in interface IOServiceProvideropen in class AbstractIOServiceProviderraf - the file to work on, it has already passed the isValidFile() test.ncfile - add objects to this empty NetcdfFilecancelTask - used to monitor user cancellation; may be null.IOException - if read errorpublic static Map<String,Number> readRecordsHdr(RandomAccessFile raf)
public Map<String,String> readStnNames(RandomAccessFile raf)
public ArrayList<Variable> init(RandomAccessFile raf, NetcdfFile ncfile, Map<String,String> hdrNames) throws IOException
raf - ucar.unidata.io.RandomAccessFile corresponds of SIGMET datafile.ncfile - an empty NetcdfFile object which will be filled.hdrNames - java.util.Map with values for "StationName.." AttributesIOExceptionpublic void doNetcdfFileCoordinate(NetcdfFile ncfile, int[] bst, short[] yr, short[] m, short[] dda, ArrayList<Variable> varList, Map<String,Number> recHdr)
ncfile - NetcdfFile object which will be filled.bst - number of seconds since midnight for start of sweepyr - year of start of each sweepm - month of start of each sweepdda - day of start of each sweepvarList - ArrayList of Variables of ncfilerecHdr - java.util.Map with values for Attributespublic Array readData1(Variable v2, Section section) throws IOException, InvalidRangeException
v2 - Variable. It may have FLOAT/INTEGER data type.section - wanted section of data of Variable. The section list is a list
of ucar.ma2.Range which define the requested data subset.IOExceptionInvalidRangeExceptionpublic Array readData(Variable v2, Section section) throws IOException, InvalidRangeException
IOServiceProviderv2 - 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.IOException - if read errorInvalidRangeException - if invalid sectionRangepublic Array readIntData(LayoutRegular index, Variable v2) throws IOException
index - LayoutRegular objectv2 - Variable has INTEGER data type.IOExceptionpublic Array readFloatData(LayoutRegular index, Variable v2) throws IOException
index - LayoutRegular objectv2 - Variable has FLOAT data type.IOExceptionpublic long readToByteChannel11(Variable v2, Section section, WritableByteChannel channel) throws IOException, InvalidRangeException
v2 - Variablesection - wanted section of data of Variable. The section list is a list
of ucar.ma2.Range which define the requested data subset.channel - WritableByteChannel object - channel that can write bytes.IOExceptionInvalidRangeExceptionpublic Array readNestedData(Variable v2, List section) throws IOException, InvalidRangeException
IOExceptionInvalidRangeExceptionpublic void close()
throws IOException
IOServiceProviderclose in interface IOServiceProviderclose in class AbstractIOServiceProviderIOException - if read errorpublic void setSpecial(Object special)
public String toStringDebug(Object o)
IOServiceProvidertoStringDebug in interface IOServiceProvidertoStringDebug in class AbstractIOServiceProvidero - which objectpublic String getDetailInfo()
IOServiceProvidergetDetailInfo in interface IOServiceProvidergetDetailInfo in class AbstractIOServiceProviderCopyright © 1999-2012 UCAR/Unidata. All Rights Reserved.