title: Reloading resources loaded by getResourceAsStream
body: <p>Following best practices, I'm using <code>Thread.currentThread().getContextClassLoader().getResourceAsStream</code> to load resources in a web application (like text files or xml files), instead of going through the file API.</p>
  
  <p>However, this has the disadvantage that if the resource changes on disk, a following call to getResourceAsStream keeps returning the old version indefinitely.</p>
  
  <p>I would like it to pick up the new version though. In my debugger I see there's a simple HashMap called resourceEntries in the classLoader. Using reflection I've been able to remove a specific entry and this seems to work.</p>
  
  <p>This method is however fragile.</p>
  
  <p>Is there a more standard way to do this?</p>