public class ResourceLoaderImpl extends Object implements ResourceLoader
| Constructor and Description |
|---|
ResourceLoaderImpl(Supplier<Collection<Cookie>> cookieSupplier) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Optional<String> |
getContents(URI url,
URI referrer)
Get the contents of the given URL as String.
|
Optional<String> |
getExternalInlineImgSrc(URI url,
URI referrer)
Get the contents of the given URL as HTML img tag src: e.g.
|
String |
getInlineImgSrc(String contentType,
InputStream in)
Read binary image data from in and get e.g.
|
public ResourceLoaderImpl(Supplier<Collection<Cookie>> cookieSupplier)
public Optional<String> getContents(URI url, URI referrer)
ResourceLoadergetContents in interface ResourceLoaderpublic Optional<String> getExternalInlineImgSrc(URI url, URI referrer)
ResourceLoadergetExternalInlineImgSrc in interface ResourceLoaderpublic String getInlineImgSrc(String contentType, InputStream in) throws IOException
ResourceLoadergetInlineImgSrc in interface ResourceLoaderIOException - In case of encoding problemspublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2013–2019 mklinger GmbH. All rights reserved.