public void writeData2File(byte[] data) throws FileAccessException {
  try {
    if (mOut == null) {
      File destination=new File(mUri.getPath());
      FileOutputStream fos=new FileOutputStream(destination);
      mOut=new BufferedOutputStream(fos,8 * 1024);
    }
    mOut.write(data);
  }
 catch (  IOException e) {
    throw new FileAccessException("Failed to write data chunk to file!",e);
  }
}

public void writeData2File ( byte [ ] data ) throws FileAccessException { try { if ( mOut == null ) { File destination = new File ( mUri . getPath ( ) ) ; FileOutputStream fos = new FileOutputStream ( destination ) ; mOut = new BufferedOutputStream ( fos , 8 * 1024 ) ; } mOut . write ( data ) ; } catch ( IOException e ) { throw new FileAccessException ( "Failed to write data chunk to file!" , e ) ; } }
write data chunk to file
