Class MemoryDataLoader
java.lang.Object
eu.europa.esig.dss.spi.client.http.MemoryDataLoader
- All Implemented Interfaces:
DataLoader
,Serializable
Defines a map between URL and document to load the data from offline source
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface eu.europa.esig.dss.spi.client.http.DataLoader
DataLoader.DataAndUrl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Execute a HTTP GET operation.Execute a HTTP GET operation.byte[]
Executes a HTTP POST operationvoid
setContentType
(String contentType) This allows to set the content type.
-
Constructor Details
-
MemoryDataLoader
-
-
Method Details
-
get
Description copied from interface:DataLoader
Execute a HTTP GET operation.- Specified by:
get
in interfaceDataLoader
- Parameters:
url
- the url to access- Returns:
byte
array of obtained data or null
-
get
Description copied from interface:DataLoader
Execute a HTTP GET operation. This method is used when many URls are available to access the same resource. The operation stops after the first successful download.- Specified by:
get
in interfaceDataLoader
- Parameters:
urlStrings
-List
ofString
s representing the URLs to be used in sequential way to obtain the data.- Returns:
DataAndUrl
representing the array of obtained data and used url, or null- Throws:
DSSException
-
post
Description copied from interface:DataLoader
Executes a HTTP POST operation- Specified by:
post
in interfaceDataLoader
- Parameters:
url
- to accesscontent
- the content to post- Returns:
byte
array of obtained data
-
setContentType
Description copied from interface:DataLoader
This allows to set the content type. Example: Content-Type "application/ocsp-request"- Specified by:
setContentType
in interfaceDataLoader
- Parameters:
contentType
- to set the Content-Type
-