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 java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description privateFormatBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RtfExternalGraphic.FormatBaseconvert(RtfExternalGraphic.FormatBase format, byte[] data)Convert image data if necessary - for example when format is not supported by rtf.static RtfExternalGraphic.FormatBasedetermineFormat(byte[] data)Determine image file format.java.lang.StringgetRtfTag()Get rtf tag.intgetType()Get image type.static booleanisFormat(byte[] data)Determines whether the image is in the according format.
-
-
-
Method Detail
-
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 typedata- 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 java.lang.String getRtfTag()
Get rtf tag.- Returns:
- Rtf tag for image format.
-
-