static CharSequence stripLineBreaks(final CharSequence s) {
        if (s == null) {
            return null;
        }
        boolean requiresRewrite = false;
        int n = 0;
        for (; n < s.length(); n++) {
            final char ch = s.charAt(n);
            if (isLineBreak(ch)) {
                requiresRewrite = true;
                break;
            }
        }
        if (!requiresRewrite) {
            return s;
        }
        final StringBuilder buf = new StringBuilder();
        buf.append(s, 0, n);
        for (; n < s.length(); n++) {
            final char ch = s.charAt(n);
            if (isLineBreak(ch)) {
                buf.append(' ');
            } else {
                buf.append(ch);
            }
        }
        return buf.toString();
    }
The epilogue to be included after the multipart content.
httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/AbstractMultipartFormat.java