Class ImageCacher.Embedded

    • Constructor Detail

      • Embedded

        public Embedded()
    • Method Detail

      • setDOMTreeManager

        public void setDOMTreeManager​(DOMTreeManager domTreeManager)
        Sets the DOMTreeManager this cacher should work on.
        Overrides:
        setDOMTreeManager in class ImageCacher
        Parameters:
        domTreeManager - the DOMTreeManager for the tree this cacher works on
      • getCacheableData

        java.lang.Object getCacheableData​(java.io.ByteArrayOutputStream os)
        Description copied from class: ImageCacher
        Returns an object which can be cached. Implementation must determine which information should actually be stored.
        Specified by:
        getCacheableData in class ImageCacher
        Parameters:
        os - the byte stream which is to be coerced
      • imagesMatch

        boolean imagesMatch​(java.lang.Object o1,
                            java.lang.Object o2)
        Description copied from class: ImageCacher
        Determines if two images are equal. Interpretation of the objects referred to by o1 and o2 is entirely implementation-dependent.
        Specified by:
        imagesMatch in class ImageCacher
        Parameters:
        o1 - object referring to one image
        o2 - object referring to the other image
      • createEntry

        ImageCacher.ImageCacheEntry createEntry​(int checksum,
                                                java.lang.Object data,
                                                int width,
                                                int height,
                                                SVGGeneratorContext ctx)
        Description copied from class: ImageCacher
        Creates a new entry for keeping in the cache.
        Specified by:
        createEntry in class ImageCacher
        Parameters:
        checksum - the checksum from which the hash key is derived
        data - the data to be cached
        width - image width
        height - image height
        ctx - the SVGGeneratorContext
      • addToTree

        private void addToTree​(java.lang.String id,
                               java.lang.String href,
                               int width,
                               int height,
                               SVGGeneratorContext ctx)
        Adds a new image element to the defs section for cached images.