Top Description Fields Constructors Methods
org.springframework.web.multipart

public Class MaxUploadSizeExceededException

extends MultipartException
implements ErrorResponse
Class Inheritance
All Implemented Interfaces
org.springframework.web.ErrorResponse
Annotations
@SuppressWarnings:serial
Imports
org.springframework.http.HttpStatus, .HttpStatusCode, .ProblemDetail, org.springframework.lang.Nullable, org.springframework.web.ErrorResponse

MultipartException subclass thrown when an upload exceeds the maximum upload size allowed.
Authors
Juergen Hoeller, Sebastien Deleuze
Since
1.0.1

Field Summary

Modifier and TypeField and Description
private static final ProblemDetail
private final long

Constructor Summary

AccessConstructor and Description
public
MaxUploadSizeExceededException(long
the maximum upload size allowed, or -1 if the size limit isn't known
maxUploadSize
)

Constructor for MaxUploadSizeExceededException.

public
MaxUploadSizeExceededException(long
the maximum upload size allowed, or -1 if the size limit isn't known
maxUploadSize
,
Throwable
root cause from multipart parsing API in use
ex
)

Constructor for MaxUploadSizeExceededException.

Method Summary

Modifier and TypeMethod and Description
public ProblemDetail
getBody()

Implements org.springframework.web.ErrorResponse.getBody.

Return the body for the response, formatted as an RFC 7807 ProblemDetail whose status should match the response status.
public long
getMaxUploadSize()

Return the maximum upload size allowed, or -1 if the size limit isn't known.

public HttpStatusCode
getStatusCode()

Implements org.springframework.web.ErrorResponse.getStatusCode.

Return the HTTP status code to use for the response.

Field Detail

bodyback to summary
private static final ProblemDetail body
maxUploadSizeback to summary
private final long maxUploadSize

Constructor Detail

MaxUploadSizeExceededExceptionback to summary
public MaxUploadSizeExceededException(long maxUploadSize)

Constructor for MaxUploadSizeExceededException.

Parameters
maxUploadSize:long

the maximum upload size allowed, or -1 if the size limit isn't known

MaxUploadSizeExceededExceptionback to summary
public MaxUploadSizeExceededException(long maxUploadSize, Throwable ex)

Constructor for MaxUploadSizeExceededException.

Parameters
maxUploadSize:long

the maximum upload size allowed, or -1 if the size limit isn't known

ex:Throwable

root cause from multipart parsing API in use

Method Detail

getBodyback to summary
public ProblemDetail getBody()

Implements org.springframework.web.ErrorResponse.getBody.

Doc from org.springframework.web.ErrorResponse.getBody.

Return the body for the response, formatted as an RFC 7807 ProblemDetail whose status should match the response status.

Annotations
@Override
getMaxUploadSizeback to summary
public long getMaxUploadSize()

Return the maximum upload size allowed, or -1 if the size limit isn't known.

getStatusCodeback to summary
public HttpStatusCode getStatusCode()

Implements org.springframework.web.ErrorResponse.getStatusCode.

Doc from org.springframework.web.ErrorResponse.getStatusCode.

Return the HTTP status code to use for the response.

Annotations
@Override