Cast Long[] to long[]
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/564392/converting-an-array-of-objects-to-an-array-of-their-primitive-types">Converting an array of objects to an array of their primitive types</a>  </p>
</blockquote>



<p>I making a <code>Parcel</code> for Android and I'm trying to package an <code>ArrayList&lt;Long&gt;</code> (toArray gives me <code>Long[]</code>) by converting it to <code>long[]</code>, is there a simple way to do this? </p>

<p>I realize I can loop through but I guess I'm looking for a more elegant solution.</p>
