cborExtractFirstDataItem

Extracts the first CBOR data item from a stream of bytes.

If a data item was found, returns the bytes and removes it from the given output stream.

Return

the bytes of the first CBOR data item or null if not enough bytes have been received.

Parameters

pendingDataBaos

A ByteArrayOutputStream with incoming bytes which must all be valid CBOR.