Class MimeEnabledImageFlavor
java.lang.Object
org.apache.xmlgraphics.image.loader.ImageFlavor
org.apache.xmlgraphics.image.loader.RefinedImageFlavor
org.apache.xmlgraphics.image.loader.MimeEnabledImageFlavor
Special image flavor subclass which enables the restriction to a particular MIME type.
-
Field Summary
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
ConstructorsConstructorDescriptionMimeEnabledImageFlavor(ImageFlavor parentFlavor, String mime) Constructs a new image flavor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the MIME type that the image flavor represents if a MIME type is available.inthashCode()Methods inherited from class org.apache.xmlgraphics.image.loader.RefinedImageFlavor
getNamespace, getParentFlavor, isCompatibleMethods inherited from class org.apache.xmlgraphics.image.loader.ImageFlavor
getName, toString
-
Constructor Details
-
MimeEnabledImageFlavor
Constructs a new image flavor.- Parameters:
parentFlavor- the parent image flavormime- a MIME type refining the parent image flavor
-
-
Method Details
-
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:
getMimeTypein classRefinedImageFlavor- Returns:
- the MIME type or null if no MIME type can be provided (like for in-memory images)
-
equals
Description copied from class:ImageFlavor- Overrides:
equalsin classImageFlavor
-
hashCode
public int hashCode()Description copied from class:ImageFlavor- Overrides:
hashCodein classImageFlavor
-