title: java.io.FileNotFoundException (Trying to deserialize)
body: <p>I'm trying to deserialize an XML file into an Object.
  My code fails on the line:</p>
  
  <pre><code>new FileInputStream(mySearch)
  </code></pre>
  
  <p>with a <code>java.io.FileNotFoundException</code>.</p>
  
  <p>So, I added the:  if (exists) block to see if the file could be found another way.</p>
  
  <p>I've googled the error and read other threads of discussion. Based on those discussions, I've tried <strong>FIVE</strong> different ways of specifying the file path and name. (See the commented out attempts)</p>
  
  <p>The desired behavior is that I figure out what is wrong with my syntax for the path and file name, so that the file will be found and deserialized.</p>
  
  <pre><code>import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.widget.TextView;
  import java.beans.XMLDecoder;
  import java.io.BufferedInputStream;
  import java.io.FileInputStream;
  import java.io.File;
  
  public class MainActivity extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      // 5/20/2018 T. Pfaff - Added XMLDecoder Deserialization of XML file into EquationLib/LibSets/EquationSet
  
      //===========================================================================================
      //Below are the FIVE different ways that I've tried to get it to find the file
  
      String myFileStr = "C:\\Users\\Terence\\Documents\\Meditate-Lemniscate\\Test_Single.xml";
      //String myFileStr = "c:\\users\\terence\\documents\\meditate-lemniscate\\test_single.xml";
      //String myFileStr = "C:/Users/Terence/Documents/Meditate-Lemniscate/Test_Single.xml";
      //String myFileStr = "c:/users/terence/documents/meditate-lemniscate/test_single.xml";
      //String myFileStr = "Test_Single.xml";
  
      //===========================================================================================
  
      String myEqSetName = "";
      Integer myCnt = 0;
      EquationLib equationLib = new EquationLib();
      TextView myTV = (TextView) findViewById(R.id.myTextView);
  
      //=============================================================================
      //This block of code ALWAYS results in "Does NOT Exist"
      //no matter which value I use for myFileStr
  
      File mySearch = new File(myFileStr);
      boolean exists = mySearch.exists();
  
      if (exists) {
          myTV.setText("YES EXISTS: " + myFileStr);
      } else {
          myTV.setText("Does NOT Exist: " + myFileStr);
      }
      //==============================================================================
  
  
      XMLDecoder decoder=null;
  
      // The first statement in the try block throws the exception:
      //java.io.FileNotFoundException: C:\Users\Terence\Documents\Meditate-Lemniscate\Test_Single.xml (No such file or directory)
  
      try{
          FileInputStream myFileIS = new FileInputStream(mySearch);
          decoder = new XMLDecoder(new BufferedInputStream(myFileIS));
          equationLib = (EquationLib) decoder.readObject();
  
          myCnt = equationLib.libSets.size();
          myEqSetName = equationLib.libSets.get(0).equationSet.name;
  
      } catch (Exception e){
          e.printStackTrace();
      }
  
      //myTV.setText(myCnt.toString());
  }
  </code></pre>
  
  <p>}</p>