title: error message : stream closed
body: <p>Upon running following code under class <code>FlightSearch</code></p>
  
  <pre><code>String moreSearch = "y";
      List&lt;Flight&gt; resultList;
  
      // load initial flight data into DB
      if (!init()) {
          return;
      }
      // A background thread to monitor changes in csv repository
      FileListner fl = new FileListner();
      fl.start();
  
      do {
          InputStreamReader isr = new InputStreamReader(System.in);
          BufferedReader br = new BufferedReader(isr);
          // main thread gets input
          Input inputQuery = new Input();
          try {
              inputQuery.getQuery();
          } catch (InvalidException e1) {
              e1.getMessage();
          } finally {
              fl.stopThread();
          }
          // main thread STARTs processing task as background monitors csv
          // repo
          QueryProcessor processor = new QueryProcessor();
          resultList = null;
          resultList = processor.matchQuery(inputQuery);
  
          displayResult(resultList, inputQuery.getFlightClass());
  
          System.out
                  .println("More Flight Query ? Press n/N to exit. Anyother key to continue searching.");
  
          try {
              moreSearch = br.readLine(); // LINE 56
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }finally{
              if(br!=null){
                  try {
                      br.close();
                  } catch (IOException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
                  }
              }
          }
  
  
      } while (!moreSearch.equalsIgnoreCase("n"));
  
      System.out.println("Thank You !!!");
  </code></pre>
  
  <p>I get following error :</p>
  
  <pre><code>java.io.IOException: Stream closed
  at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:162)
  at java.io.BufferedInputStream.read(BufferedInputStream.java:325)
  at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
  at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
  at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
  at java.io.InputStreamReader.read(InputStreamReader.java:184)
  at java.io.BufferedReader.fill(BufferedReader.java:154)
  at java.io.BufferedReader.readLine(BufferedReader.java:317)
  at java.io.BufferedReader.readLine(BufferedReader.java:382)
  at com.myApp.FlightSearch.main(FlightSearch.java:56)
  </code></pre>
  
  <p>I have also tried moving </p>
  
  <pre><code>InputStreamReader isr = new InputStreamReader(System.in);
  BufferedReader br = new BufferedReader(isr);
  </code></pre>
  
  <p>moving out of do-while loop but in vain.</p>