title: Java : convert List of Bytes to array of bytes
body: <p>Trying to solve what should be a simple problem.  Got a list of Bytes, want to convert it at the end of a function to an array of bytes.</p>
  
  <pre><code>final List&lt;Byte&gt; pdu = new ArrayList&lt;Byte&gt;();
  ....
  return pdu.toArray(new byte[pdu.size()]);;
  </code></pre>
  
  <p>compiler doesn't like syntax on my <code>toArray</code>.  How to fix this?</p>