Class FileSizeLimitExceededException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.helger.web.fileupload.exception.FileUploadException
-
- com.helger.web.fileupload.exception.FileSizeLimitExceededException
-
- All Implemented Interfaces:
Serializable
public class FileSizeLimitExceededException extends FileUploadException
Thrown to indicate that A files size exceeds the configured maximum.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FileSizeLimitExceededException(String sMsg, long nActual, long nPermitted, String sFieldName, String sFilename)Constructs aSizeExceededExceptionwith the specified detail message, and actual and permitted sizes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetActualSize()Retrieves the actual size of the request.StringgetFieldName()Returns the field name of the item, which caused the exception.StringgetFileName()Returns the file name of the item, which caused the exception.longgetPermittedSize()Retrieves 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
-
-
-
-
Constructor Detail
-
FileSizeLimitExceededException
public FileSizeLimitExceededException(String sMsg, long nActual, long nPermitted, @Nullable String sFieldName, @Nullable String sFilename)
Constructs aSizeExceededExceptionwith the specified detail message, and actual and permitted sizes.- Parameters:
sMsg- The detail message.nActual- The actual request size.nPermitted- The maximum permitted request size.sFieldName- Field name of the item, which caused the exception.sFilename- File name of the item, which caused the exception.
-
-
Method Detail
-
getFileName
@Nullable public String getFileName()
Returns the file name of the item, which caused the exception.- Returns:
- File name, if known, or null.
-
getFieldName
@Nullable public String getFieldName()
Returns the field name of the item, which caused the exception.- Returns:
- Field name, if known, or null.
-
getActualSize
public long getActualSize()
Retrieves the actual size of the request.- Returns:
- The actual size of the request.
-
getPermittedSize
public long getPermittedSize()
Retrieves the permitted size of the request.- Returns:
- The permitted size of the request.
-
-