Como salvar arquivo de texto analisado no armazenamento interno / externo no android

Atualmente estou trabalhando no projeto onde eu preciso analisar um arquivo de texto remoto e armazená-lo no armazenamento local (interno / externo). Eu sou capaz de analisar o arquivo de texto, mas não é possível armazená-lo no SDCARD. Aqui está o meu código:

package com.exercise.AndroidInternetTxt;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.MalformedURLException;
import java.net.URL;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;

public class AndroidInternetTxt extends Activity {

    TextView textMsg, textPrompt;
    final String textSource = "http://sites.google.com/site/androidersite"
                                                              + "/text.txt";

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        textPrompt = (TextView) findViewById(R.id.textprompt);
        textMsg = (TextView) findViewById(R.id.textmsg);
        textPrompt.setText("Wait...");
        URL textUrl;
        try {
            textUrl = new URL(textSource);
            BufferedReader bufferReader = new BufferedReader(
                    new InputStreamReader(textUrl.openStream()));
            String StringBuffer;
            String stringText = "";
            while ((StringBuffer = bufferReader.readLine()) != null) {
                stringText += StringBuffer;
            }
            bufferReader.close();
            textMsg.setText(stringText);
            // Saving the parsed data.........
            File myFile = new File("sdcard/mysdfile.txt");
            if (!myFile.exists()) {
                myFile.mkdirs();
            }
            myFile = new File("sdcard/mysdfile.txt");
            myFile.createNewFile();
            FileOutputStream fOut = new FileOutputStream(myFile);
            OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut);
            myOutWriter.append(textMsg.getText());
            myOutWriter.close();
            fOut.close();
            Toast.makeText(getBaseContext(), "Done writing SD 'mysdfile.txt'",
                Toast.LENGTH_SHORT).show();
        } catch (MalformedURLException e) {
            e.printStackTrace();
            textMsg.setText(e.toString());
        } catch (IOException e) {
            e.printStackTrace();
            textMsg.setText(e.toString());
        }
        textPrompt.setText("Finished!");
    }
}

E aqui está o meu arquivo de manifesto -

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.exercise.AndroidInternetTxt"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="4" />
    <uses-permission android:name="android.permission.INTERNET"/>

    <application android:label="@string/app_name">
        <activity android:name=".AndroidInternetTxt"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE"/>
</manifest> 

No entanto, minha pergunta é -

Como faço para armazenar os dados de texto analisados ​​em um arquivo dentro da memória do SDCARD ou do telefone?Existe alguma maneira de verificar o URL com intervalo pré-definido usando o temporizador?

Qualquer exemplo de código é excelente para mim.

questionAnswers(3)

yourAnswerToTheQuestion