code: public InputStream getResourceAsStream(String fileName)
      {
          try
          {
              File file = getFile(fileName);
              cache.put(fileName, new CacheEntry(file));
              return new FileInputStream(file);
          }
          catch (FileNotFoundException e)
          {
              InputStream is = 
                  Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName);
              if (is != null)
              {
                  cache.put(fileName, new CacheEntry());
              }
              return is;
          }
      }
docs: Returns an input stream for reading the specified resource.  This method
  functions similarly to
  <code>ClassLoader.getResourceAsStream</code>. <B>Make sure you
  close the stream when you are done with it, as it allocates a
  file handle on the system, and leaving them open degrades
  performance or causes failures.</B>
  
  @param  fileName the name of the resource to resolve
  @return an input stream opened to the requested resource, or <code>null</code>
  if the resource could not be found