ResourceResolver { public boolean isDataSrc(String src) { return src.startsWith(DATA_SCHEMA_PREFIX) && src.contains(","); } 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 isDataSrcTest() { ResourceResolver resourceResolver = new ResourceResolver(baseUri); Assert.assertTrue(resourceResolver.isDataSrc(bLogo)); Assert.assertTrue(resourceResolver.isDataSrc(bLogoCorruptedData)); Assert.assertTrue(resourceResolver.isDataSrc(bLogoIncorrect)); Assert.assertFalse(resourceResolver.isDataSrc("https: }