read Data from text files
<p>I'm trying to read a text files and insert the data from these text files into a URL; 
but i have this error "java.lang.illegalargumentexception contains a path separator file" </p>

<p>this is the read method that im using </p>

<p>></p>

<pre><code>public  String ReadFile (String Path){
    String     res  =    null;
    try {
        String filePath = android.os.Environment.getExternalStorageDirectory().getPath() + "/" + Path;

        File file = new File(filePath);
        if(file.exists()){
           InputStream       in = openFileInput(filePath);

           if (in != null) {
            // prepare the file for reading
             InputStreamReader input = new InputStreamReader(in);
             BufferedReader buffreader = new BufferedReader(input);

              res = "";
              String line;
            while (( line = buffreader.readLine()) != null) {
                res += line;
              }
              in.close();

              }else{
            }
        }else{
               Toast.makeText(getApplicationContext(), "The File" + Path +  " not Found" ,Toast.LENGTH_SHORT).show();
        }
    } catch(Exception e){
           Toast.makeText(getApplicationContext(),e.toString() +   e.getMessage(),Toast.LENGTH_SHORT).show();
    }
    return res;
}



  &gt;  String sendername = ReadFile ("SenderName.txt");
     String AccountName = ReadFile ("AccountName.txt");
     String AccountPassword = ReadFile ("AccountPassword.txt");
     String MsgText = ReadFile ("MsgText.txt");
</code></pre>

<p>Thanks,</p>
