how do i change this code for videos?
<p>This is my code below which takes a picture from gallery to save in database. How do I change this piece of code for videos? What I write instead of bitmap?  Please help me how do I change??? I want change this code to take video from gallery safe in internal  memory and safe is path in database is work fine for photos now I want to change for videos.</p>

<pre><code>    public void SelecedtPhotos()
   {

    final int len = thumbnailsselection.length;
//  int cnt = 0;

    for (int i =0; i&lt;len; i++)
    {
        if (thumbnailsselection[i])
        {
            //cnt++;

            BitmapFactory.Options options = new 
 BitmapFactory.Options();
            options.inSampleSize = 8; 
            options.inPreferredConfig = Bitmap.Config.ARGB_8888;

            Bitmap bitmap = BitmapFactory.decodeFile(arrPath[i],  
  options);

                }
            try {



                File photos=new File(getFilesDir(), "photos");
FileOutputStream outputStream=new FileOutputStream(new File(photos,   
      FileName(arrPath[i])));




                outputStream.write(getBitmapAsByteArray(bitmap));
                outputStream.close();
            } catch (Exception e) {
                e.printStackTrace();
            }

            db = new DataBase(getBaseContext()); 
            try {
                db.createDataBase();
            } catch (IOException e1) {
                e1.printStackTrace();
            }

            db.insert_update("INSERT INTO Photos(name,ext,path) VALUES 
   ('"+FileName(arrPath[i])+"','"+fileExt(arrPath[i])+"','"+arrPath[i]+"')");

            db.close();

            File file = new File(arrPath[i]);
            boolean t = file.delete();

        }
</code></pre>
