Class ImageValue

All Implemented Interfaces:
Peer

public final class ImageValue extends Content
A class to represent content
  • Constructor Details

    • ImageValue

      public ImageValue(Element parent, Node prevSibling)
  • Method Details

    • defaultAttribute

      public Attribute defaultAttribute(int eTag)
      Overrides:
      defaultAttribute in class Element
    • createProto

      public ProtoableNode createProto(Element parent, boolean bFull)
      Overrides:
      createProto in class ProtoableNode
    • equals

      public boolean equals(Object object)
      Description copied from class: Content
      Equals is a helper function that returns whether two Contents are equal (case-sensitive, and considering the null state of both nodes).
      Overrides:
      equals in class Content
      Parameters:
      object - the content node to compare.
      Returns:
      true if the content nodes are equal.
      See Also:
    • hashCode

      public int hashCode()
      Description copied from class: Content
      Returns a hash code value for the object. This method is unsupported.
      Overrides:
      hashCode in class Content
    • getIsNull

      public boolean getIsNull()
      Description copied from class: Element
      Determine if this node contains a null value.
      Overrides:
      getIsNull in class Content
      Returns:
      true if this node contains a null value, false otherwise.
    • getScriptTable

      public ScriptTable getScriptTable()
      Overrides:
      getScriptTable in class Content
    • getValue

      public String getValue()
    • setAttribute

      public void setAttribute(Attribute oAttr, int eTag)
      Description copied from class: ProtoableNode
      Sets an attribute of this element.
      Overrides:
      setAttribute in class ProtoableNode
      Parameters:
      oAttr - the attribute.
      eTag - The XFA tag name of the attribute being set.
      See Also:
    • setValue

      public void setValue(byte[] pImageBuffer, String sContentType)
      Set the value for this image
      This function will set the value of the #text child to the base64 encoded value of the image. It will also set the contentType and tranferEncoding attributes on the image element
      Parameters:
      pImageBuffer - - the raw image value.
      sContentType - - the content type of the image
    • setValue

      public void setValue(String sB64, String sContentType)
      Set the base64 encoded value for this image
      This function will set the value of the #text child to the base64 encoded value of the image. It will also set the contentType and tranferEncoding attributes on the image element
      Parameters:
      sB64 - - base 64 encoded data
      sContentType - - the content type of the image
    • toString

      public String toString()
      Return the value of the content as a string
      Overrides:
      toString in class Content
      Returns:
      the string representation of the value.