getClass().getClassLoader().getResourceAsStream() is caching the resource
To avoid caching you can use:
getClass().getClassLoader().getResource().openStream()
It would be equal to using URLResourceLoader
for Velocity instead of ClasspathResourceLoader
I suppose. I would just go with a file loader.
See if something like this helps (exception handling omitted):
URL res = getClass().getClassLoader().getResource(resName);
if (res != null) {
URLConnection resConn = res.openConnection();
resConn.setUseCaches(false);
InputStream in = resConn.getInputStream();
}