Fastest way of writing the first 10 000 lines of data file to new file
<p>I want the first ten thousand lines of a hyuuge (.csv) file.</p>

<p>The naive way of </p>

<p>1) creating a reader &amp; writer </p>

<p>2) reading the original file line for line</p>

<p>3) writing the first ten thousand lines to a new file</p>

<p>can't be the fastest, can it?</p>

<p>This will be a common operation in my app so I'm slightly concerned about speed, but also just curious.</p>

<p>Thanks.</p>
