Package com.bfo.box

Class CborBox


public class CborBox extends DataBox
A "cbor" box contains a single CBOR object. It is identical to JsonBox except the value is serialized as CBOR. It is defined in ISO19566-5 appendix B.5
Since:
5
  • Constructor Details

    • CborBox

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

      public CborBox(Json cbor)
      Create a new CborBox
      Parameters:
      cbor - the Json object, which must not be null
  • Method Details

    • setCbor

      public void setCbor(Json cbor)
      Replace the CBOR object on this struture.
      Parameters:
      cbor - the JSon object, which must not be null
    • cbor

      public Json cbor()
      Return the CBOR object contained in this struture.
      Returns:
      the object
    • toString

      public String toString()
      Description copied from class: Box
      Return a String representation of this Box, which will be parseable as JSON
      Overrides:
      toString in class Box