• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Cached audioclip  RSS feed

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a applet to play audio. On the web page there is a button. Pressing the button will call the applet's playAudio method in which I put the following code:
String myUrl = "...";//a servlet which fetches audio stream from the dabase
audioClip = getAudioClip( getCodeBase(), myUrl );
audioClip.play();
When I opend a new web browser and clicked the button to play audio for the first time it accessed the servlet and played the audio fine. When clicked the button the second time the audio was played but there was no access to the servlet. I believe the audio was cached and the applet didn't send a request to the servlet. Actually the audio is changed often, so I don't need the cache. How can I change the applet to get rid of the cache?

Any idea is greatly appreciated!

Chris
[ July 25, 2006: Message edited by: Chris Wang ]
 
Chris Wang
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I have to update my question. Actually I need the cached audio on the client side, the server side code will return "NOT_MODIFIED" to the client if the audio file is not changed since last modified, otherwise return the new audio data. But for the applet what I realy expacted is it should send the request every time I hit the play button. So it seems the fresh-time should be reduced to 0. Don't know how.

Chris
 
I'm full of tinier men! And a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!