Class Java2DUserAgent

    • Constructor Detail

      • Java2DUserAgent

        public Java2DUserAgent()
    • Method Detail

      • getImageResource

        public ImageResource getImageResource​(String uri,
                                              ExternalResourceType type)
        Retrieves the image located at the given URI. It's assumed the URI does point to an image--the URI will be accessed (using the set HttpStreamFactory or URL::openStream), opened, read and then passed into the JDK image-parsing routines. The result is packed up into an ImageResource for later consumption.
        Specified by:
        getImageResource in interface UserAgentCallback
        Specified by:
        getImageResource in class NaiveUserAgent
        Parameters:
        uri - Location of the image source.
        Returns:
        An ImageResource containing the image.