ResourceResolver { @Deprecated public boolean isImageTypeSupportedByImageDataFactory(String src) { try { URL url = uriResolver.resolveAgainstBaseUri(src); url = UrlUtil.getFinalURL(url); return ImageDataFactory.isSupportedType(retriever.getByteArrayByUrl(url)); } catch (Exception e) { return false; } } ResourceResolver(String baseUri);  ResourceResolver(String baseUri, IResourceRetriever retriever); IResourceRetriever getRetriever(); ResourceResolver setRetriever(IResourceRetriever retriever); @Deprecated PdfImageXObject retrieveImage(String src); PdfXObject retrieveImageExtended(String src); @Deprecated InputStream retrieveStyleSheet(String uri); @Deprecated byte[] retrieveStream(String src); byte[] retrieveBytesFromResource(String src); InputStream retrieveResourceAsInputStream(String src); boolean isDataSrc(String src); URL resolveAgainstBaseUri(String uri); void resetCache(); @Deprecated boolean isImageTypeSupportedByImageDataFactory(String src); static final String BASE64IDENTIFIER; static final String DATA_SCHEMA_PREFIX; }
@Test public void isImageTypeSupportedTest() { ResourceResolver resourceResolver = new ResourceResolver(baseUri); Assert.assertTrue(resourceResolver.isImageTypeSupportedByImageDataFactory("resourceResolverTest.png")); Assert.assertFalse(resourceResolver.isImageTypeSupportedByImageDataFactory("test.txt")); Assert.assertFalse(resourceResolver.isImageTypeSupportedByImageDataFactory("htt: }