try {
contentId = URLDecoder.decode(contentId.substring(4), "UTF-8");
} catch (UnsupportedEncodingException ue) {
contentId = contentId.substring(4);
}
return new LazyDataSource(contentId, attachments);
} else if (contentId.indexOf("://") == -1) {
return new LazyDataSource(contentId, attachments);
} else {
try {
return new URLDataSource(new URL(contentId));
} catch (MalformedURLException e) {
throw new Fault(e);