Class MimeEnabledImageFlavor
- java.lang.Object
-
- org.apache.xmlgraphics.image.loader.ImageFlavor
-
- org.apache.xmlgraphics.image.loader.RefinedImageFlavor
-
- org.apache.xmlgraphics.image.loader.MimeEnabledImageFlavor
-
public class MimeEnabledImageFlavor extends RefinedImageFlavor
Special image flavor subclass which enables the restriction to a particular MIME type.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
mime
-
Fields inherited from class org.apache.xmlgraphics.image.loader.ImageFlavor
BUFFERED_IMAGE, GRAPHICS2D, RAW, RAW_CCITTFAX, RAW_EMF, RAW_EPS, RAW_JPEG, RAW_LZW, RAW_PDF, RAW_PNG, RAW_TIFF, RENDERED_IMAGE, XML_DOM
-
-
Constructor Summary
Constructors Constructor Description MimeEnabledImageFlavor(ImageFlavor parentFlavor, java.lang.String mime)
Constructs a new image flavor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getMimeType()
Returns the MIME type that the image flavor represents if a MIME type is available.int
hashCode()
-
Methods inherited from class org.apache.xmlgraphics.image.loader.RefinedImageFlavor
getNamespace, getParentFlavor, isCompatible
-
Methods inherited from class org.apache.xmlgraphics.image.loader.ImageFlavor
getName, toString
-
-
-
-
Constructor Detail
-
MimeEnabledImageFlavor
public MimeEnabledImageFlavor(ImageFlavor parentFlavor, java.lang.String mime)
Constructs a new image flavor.- Parameters:
parentFlavor
- the parent image flavormime
- a MIME type refining the parent image flavor
-
-
Method Detail
-
getMimeType
public java.lang.String getMimeType()
Returns the MIME type that the image flavor represents if a MIME type is available. This is only applicable to images which can also exist as files. For images flavors like decoded in-memory images (Rendered/BufferedImage), this method will return null.- Overrides:
getMimeType
in classRefinedImageFlavor
- Returns:
- the MIME type or null if no MIME type can be provided (like for in-memory images)
-
equals
public boolean equals(java.lang.Object o)
Description copied from class:ImageFlavor
- Overrides:
equals
in classImageFlavor
-
hashCode
public int hashCode()
Description copied from class:ImageFlavor
- Overrides:
hashCode
in classImageFlavor
-
-