org.apache.batik.ext.awt.image
public class URLImageCache extends SoftReferenceCache
Adding an image is two fold. First you add the ParsedURL, this lets the cache know that someone is working on this ParsedURL. Then when the completed RenderedImage is ready you put it into the cache.
If someone requests a ParsedURL after it has been added but before it has been put they will be blocked until the put.
Constructor Summary | |
---|---|
URLImageCache()
Let people create there own caches. |
Method Summary | |
---|---|
void | clear(ParsedURL purl)
Clear the entry for ParsedURL.
|
static URLImageCache | getDefaultCache() |
boolean | isDone(ParsedURL purl)
Check if request(url) will return immediately with the
Filter. |
boolean | isPresent(ParsedURL purl)
Check if request(url) will return with a Filter
(not putting you on the hook for it). |
void | put(ParsedURL purl, Filter filt)
Associate bi with purl. bi is only referenced through
a soft reference so don't rely on the cache to keep it
around. |
Filter | request(ParsedURL purl)
If this returns null then you are now 'on the hook'.
to put the Filter associated with ParsedURL into the
cache. |