Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 146
Registered: ‎11-05-2008
My Device: Not Specified

Ho to cache the image of a browser

Hi,

  I m using BrowserField Demo.Every time to show the image it's accessing the network,but it's already accessed from network.How can I cache the image?

 I have posted about it before,But no body reply.

Can anybody pleasee help me regarding this?

Thanx in advance.

Highlighted
Visitor
Posts: 1
Registered: ‎07-14-2009
My Device: Not Specified

Re: Ho to cache the image of a browser

Basically you need to implement HttpConnection interface in class which persist downloaded data and when the RenderingApplication requests an http resource this class provides the persisted data.

 

Very well organized caching framework is implemented in the project LogicMail. Look at the BrowserFieldRenderer.java, inside it there is a private class LocalDataHttpConnection which stores and retrieves bytes from the file system. What to do with these bytes is up to you.