Convenience method to decode a byte array directly. @param bytes the CBOR encoded data @return a list of DataItems @throws CborException if decoding failed
(byte[] bytes)
| 74 | * if decoding failed |
| 75 | */ |
| 76 | public static List<DataItem> decode(byte[] bytes) throws CborException { |
| 77 | return new CborDecoder(new ByteArrayInputStream(bytes)).decode(); |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Decode the {@link InputStream} to a list of {@link DataItem}s. |