public String readLine ( ) throws IOException { StringBuilder bldr = new StringBuilder ( ) ; while ( true ) { int b = read ( ) ; if ( b == - 1 || b == 10 ) { break ; } else if ( b != ' ' ) { bldr . append ( ( char ) ( ( byte ) b ) ) ; } } return bldr . toString ( ) ; }
Reads a line up until \ r \ n This will act similar to BufferedReader . readLine