// Wrap up the Reader in an InputSource
InputSource source = new InputSource(reader);
source.setSystemId(imxPath);
ImageProviderRequest request = null;
try
{
request =
ImageProviderRequestUtils.createImageProviderRequest(context,
parser,
source);
}
catch (SAXException e)
{
_error(_XML_DECODING_ERROR + imxPath, e);
}
catch (IOException e)
{
_error(_XML_DECODING_ERROR + imxPath, e);
}
finally
{
try { in.close(); } catch (IOException e) { _error(e); }
}
if (request == null)
return null;
// Get the ImageType from the request
ImageType type = _getImageType(context, request);
assert (type != null);
// Get the properties from the request
Map<Object, Object> properties = request.getRenderProperties(context);
assert (properties != null);
// Get the base name for the URI (minus the extension)
int dotIndex = imxName.lastIndexOf('.');
String baseName = (dotIndex == -1) ?