code: public void decode(DataItemListener dataItemListener) throws CborException {
          Objects.requireNonNull(dataItemListener);
          DataItem dataItem = decodeNext();
          while (dataItem != null) {
              dataItemListener.onDataItem(dataItem);
              dataItem = decodeNext();
          }
      }
docs: Streaming decoding of an input stream. On each decoded DataItem, the
  callback listener is invoked.
  
  @param dataItemListener
  the callback listener
  @throws CborException
  if decoding failed