public abstract class AbstractMultiPartRequest extends Object implements MultiPartRequest
MultiPartRequest
Modifier and Type | Field and Description |
---|---|
static int |
BUFFER_SIZE
Defines the internal buffer size used during streaming operations.
|
protected int |
bufferSize
Specifies the buffer size to use during streaming.
|
protected String |
defaultEncoding |
protected Locale |
defaultLocale
Localization to be used regarding errors.
|
protected List<LocalizedMessage> |
errors
Internal list of raised errors to be passed to the the Struts2 framework.
|
protected Long |
maxFiles
Specifies the maximum number of files in one request.
|
protected Long |
maxFileSize
Specifies the maximum size per file in the request.
|
protected Long |
maxSize
Specifies the maximum size of the entire request.
|
protected Long |
maxStringLength
Specifies the maximum length of a string parameter in a multipart request.
|
Constructor and Description |
---|
AbstractMultiPartRequest() |
Modifier and Type | Method and Description |
---|---|
protected LocalizedMessage |
buildErrorMessage(Throwable e,
Object[] args)
Build error message.
|
protected String |
getCanonicalName(String originalFileName) |
List<LocalizedMessage> |
getErrors()
Returns a list of error messages that may have occurred while processing the request.
|
void |
setBufferSize(String bufferSize) |
void |
setDefaultEncoding(String enc) |
protected void |
setLocale(javax.servlet.http.HttpServletRequest request) |
void |
setLocaleProviderFactory(LocaleProviderFactory localeProviderFactory) |
void |
setMaxFiles(String maxFiles) |
void |
setMaxFileSize(String maxFileSize) |
void |
setMaxSize(String maxSize) |
void |
setMaxStringLength(String maxStringLength) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cleanUp, getContentType, getFile, getFileNames, getFileParameterNames, getFilesystemName, getParameter, getParameterNames, getParameterValues, parse
public static final int BUFFER_SIZE
protected List<LocalizedMessage> errors
protected Long maxSize
protected Long maxFiles
protected Long maxStringLength
protected Long maxFileSize
protected int bufferSize
protected String defaultEncoding
protected Locale defaultLocale
public void setBufferSize(String bufferSize)
bufferSize
- Sets the buffer size to be used.public void setDefaultEncoding(String enc)
public void setMaxSize(String maxSize)
maxSize
- Injects the Struts multipart request maximum size.public void setMaxFiles(String maxFiles)
public void setMaxFileSize(String maxFileSize)
public void setMaxStringLength(String maxStringLength)
public void setLocaleProviderFactory(LocaleProviderFactory localeProviderFactory)
protected void setLocale(javax.servlet.http.HttpServletRequest request)
request
- Inspect the servlet request and set the locale if one wasn't provided by
the Struts2 framework.protected LocalizedMessage buildErrorMessage(Throwable e, Object[] args)
e
- the Throwable/Exceptionargs
- argumentspublic List<LocalizedMessage> getErrors()
MultiPartRequest
MultiPartRequestWrapper
's errors field.getErrors
in interface MultiPartRequest
Copyright © 2000–2024 Apache Software Foundation. All rights reserved.