Having trouble using load() and save() methods stored outside of main.java
<p>Here is what my io.java file looks like, which contains the class "io", which holds my methods load() and save().</p>

<pre><code> package com.myschedules;

 //FILE I/O
 import java.io.*; 
 import android.content.Context;

 public class io {

Context asdf;

//save file 
public  void save(String filename, String data) { 

    try { 
        FileOutputStream fos = asdf.openFileOutput(filename, Context.MODE_PRIVATE); 
        fos.write(data.getBytes()); 
        fos.close(); 
    } 
    catch (Exception ex) { 
    }
}


//load file
public  String load(String filename) {
    try { 
         FileInputStream fis = asdf.openFileInput(filename);
         BufferedReader reader = new BufferedReader(new InputStreamReader(fis));
         String line = null, input="";
         while ((line = reader.readLine()) != null) input += line; 
         reader.close(); fis.close();
         return input; 
    } 
    catch (Exception ex) {
         return ""; 
    }
 }
</code></pre>

<p>}</p>

<p>When I got to call these methods in main, it looks like this:</p>

<pre><code> io login_io = new io();
 String login_preferences = login_io.load("login_preferences.dat");
</code></pre>

<p>Unfortunately, this just causes my app to crash at start up.  How can I store my load() and save() functions in a separate file as to not clutter up my main. Compartmentalization is extremely important for my own organization.  This is so simple in other languages with the #include or import calls, but I'm lost here.</p>

<p>EDIT:</p>

<p>Okay, now I've got another issue... this is from within MainActivity.java.  I am wanting to do some file I/O after a button is clicked.  However, it ends up producing this error over the "io login_io = new io(this);": </p>

<p>"The constructor io(new View.OnClickListener(){}) is undefined"</p>

<pre><code> cmd_login.setOnClickListener(new OnClickListener()
    {

        public void onClick(View v) 
        {

            io login_io = new io(this);
            String login_preferences = login_io.load("login_preferences.dat");
</code></pre>
