Package org.apache.commons.fileupload
Class FileUploadBase.SizeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.commons.fileupload.FileUploadException
org.apache.commons.fileupload.FileUploadBase.SizeException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FileUploadBase.FileSizeLimitExceededException,FileUploadBase.SizeLimitExceededException
- Enclosing class:
FileUploadBase
This exception is thrown, if a requests permitted size
is exceeded.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longThe actual size of the request.private final longThe maximum permitted size of the request.private static final longSerial version UID, being used, if serialized. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSizeException(String message, long actual, long permitted) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionlongGets the actual size of the request.longGets the permitted size of the request.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial version UID, being used, if serialized.- See Also:
-
actual
private final long actualThe actual size of the request. -
permitted
private final long permittedThe maximum permitted size of the request.
-
-
Constructor Details
-
SizeException
Creates a new instance.- Parameters:
message- The detail message.actual- The actual number of bytes in the request.permitted- The requests size limit, in bytes.
-
-
Method Details
-
getActualSize
public long getActualSize()Gets the actual size of the request.- Returns:
- The actual size of the request.
- Since:
- 1.3
-
getPermittedSize
public long getPermittedSize()Gets the permitted size of the request.- Returns:
- The permitted size of the request.
- Since:
- 1.3
-