code: public List<DataItem> decode() throws CborException {
          List<DataItem> dataItems = new LinkedList<>();
          DataItem dataItem;
          while ((dataItem = decodeNext()) != null) {
              dataItems.add(dataItem);
          }
          return dataItems;
      }
docs: Decode the {@link InputStream} to a list of {@link DataItem}s.
  
  @return the list of {@link DataItem}s
  @throws CborException
  if decoding failed