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 boolean
allowCompression
protected static boolean
DEBUG
protected static int
DFALTPRELOADSIZE
protected int
status
-
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 String
buildURL(String baseurl, String suffix, DapDataset template, String ce)
boolean
dspMatch(String url, DapContext context)
Determine if a path refers to an object processable by this DSPvoid
loadDAP()
This will be called lazily when trying to read data.void
loadDMR()
Extract the DMR from available dechunked dataprotected InputStream
makeRequest(String methodurl)
Open a connection and make a request for the (possibly constrained) DMR|DAP (choice is made by url extension)D4DSP
open(String fileurl, ChecksumMode cmode)
"open" a reference to a data source and return the DSP wrapper.static void
setHttpDebug()
-
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:
open
in 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:D4DSP
Determine if a path refers to an object processable by this DSP
-
loadDMR
public void loadDMR() throws DapException
Description copied from class:D4DSP
Extract the DMR from available dechunked data- Overrides:
loadDMR
in classD4DSP
- Throws:
DapException
-
loadDAP
public void loadDAP() throws DapException
This will be called lazily when trying to read data.- Overrides:
loadDAP
in 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)
-
-