Class RtfExternalGraphic.FormatBase

java.lang.Object
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic.FormatBase
Direct Known Subclasses:
RtfExternalGraphic.FormatBMP, RtfExternalGraphic.FormatEMF, RtfExternalGraphic.FormatGIF, RtfExternalGraphic.FormatJPG, RtfExternalGraphic.FormatPNG
Enclosing class:
RtfExternalGraphic

private static class RtfExternalGraphic.FormatBase extends Object
  • Constructor Details

    • FormatBase

      private FormatBase()
  • Method Details

    • isFormat

      public static boolean isFormat(byte[] data)
      Determines whether the image is in the according format.
      Parameters:
      data - Image
      Returns:
      true If according type\n false Other type
    • convert

      public RtfExternalGraphic.FormatBase convert(RtfExternalGraphic.FormatBase format, byte[] data)
      Convert image data if necessary - for example when format is not supported by rtf.
      Parameters:
      format - Format type
      data - Image
    • determineFormat

      public static RtfExternalGraphic.FormatBase determineFormat(byte[] data)
      Determine image file format.
      Parameters:
      data - Image
      Returns:
      Image format class
    • getType

      public int getType()
      Get image type.
      Returns:
      Image format class
    • getRtfTag

      public String getRtfTag()
      Get rtf tag.
      Returns:
      Rtf tag for image format.