CBOR

open class CBOR

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun <T> getObject(data: @NotNull Array<Byte>, @NotNull key: @NotNull String, @NotNull type: @NotNull Class<T>): T
Link copied to clipboard
@NotNull
open fun getString(data: @NotNull Array<Byte>, @NotNull key: @NotNull String): @NotNull String
Link copied to clipboard
open fun stringLength(@NotNull s: @NotNull String): Int
Calculates the size in bytes of a CBOR encoded string.
Link copied to clipboard
open fun toBytes(obj: Any): Array<Byte>
Link copied to clipboard
open fun <T> toObject(data: Array<Byte>, type: Class<T>): T
Link copied to clipboard
open fun toObjectMap(data: Array<Byte>): Map<String, Any>
Link copied to clipboard
open fun <T> toString(obj: T): String
open fun toString(data: Array<Byte>): String
open fun toString(data: Array<Byte>, offset: Int): String
Link copied to clipboard
open fun toStringMap(data: Array<Byte>): Map<String, String>
Link copied to clipboard
open fun uintLength(n: Int): Int
Calculates the size in bytes of a CBOR encoded unsigned integer.