Package com.linecorp.armeria.common
Class ContentTooLargeExceptionBuilder
java.lang.Object
com.linecorp.armeria.common.ContentTooLargeExceptionBuilder
Builds a new
ContentTooLargeException
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a new instance ofContentTooLargeException
.Sets theThrowable
that caused thisContentTooLargeException
to get thrown.contentLength
(long contentLength) Sets the actual content length in bytes, as specified in thecontent-length
header.contentLength
(HttpHeaders headers) Sets the actual content length in bytes, as specified in thecontent-length
header, from the specifiedHttpHeaders
.earlyRejection
(boolean isEarlyRejection) Sets the exception as early rejection.maxContentLength
(long maxContentLength) Sets the maximum allowed content length in bytes.transferred
(long transferred) Sets the number of bytes transferred so far.
-
Method Details
-
maxContentLength
Sets the maximum allowed content length in bytes. -
contentLength
Sets the actual content length in bytes, as specified in thecontent-length
header. -
contentLength
Sets the actual content length in bytes, as specified in thecontent-length
header, from the specifiedHttpHeaders
. If thecontent-length
header is missing or its value is not valid,-1
(unknown) will be set instead. -
transferred
Sets the number of bytes transferred so far. -
cause
Sets theThrowable
that caused thisContentTooLargeException
to get thrown. -
earlyRejection
Sets the exception as early rejection. -
build
Returns a new instance ofContentTooLargeException
.
-