public class NaiveUserAgent extends Object implements UserAgentCallback
| Constructor and Description |
|---|
NaiveUserAgent(org.eclipse.swt.graphics.Device device)
Creates a new instance of NaiveUserAgent
|
| Modifier and Type | Method and Description |
|---|---|
protected ImageResource |
createImageResource(String uri,
InputStream is)
Factory method to generate ImageResources from a given Image.
|
void |
disposeCache()
Dispose all images in cache and clean the cache.
|
String |
getBaseURL() |
byte[] |
getBinaryResource(String uri) |
CSSResource |
getCSSResource(String uri) |
ImageResource |
getImageResource(String uri) |
protected InputStream |
getInputStream(String uri)
Gets a Reader for the resource identified
|
XMLResource |
getXMLResource(String uri) |
boolean |
isVisited(String uri)
Gets the visited attribute of the NaiveUserAgent object
|
String |
resolveURI(String uri) |
void |
setBaseURL(String url) |
public NaiveUserAgent(org.eclipse.swt.graphics.Device device)
protected InputStream getInputStream(String uri)
uri - PARAMpublic CSSResource getCSSResource(String uri)
getCSSResource in interface UserAgentCallbackpublic ImageResource getImageResource(String uri)
getImageResource in interface UserAgentCallbackprotected ImageResource createImageResource(String uri, InputStream is)
uri - The URI for the image, resolved to an absolute URI.is - Stream of the image; may be null (for example, if image could
not be loaded).public XMLResource getXMLResource(String uri)
getXMLResource in interface UserAgentCallbackpublic boolean isVisited(String uri)
isVisited in interface UserAgentCallbackuri - PARAMpublic void setBaseURL(String url)
setBaseURL in interface UserAgentCallbackpublic String resolveURI(String uri)
resolveURI in interface UserAgentCallbackpublic String getBaseURL()
getBaseURL in interface UserAgentCallbackpublic void disposeCache()
public byte[] getBinaryResource(String uri)
getBinaryResource in interface UserAgentCallbackCopyright © 2019. All rights reserved.