public class FileUtil
extends java.lang.Object
构造器和说明 |
---|
FileUtil() |
限定符和类型 | 方法和说明 |
---|---|
static void |
byte2File(byte[] buf,
com.seeyon.ctp.common.file.model.CtpLocalFile file)
讲字节写入文件
|
static java.lang.String |
CheckFileValid(java.lang.String filePathName) |
static void |
downloadFile(javax.servlet.http.HttpServletResponse response,
com.seeyon.ctp.common.file.model.CtpLocalFile file)
将文件写入响应流
|
static void |
downloadFile(javax.servlet.http.HttpServletResponse response,
java.lang.String fileName)
将文件写入响应流
|
static byte[] |
file2byte(com.seeyon.ctp.common.file.model.CtpLocalFile file)
将文件转为字节
|
static void |
fileByteToResponse(javax.servlet.http.HttpServletResponse response,
byte[] fileByte)
将字节写入响应流
|
static byte[] |
hex2byte(java.lang.String str)
将16进制字符串转换成byte数组
|
static byte[] |
LoadRevisionAsImgByte(java.lang.String RevisionValue)
有金格的方法,见 iMsgServer2000类
|
static com.seeyon.ctp.common.file.model.CtpLocalFile |
toDocumentKG(com.seeyon.ctp.common.file.model.CtpLocalFile file)
对文件进行金格处理(兼容老版本的文档)
|
public static byte[] file2byte(com.seeyon.ctp.common.file.model.CtpLocalFile file)
file
- public static void byte2File(byte[] buf, com.seeyon.ctp.common.file.model.CtpLocalFile file)
buf
- file
- public static java.lang.String CheckFileValid(java.lang.String filePathName)
public static byte[] hex2byte(java.lang.String str)
str
- public static void downloadFile(javax.servlet.http.HttpServletResponse response, java.lang.String fileName) throws java.lang.Exception
response
- fileName
- 输出文件地址java.lang.Exception
public static void downloadFile(javax.servlet.http.HttpServletResponse response, com.seeyon.ctp.common.file.model.CtpLocalFile file) throws java.lang.Exception
response
- file
- 输出文件java.lang.Exception
public static void fileByteToResponse(javax.servlet.http.HttpServletResponse response, byte[] fileByte)
response
- fileByte
- public static byte[] LoadRevisionAsImgByte(java.lang.String RevisionValue)
RevisionValue
- public static com.seeyon.ctp.common.file.model.CtpLocalFile toDocumentKG(com.seeyon.ctp.common.file.model.CtpLocalFile file)
file
- 原解密后的文档java.io.IOException