public final int getNewBufferSize ( int curSize , int minNewSize ) { if ( curSize <= maxDoublingSize ) return Math . max ( curSize << 1 , minNewSize ) ; else return Math . max ( curSize + ( curSize >> 2 ) , minNewSize ) ; }
Gets the number of bytes to which the internal buffer should be resized .