title: Java: most efficient way to defensively copy an int[]?
body: <p>I have an interface <code>DataSeries</code> with a method</p>
  
  <pre><code>int[] getRawData();
  </code></pre>
  
  <p>For various reasons (primarily because I'm using this with MATLAB, and MATLAB handles int[] well) I need to return an array rather than a List.</p>
  
  <p>I don't want my implementing classes to return the int[] array because it is mutable. What is the most efficient way to copy an int[] array (sizes in the 1000-1000000 length range) ? Is it <code>clone()</code>?</p>