private Printer escapeCharacter(char c) {
    if (c == '"') {
      return backslashChar(c);
    }
    switch (c) {
      case '\\':
        return backslashChar('\\');
      case '\r':
        return backslashChar('r');
      case '\n':
        return backslashChar('n');
      case '\t':
        return backslashChar('t');
      default:
        if (c < 32) {
          // TODO(bazel-team): support \x escapes
          return this.append(String.format("\\x%02x", (int) c));
        }
        return this.append(c); // no need to support UTF-8
    }
  }
private Printer escapeCharacter(char c) {
    if (c == '"') {
      return backslashChar(c);
    }
    switch (c) {
      case '\\':
        return backslashChar('\\');
      case '\r':
        return backslashChar('r');
      case '\n':
        return backslashChar('n');
      case '\t':
        return backslashChar('t');
      default:
        if (c < 32) {
         
          return this.append(String.format("\\x%02x", (int) c));
        }
        return this.append(c);
    }
  }
private printer escapecharacter(char c) { if (c == '"') { return backslashchar(c); } switch (c) { case '\\': return backslashchar('\\'); case '\r': return backslashchar('r'); case '\n': return backslashchar('n'); case '\t': return backslashchar('t'); default: if (c < 32) { return this.append(string.format("\\x%02x", (int) c)); } return this.append(c); } }