Java rotation utility. Rotates an integer array by specific index in reverse order