Package com.storedobject.common
Interface BinaryContentGenerator
- All Superinterfaces:
ContentGenerator
- 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 binary "content".
- Author:
- Syam
-
Field Summary
Fields inherited from interface com.storedobject.common.ContentGenerator
ext
-
Method Summary
Modifier and TypeMethodDescriptionvoid
generateContent
(OutputStream output) Generate the content and write to an output stream.default String
Mime type of the content.default String
File extension normally used for this type of content.
-
Method Details
-
generateContent
Generate the content and write to an output stream.- Parameters:
output
- Output stream to collect the generated content.- Throws:
Exception
- if content can not be generated.
-
getContentType
Mime type of the content.- Specified by:
getContentType
in interfaceContentGenerator
- Returns:
- Default implementation returns "application/octet-stream".
-
getFileExtension
File extension normally used for this type of content.- Specified by:
getFileExtension
in interfaceContentGenerator
- Returns:
- Default implementation returns "bin".
-