com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class ExternalResourceResolver

  • java.lang.Object
    • com.aspose.slides.ExternalResourceResolver
  • All Implemented Interfaces:
    IExternalResourceResolver


    public class ExternalResourceResolver
    extends java.lang.Object
    implements IExternalResourceResolver

    Callback class used to resolve external resources during Html, Svg documents import.


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

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.io.InputStream getEntity(java.lang.String absoluteUri)
      Maps a URI to an object containing the actual resource.
      java.lang.String resolveUri(java.lang.String baseUri, java.lang.String relativeUri)
      Resolves the absolute URI from the base and relative URIs.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExternalResourceResolver

        public ExternalResourceResolver()
    • Method Detail

      • resolveUri

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

        Resolves the absolute URI from the base and relative URIs.

        Specified by:
        resolveUri in interface IExternalResourceResolver
        Parameters:
        baseUri - Base URI of linking objects
        relativeUri - Relative URI to the linked object.
        Returns:
        Absolute URI or null if the relative URI cannot be resolved.
      • getEntity

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

        Maps a URI to an object containing the actual resource.

        Specified by:
        getEntity in interface IExternalResourceResolver
        Parameters:
        absoluteUri - Absolute URI to the object.
        Returns:
        A InputStream object or null if resource cannot be streamed.