类 FileOut
java.lang.Object
com.gdxsoft.easyweb.script.servlets.FileOut
-
字段概要
字段 -
构造器概要
构造器构造器说明FileOut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) -
方法概要
修饰符和类型方法说明voidaddCacheControl(Long cacheLife) booleanlongDownload the filegetFile()intstatic DimensiongetImageResize(String resize) Parse the size string to the dimension, filter invalid charstatic FilegetImageResizedFile(File image, String resize) static FilegetOrCreateImageResizedFile(File image, String resize, boolean createNew, String accept) javax.servlet.http.HttpServletRequestjavax.servlet.http.HttpServletResponsebooleanbooleanbooleanoutBufferedImage(BufferedImage image) voidvoidoutContetType(String ext) longOut file bytes in-line, e.g. image, pdf, and check the header flag If-Modified(304) and output the header Cache-control(OneWeek)longoutFileBytesInline(boolean checkIfModified, Long cacheLife) Out file bytes in-line, e.g. image, pdflongoutFileBytesInline(RestfulResult<Object> result, boolean checkIfModified, Long cacheLife) longOut the file's bytes to user client(response)
-
字段详细资料
-
MAP
-
DEF_DOWNLOAD_TYPE
-
-
构造器详细资料
-
FileOut
public FileOut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
-
方法详细资料
-
getImageResizedFile
-
getOrCreateImageResizedFile
-
getImageResize
-
initFile
-
outBufferedImage
-
initFile
-
outContetType
public void outContetType() -
outContetType
-
addCacheControl
-
chcekIfNotModified
public boolean chcekIfNotModified() -
download
-
outFileBytesInline
public long outFileBytesInline()Out file bytes in-line, e.g. image, pdf, and check the header flag If-Modified(304) and output the header Cache-control(OneWeek)- 返回:
- The length of the file
-
outFileBytesInline
Out file bytes in-line, e.g. image, pdf- 参数:
checkIfModified- Whether to check the header If-Modified flag (304)cacheLife- Whether to output the Cache-Control header- 返回:
- The length of the file
-
outFileBytesInline
public long outFileBytesInline(RestfulResult<Object> result, boolean checkIfModified, Long cacheLife) -
outFileBytesToClient
public long outFileBytesToClient()Out the file's bytes to user client(response)- 参数:
file- the fileresponse- HttpServletResponse- 返回:
- out bytes length
-
getRequest
public javax.servlet.http.HttpServletRequest getRequest() -
getResponse
public javax.servlet.http.HttpServletResponse getResponse() -
getFile
-
getHttpStatusCode
public int getHttpStatusCode()
-