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

Staff online

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
DewittMill
Top