boolean canDecode = false;
if (input instanceof ImageInputStream) {
ImageInputStream inputStream = (ImageInputStream) input;
MimeDiscoverer mimeDiscoverer = new DefaultMimeDiscoverer();
String mimeType = mimeDiscoverer.discoverMimeType(inputStream);
if (SVG_MIME_TYPE.equals(mimeType))
{
canDecode = true;
}
else if (XML_MIME_TYPE.equals(mimeType))