public class DapNetcdfFile
extends ucar.nc2.NetcdfFile
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DapNetcdfFile.NullCancelTask |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowCompression |
protected java.util.Map<ucar.nc2.Variable,ucar.ma2.Array> |
arraymap
Originally, the array for a variable was stored
using var.setCacheData().
|
protected ucar.nc2.util.CancelTask |
cancel |
protected boolean |
closed |
protected dap4.dap4shared.D4DSP |
dsp |
protected java.lang.String |
finalurl |
protected dap4.cdmshared.NodeMap |
nodemap |
protected static DapNetcdfFile.NullCancelTask |
nullcancel |
protected java.lang.String |
originalurl |
protected dap4.dap4shared.XURI |
xuri |
cache, cacheName, debugCompress, debugSPI, dimensions, gattributes, id, IOSP_MESSAGE_ADD_RECORD_STRUCTURE, IOSP_MESSAGE_CONVERT_RECORD_STRUCTURE, IOSP_MESSAGE_RANDOM_ACCESS_FILE, IOSP_MESSAGE_REMOVE_RECORD_STRUCTURE, location, reservedCdl, reservedFullName, reservedSectionSpec, rootGroup, showRequest, spi, title, variables| Constructor and Description |
|---|
DapNetcdfFile(java.lang.String url)
Open a Dap4 connection
|
DapNetcdfFile(java.lang.String url,
ucar.nc2.util.CancelTask cancelTask)
Open a Dap4 connection or file via a D4DSP.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close all resources (files, sockets, etc) associated with this file.
|
dap4.dap4shared.DSP |
getDSP() |
java.lang.String |
getURL() |
boolean |
isconstrainable() |
java.util.List<ucar.ma2.Array> |
readArrays(java.util.List<ucar.nc2.Variable> variables)
Do a bulk read on a list of Variables and
return a corresponding list of Array that contains the results
of a full read on each Variable.
|
protected ucar.ma2.Array |
readData(ucar.nc2.Variable cdmvar,
ucar.ma2.Section section)
Primary read entry point.
|
ucar.ma2.Array |
readSection(java.lang.String variableSection) |
long |
readToByteChannel(ucar.nc2.Variable v,
ucar.ma2.Section section,
java.nio.channels.WritableByteChannel channel)
Read databuffer from a top level Variable
and send databuffer to a WritableByteChannel.
|
addAttribute, addAttribute, addDimension, addGroup, addStringVariable, addVariable, addVariable, addVariableAttribute, canOpen, empty, findAttribute, findAttValueIgnoreCase, findDimension, findGlobalAttribute, findGlobalAttributeIgnoreCase, findGroup, findVariable, findVariable, findVariableByAttribute, finish, getCacheName, getDetailInfo, getDetailInfo, getDimensions, getFileTypeDescription, getFileTypeId, getFileTypeVersion, getGlobalAttributes, getId, getIosp, getLastModified, getLocation, getRootGroup, getStructureIterator, getTitle, getUnlimitedDimension, getVariables, hasUnlimitedDimension, iospRegistered, main, makeFullName, makeFullName, makeFullNameSectionSpec, makeFullNameWithString, makeNameUnescaped, makeRecordStructure, makeRootGroup, makeValidCDLName, makeValidCdmObjectName, makeValidPathName, makeValidSectionSpecName, open, open, open, open, open, open, openInMemory, openInMemory, openInMemory, openInMemory, reacquire, read, readAttributeDouble, readAttributeInteger, readToOutputStream, registerIOProvider, registerIOProvider, registerIOProvider, release, removeDimension, removeRecordStructure, removeVariable, sendIospMessage, setCacheName, setDebugFlags, setFileCache, setId, setImmutable, setLocation, setProperty, setTitle, showCached, showProxies, syncExtend, toString, toStringDebug, toStringEnd, toStringStart, toStringStart, writeCDL, writeCDL, writeCDL, writeNcML, writeNcMLprotected static final DapNetcdfFile.NullCancelTask nullcancel
protected boolean allowCompression
protected boolean closed
protected java.lang.String originalurl
protected java.lang.String finalurl
protected dap4.dap4shared.XURI xuri
protected dap4.dap4shared.D4DSP dsp
protected ucar.nc2.util.CancelTask cancel
protected dap4.cdmshared.NodeMap nodemap
protected java.util.Map<ucar.nc2.Variable,ucar.ma2.Array> arraymap
public DapNetcdfFile(java.lang.String url,
ucar.nc2.util.CancelTask cancelTask)
throws java.io.IOException
url - URL for the request.cancelTask - check if task is cancelled; may be null.java.io.IOExceptionpublic DapNetcdfFile(java.lang.String url)
throws java.io.IOException
url - URL for the request.java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface ucar.nc2.util.cache.FileCacheableclose in class ucar.nc2.NetcdfFilejava.io.IOException - if error when closingpublic boolean isconstrainable()
public java.lang.String getURL()
public dap4.dap4shared.DSP getDSP()
public java.util.List<ucar.ma2.Array> readArrays(java.util.List<ucar.nc2.Variable> variables)
throws java.io.IOException
readArrays in class ucar.nc2.NetcdfFilevariables - List of type Variablejava.io.IOException - if read errorpublic long readToByteChannel(ucar.nc2.Variable v,
ucar.ma2.Section section,
java.nio.channels.WritableByteChannel channel)
throws java.io.IOException,
ucar.ma2.InvalidRangeException
readToByteChannel in class ucar.nc2.NetcdfFilev - a top-level Variablesection - the section of databuffer to read.
There must be a Range for each Dimension in the variable,
in order.
Note: no nulls allowed. IOSP may not modify.channel - write databuffer to this WritableByteChanneljava.io.IOException - if read errorucar.ma2.InvalidRangeException - if invalid sectionpublic ucar.ma2.Array readSection(java.lang.String variableSection)
throws java.io.IOException,
ucar.ma2.InvalidRangeException
readSection in class ucar.nc2.NetcdfFilejava.io.IOExceptionucar.ma2.InvalidRangeExceptionprotected ucar.ma2.Array readData(ucar.nc2.Variable cdmvar,
ucar.ma2.Section section)
throws java.io.IOException,
ucar.ma2.InvalidRangeException
readData in class ucar.nc2.NetcdfFilecdmvar - A top-level variablesection - the section of databuffer to read.
There must be a Range for each Dimension in the variable,
in order. Note: no nulls allowed.java.io.IOException - if read errorucar.ma2.InvalidRangeException - if invalid section