T - the type of objects.
public class ImageSourceUrlPattern<T> extends Objectimplements ImageSource <T ,BufferedImageAndBytes >
| Constructor and Description |
|---|
ImageSourceUrlPattern(UrlProvider
An ImageSource implementation based that works with UrlResoluter
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isOnline()
|
BufferedImageAndBytes |
load(T thing)
|
BufferedImageAndBytes |
loadImage(T thing)
Load the image and return it as a BufferedImage together with the raw bytes.
|
void |
setOnline(boolean online)
|
void |
setPathResoluter(UrlProvider
Set the UrlResoluter used to resolve image URLs.
|
void |
setUserAgent(String
Set the user-agent to use during HTTP-requests.
|
public ImageSourceUrlPattern(UrlProvider<T> resolver, int nTries)
resolver - the url generator
nTries - the number of times to retry failing images before giving up
public void setPathResoluter(UrlProvider<T> resolver)
resolver - the resolver to use
public void setUserAgent(StringuserAgent)
userAgent - the user agent to use.
public boolean isOnline()
public void setOnline(boolean online)
public BufferedImageAndBytesload(T thing)
public BufferedImageAndBytesloadImage(T thing)
thing - the thing to load the image for.