Class ImageBase64


  • public class ImageBase64
    extends Image
    Represents an image to insert in a template with a base64-encoded string as source.
    • Constructor Detail

      • ImageBase64

        public ImageBase64​(java.lang.String name)
        This object represent an image to insert in the template. This constructor doesn't set the base64-string so setFromLocalFile should be called. The options of the image can be turned on via the setter functions.
        Parameters:
        name - Name of this image for the tag.
      • ImageBase64

        public ImageBase64​(java.lang.String name,
                           java.lang.String base64)
        This object represent an image to insert in the template. The options of the image can be turned on via the setter functions. The source of this image is a base64-encoded string.
        Parameters:
        name - Name of this image for the tag.
        base64 - Base64 string of the image.
    • Method Detail

      • setFileFromLocalFile

        public void setFileFromLocalFile​(java.lang.String filePath)
                                  throws java.io.IOException
        Reads all bytes of the file, converts them to base64 and stores them in this.value.
        Parameters:
        filePath - Path of the local file.
        Throws:
        java.io.IOException - If file not found.