tags:

views:

35

answers:

1

I use the below code to create a file in my application.I need to check is the file is exist or not from my code ? Help me

FileOutputStream fOut = null;        
    OutputStreamWriter osw = null;
    String data="My file Test ";  
    try{
        fOut = openFileOutput("settings.dat",MODE_PRIVATE);     
        osw = new OutputStreamWriter(fOut);
        osw.write(data);
        osw.flush();           
        }
        catch (Exception e) {      
        e.printStackTrace();          
        }
+2  A: 
aioobe