org.tinygroup.weblayer.webcontext.parser.upload
类 UploadParameters

java.lang.Object
  继承者 org.tinygroup.weblayer.webcontext.parser.upload.UploadParameters
所有已实现的接口:
UploadConfiguration

public class UploadParameters
extends Object
implements UploadConfiguration

multipart/form-data类型的HTTP请求参数上传

作者:
renhui

字段摘要
 
从接口 org.tinygroup.weblayer.webcontext.parser.upload.UploadConfiguration 继承的字段
FILE_SIZE_MAX_DEFAULT, SIZE_MAX_DEFAULT, SIZE_THRESHOLD_DEFAULT
 
构造方法摘要
UploadParameters()
           
 
方法摘要
 void applyDefaultValues()
          设置默认值。
 boolean equals(Object obj)
           
 String[] getFileNameKey()
          标准的上传文件请求中,包含这样的内容: Content-Disposition: attachment; filename=xxx.txt
 org.tinygroup.commons.tools.HumanReadableSize getFileSizeMax()
          取得单个文件允许的最大尺寸,超过此尺寸的文件将被抛弃。
 File getRepository()
          取得暂存文件的目录。
 org.tinygroup.commons.tools.HumanReadableSize getSizeMax()
          取得HTTP请求的最大尺寸,超过此尺寸的请求将被抛弃。
 org.tinygroup.commons.tools.HumanReadableSize getSizeThreshold()
          取得将文件放在内存中的阈值,小于此值的文件被保存在内存中。
 boolean isKeepFormFieldInMemory()
          是否将普通的form field保持在内存里?
 boolean isSaveInFile()
           
 void setFileNameKey(String[] fileNameKey)
           
 void setFileSizeMax(org.tinygroup.commons.tools.HumanReadableSize fileSizeMax)
           
 void setFileSizeMax(long fileSizeMax)
           
 void setKeepFormFieldInMemory(boolean keepFormFieldInMemory)
           
 void setRepository(File repository)
           
 void setSaveInFile(boolean saveInFile)
           
 void setSizeMax(org.tinygroup.commons.tools.HumanReadableSize sizeMax)
           
 void setSizeMax(long sizeMax)
           
 void setSizeThreshold(org.tinygroup.commons.tools.HumanReadableSize sizeThreshold)
           
 void setSizeThreshold(int sizeThreshold)
           
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

UploadParameters

public UploadParameters()
方法详细信息

getRepository

public File getRepository()
从接口 UploadConfiguration 复制的描述
取得暂存文件的目录。

指定者:
接口 UploadConfiguration 中的 getRepository

setRepository

public void setRepository(File repository)

getSizeMax

public org.tinygroup.commons.tools.HumanReadableSize getSizeMax()
从接口 UploadConfiguration 复制的描述
取得HTTP请求的最大尺寸,超过此尺寸的请求将被抛弃。单位:字节,值-1表示没有限制。

指定者:
接口 UploadConfiguration 中的 getSizeMax

setSizeMax

public void setSizeMax(org.tinygroup.commons.tools.HumanReadableSize sizeMax)

setSizeMax

public void setSizeMax(long sizeMax)

getFileSizeMax

public org.tinygroup.commons.tools.HumanReadableSize getFileSizeMax()
从接口 UploadConfiguration 复制的描述
取得单个文件允许的最大尺寸,超过此尺寸的文件将被抛弃。单位:字节,值-1表示没有限制。

指定者:
接口 UploadConfiguration 中的 getFileSizeMax

setFileSizeMax

public void setFileSizeMax(org.tinygroup.commons.tools.HumanReadableSize fileSizeMax)

setFileSizeMax

public void setFileSizeMax(long fileSizeMax)

getSizeThreshold

public org.tinygroup.commons.tools.HumanReadableSize getSizeThreshold()
从接口 UploadConfiguration 复制的描述
取得将文件放在内存中的阈值,小于此值的文件被保存在内存中。单位:字节。

指定者:
接口 UploadConfiguration 中的 getSizeThreshold

setSizeThreshold

public void setSizeThreshold(org.tinygroup.commons.tools.HumanReadableSize sizeThreshold)

setSizeThreshold

public void setSizeThreshold(int sizeThreshold)

isKeepFormFieldInMemory

public boolean isKeepFormFieldInMemory()
从接口 UploadConfiguration 复制的描述
是否将普通的form field保持在内存里?当sizeThreshold值为0 的时候,该值自动为true

指定者:
接口 UploadConfiguration 中的 isKeepFormFieldInMemory

setKeepFormFieldInMemory

public void setKeepFormFieldInMemory(boolean keepFormFieldInMemory)

isSaveInFile

public boolean isSaveInFile()
指定者:
接口 UploadConfiguration 中的 isSaveInFile

setSaveInFile

public void setSaveInFile(boolean saveInFile)

getFileNameKey

public String[] getFileNameKey()
从接口 UploadConfiguration 复制的描述
标准的上传文件请求中,包含这样的内容: Content-Disposition: attachment; filename=xxx.txt 。然而有些不规范的应用,会取fname=xxx.txt。此变量为兼容这种情况而设。

指定者:
接口 UploadConfiguration 中的 getFileNameKey

setFileNameKey

public void setFileNameKey(String[] fileNameKey)

applyDefaultValues

public void applyDefaultValues()
设置默认值。


equals

public boolean equals(Object obj)
覆盖:
Object 中的 equals

toString

public String toString()
覆盖:
Object 中的 toString


Copyright © 2006–2013 开源组织. All rights reserved.