title: Android : Copy RawFile to Sdcard (video mp4)
body: <p>What is wrong on this code ?<br>
  I've a Raw file in my project (mp4 videofile),<br>
  when i do this, and then i retreive file from SDcard file are not identical so video can not be load :(<br>
  Do you have another way to automaticly copy a raw file to sdcard ?<br>
  Thanks</p>
  
  <pre><code>String FICHIER_BLOW = "blowvid4.mp4";
  File f=new File(Environment.getExternalStorageDirectory(), FICHIER_BLOW);
  try {
      if (f.createNewFile()){
      FileWriter ecrivain = new FileWriter(f);
      BufferedWriter bufEcrivain = new BufferedWriter(ecrivain);
      BufferedInputStream VideoReader = new BufferedInputStream(getResources().openRawResource(R.raw.blow));
      while( VideoReader.available() &gt; 0 ){
          bufEcrivain.write(VideoReader.read());
      }
      bufEcrivain.close();
  
      VideoView videoView = (VideoView) findViewById(R.id.VideoView);
      MediaController mediaController = new MediaController(this);
      mediaController.setAnchorView(videoView);
      video =Uri.fromFile(f);
      videoView.setMediaController(mediaController);
      videoView.setVideoURI(video);
      videoView.start();
      }
  } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  }
  </code></pre>