Package com.linecorp.armeria.common
Class ContentTooLargeExceptionBuilder
java.lang.Object
com.linecorp.armeria.common.ContentTooLargeExceptionBuilder
public final class ContentTooLargeExceptionBuilder extends Object
Builds a new
ContentTooLargeException
.-
Method Summary
Modifier and Type Method Description ContentTooLargeException
build()
Returns a new instance ofContentTooLargeException
.ContentTooLargeExceptionBuilder
contentLength(long contentLength)
Sets the actual content length in bytes, as specified in thecontent-length
header.ContentTooLargeExceptionBuilder
contentLength(HttpHeaders headers)
Sets the actual content length in bytes, as specified in thecontent-length
header, from the specifiedHttpHeaders
.ContentTooLargeExceptionBuilder
maxContentLength(long maxContentLength)
Sets the maximum allowed content length in bytes.ContentTooLargeExceptionBuilder
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. -
build
Returns a new instance ofContentTooLargeException
.
-