code: public static boolean isSurrogatePair(char[] text, int idx) {
          if (idx < 0 || idx > text.length - 2)
              return false;
          return isSurrogateHigh(text[idx]) && isSurrogateLow(text[idx + 1]);
      }
docs: Checks if two subsequent characters in a character array are
  are the higher and the lower character in a surrogate
  pair (and therefore eligible for conversion to a UTF 32 character).
  @param text	the character array with the high and low surrogate characters
  @param idx	the index of the 'high' character in the pair
  @return	true if the characters are surrogate pairs
  @since	2.1.2