question: protected void loadChars ( AbstractMRReply msg , DataInputStream istream ) throws IOException { int i ; for ( i = 0 ; i < msg . maxSize ( ) ; i ++ ) { byte char1 = readByteProtected ( istream ) ; if ( flushReceiveChars ) { log . warn ( "timeout flushes receive buffer: {}" , msg . toString ( ) ) ; msg . flush ( ) ; i = 0 ; flushReceiveChars = false ; } if ( canReceive ( ) ) { msg . setElement ( i , char1 ) ; if ( endOfMessage ( msg ) ) { break ; } } else { i -- ; log . error ( "unsolicited character received: {}" , Integer . toHexString ( char1 ) ) ; } } }
target:  Get characters from the input source, and file a message. <P> Returns only when the message is complete. <P> Only used in the Receive thread. <P> Handles timeouts on read by ignoring zero-length reads.