Package com.linecorp.armeria.common
Class ContentTooLargeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.linecorp.armeria.common.ContentTooLargeException
- All Implemented Interfaces:
Serializable
A
RuntimeException
raised when the length of request or response content exceeds its limit.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Returns aContentTooLargeExceptionBuilder
which may return a singleton or a new instance in itsContentTooLargeExceptionBuilder.build()
method, depending onFlags.verboseExceptionSampler()
's decision.long
Returns the actual content length in bytes, as specified in thecontent-length
header, or-1
if this value is not known.static ContentTooLargeException
get()
Returns aContentTooLargeException
which may be a singleton or a new instance, depending onFlags.verboseExceptionSampler()
's decision.long
Returns the maximum allowed content length in bytes, or-1
if this value is not known.long
Returns the number of bytes transferred so far, or-1
if this value is not known.Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
get
Returns aContentTooLargeException
which may be a singleton or a new instance, depending onFlags.verboseExceptionSampler()
's decision. -
builder
Returns aContentTooLargeExceptionBuilder
which may return a singleton or a new instance in itsContentTooLargeExceptionBuilder.build()
method, depending onFlags.verboseExceptionSampler()
's decision. -
transferred
public long transferred()Returns the number of bytes transferred so far, or-1
if this value is not known. -
contentLength
public long contentLength()Returns the actual content length in bytes, as specified in thecontent-length
header, or-1
if this value is not known. -
maxContentLength
public long maxContentLength()Returns the maximum allowed content length in bytes, or-1
if this value is not known. -
fillInStackTrace
- Overrides:
fillInStackTrace
in classThrowable
-