Package com.digimarc.dms.payload
Class RawPayload
java.lang.Object
com.digimarc.dms.payload.Payload
com.digimarc.dms.payload.RawPayload
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.digimarc.dms.payload.Payload
Payload.BasicRepresentation, Payload.Data, Payload.DataFormatMode, Payload.GIAIFieldRepresentation, Payload.GS1_AI_Representation, Payload.Representation, Payload.Sgtin96Representation
-
Constructor Summary
ConstructorsConstructorDescriptionRawPayload
(Payload payload) Constructs a RawPayload from a Payload object.RawPayload
(String cpmPath) Constructs a RawPayload object from a CPM path.RawPayload
(String cpmPath, boolean isPrivate) Constructs a RawPayload object from a CPM path -
Method Summary
Modifier and TypeMethodDescriptionReturns the value substring of a CPM payload.getGrid()
Get the Grid substring of the CPM path.Get the Protocol substring of the CPM path.Get the subtype of a Digimarc Barcode payload from the CPM path.getType()
Get the Type substring of the CPM path.getValueForVersionAndSubType
(int version, int subType) This method is intended for use in applications using Digimarc Barcodes with reserved payload ranges.Get the version substring of the CPM path.boolean
Determine if a payload was read using a private channelMethods inherited from class com.digimarc.dms.payload.Payload
equals, getAllRepresentations, getData, getData, getGS1Data, getPayloadString, getPayloadVersion, getRepresentation, getSymbology, hashCode, isEphemeral
-
Constructor Details
-
RawPayload
Constructs a RawPayload object from a CPM path.- Parameters:
cpmPath
- CPM Path.
-
RawPayload
Constructs a RawPayload object from a CPM path- Parameters:
cpmPath
- CPM Path.isPrivate
- is Payload produced by reading with a private channel.
-
RawPayload
Constructs a RawPayload from a Payload object.- Parameters:
payload
- Payload object.
-
-
Method Details
-
getGrid
Get the Grid substring of the CPM path.- Returns:
- The grid substring from the payload's CPM path
-
getProtocol
Get the Protocol substring of the CPM path.- Returns:
- The protocol substring from the payload's CPM path
-
getType
Get the Type substring of the CPM path.- Returns:
- The type substring from the payload's CPM path
-
getVersion
Get the version substring of the CPM path.- Returns:
- The version substring from the payload's CPM path
-
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
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
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
-