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

public class EmbeddedFileContainerBox extends JUMBox
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 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

      public String mediaType()
      Return the media-type of the embedded file
      Returns:
      the media-type
    • fileName

      public String fileName()
      Return the file-name of the embedded file, or null if not specified
      Returns:
      the file-name
    • fileURL

      public String 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

      public ByteBuffer data()
      Return the embedded file as a ByteBuffer if its embedded, otherwise return null
      Returns:
      the file data