org.tinygroup.weblayer.webcontext.parser.impl
public class UploadedFileExtensionWhitelist extends BeanSupport implements UploadedFileFilter
| Constructor and 描述 |
|---|
UploadedFileExtensionWhitelist() |
| Modifier and Type | Method and 描述 |
|---|---|
org.apache.commons.fileupload.FileItem |
filter(String key,
org.apache.commons.fileupload.FileItem file)
过滤指定文件,如果返回
null表示忽略该文件。 |
protected void |
init() |
boolean |
isFiltering(javax.servlet.http.HttpServletRequest request)
是否需要过滤,如果返回否,则对于该请求的所有参数均不执行该过滤器。
|
void |
setAllowedExtensions(String[] extensions) |
afterPropertiesSet, assertInitialized, destroy, dispose, getBeanDescription, getBeanDescription, getBeanInterface, getBeanName, isInitialized, postDispose, postInit, preDispose, preInit, resolveBeanInterface, setBeanName, toStringpublic void setAllowedExtensions(String[] extensions)
public boolean isFiltering(javax.servlet.http.HttpServletRequest request)
ParameterParserFilter有些filter可以根据URL来确定是否要过滤参数。
isFiltering 接口 {1} 中的 {0} ParameterParserFilterprotected void init()
throws Exception
init 类 {1} 中的 {0} BeanSupportExceptionpublic org.apache.commons.fileupload.FileItem filter(String key, org.apache.commons.fileupload.FileItem file)
UploadedFileFilternull表示忽略该文件。
注意,file可能是null。
filter 接口 {1} 中的 {0} UploadedFileFilterCopyright © 2006–2015 TinyGroup. All rights reserved.