title: Java - How decode CBOR encoded byte[] array?
body: <p>I get data from server - is a CBOR encoded byte[] array and to decoded this I am using <a href="https://github.com/c-rack/cbor-java" rel="nofollow noreferrer">cbor-java</a> implementation.</p>
  
  <pre><code>    byte[] decodedMessage = { 0x78, (byte)0x9c, 0x5b, (byte)0xe4, 0x58, 0x10}
      ByteArrayInputStream bais = new ByteArrayInputStream(decodedMessage);
      List&lt;DataItem&gt; dataItems = new CborDecoder(bais).decode();
      for(DataItem dataItem : dataItems) {
      }
  </code></pre>
  
  <p>If you have some experience with this, can you explain me how i can get the decoded content of array, not the <a href="http://c-rack.github.io/cbor-java/apidocs/index.html" rel="nofollow noreferrer">DataItem</a> object.</p>