com.aspose.slides
Interface IHtmlExternalResolver

All Known Implementing Classes:
HtmlExternalResolver

public interface IHtmlExternalResolver

Callback object used by HTML import routine to obtain referrenced objects such as images. Supports "data:" "file:" and "http:" url schemes.


Using this resolver could create a vulnurability when client provided HTML file will make server software to obtain local or network file. Use with caution. It is recommended not to specify HtmlExternalResolver at all (only embedded objects will be read) or create some subclass which checks if specified uri is valid.


Method Summary
 java.io.InputStream getEntity(java.lang.String absoluteUri)
           Fetches linked object.
 java.lang.String resolveUri(java.lang.String baseUri, java.lang.String relativeUri)
           Resolves URI.
 

Method Detail

resolveUri

java.lang.String resolveUri(java.lang.String baseUri,
                            java.lang.String relativeUri)

Resolves URI.

Parameters:
baseUri - absolute URI of linking objects
relativeUri - URI to the linked object.
Returns:
absolute URI to the linked object. Returning null will prevent object from loading.

getEntity

java.io.InputStream getEntity(java.lang.String absoluteUri)

Fetches linked object.

Parameters:
absoluteUri - Absolute URI to the object (returned by ResolveUri(string, string) method.
Returns:
System.IO.Stream object with the linked object data or null if object can't or shouldn't be loaded.


Copyright © Copyright 2004-2016 Aspose Pty Ltd. All Rights Reserved.