code: public static StringBuffer append(StringBuffer target, int char32) {
          // Check for irregular values
          if (char32 < CODEPOINT_MIN_VALUE || char32 > CODEPOINT_MAX_VALUE) {
              throw new IllegalArgumentException("Illegal codepoint: " + Integer.toHexString(char32));
          }
  
          // Write the UTF-16 values
          if (char32 >= SUPPLEMENTARY_MIN_VALUE) {
              target.append(getLeadSurrogate(char32));
              target.append(getTrailSurrogate(char32));
          } else {
              target.append((char) char32);
          }
          return target;
      }
docs: Append a single UTF-32 value to the end of a StringBuffer. If a validity check is required,
  use {@link android.icu.lang.UCharacter#isLegal(int)} on char32 before
  calling.
  
  @param target The buffer to append to
  @param char32 Value to append.
  @return the updated StringBuffer
  @exception IllegalArgumentException Thrown when char32 does not lie within the range of the Unicode codepoints