if (sourceName == null)
throw new NullPointerException();
if (context == null)
throw new NullPointerException();
InputStreamProvider provider = resolver.getProvider(sourceName);
Object cached = provider.getCachedResult();
if ((cached != null) && expectedType.isInstance(cached))
return cached;
InputStream stream = provider.openInputStream();
try
{
// Store a resolver relative to the file we're about to parse
// Store the inputStreamProvider on the context;
// this will be used to get the document's timestamp later on
XMLUtils.setResolver(context, resolver.getResolver(sourceName));
XMLUtils.setInputStreamProvider(context, provider);
// PARSE!
// create a SkinStyleSheetNode
// (contains a namespaceMap and a List of SkinSelectorPropertiesNodes
// and additional information like direction, locale, etc.)
// (selectorName + a css propertyList))
BufferedReader in = new BufferedReader(new InputStreamReader(stream));
List <SkinStyleSheetNode> skinSSNodeList = _parseCSSStyleSheet(in);
in.close();
// process the SkinStyleSheetNodes to create a StyleSheetEntry object
StyleSheetEntry styleSheetEntry =
_createStyleSheetEntry(context, sourceName, skinSSNodeList);
// Store the cached result (if successful)
// otherwise, if we don't do this, we will keep reparsing. Somehow
// this affects whether the file has been modified. STRANGE!
// if (value != null)
// provider.setCachedResult(value);
// return value;
provider.setCachedResult(styleSheetEntry);
return styleSheetEntry;
}
finally
{