public class AttachmentHelper
extends java.lang.Object
构造器和说明 |
---|
AttachmentHelper() |
限定符和类型 | 方法和说明 |
---|---|
static Attachment |
addAttachment(java.awt.Image image)
添加附件
|
static Attachment |
addAttachment(java.awt.Image image,
int cellwidth,
int cellheight)
添加附件
|
static Attachment |
addAttachment(java.awt.Image image,
java.lang.String type,
int cellwidth,
int cellheight)
添加附件
|
static Attachment |
addAttachment(java.awt.Image image,
java.lang.String type,
java.lang.String name)
添加附件
|
static byte[] |
changeImageLayout(byte[] bytes,
Attachment attach,
javax.servlet.http.HttpServletRequest req)
neil: 处理已上传图片的layout, 改为自适应, 即Constants.IMAGE_ADJUST
|
static boolean |
isAdjust(javax.servlet.http.HttpServletRequest req,
Attachment attach) |
static void |
output(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
public static Attachment addAttachment(java.awt.Image image, java.lang.String type, java.lang.String name)
image
- 图片文件type
- 图片类型name
- 图片名字public static Attachment addAttachment(java.awt.Image image, java.lang.String type, int cellwidth, int cellheight)
image
- 图片文件type
- 图片类型cellwidth
- 图片宽度cellheight
- 图片高度public static Attachment addAttachment(java.awt.Image image)
image
- 图片文件public static Attachment addAttachment(java.awt.Image image, int cellwidth, int cellheight)
image
- 图片文件cellwidth
- 单元格宽cellheight
- 单元格高public static void output(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws java.lang.Exception
java.lang.Exception
public static boolean isAdjust(javax.servlet.http.HttpServletRequest req, Attachment attach)
public static byte[] changeImageLayout(byte[] bytes, Attachment attach, javax.servlet.http.HttpServletRequest req)