retriving data from SD card in multiple text boxes
<p>code for saving in SD card,i have declared button save where registered onclicklistner as follows: </p>

<pre><code>        btn.setOnClickListener(new View.OnClickListener()
        {       
    EditText filename =(EditText) findViewById(R.id.filename);
            EditText filecontent =(EditText) findViewById(R.id.filecontent);
       public void onClick(View view) 
        {

        String str = filename.getText().toString();
        String str2= filecontent.getText().toString();

            File sdCard = Environment.getExternalStorageDirectory();
            File directory = new File (sdCard.getAbsolutePath()+"/MyFiles");
            directory.mkdirs();
            File file = new File(directory,"textfile.txt");
                    FileOutputStream fOut = new FileOutputStream(file);
            OutputStreamWriter osw = new OutputStreamWriter(fOut);
                osw.write(str);
            osw.write("   ");
            osw.write(str2);
                    osw.close();


        }

       } 
</code></pre>

<p>on load button i have registered onclicklistener while defined block as well
        private static final int READ_BLOCK_SIZE = 100;
while load code is:</p>

<pre><code>    Button load = (Button) findViewById(R.id.load);
    load.setOnClickListener(new View.OnClickListener() {
EditText filename =(EditText) findViewById(R.id.filename);
    EditText filecontent =(EditText) findViewById(R.id.filecontent);
    public void onClick(View v) {

       File sdCard = Environment.getExternalStorageDirectory();
        File directory = new File (sdCard.getAbsolutePath() +
        "/MyFiles");
        File file = new File(directory, "textfile.txt");

        FileInputStream fIn = new FileInputStream(file);
        InputStreamReader isr = new InputStreamReader(fIn);
             char[] inputBuffer = new char[READ_BLOCK_SIZE];
        String s = "";
        int charRead;

    while ((charRead = isr.read(inputBuffer))&gt;0)
    {
        //---convert the chars to a String---
        String readString =
        String.copyValueOf(inputBuffer, 0,
        charRead);
        s += readString;
        inputBuffer = new char[READ_BLOCK_SIZE];
    }

  filename.setText(s);
  filecontent.setText(s);
  Toast.makeText(getBaseContext(),
  "File loaded successfully!",
  Toast.LENGTH_SHORT).show();
  }
  });
</code></pre>

<p>its showing all contents of files in each textbox!!i want filename  to b extracted from content !!</p>
