Package dap4.dap4lib
Class HttpDSP
- java.lang.Object
-
- dap4.dap4lib.D4DSP
-
- dap4.dap4lib.HttpDSP
-
public class HttpDSP extends D4DSP
Make a request to a server and convert the reply to a DapDataset from the returned bytes.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanallowCompressionprotected static booleanDEBUGprotected static intDFALTPRELOADSIZEprotected intstatus-
Fields inherited from class dap4.dap4lib.D4DSP
checksummode, datamap, dmr, dmrtext, location, mode, PARSEDEBUG, remoteorder, stream, streamclosed, xuri
-
-
Constructor Summary
Constructors Constructor Description HttpDSP()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static StringbuildURL(String baseurl, String suffix, DapDataset template, String ce)booleandspMatch(String url, DapContext context)Determine if a path refers to an object processable by this DSPvoidloadDAP()This will be called lazily when trying to read data.voidloadDMR()Extract the DMR from available dechunked dataprotected InputStreammakeRequest(String methodurl)Open a connection and make a request for the (possibly constrained) DMR|DAP (choice is made by url extension)D4DSPopen(String fileurl, ChecksumMode cmode)"open" a reference to a data source and return the DSP wrapper.static voidsetHttpDebug()-
Methods inherited from class dap4.dap4lib.D4DSP
addVariableData, getChecksumMap, getChecksumMode, getDMR, getMethodUrl, getStream, getVariableDataMap, loadContext, parseDMR, parseURL, processAttributes, processMaps, readDMR, reportError, setDMR, setStream, suppressAttributes
-
-
-
-
Field Detail
-
DEBUG
protected static final boolean DEBUG
- See Also:
- Constant Field Values
-
DFALTPRELOADSIZE
protected static final int DFALTPRELOADSIZE
- See Also:
- Constant Field Values
-
allowCompression
protected boolean allowCompression
-
status
protected int status
-
-
Method Detail
-
setHttpDebug
public static void setHttpDebug()
-
open
public D4DSP open(String fileurl, ChecksumMode cmode) throws DapException
Description copied from class:D4DSP"open" a reference to a data source and return the DSP wrapper.- Overrides:
openin classD4DSP- Parameters:
fileurl- - Object that defines the data source- Returns:
- = wrapping dsp
- Throws:
DapException
-
dspMatch
public boolean dspMatch(String url, DapContext context)
Description copied from class:D4DSPDetermine if a path refers to an object processable by this DSP
-
loadDMR
public void loadDMR() throws DapExceptionDescription copied from class:D4DSPExtract the DMR from available dechunked data- Overrides:
loadDMRin classD4DSP- Throws:
DapException
-
loadDAP
public void loadDAP() throws DapExceptionThis will be called lazily when trying to read data.- Overrides:
loadDAPin classD4DSP- Throws:
DapException
-
makeRequest
protected InputStream makeRequest(String methodurl) throws DapException
Open a connection and make a request for the (possibly constrained) DMR|DAP (choice is made by url extension)- Throws:
DapException
-
buildURL
protected static String buildURL(String baseurl, String suffix, DapDataset template, String ce)
-
-