title: How to assemble the file using the range header?
body: <p>I use range hader, but not create correct file.</p>
  
  <p>if I send <code>Range bytes=0-8999</code> file weighs 9000 bytes and correct work.
  if I send <code>Range bytes=0-8999,9000-9999</code> file weighs 10213 bytes and <strong>NOT</strong> correct work.</p>
  
  <p>File type mp3.</p>
  
  <p>What could be wrong?</p>
  
  <pre><code>HttpGet first = new HttpGet("http://cs4832.vkontakte.ru/u50184979/audio/ef64581d913c.mp3");
  first.addHeader("Accept-Ranges", "bytes");
  first.addHeader("Range", "bytes=0-8999,9000-9999");
  
  //first.addHeader("Accept-Ranges", "bytes");
  
  HttpResponse response = httpclient.execute(first, localContext);
  
  
  InputStream instream = response.getEntity().getContent();
  File f = new File("outFile1.mp3");
  
  OutputStream out = new FileOutputStream(f);
  byte buf[] = new byte[1024];
  int len;
  while ((len = instream.read(buf)) &gt; 0) {
      out.write(buf, 0, len);
  }
  out.close();
  instream.close();
  </code></pre>