private static String escapeAndQuote(String value) {
        StringBuilder escaped = new StringBuilder(value.length() + 16).append('"');
        for (int i = 0; i < value.length(); i++) {
            char ch = value.charAt(i);
            if (ch == '\r' || ch == '\\' || ch == '"') {
                escaped.append('\\');
            }
            escaped.append(ch);
        }
        return escaped.append('"').toString();
    }
Returns the string representation of this media type in the format described in <a
href="https://datatracker.ietf.org/doc/rfc2045/">RFC 2045</a>.
core/src/main/java/com/linecorp/armeria/common/MediaType.java