title: passing InputStream to a different class and getting a NullPointerException
body: <p>I am trying to create an InputStream inside my activity.  It creates just fine but I am trying to pass the created InputStream to a class where I actually want to work with the InputStream.   The InputStream in created inside an onClick method on my activity.  The second I try to pass the InputStream object to a method inside my "working class" I get a NullPointerException.  I do not want to do the work inside my activity.  How can I pass either the InputStream or even an AssetManager object to work with it.  My "working class" doesnt extend or implement anything.  Should it?</p>
  
  <pre><code>    public class MainActivity extends ListActivity {
          private DbManagement mdbManager;
          private TestProcessor tp;
          @Override
          public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_lookup);
              mdbManager = new DbManagement(this);
              mdbManager.open();
              fillData();
              Button testingCsv =(Button)findViewById(R.id.btnTestCsv);
              testingCsv.setOnClickListener(ChokeSlam);
              testPopulate_Tests();
  
          }
  
          private OnClickListener ChokeSlam = new OnClickListener(){
  
              @Override
              public void onClick(View v) {
                  // TODO Auto-generated method stub
                  AssetManager aM = getAssets();
                  InputStream ipNext = null;
                  InputStreamReader iprNext = null;
                  try{                
                      //ipNext = aM.open("Book1.csv");
                      //CSVReader reader = new CSVReader(new InputStreamReader(ipNext));
                      //iprNext = new InputStreamReader(ipNext);
                      //tp.ProcessInboundStream(ipNext);
                      tp.ProcessInboundStream(aM,"Book1.csv");
                      ipNext.close();
                      //tp.ProcessInboundStream(new InputStream(ipNext));
                  }
                  catch(Exception ex){
                    System.out.println(ex.toString());
                  }
              }
  
          };
  
  
  
      public class TestProcessor {
          private DbManagement mdbManager;
          private final Context mctx;
  
          public TestProcessor(Context ctx) {
              // TODO Auto-generated constructor stub
              this.mctx = ctx;
          }
          public void ProcessInboundStream(AssetManager aM,String fileName){
  
  
              InputStream ipNext = null;
              try{                
                  ipNext = aM.open(fileName);
                  CSVReader reader = new CSVReader(new InputStreamReader(ipNext));        
                  ipNext.close();
                  //tp.ProcessInboundStream(new InputStream(ipNext));
              }
              catch(Exception ex){
                System.out.println(ex.toString());
              }
          }
      }
  </code></pre>