question: @ Deprecated @ Override public String readLine ( ) throws IOException { StringBuilder b = new StringBuilder ( 0 ) ; int chr ; while ( ( chr = read ( ) ) >= 0 ) { if ( chr != '\n' ) { b . append ( ( char ) chr ) ; } else { return b . toString ( ) ; } } return b . toString ( ) ; }
target:  Emulate the deprecated DataInputStream.readLine() method. Originally we used the method itself, but Alan Brighton suggested using a java.io.BufferedReader to eliminate the deprecation warning. This was used for a long time, but more recently we noted that this doesn't work. We now use a simple method that largely ignores character encodings and only uses the "\n" as the line separator. This method is slow regardless. In the current version