类 FilePartUtils
java.lang.Object
dev.utils.common.file.FilePartUtils
detail: 文件分片工具类
-
字段概要
字段 -
方法概要
修饰符和类型方法说明static byte[]文件拆分static byte[]fileSplit(File file, FilePartAssist assist, int partIndex) 文件拆分static byte[]fileSplit(File file, FilePartItem item) 文件拆分static byte[]文件拆分static byte[]fileSplit(String filePath, FilePartAssist assist, int partIndex) 文件拆分static byte[]fileSplit(String filePath, FilePartItem item) 文件拆分static booleanfileSplitDelete(File file, FilePartAssist assist, String destFolderPath, int partIndex) 删除拆分文件static booleanfileSplitDelete(File file, FilePartItem item, String destFolderPath) 删除拆分文件static booleanfileSplitDelete(String filePath, FilePartAssist assist, String destFolderPath, int partIndex) 删除拆分文件static booleanfileSplitDelete(String filePath, FilePartItem item, String destFolderPath) 删除拆分文件static booleanfileSplitDeletes(File file, FilePartAssist assist, String destFolderPath) 删除拆分文件static booleanfileSplitDeletes(File file, String destFolderPath) 删除拆分文件static booleanfileSplitDeletes(String filePath, FilePartAssist assist, String destFolderPath) 删除拆分文件static booleanfileSplitDeletes(String filePath, String destFolderPath) 删除拆分文件static booleanfileSplitMerge(File file, FilePartAssist assist, String destFolderPath, String fileName) 分片合并static booleanfileSplitMerge(String filePath, FilePartAssist assist, String destFolderPath, String fileName) 分片合并static booleanfileSplitMergeFiles(File file, List<File> files) 分片合并static booleanfileSplitMergeFiles(String filePath, List<File> files) 分片合并static booleanfileSplitMergePaths(File file, List<String> paths) 分片合并static booleanfileSplitMergePaths(String filePath, List<String> paths) 分片合并static booleanfileSplitSave(File file, long start, long end, String destFolderPath, String partName) 文件拆分并存储static booleanfileSplitSave(File file, FilePartAssist assist, String destFolderPath, int partIndex) 文件拆分并存储static booleanfileSplitSave(File file, FilePartItem item, String destFolderPath) 文件拆分并存储static booleanfileSplitSave(String filePath, long start, long end, String destFolderPath, String partName) 文件拆分并存储static booleanfileSplitSave(String filePath, FilePartAssist assist, String destFolderPath, int partIndex) 文件拆分并存储static booleanfileSplitSave(String filePath, FilePartItem item, String destFolderPath) 文件拆分并存储static booleanfileSplitSaves(File file, FilePartAssist assist, String destFolderPath) 文件拆分并存储static booleanfileSplitSaves(File file, String destFolderPath) 文件拆分并存储static booleanfileSplitSaves(String filePath, FilePartAssist assist, String destFolderPath) 文件拆分并存储static booleanfileSplitSaves(String filePath, String destFolderPath) 文件拆分并存储static FilePartAssistgetFilePartAssist(File file) 获取文件分片辅助类static FilePartAssistgetFilePartAssist(File file, int partCount, long minLength) 获取文件分片辅助类static FilePartAssistgetFilePartAssist(String filePath) 获取文件分片辅助类static FilePartAssistgetFilePartAssist(String filePath, int partCount, long minLength) 获取文件分片辅助类static StringgetPartName(FilePartAssist assist, int partIndex) 获取分片文件名 ( 后缀索引拼接 )static StringgetPartName(FilePartItem item, String fileName) 获取分片文件名 ( 后缀索引拼接 )static StringgetPartName(String fileName, int partIndex) 获取分片文件名 ( 后缀索引拼接 )static booleanisFilePart(File file) 是否符合文件分片条件static booleanisFilePart(File file, int partCount, long minLength) 是否符合文件分片条件static booleanisFilePart(String filePath) 是否符合文件分片条件static booleanisFilePart(String filePath, int partCount, long minLength) 是否符合文件分片条件
-
字段详细资料
-
方法详细资料
-
getPartName
获取分片文件名 ( 后缀索引拼接 )- 参数:
item-FilePartItemfileName- 原始文件名- 返回:
- 分片文件名
-
getPartName
获取分片文件名 ( 后缀索引拼接 )- 参数:
assist-FilePartAssistpartIndex- 分片索引- 返回:
- 分片文件名
-
getPartName
获取分片文件名 ( 后缀索引拼接 )- 参数:
fileName- 原始文件名partIndex- 分片索引- 返回:
- 分片文件名
-
getFilePartAssist
获取文件分片辅助类- 参数:
filePath- 文件路径- 返回:
FilePartAssist
-
getFilePartAssist
获取文件分片辅助类- 参数:
filePath- 文件路径partCount- 分片总数minLength- 分片片段允许最小值 byte- 返回:
FilePartAssist
-
getFilePartAssist
获取文件分片辅助类- 参数:
file- 文件- 返回:
FilePartAssist
-
getFilePartAssist
获取文件分片辅助类- 参数:
file- 文件partCount- 分片总数minLength- 分片片段允许最小值 byte- 返回:
FilePartAssist
-
isFilePart
是否符合文件分片条件- 参数:
filePath- 文件路径- 返回:
trueyes,falseno
-
isFilePart
是否符合文件分片条件- 参数:
filePath- 文件路径partCount- 分片总数minLength- 分片片段允许最小值 byte- 返回:
trueyes,falseno
-
isFilePart
是否符合文件分片条件- 参数:
file- 文件- 返回:
trueyes,falseno
-
isFilePart
是否符合文件分片条件- 参数:
file- 文件partCount- 分片总数minLength- 分片片段允许最小值 byte- 返回:
trueyes,falseno
-
fileSplit
文件拆分- 参数:
filePath- 文件路径start- 分片字节开始索引end- 分片字节结束索引- 返回:
- 指定位置数据
-
fileSplit
文件拆分慎用, 防止内存溢出- 参数:
file- 文件start- 分片字节开始索引end- 分片字节结束索引- 返回:
- 指定位置数据
-
fileSplit
文件拆分- 参数:
filePath- 文件路径item-FilePartItem- 返回:
- 指定位置数据
-
fileSplit
文件拆分- 参数:
file- 文件item-FilePartItem- 返回:
- 指定位置数据
-
fileSplit
文件拆分- 参数:
filePath- 文件路径assist-FilePartAssistpartIndex- 分片索引- 返回:
- 指定位置数据
-
fileSplit
文件拆分- 参数:
file- 文件assist-FilePartAssistpartIndex- 分片索引- 返回:
- 指定位置数据
-
fileSplitSave
public static boolean fileSplitSave(String filePath, long start, long end, String destFolderPath, String partName) 文件拆分并存储- 参数:
filePath- 文件路径start- 分片字节开始索引end- 分片字节结束索引destFolderPath- 存储目标文件夹地址partName- 分片文件名- 返回:
truesuccess,falsefail
-
fileSplitSave
public static boolean fileSplitSave(File file, long start, long end, String destFolderPath, String partName) 文件拆分并存储- 参数:
file- 文件start- 分片字节开始索引end- 分片字节结束索引destFolderPath- 存储目标文件夹地址partName- 分片文件名- 返回:
truesuccess,falsefail
-
fileSplitSave
文件拆分并存储- 参数:
filePath- 文件路径item-FilePartItemdestFolderPath- 存储目标文件夹地址- 返回:
truesuccess,falsefail
-
fileSplitSave
文件拆分并存储- 参数:
file- 文件item-FilePartItemdestFolderPath- 存储目标文件夹地址- 返回:
truesuccess,falsefail
-
fileSplitSave
public static boolean fileSplitSave(String filePath, FilePartAssist assist, String destFolderPath, int partIndex) 文件拆分并存储- 参数:
filePath- 文件路径assist-FilePartAssistdestFolderPath- 存储目标文件夹地址partIndex- 分片索引- 返回:
truesuccess,falsefail
-
fileSplitSave
public static boolean fileSplitSave(File file, FilePartAssist assist, String destFolderPath, int partIndex) 文件拆分并存储- 参数:
file- 文件assist-FilePartAssistdestFolderPath- 存储目标文件夹地址partIndex- 分片索引- 返回:
truesuccess,falsefail
-
fileSplitSaves
文件拆分并存储- 参数:
filePath- 文件路径destFolderPath- 存储目标文件夹地址- 返回:
truesuccess,falsefail
-
fileSplitSaves
文件拆分并存储- 参数:
file- 文件destFolderPath- 存储目标文件夹地址- 返回:
truesuccess,falsefail
-
fileSplitSaves
文件拆分并存储- 参数:
filePath- 文件路径assist-FilePartAssistdestFolderPath- 存储目标文件夹地址- 返回:
truesuccess,falsefail
-
fileSplitSaves
文件拆分并存储- 参数:
file- 文件assist-FilePartAssistdestFolderPath- 存储目标文件夹地址- 返回:
truesuccess,falsefail
-
fileSplitDelete
删除拆分文件- 参数:
filePath- 文件路径item-FilePartItemdestFolderPath- 待删除目标文件夹地址- 返回:
truesuccess,falsefail
-
fileSplitDelete
删除拆分文件- 参数:
file- 文件item-FilePartItemdestFolderPath- 待删除目标文件夹地址- 返回:
truesuccess,falsefail
-
fileSplitDelete
public static boolean fileSplitDelete(String filePath, FilePartAssist assist, String destFolderPath, int partIndex) 删除拆分文件- 参数:
filePath- 文件路径assist-FilePartAssistdestFolderPath- 待删除目标文件夹地址partIndex- 分片索引- 返回:
truesuccess,falsefail
-
fileSplitDelete
public static boolean fileSplitDelete(File file, FilePartAssist assist, String destFolderPath, int partIndex) 删除拆分文件- 参数:
file- 文件assist-FilePartAssistdestFolderPath- 待删除目标文件夹地址partIndex- 分片索引- 返回:
truesuccess,falsefail
-
fileSplitDeletes
删除拆分文件- 参数:
filePath- 文件路径destFolderPath- 待删除目标文件夹地址- 返回:
truesuccess,falsefail
-
fileSplitDeletes
删除拆分文件- 参数:
file- 文件destFolderPath- 待删除目标文件夹地址- 返回:
truesuccess,falsefail
-
fileSplitDeletes
public static boolean fileSplitDeletes(String filePath, FilePartAssist assist, String destFolderPath) 删除拆分文件- 参数:
filePath- 文件路径assist-FilePartAssistdestFolderPath- 待删除目标文件夹地址- 返回:
truesuccess,falsefail
-
fileSplitDeletes
删除拆分文件- 参数:
file- 文件assist-FilePartAssistdestFolderPath- 待删除目标文件夹地址- 返回:
truesuccess,falsefail
-
fileSplitMergePaths
分片合并- 参数:
filePath- 文件路径paths- 待合并文件 ( 按顺序 )- 返回:
truesuccess,falsefail
-
fileSplitMergePaths
分片合并- 参数:
file- 文件paths- 待合并文件 ( 按顺序 )- 返回:
truesuccess,falsefail
-
fileSplitMergeFiles
分片合并- 参数:
filePath- 文件路径files- 待合并文件 ( 按顺序 )- 返回:
truesuccess,falsefail
-
fileSplitMergeFiles
分片合并- 参数:
file- 文件files- 待合并文件 ( 按顺序 )- 返回:
truesuccess,falsefail
-
fileSplitMerge
public static boolean fileSplitMerge(String filePath, FilePartAssist assist, String destFolderPath, String fileName) 分片合并- 参数:
filePath- 文件路径assist-FilePartAssistdestFolderPath- 分片所在文件夹地址fileName- 原文件名- 返回:
truesuccess,falsefail
-
fileSplitMerge
public static boolean fileSplitMerge(File file, FilePartAssist assist, String destFolderPath, String fileName) 分片合并- 参数:
file- 文件assist-FilePartAssistdestFolderPath- 分片所在文件夹地址fileName- 原文件名- 返回:
truesuccess,falsefail
-