code: static InputStream getResourceAsStream(final String name)
     {
        if (System.getSecurityManager() == null)
           return Thread.currentThread().getContextClassLoader().getResourceAsStream(name);
  
        return AccessController.doPrivileged(new PrivilegedAction<InputStream>() 
        {
           public InputStream run()
           {
              return Thread.currentThread().getContextClassLoader().getResourceAsStream(name);
           }
        });
     }
docs: Get the input stream for a resource in the context class loader
  @param name The name of the resource
  @return The input stream