public class FilePretreatUtils extends Object
| 构造器和说明 |
|---|
FilePretreatUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
addThumbnail(com.centit.fileserver.po.FileInfo fileInfo,
String sourceFilePath,
int width,
int height) |
static String |
addWatermarkForPdf(com.centit.fileserver.po.FileInfo fileInfo,
String inputPdfPath,
Map<String,Object> pretreatInfo) |
static boolean |
createImageThumbnail(String filename,
int thumbWidth,
int thumbHeight,
int quality,
String outFilename)
给文件添加缩略图
|
static String |
createPdf(com.centit.fileserver.po.FileInfo fileInfo,
String sourceFilePath) |
static String |
encryptFile(com.centit.fileserver.po.FileInfo fileInfo,
String sourceFilePath,
String encryptType,
String password)
加密文件:加密算法暂时不可以设定
|
static com.centit.search.document.FileDocument |
index(com.centit.fileserver.po.FileInfo fileInfo,
File sourceFile) |
static boolean |
office2Pdf(String inputFile,
String pdfFile)
将office文件转换为PDF
|
static boolean |
office2Pdf(String suffix,
String inputFile,
String pdfFile) |
static String |
zipFile(com.centit.fileserver.po.FileInfo fileInfo,
String sourceFilePath) |
static boolean |
zipFile(String inputFile,
String fileName,
String zipFilePathName)
压缩文件
|
static String |
zipFileAndEncrypt(com.centit.fileserver.po.FileInfo fileInfo,
String sourceFilePath,
String encryptPass) |
static boolean |
zipFileAndEncrypt(String inputFilePath,
String zipFilePath,
String password)
压缩文件并通过密码加密
|
public static boolean office2Pdf(String inputFile, String pdfFile) throws Exception
inputFile - office文件pdfFile - PDF文件Exception - 异常public static boolean office2Pdf(String suffix, String inputFile, String pdfFile) throws Exception
Exceptionpublic static boolean createImageThumbnail(String filename, int thumbWidth, int thumbHeight, int quality, String outFilename)
filename - 文件名thumbWidth - 宽度thumbHeight - 高度quality - qualityoutFilename - 处理后文件名public static boolean zipFile(String inputFile, String fileName, String zipFilePathName)
inputFile - 处理前的文件fileName - 文件名zipFilePathName - zip文件路径public static boolean zipFileAndEncrypt(String inputFilePath, String zipFilePath, String password)
inputFilePath - 处理前的文件zipFilePath - zip文件路径password - 密码public static String createPdf(com.centit.fileserver.po.FileInfo fileInfo, String sourceFilePath) throws Exception
Exceptionpublic static String addWatermarkForPdf(com.centit.fileserver.po.FileInfo fileInfo, String inputPdfPath, Map<String,Object> pretreatInfo) throws IOException
IOExceptionpublic static String addThumbnail(com.centit.fileserver.po.FileInfo fileInfo, String sourceFilePath, int width, int height) throws IOException
IOExceptionpublic static String zipFile(com.centit.fileserver.po.FileInfo fileInfo, String sourceFilePath) throws IOException
IOExceptionpublic static String zipFileAndEncrypt(com.centit.fileserver.po.FileInfo fileInfo, String sourceFilePath, String encryptPass) throws IOException
IOExceptionpublic static String encryptFile(com.centit.fileserver.po.FileInfo fileInfo, String sourceFilePath, String encryptType, String password)
fileInfo - 处理前文件sourceFilePath - 源文件路径encryptType - 加密类型password - 密码public static com.centit.search.document.FileDocument index(com.centit.fileserver.po.FileInfo fileInfo,
File sourceFile)
Copyright © 2025 Centit Information Technical, co. Inc.. All rights reserved.