code: public static void reverseByteArray(final byte[] data, final int start, final int length) {
          for (int left = start, right = start + length - 1; left < right; left++, right--) {
              // swap the values at the left and right indices
              byte temp = data[left];
              data[left]  = data[right];
              data[right] = temp;
          }
      }
docs: reverse elements in the subarray data[start:start+length]