# Class FileUploadByteCountLimitException

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

All Implemented Interfaces:
  `Serializable`

public class FileUploadByteCountLimitException extends FileUploadSizeException
Signals that a file size exceeds the configured maximum.

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`FileUploadByteCountLimitException(String message, long actual, long permitted, String fileName, String fieldName)`
Constructs an instance with the specified detail message, and actual and permitted sizes.

## Method Summary

Modifier and Type
Method
Description
`String`
`getFieldName()`
Gets the field name of the item, which caused the exception.
`String`
`getFileName()`
Gets the file name of the item, which caused the exception.

### Methods inherited from class FileUploadSizeException

`getActualSize, getPermitted`

### 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

### FileUploadByteCountLimitException

public FileUploadByteCountLimitException(String message, long actual, long permitted, String fileName, String fieldName)
Constructs an instance with the specified detail message, and actual and permitted sizes.

Parameters:
  `message` - The detail message (which is saved for later retrieval by the `Throwable.getMessage()` method)
  `actual` - The actual request size.
  `permitted` - The maximum permitted request size.
  `fileName` - File name of the item, which caused the exception.
  `fieldName` - Field name of the item, which caused the exception.

## Method Details

### getFieldName

public String getFieldName()
Gets the field name of the item, which caused the exception.

Returns:
  Field name, if known, or null.

### getFileName

public String getFileName()
Gets the file name of the item, which caused the exception.

Returns:
  File name, if known, or null.