Class CBORPairList
java.lang.Object
com.authlete.cbor.CBORItem
com.authlete.cbor.CBORPairList
- Direct Known Subclasses:
AuthorizedDataElements
,COSEKey
,COSEUnprotectedHeader
,CWTClaimsSet
,DeviceAuth
,DeviceKeyInfo
,DeviceNameSpaces
,DeviceResponse
,DeviceSigned
,DeviceSignedItems
,DigestIDs
,Document
,DocumentError
,ErrorItems
,Errors
,IssuerNameSpaces
,IssuerSigned
,IssuerSignedItem
,KeyAuthorizations
,KeyInfo
,MobileSecurityObject
,ValidityInfo
,ValueDigests
A class that represents a CBOR map (major type = 5).
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCBORPairList
(List<? extends CBORPair> pairs) A constructor with a list of key-value pairs that this CBOR map holds.CBORPairList
(T... pairs) A constructor with a list of key-value pairs that this CBOR map holds. -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(OutputStream outputStream) Write the CBOR representation of this instance into the output stream.Find a pair that has the specified key.getPairs()
Get the key-value pairs in this CBOR map.parse()
Convert thisCBORItem
instance into an instance of a common Java class.protected String
Stringify this CBOR item and all the nested CBOR items in the pretty format.toString()
Return"{<key>: <value>, ...}"
Methods inherited from class com.authlete.cbor.CBORItem
encode, encodeMajorWithNumber, encodeToBase64, encodeToBase64Url, encodeToHex, getComment, prettify, setComment, toString
-
Constructor Details
-
CBORPairList
-
CBORPairList
public CBORPairList(T... pairs) A constructor with a list of key-value pairs that this CBOR map holds.- Parameters:
pairs
- A list of key-value pairs.- Since:
- 1.14
-
-
Method Details
-
getPairs
-
toString
-
prettify
Description copied from class:CBORItem
Stringify this CBOR item and all the nested CBOR items in the pretty format.Subclasses should override this method as necessary.
- Overrides:
prettify
in classCBORItem
- Parameters:
indent
- The indent inherited from the upper CBOR item.indentUnit
- Additional indent that should be added when nested CBOR items are stringified.tagNumber
- The tag number of the tag wrapping this CBOR item. If this CBOR item is not wrapped,null
is passed.- Returns:
- The string expression of this CBOR item and all the nested CBOR items.
-
encode
Description copied from class:CBORItem
Write the CBOR representation of this instance into the output stream.- Specified by:
encode
in classCBORItem
- Parameters:
outputStream
- The output stream to write the CBOR representation into.- Throws:
IOException
-
parse
-
findByKey
-