code: public static String javaStringEscape(@NonNull String string) {
        StringBuilder b = new StringBuilder();
        for (char c : string.toCharArray()) {
           if (c >= 128) {
              b.append("\\u").append(String.format("%04X", (int) c));
           } else {
              b.append(c);
           }
        }
        return b.toString();
     }
docs: Escapes the unicode in the given string using the Java specification
  
  @param string The string to escape
  @return The escaped string