title: proper condition to check end of line in buffered reader
body: <p>In below code, I feel while() condition may not be correct, because I am calling the readLine() method twice, means not verifying the firstLine string in my if() condition from reader.</p>
  
  <p>what is the correct way to verify if buffered reader (br) has not reached end of line.</p>
  
  <pre><code>try {
      if (is != null) {
          br = new BufferedReader(new InputStreamReader(is));
          os.write("x ample.abcd.com\r\n\r\n".getBytes());
          if (br != null) {
              while (br.readLine() != null) {
                  String returnString = br.readLine();
                  if (returnString.contains("250")) {
                      logger.debug(" string:" + returnString);
                      break;
                  }
              }
          }
      }
  } catch (IOException e1) {
      e1.printStackTrace();
  } finally {
      try {
          if (br != null)
              br.close();
          if (sockt != null)
              sockt.close();
      } catch (IOException e) {
          e.printStackTrace();
      }
  </code></pre>