guava/src/com/google/common/escape/ArrayBasedUnicodeEscaper.java
@Override
  protected final char[] escape(int cp) {
    if (cp < replacementsLength) {
      char[] chars = replacements[cp];
      if (chars != null) {
        return chars;
      }
    }
    if (cp >= safeMin && cp <= safeMax) {
      return null;
    }
    return escapeUnsafe(cp);
  }
@Override
  protected final char[] escape(int cp) {
    if (cp < replacementsLength) {
      char[] chars = replacements[cp];
      if (chars != null) {
        return chars;
      }
    }
    if (cp >= safeMin && cp <= safeMax) {
      return null;
    }
    return escapeUnsafe(cp);
  }
Escapes a single Unicode code point using the replacement array and safe range values. If the
given character does not have an explicit replacement and lies outside the safe range then
{@link #escapeUnsafe} is called.