Package com.bfo.box
Class EmbeddedFileContainerBox
java.lang.Object
com.bfo.box.Box
com.bfo.box.JUMBox
com.bfo.box.EmbeddedFileContainerBox
- Direct Known Subclasses:
C2PA_AssertionThumbnail
An EmbeddedFileContainerBox is a JUMBF wrapper around a pair of "bfdb" and "bidb" boxes.
It is defined in ISO19566-5 AMD-1. The contents is an file (or URL of a file) with a mediaType
and optional filename
- Since:
- 5
-
Constructor Summary
ConstructorsConstructorDescriptionEmbeddedFileContainerBox
(String label, String mediaType, String fileName, InputStream data) Create a new EmbeddedFileContainerBox. -
Method Summary
Modifier and TypeMethodDescriptiondata()
Return the embedded file as a ByteBuffer if its embedded, otherwise return nullfileName()
Return the file-name of the embedded file, or null if not specifiedfileURL()
Return the URL of the embedded file it is an external reference, otherwise return nullReturn the media-type of the embedded file
-
Constructor Details
-
EmbeddedFileContainerBox
public EmbeddedFileContainerBox(String label, String mediaType, String fileName, InputStream data) throws IOException Create a new EmbeddedFileContainerBox. The stream will be fully read but not closed- Parameters:
label
- the label (required)mediaType
- the mediaType (required)fileName
- the fileName (may be null)data
- the data to read (required)- Throws:
IOException
- if the stream cannot be read.
-
-
Method Details
-
mediaType
Return the media-type of the embedded file- Returns:
- the media-type
-
fileName
Return the file-name of the embedded file, or null if not specified- Returns:
- the file-name
-
fileURL
Return the URL of the embedded file it is an external reference, otherwise return null- Returns:
- the URL of the external file reference
-
data
Return the embedded file as a ByteBuffer if its embedded, otherwise return null- Returns:
- the file data
-