I have a text file of dictionary and I want to match words with EditText value. But I am getting the following error java.io.FileNotFoundException: /Test/res/raw/test.txt: open failed: ENOENT (No such file or directory)
This what I have done so far.
public void show(View view) throws IOException
{
    File file = new File("/Test/res/raw/test.txt");
    if (!file.exists())
    {
         helloTxt1.setText("empty");    
    }
    try 
    {  
        FileInputStream in = new FileInputStream(file);
        int len = 0;
        byte[] data1 = new byte[1024];
        while ( -1 != (len = in.read(data1)) )
        {
            if(new String(data1, 0, len).contains(edittxt.getText().toString()))
            {
                  helloTxt1.setText("1");
            }
            else
            {
                  helloTxt1.setText("0");
            }                             
        }
    } catch (FileNotFoundException e) 
      {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }    
}
Thanks in advance.
 
     
     
    