Class CPDefault
java.lang.Object
com.authlete.cbor.tag.CPDefault
- All Implemented Interfaces:
CBORTagProcessor
A tag processor that returns a
CBORTaggedItem
instance that
has the tag number and the tag content passed as arguments of the
process
method.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
CPDefault
public CPDefault()
-
-
Method Details
-
process
Description copied from interface:CBORTagProcessor
Process a tag.The CBOR data item returned by this method replaces the current tagged item (
CBORTaggedItem
).The simplest implementation is to return
tagContent
as is. It means that the tag is just removed. (cf.CPUntag
)The second simplest implementation is to create a
CBORTaggedItem
instance with the tag number and the tag content passed as arguments and return it. (cf.CPDefault
)- Specified by:
process
in interfaceCBORTagProcessor
- Parameters:
tagNumber
- The tag number.tagContent
- The tag content.- Returns:
- A CBOR data item which replaces the current tagged item
(
CBORTaggedItem
). - Throws:
CBORDecoderException
-