title: Is BufferedInputStream and BufferedOutputstream different from InputStream and Outputstream
body: <p>recently i had troubles working with InputStreams and OutputStreams when  i was trying to implement a basic file downloader in my android application.. to elaborate things this is how i did it..    </p>
  
  <p>i get an InputStream object using the apache HttpClient classes then tried writing the stream to a file.. but strangely when i buffer the InputStream or the OutputStream i get an unreadable file.... this is the code..  </p>
  
  <p>//to make the code concise i removed exceptions and stream closing..   </p>
  
  <pre><code>private void download(InputStream in,String fileName){   
  
  //if i dont use the buffered thing and read directly from in everything is ok
  // same is the buffered out i had to use in/outstream 
  BufferedInputStream bufferedIn = new BufferedInputStream(in);  
  FileOutputStream fout = new FileOutputStream(new File(fileName));  
  
  BufferedOutputstream  bufferedOut = new BufferedOutputstream(fout);    
  int read = -1;
  
  while((read = bufferedIn.read()) != -1){
     bufferedOut.write(read);
  }
  //close the buffers
  }
  </code></pre>