|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.nc2.iosp.nids.Nidsiosp
public class Nidsiosp
IOServiceProvider implementation abstract base class to read/write "version 3" netcdf files. AKA "file format version 1" files.
see concrete class
| Field Summary | |
|---|---|
protected boolean |
debug
|
protected boolean |
debugSize
|
protected boolean |
debugSPIO
|
protected java.util.HashMap |
dimHash
|
protected int |
fileUsed
|
protected boolean |
fill
|
protected ucar.nc2.iosp.nids.Nidsheader |
headerParser
|
protected boolean |
readonly
|
protected int |
recStart
|
protected boolean |
showHeaderBytes
|
| Constructor Summary | |
|---|---|
Nidsiosp()
|
|
| Method Summary | |
|---|---|
void |
close()
Close the file. |
protected static char[] |
convertByteToChar(byte[] byteArray)
|
protected static byte[] |
convertCharToByte(char[] from)
|
short |
convertunsignedByte2Short(byte b)
|
void |
flush()
|
java.lang.String |
getDetailInfo()
Show debug / underlying implementation details |
boolean |
isValidFile(RandomAccessFile raf)
Check if this is a valid file for this IOServiceProvider. |
static void |
main(java.lang.String[] args)
|
void |
open(RandomAccessFile raf,
NetcdfFile file,
CancelTask cancelTask)
Open existing file, and populate ncfile with it. |
ArrayStructure |
readCircleStructData(java.lang.String name,
java.nio.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,
java.util.List sectionList)
Read data from a top level Variable and return a memory resident Array. |
java.lang.Object |
readDistance(ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
|
ArrayStructure |
readGraphicSymbolData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data |
ArrayStructure |
readLinkedVectorData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data |
Array |
readNestedCircleStructData(java.lang.String name,
java.lang.String memberName,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
Read nested data |
Array |
readNestedData(Variable v2,
java.util.List section)
Read data from a Variable that is nested in one or more Structures. |
Array |
readNestedDataUnlinkVector(java.lang.String name,
java.lang.String memberName,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
Read nested data |
Array |
readNestedGraphicSymbolData(java.lang.String name,
StructureMembers.Member m,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
Read nested data |
Array |
readNestedLinkedVectorData(java.lang.String name,
java.lang.String memberName,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
Read nested data |
Array |
readNestedTextStringData(java.lang.String name,
java.lang.String memberName,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
Read nested data |
Array |
readNestedVectorArrowData(java.lang.String name,
java.lang.String memberName,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
Read nested data |
Array |
readNestedWindBarbData(java.lang.String name,
java.lang.String memberName,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
Read nested data |
java.lang.Object |
readOneArrayData(java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.lang.String vName)
|
java.lang.Object |
readOneArrayData1(java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data |
byte[] |
readOneBeamData(byte[] ddata,
int rLen,
int xt,
int off)
|
byte[] |
readOneRowData(byte[] ddata,
int rLen,
int xt)
Read data from encoded values and run len into regular data array |
byte[] |
readOneRowData1(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.nids.Nidsheader.Vinfo vinfo,
java.lang.String vName)
Read data |
java.lang.Object |
readRadialDataAzi(java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
|
java.lang.Object |
readRadialDataEle(java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
|
java.lang.Object |
readRadialDataGate(ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
|
java.lang.Object |
readRadialDataLatLonAlt(double t,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
|
java.lang.Object |
readTabAlphaNumData(java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data |
ArrayStructure |
readTextStringData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data |
byte[] |
readUCompData(long hoff,
long doff)
Read uncompressed data |
ArrayStructure |
readUnlinkedVectorData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data |
ArrayStructure |
readVectorArrowData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
Read data |
ArrayStructure |
readWindBarbData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List sList)
Read data |
void |
setSpecial(java.lang.Object special)
A way to communicate arbitrary information to an iosp. |
boolean |
sync()
Check if file has changed, and reread metadata if needed. |
boolean |
syncExtend()
Extend the file if needed in a way that is compatible with the current metadata. |
java.lang.String |
toStringDebug(java.lang.Object o)
Debug info for this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected 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 java.util.HashMap dimHash
| Constructor Detail |
|---|
public Nidsiosp()
| Method Detail |
|---|
public void setSpecial(java.lang.Object special)
IOServiceProvider
setSpecial in interface IOServiceProviderspecial - opaque special settings.
public Array readNestedData(Variable v2,
java.util.List section)
throws java.io.IOException,
InvalidRangeException
IOServiceProviderv2.getParent() is called to get the containing Structures.
readNestedData in interface IOServiceProviderv2 - a nested Variable.section - List of type Range specifying the section of data to read. There must be a Range for each
Dimension in each parent, as well as in the Variable itself. Must be in order from outer to inner.
Note: no nulls.
java.io.IOException
InvalidRangeExceptionpublic boolean isValidFile(RandomAccessFile raf)
IOServiceProvider
isValidFile in interface IOServiceProviderraf - RandomAccessFile
public void open(RandomAccessFile raf,
NetcdfFile file,
CancelTask cancelTask)
throws java.io.IOException
IOServiceProvider
open in interface IOServiceProviderraf - the file to work on, it has already passed the isValidFile() test.file - add objects to this NetcdfFilecancelTask - used to monito user cancellation; may be null.
java.io.IOException
public Array readData(Variable v2,
java.util.List sectionList)
throws java.io.IOException,
InvalidRangeException
IOServiceProvider
readData in interface IOServiceProviderv2 - a top-level VariablesectionList - List of type Range specifying the section of data to read.
There must be a Range for each Dimension in the variable, in order.
Note: no nulls.
java.io.IOException
InvalidRangeExceptionRange
public Array readNestedGraphicSymbolData(java.lang.String name,
StructureMembers.Member m,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
throws java.io.IOException,
InvalidRangeException
name - Variable name,m - Structure mumber name,bos - data buffer,vinfo - variable info,section - variable section
java.io.IOException
InvalidRangeException
public ArrayStructure readGraphicSymbolData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
name - Variable namebos - data buffer,vinfo - variable info,
java.io.IOException
InvalidRangeException
public Array readNestedLinkedVectorData(java.lang.String name,
java.lang.String memberName,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
throws java.io.IOException,
InvalidRangeException
name - Variable name,memberName - mumber name,bos - data buffer,vinfo - variable info,section - variable section
java.io.IOException
InvalidRangeException
public ArrayStructure readLinkedVectorData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
name - Variable name,bos - data buffer,vinfo - variable info,
java.io.IOException
InvalidRangeException
public Array readNestedCircleStructData(java.lang.String name,
java.lang.String memberName,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
throws java.io.IOException,
InvalidRangeException
name - Variable name,memberName - Structure mumber name,bos - Data buffer,vinfo - variable info,section - variable section
java.io.IOException
InvalidRangeException
public ArrayStructure readCircleStructData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
name - Variable name,bos - Data buffer,vinfo - variable info,
java.io.IOException
InvalidRangeException
public java.lang.Object readTabAlphaNumData(java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
bos - Data buffer,vinfo - variable info,
java.io.IOException
InvalidRangeException
public java.lang.Object readOneScanData(java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.lang.String vName)
throws java.io.IOException,
InvalidRangeException
bos - Data buffervinfo - variable info
java.io.IOException
InvalidRangeException
public byte[] readOneBeamData(byte[] ddata,
int rLen,
int xt,
int off)
throws java.io.IOException,
InvalidRangeException
java.io.IOException
InvalidRangeException
public Array readNestedWindBarbData(java.lang.String name,
java.lang.String memberName,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
throws java.io.IOException,
InvalidRangeException
name - Variable name,memberName - Structure mumber name,bos - Data buffer,vinfo - variable info,section - variable section
java.io.IOException
InvalidRangeException
public ArrayStructure readWindBarbData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List sList)
throws java.io.IOException,
InvalidRangeException
name - Variable name,bos - Data buffer,vinfo - variable info,
java.io.IOException
InvalidRangeException
public Array readNestedVectorArrowData(java.lang.String name,
java.lang.String memberName,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
throws java.io.IOException,
InvalidRangeException
name - Variable name,memberName - Structure mumber name,bos - Data buffer,vinfo - variable info,section - variable section
java.io.IOException
InvalidRangeException
public ArrayStructure readVectorArrowData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
name - Variable name,bos - Data buffer,vinfo - variable info,
java.io.IOException
InvalidRangeException
public Array readNestedTextStringData(java.lang.String name,
java.lang.String memberName,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
throws java.io.IOException,
InvalidRangeException
name - Variable name,memberName - Structure mumber name,bos - Data buffer,vinfo - variable info,section - variable section
java.io.IOException
InvalidRangeException
public ArrayStructure readTextStringData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
name - Variable name,bos - Data buffer,vinfo - variable info
java.io.IOException
InvalidRangeException
public Array readNestedDataUnlinkVector(java.lang.String name,
java.lang.String memberName,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.util.List section)
throws java.io.IOException,
InvalidRangeException
name - Variable name,memberName - Structure mumber name,bos - Data buffer,vinfo - variable info,section - variable section
java.io.IOException
InvalidRangeException
public ArrayStructure readUnlinkedVectorData(java.lang.String name,
java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
name - Variable name,bos - Data buffer,vinfo - variable info,
java.io.IOException
InvalidRangeException
public java.lang.Object readOneArrayData(java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
java.lang.String vName)
throws java.io.IOException,
InvalidRangeException
java.io.IOException
InvalidRangeException
public java.lang.Object readOneArrayData1(java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
bos - is data buffervinfo - is variable info
java.io.IOException
InvalidRangeException
public byte[] readOneRowData1(byte[] ddata,
int rLen,
int xt)
throws java.io.IOException,
InvalidRangeException
ddata - is encoded data values
java.io.IOException
InvalidRangeException
public byte[] readOneRowData(byte[] ddata,
int rLen,
int xt)
throws java.io.IOException,
InvalidRangeException
ddata - is encoded data values
java.io.IOException
InvalidRangeException
public java.lang.Object readRadialDataEle(java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
java.io.IOException
InvalidRangeException
public java.lang.Object readRadialDataLatLonAlt(double t,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
java.io.IOException
InvalidRangeException
public java.lang.Object readRadialDataAzi(java.nio.ByteBuffer bos,
ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
java.io.IOException
InvalidRangeException
public java.lang.Object readDistance(ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
java.io.IOException
InvalidRangeException
public java.lang.Object readRadialDataGate(ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
throws java.io.IOException,
InvalidRangeException
java.io.IOException
InvalidRangeException
public byte[] readCompData1(byte[] uncomp,
long hoff,
long doff)
throws java.io.IOException
java.io.IOException
public byte[] readCompData(long hoff,
long doff)
throws java.io.IOException
hoff - header offsetdoff - data offset
java.io.IOException
public byte[] readUCompData(long hoff,
long doff)
throws java.io.IOException
hoff - header offsetdoff - data offset
java.io.IOExceptionprotected static char[] convertByteToChar(byte[] byteArray)
protected static byte[] convertCharToByte(char[] from)
public short convertunsignedByte2Short(byte b)
public void flush()
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
IOServiceProvider
close in interface IOServiceProviderjava.io.IOExceptionpublic boolean syncExtend()
IOServiceProvider
syncExtend in interface IOServiceProviderpublic boolean sync()
IOServiceProvider
sync in interface IOServiceProviderpublic java.lang.String toStringDebug(java.lang.Object o)
toStringDebug in interface IOServiceProviderpublic java.lang.String getDetailInfo()
IOServiceProvider
getDetailInfo in interface IOServiceProvider
public static void main(java.lang.String[] args)
throws java.lang.Exception,
java.io.IOException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
java.lang.Exception
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||