read failed: EBADF (Bad file number)
<p>When I try do a copy one file of the external storage for into folder database, this error happens:</p>

<blockquote>
  <p>java.io.IOException: read failed: EBADF (Bad file number)</p>
</blockquote>

<p>This error happens on the line of while of this method </p>

<pre><code>private void copiarBaseDados(InputStream input) throws IOException{
  OutputStream output = new FileOutputStream(ConfiguracoesBaseDados.BANCO_PATH + ConfiguracoesBaseDados.BANCO_NOME);
  int tamanho;
  byte[] buffer = new byte[1024];
  while ((tamanho = input.read(buffer)) &gt; 0) 
       output.write(buffer, 0, tamanho);
  output.flush();
  output.close();
  input.close();
}
</code></pre>

<p>Any idea what could be the problem? Thanks</p>
