程序包 com.walker.file
接口 FileOperateEngine
public interface FileOperateEngine
-
方法概要
修饰符和类型方法说明voidclose()关闭引擎。byte[]downloadFile(String id) 下载单个文件,该方法适用于中小型文件,大文件需要其他方式处理。getFileInfo(String id) 返回文件基本信息getFileInfoList(List<String> ids) 返回给定多个文件的集合。返回文件存储类型。voidsetFileRoot(String rootName) 设置文件存储的根目录,如: /rootFileFileInfo[]uploadFile(InputStream[] inputStream, String[] fileName, String groupId, long[] fileSize, Integer businessType, String owner) 多个文件上传uploadFile(InputStream inputStream, String fileName, String groupId, long fileSize) 已过时。uploadFile(InputStream inputStream, String fileName, String groupId, long fileSize, Integer businessType, String owner) 文件上传uploadFile(String filePath, String groupId)
-
方法详细资料
-
close
void close()关闭引擎。 -
uploadFile
@Deprecated FileInfo uploadFile(InputStream inputStream, String fileName, String groupId, long fileSize) throws FileOperateException 已过时。上传文件操作- 参数:
inputStream- 文件流fileName- 文件名称,如: demo.txtgroupId- 分组ID,即: 业务ID- 返回:
- 抛出:
FileOperateException
-
uploadFile
FileInfo uploadFile(InputStream inputStream, String fileName, String groupId, long fileSize, Integer businessType, String owner) throws FileOperateException 文件上传- 参数:
inputStream-fileName- 文件名称,如: demo.txtgroupId-fileSize- 文件大小businessType- 业务分类(PID),为空表示不存在系统默认:-1owner- 数据归属(商户ID)- 返回:
- 抛出:
FileOperateException
-
uploadFile
FileInfo[] uploadFile(InputStream[] inputStream, String[] fileName, String groupId, long[] fileSize, Integer businessType, String owner) throws FileOperateException 多个文件上传- 参数:
inputStream-fileName-groupId-fileSize-businessType-owner-- 返回:
- 返回多个文件结果集合
- 抛出:
FileOperateException
-
uploadFile
-
downloadFile
下载单个文件,该方法适用于中小型文件,大文件需要其他方式处理。- 参数:
id- 文件id- 返回:
- 返回文件二进制数据
- 抛出:
FileOperateException
-
getFileInfo
返回文件基本信息- 参数:
id- 文件id- 返回:
-
getFileInfoList
返回给定多个文件的集合。- 参数:
ids-- 返回:
-
getFileStoreType
FileStoreType getFileStoreType()返回文件存储类型。- 返回:
-
setFileRoot
设置文件存储的根目录,如: /rootFile- 参数:
rootName-
-