protected String readLine() throws IOException {
  StringBuilder sb=new StringBuilder();
  int c;
  while ((c=inputStream.read()) != -1) {
    if (c == '\r')     continue;
    if (c == '\n')     break;
    sb.append((char)c);
  }
  return sb.toString();
}

protected String readLine ( ) throws IOException { StringBuilder sb = new StringBuilder ( ) ; int c ; while ( ( c = inputStream . read ( ) ) != - 1 ) { if ( c == '\r' ) continue ; if ( c == '\n' ) break ; sb . append ( ( char ) c ) ; } return sb . toString ( ) ; }
reads one response line .
