protected Object newArray ( Object old , int oldLen , Object arr ) { int sb = Math . floorMod ( begin , oldLen ) ; int se = Math . floorMod ( end , oldLen ) ; if ( sb < se ) { System . arraycopy ( old , sb , arr , sb , se - sb ) ; } else { System . arraycopy ( old , sb , arr , sb , oldLen - sb ) ; System . arraycopy ( old , 0 , arr , 0 , se ) ; } return arr ; }
Returns new oldLen ring buffer