Package com.bfo.box

Class JUMBox

java.lang.Object
com.bfo.box.Box
com.bfo.box.JUMBox
Direct Known Subclasses:
C2PA_AssertionUnknown, C2PAManifest, C2PAStore, CborContainerBox, EmbeddedFileContainerBox, JsonContainerBox

public class JUMBox extends Box
Represents a "JUMBF" ("JPEG Univesal Metadata Box Format") box as defined in ISO19566 appendix A.2. The Box.type is always "jumb", and this box always contains exactly one "jumd" description box (not public, but accessible with Box.first) and one or more content boxes to follow that.
Since:
5
  • Constructor Details

    • JUMBox

      public JUMBox()
      Create a new uninitialized box, for loading. Don't call this constructor
    • JUMBox

      public JUMBox(String subtype, String label)
      Create a new JUMBox
      Parameters:
      subtype - the subtype which will be set on the description. Required.
      label - the label which will be set on the description. Theoretically optional, but effectively required for C2PA
  • Method Details

    • find

      public JUMBox find(String path)
      Given a JUMBox path eg "self#jumbf=a/b" or "jumbf=a/b" or "a/b", return the child that matches that box. The returned child will always be a JUMBox, or null if no such child exists.
      Parameters:
      path - the JUMBF path to match
      Returns:
      the Box matching that path
    • find

      public String find(JUMBox child)
      Given a descendent of this box, return the JUMBF path (with the leading "self#jumbf=") that would be used to request it, or null if it's not requestable or not found. It will be returned as a relative path if possible, an absolute one if not.
      Parameters:
      child - the descendent Box
      Returns:
      the JUMBF path to request that box from this node
    • subtype

      public String subtype()
      Return the subtype of this box's "description" box, either a 4-character alpha-numeric string (if the type is a "standard" subtype) or a 32-character hex string
      Returns:
      the subtype
    • label

      public String label()
      Return the label from this box's "description" box, or null if there is none.
      Returns:
      the label