public TextObject append ( Reader reader ) throws IOException { char [ ] buf = new char [ 1024 ] ; while ( reader . ready ( ) && ( maxTextLength == 0 || stringBuilder . length ( ) < maxTextLength ) ) { int length = reader . read ( buf ) ; append ( String . valueOf ( buf , 0 , length ) ) ; } return this ; }
Append the target text for language detection . This method read the text from specified input reader . If the total size of target text exceeds the limit size the rest is ignored .