code: static CharInfo getCharInfo(String entitiesFileName, String method)
      {
          CharInfo charInfo = (CharInfo) m_getCharInfoCache.get(entitiesFileName);
          if (charInfo != null) {
          	return mutableCopyOf(charInfo);
          }
  
          // try to load it internally - cache
          try {
              charInfo = getCharInfoBasedOnPrivilege(entitiesFileName, 
                                          method, true);
              // Put the common copy of charInfo in the cache, but return
              // a copy of it.
              m_getCharInfoCache.put(entitiesFileName, charInfo);
              return mutableCopyOf(charInfo);
          } catch (Exception e) {}
  
          // try to load it externally - do not cache
          try {
              return getCharInfoBasedOnPrivilege(entitiesFileName, 
                                  method, false);
          } catch (Exception e) {}
  
          String absoluteEntitiesFileName;
  
          if (entitiesFileName.indexOf(':') < 0) {
              absoluteEntitiesFileName =
                  SystemIDResolver.getAbsoluteURIFromRelative(entitiesFileName);
          } else {
              try {
                  absoluteEntitiesFileName =
                      SystemIDResolver.getAbsoluteURI(entitiesFileName, null);
              } catch (TransformerException te) {
                  throw new WrappedRuntimeException(te);
              }
          }
  
          return getCharInfoBasedOnPrivilege(entitiesFileName, 
                                  method, false);
      }
docs: Factory that reads in a resource file that describes the mapping of
  characters to entity references.
  
  Resource files must be encoded in UTF-8 and have a format like:
  <pre>
  # First char # is a comment
  Entity numericValue
  quot 34
  amp 38
  </pre>
  (Note: Why don't we just switch to .properties files? Oct-01 -sc)
  
  @param entitiesResource Name of entities resource file that should
  be loaded, which describes that mapping of characters to entity references.
  @param method the output method type, which should be one of "xml", "html", "text"...
  
  @xsl.usage internal