public class AttachmentService
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
BASE64_DATA |
构造器和说明 |
---|
AttachmentService() |
限定符和类型 | 方法和说明 |
---|---|
void |
downloadAttach(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
java.lang.String[] ids)
附件下载(批量)
|
void |
exportImg(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
java.lang.String id)
导出图片
|
java.lang.String |
getImageBase64(java.lang.String id)
获取图片的base64数据
|
static AttachmentService |
getInstance() |
void |
showImage(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
java.lang.String id,
java.lang.String format,
boolean adjust)
获取图片
|
void |
uploadAttach(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
int width,
int height,
java.lang.String fileName)
上传附件
|
public static final java.lang.String BASE64_DATA
public static AttachmentService getInstance()
public void exportImg(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String id) throws java.lang.Exception
req
- 请求res
- 响应id
- 附件idjava.lang.Exception
- 异常public void downloadAttach(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String[] ids) throws java.lang.Exception
req
- 请求res
- 响应ids
- 附件id数组java.lang.Exception
- 异常public void uploadAttach(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, int width, int height, java.lang.String fileName) throws java.lang.Exception
req
- 请求res
- 响应width
- 宽height
- 长fileName
- 附件名称java.lang.Exception
- 异常public void showImage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String id, java.lang.String format, boolean adjust) throws java.lang.Exception
req
- 请求res
- 响应id
- 附件idformat
- 编码adjust
- 是否调整大小java.lang.Exception
- 异常public java.lang.String getImageBase64(java.lang.String id) throws java.lang.Exception
id
- java.lang.Exception