String resourceName = getResourceName(resourceLocation);
InputStream is = DataSourceClassPathResolver.class.getResourceAsStream(resourceName);
if (is != null)
{
ByteArrayDataSource ds = new ByteArrayDataSource(is, mimeType);
// EMAIL-125: set the name of the DataSource to the normalized resource URL
// similar to other DataSource implementations, e.g. FileDataSource, URLDataSource
ds.setName(DataSourceClassPathResolver.class.getResource(resourceName).toString());
result = ds;
}
else
{
if (isLenient)