Image Cache question

P

pcouas

Hi,


I load image, GIF, JPEG and PNG created from an Servlet and it seems
this folloing instruction don't use Cache, Could you confirm me ?
bitmap= Toolkit.getDefaultToolkit().getImage( ap) ;

PS
ap is an URL


So, i try this following code, but i could not add uc.disconnect() and
that's seems not working with PGN file ?

java.net.HttpURLConnection uc
=(java.net.HttpURLConnection)(ap).openConnection();
uc.setDefaultUseCaches(true); //Should force the use of caching,
right?
uc.setUseCaches(true); //Redundant, but I'll try anything.
uc.connect();
bitmap = Toolkit.getDefaultToolkit().createImage(prod);


Regards
Philippe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top