public class MemoryDataLoader extends Object implements DataLoader
DataLoader.DataAndUrl| Constructor and Description |
|---|
MemoryDataLoader(Map<String,byte[]> dataMap) |
| Modifier and Type | Method and Description |
|---|---|
DataLoader.DataAndUrl |
get(List<String> urlStrings)
Execute a HTTP GET operation.
|
byte[] |
get(String url)
Execute a HTTP GET operation.
|
byte[] |
get(String url,
boolean refresh)
Execute a HTTP GET operation with indication concerning the mandatory nature of the operation.
|
byte[] |
post(String url,
byte[] content)
Executes a HTTP POST operation
|
void |
setContentType(String contentType)
This allows to set the content type.
|
public byte[] get(String url)
DataLoaderget in interface DataLoaderurl - the url to accessbyte array of obtained data or nullpublic DataLoader.DataAndUrl get(List<String> urlStrings)
DataLoaderget in interface DataLoaderurlStrings - List of Strings representing the URLs to be used in sequential way to obtain the data.DataAndUrl representing the array of obtained data and used url, or nullpublic byte[] get(String url, boolean refresh)
DataLoaderget in interface DataLoaderurl - to accessrefresh - if true indicates that the cached data should be refreshedbyte array of obtained data or nullpublic byte[] post(String url, byte[] content)
DataLoaderpost in interface DataLoaderurl - to accesscontent - the content to postbyte array of obtained datapublic void setContentType(String contentType)
DataLoadersetContentType in interface DataLoadercontentType - to set the Content-TypeCopyright © 2019. All rights reserved.