Package com.storedobject.common
Interface ImageGenerator
- All Superinterfaces:
ContentGenerator
- All Known Implementing Classes:
GeneratedImage
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Anything that generates some sort of image "content".
- Author:
- Syam
-
Field Summary
Fields inherited from interface com.storedobject.common.ContentGenerator
ext
-
Method Summary
-
Method Details
-
generateContent
Generate the content and write to an output stream.- Parameters:
out
- Output stream where the generated image will be written to.- Throws:
Exception
- if content can not be generated.
-
getContentType
Mime type of the content.- Specified by:
getContentType
in interfaceContentGenerator
- Returns:
- Default implementation returns "image/png".
-
getFileExtension
File extension normally used for this type of content.- Specified by:
getFileExtension
in interfaceContentGenerator
- Returns:
- Default implementation returns "png".
-