public abstract class Message extends Attribute
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
emitContent |
protected boolean |
emitTag |
protected MessageTag |
messageTag |
protected byte[] |
rgbContent |
DontSendAttributes, externalData, objDontSend, objProtected, objUnprotected, ProtectedAttributes, rgbProtected, UnprotectedAttributes| Constructor and Description |
|---|
Message() |
| Modifier and Type | Method and Description |
|---|---|
static Message |
DecodeFromBytes(byte[] rgbData)
Decode a COSE message object.
|
static Message |
DecodeFromBytes(byte[] rgbData,
MessageTag defaultTag)
Decode a COSE message object.
|
protected abstract void |
DecodeFromCBORObject(com.upokecenter.cbor.CBORObject messageObject) |
protected abstract com.upokecenter.cbor.CBORObject |
EncodeCBORObject() |
byte[] |
EncodeToBytes() |
com.upokecenter.cbor.CBORObject |
EncodeToCBORObject() |
byte[] |
GetContent() |
void |
SetContent(byte[] rgbData) |
void |
SetContent(String strData) |
addAttribute, addAttribute, addAttribute, AddProtected, AddProtected, AddProtected, AddUnprotected, AddUnprotected, AddUnprotected, findAttribute, findAttribute, setExternalprotected boolean emitTag
protected boolean emitContent
protected MessageTag messageTag
protected byte[] rgbContent
public static Message DecodeFromBytes(byte[] rgbData) throws CoseException
rgbData - byte stream to be decodedCoseException - on a decode failurepublic static Message DecodeFromBytes(byte[] rgbData, MessageTag defaultTag) throws CoseException
MessageTag.Unknown
to decode a generic structure with tagging. Use a specific value if
the tagging is absent or if a known structure is passed in.rgbData - byte stream to be decodeddefaultTag - assumed message type to be decodedCoseException - on a decode failure.public byte[] EncodeToBytes()
throws CoseException
CoseExceptionprotected abstract void DecodeFromCBORObject(com.upokecenter.cbor.CBORObject messageObject)
throws CoseException
CoseExceptionprotected abstract com.upokecenter.cbor.CBORObject EncodeCBORObject()
throws CoseException
CoseExceptionpublic com.upokecenter.cbor.CBORObject EncodeToCBORObject()
throws CoseException
CoseExceptionpublic byte[] GetContent()
public void SetContent(byte[] rgbData)
public void SetContent(String strData)
COSE for Java documentation, generatedin 2016.