com.aspose.slides
Class HtmlExternalResolver
java.lang.Object
com.aspose.slides.HtmlExternalResolver
- All Implemented Interfaces:
- IHtmlExternalResolver
public class HtmlExternalResolver
- extends java.lang.Object
- implements 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)
|
java.lang.String |
resolveUri(java.lang.String baseUri,
java.lang.String relativeUri)
Resolves URI. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HtmlExternalResolver
public HtmlExternalResolver()
resolveUri
public java.lang.String resolveUri(java.lang.String baseUri,
java.lang.String relativeUri)
Resolves URI.
- Specified by:
resolveUri
in interface IHtmlExternalResolver
- Parameters:
baseUri
- absolute URI of linking objectsrelativeUri
- URI to the linked object.
- Returns:
- absolute URI to the linked object. Returning null will prevent object from loading.
getEntity
public java.io.InputStream getEntity(java.lang.String absoluteUri)
- Specified by:
getEntity
in interface IHtmlExternalResolver