code: public static InputStream getResourceStream(String key, ClassLoader loader) {
          if (key.startsWith("/"))
              key = key.substring(1);
          InputStream is = null;
          if (loader != null) {
              is = loader.getResourceAsStream(key);
              if (is != null)
                  return is;
          }
          // Try to use Context Class Loader to load the properties file.
          try {
              ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
              if (contextClassLoader != null) {
                  is = contextClassLoader.getResourceAsStream(key);
              }
          } catch (Throwable e) {}
  
          if (is == null) {
              is = BaseFont.class.getResourceAsStream("/" + key);
          }
          if (is == null) {
              is = ClassLoader.getSystemResourceAsStream(key);
          }
          return is;
      }
docs: Gets the font resources.
  @param key the full name of the resource
  @param loader the ClassLoader to load the resource or null to try the ones available
  @return the <CODE>InputStream</CODE> to get the resource or
  <CODE>null</CODE> if not found