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 ) ; }
Factory that reads in a resource file that describes the mapping of characters to entity references .