Hey all,
Trying to work with saving and reading files from within my app. Have not had a problem using the code format provided by PlusMinus in "Working with Files" tutorial for writing a .txt file. Have verified it's existence in the DDMS during debugging. But when I try to read it back, I hit the Source Not Found error. Below is the class where teh crash is occuring. The line between the asterisks is the specific line of code that initiates the crash while stepping through in Debug Mode.
STUCK!! Any help would be greatly appreciated.
Thanks in advance.
public class MainLog1 extends Activity {
/** Called when the activity is first created. */
public static String Password;
public static String pswdread;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mainlog1);
// Read Password from .txt file
try
{
FileInputStream fIn2 = openFileInput("lipwfile.txt");
InputStreamReader isr2 = new InputStreamReader(fIn2);
***************
char [] inputBuffer = new char[pswdread.length()];
***************
isr2.read(inputBuffer);
Password = new String(inputBuffer);
Log.i("Password Retrieval = " + Password, Password);
}
catch (IOException ioe)
{
ioe.printStackTrace();
}

