@Nullable
    private static String toString(long maxContentLength, long contentLength, long transferred,
                                   boolean earlyRejection) {
        try (TemporaryThreadLocals ttl = TemporaryThreadLocals.acquire()) {
            final StringBuilder buf = ttl.stringBuilder();
            if (maxContentLength >= 0) {
                buf.append(", maxContentLength: ").append(maxContentLength);
            }
            if (contentLength >= 0) {
                buf.append(", contentLength: ").append(contentLength);
            }
            if (transferred >= 0) {
                buf.append(", transferred: ").append(transferred);
            }
            if (earlyRejection) {
                buf.append(", earlyRejection: ").append("true");
            }
            return buf.length() != 0 ? buf.substring(2) : null;
        }
    }
Returns whether the exception is raised when reading content-length header.
core/src/main/java/com/linecorp/armeria/common/ContentTooLargeException.java