MCPcopy Index your code
hub / github.com/c-rack/cbor-java / decode

Method decode

src/main/java/co/nstant/in/cbor/CborDecoder.java:76–78  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Calls 3

decodeNextMethod · 0.95
onDataItemMethod · 0.65
addMethod · 0.45