title: Convert Integer Array to Data
body: <p>How can I convert an integer Array to Data? </p>
  
  <p>This is what I have, but I am getting lost in figuring out the final step. I am only interested in the Swift 3 solution.</p>
  
  <pre><code>import Foundation
  
  var buffer = [UInt64]( repeating: 0, count: 1000 )
  
  for x in 0 ..&lt; 1000
  {
      buffer[x] = UInt64(x)
  }
  
  ///////
  // What goes here to place buffer into myData
  
  var myData = Data()
  
  //
  ///////
  </code></pre>