int readLine ( StringBuilder sb ) throws IOException { int c = reader . read ( ) ; int count = ( c == - 1 ) ? - 1 : 0 ; while ( c > - 1 && ! isOverMaxObjectLen ( count ) && ! checkEolAndAdjust ( c ) ) { count ++ ; sb . append ( ( char ) c ) ; c = reader . read ( ) ; } if ( isOverMaxObjectLen ( count ) ) { sb . setLength ( sb . length ( ) - 1 ) ; while ( c > - 1 && c != ' ' && c != ' ' ) { count ++ ; c = reader . read ( ) ; } checkEolAndAdjust ( c ) ; } return count ; }
returns the reader line length the StringBuilder has up to maxObjectLen chars