Troubleshooting guide
197
13: Using the BlackBerry Browser
}
/**
* @see
net.rim.device.api.browser.RenderingApplication#getAvailableWidth(net.rim.device.api.brows
er.BrowserContent)
*/
public int getAvailableWidth(BrowserContent browserField) {
// field has full screen
return Graphics.getScreenWidth();
}
/**
* @see
net.rim.device.api.browser.RenderingApplication#getHistoryPosition(net.rim.device.api.brow
ser.BrowserContent)
*/
public int getHistoryPosition(BrowserContent browserField) {
// no history support
return 0;
}
/**
* @see
net.rim.device.api.browser.RenderingApplication#getHTTPCookie(java.lang.String)
*/
public String getHTTPCookie(String url) {
// no cookie support
return null;
}
/**
* @see
net.rim.device.api.browser.RenderingApplication#getResource(net.rim.device.api.browser.Req
uestedResource,
* net.rim.device.api.browser.BrowserContent)
*/
public HttpConnection getResource( RequestedResource resource, BrowserContent referrer)
{
if (resource == null) {
return null;
}
// Verify that this is a cache-only request.
if (resource.isCacheOnly()) {
// no cache support
return null;
}
String url = resource.getUrl();
if (url == null) {
return null;
}
// If the referrer is null, return the connection.
if (referrer == null) {