# Class FileUploadSizeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.commons.fileupload2.core.FileUploadException
org.apache.commons.fileupload2.core.FileUploadSizeException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `FileUploadByteCountLimitException, FileUploadFileCountLimitException`

public class FileUploadSizeException extends FileUploadException
Signals that a requests permitted size is exceeded.

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`FileUploadSizeException(String message, long permitted, long actual)`
Constructs an instance.

## Method Summary

Modifier and Type
Method
Description
`long`
`getActualSize()`
Gets the actual size of the request.
`long`
`getPermitted()`
Gets the limit size of the request.

### Methods inherited from class Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### FileUploadSizeException

public FileUploadSizeException(String message, long permitted, long actual)
Constructs an instance.

Parameters:
  `message` - The detail message (which is saved for later retrieval by the `Throwable.getMessage()` method)
  `permitted` - The requests size limit.
  `actual` - The actual values for the request.

## Method Details

### getActualSize

public long getActualSize()
Gets the actual size of the request.

Returns:
  The actual size of the request.

### getPermitted

public long getPermitted()
Gets the limit size of the request.

Returns:
  The limit size of the request.