public class DapNetcdfFile extends 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<Variable,Array> |
arraymap
Originally, the array for a variable was stored
using var.setCacheData().
|
protected CancelTask |
cancel |
protected boolean |
closed |
protected D4DSP |
dsp |
protected java.lang.String |
finalurl |
protected NodeMap |
nodemap |
protected static DapNetcdfFile.NullCancelTask |
nullcancel |
protected java.lang.String |
originalurl |
protected 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,
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.
|
DSP |
getDSP() |
java.lang.String |
getURL() |
boolean |
isconstrainable() |
java.util.List<Array> |
readArrays(java.util.List<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 Array |
readData(Variable cdmvar,
Section section)
Primary read entry point.
|
Array |
readSection(java.lang.String variableSection)
Read a variable using the given section specification.
|
long |
readToByteChannel(Variable v,
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, canonicalizeUriString, 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 XURI xuri
protected D4DSP dsp
protected CancelTask cancel
protected NodeMap nodemap
public DapNetcdfFile(java.lang.String url,
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.io.Closeableclose in interface java.lang.AutoCloseableclose in interface FileCacheableclose in class NetcdfFilejava.io.IOException - if error when closingpublic boolean isconstrainable()
public java.lang.String getURL()
public DSP getDSP()
public java.util.List<Array> readArrays(java.util.List<Variable> variables) throws java.io.IOException
readArrays in class NetcdfFilevariables - List of type Variablejava.io.IOException - if read errorpublic long readToByteChannel(Variable v, Section section, java.nio.channels.WritableByteChannel channel) throws java.io.IOException, InvalidRangeException
readToByteChannel in class 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 errorInvalidRangeException - if invalid sectionpublic Array readSection(java.lang.String variableSection) throws java.io.IOException, InvalidRangeException
NetcdfFilereadSection in class NetcdfFilevariableSection - the constraint expression.java.io.IOException - if errorInvalidRangeException - if variableSection is invalidprotected Array readData(Variable cdmvar, Section section) throws java.io.IOException, InvalidRangeException
readData in class 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 errorInvalidRangeException - if invalid section