question: private int extend ( final int required ) { final int capacity = Math . max ( required , capacity ( ) * 2 ) ; if ( log . isInfoEnabled ( ) ) log . info ( "Extending buffer to capacity=" + capacity + " bytes." ) ; return capacity ; }
target:  Return the new capacity for the buffer (default is always large enough and will normally double the buffer capacity each time it overflows).