Class RawPayload

java.lang.Object
com.digimarc.dms.payload.Payload
com.digimarc.dms.payload.RawPayload

public class RawPayload extends Payload
This class allows low-level access to individual pieces of the Payload. Most applications do not need this level of detail and should use the Payload and Representation methods to correctly interpret Payload data. If you believe your application needs to use RawPayload contact Digimarc for technical guidance.
  • Constructor Details

    • RawPayload

      public RawPayload(@NonNull String cpmPath)
      Constructs a RawPayload object from a CPM path.
      Parameters:
      cpmPath - CPM Path.
    • RawPayload

      public RawPayload(@NonNull String cpmPath, boolean isPrivate)
      Constructs a RawPayload object from a CPM path
      Parameters:
      cpmPath - CPM Path.
      isPrivate - is Payload produced by reading with a private channel.
    • RawPayload

      public RawPayload(@NonNull Payload payload)
      Constructs a RawPayload from a Payload object.
      Parameters:
      payload - Payload object.
  • Method Details

    • getGrid

      @NonNull public String getGrid()
      Get the Grid substring of the CPM path.
      Returns:
      The grid substring from the payload's CPM path
    • getProtocol

      @NonNull public String getProtocol()
      Get the Protocol substring of the CPM path.
      Returns:
      The protocol substring from the payload's CPM path
    • getType

      @NonNull public String getType()
      Get the Type substring of the CPM path.
      Returns:
      The type substring from the payload's CPM path
    • getVersion

      @NonNull public String getVersion()
      Get the version substring of the CPM path.
      Returns:
      The version substring from the payload's CPM path
    • getSubType

      @Nullable public String getSubType()
      Get the subtype of a Digimarc Barcode payload from the CPM path. This is only for Digimarc Barcode payloads.
      Returns:
      The subtype if this is Digimarc Barcode, null otherwise.
    • getBaseValue

      @NonNull public String getBaseValue()
      Returns the value substring of a CPM payload. The payload value string format varies by the payload type, grid, protocol, and version.

      Applications that need to inspect the payload are discouraged from using this method alone. Although the cpmPath is unique, the value by itself is not unique across different Digimarc Barcodes. Correct understanding of a payload can only be done by using all elements of the cpmPath. Consult with Digimarc if you have unique identification requirements.

      Returns:
      The value substring from the payload's CPM path
    • getValueForVersionAndSubType

      @Nullable public String getValueForVersionAndSubType(int version, int subType)
      This method is intended for use in applications using Digimarc Barcodes with reserved payload ranges. These applications will be reading from images that have been enhanced using a defined payload version and subtype. This method may be useful if your product is using a High Volume Payload (HVP) file to enable Digimarc-enhanced content. Most applications do not need this API.
      Parameters:
      version - Version code of your application's payloads.
      subType - Subtype ID of your application's payloads.
      Returns:
      If the specified version or subType don't match null is returned. Otherwise the value substring is returned as a hex string with the subtype bits masked off.
    • isPrivate

      public boolean isPrivate()
      Determine if a payload was read using a private channel
      Returns:
      - true means it's private