code: private void reverseRange(Buffer a, int lo, int hi) {
      hi--;
      while (lo < hi) {
        s.swap(a, lo, hi);
        lo++;
        hi--;
      }
    }
docs: Reverse the specified range of the specified array.
  
  @param a the array in which a range is to be reversed
  @param lo the index of the first element in the range to be reversed
  @param hi the index after the last element in the range to be reversed