import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
/**
* @author hj
* @create 2019-06-22
**/
public class FileBreakup {
public static String [] splitFile(String filePath, String endsrc,int num) throws IOException {
String [] fileName = null;
File file = new File(filePath);
FileInputStream fis = new FileInputStream(filePath);
FileChannel inputChannel = fis.getChannel();
final long fileSize = inputChannel.size();
long fileCount = 0;
if ( (fileSize % num) > 0 ){
fileCo
拆分大文件的方法
最新推荐文章于 2023-08-02 18:45:00 发布
import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;import java.nio.ByteBuffer;import java.nio.channels.FileChannel;/** * @author hj * @create 2019-06-22 **/public class FileBreakup {.
摘要由CSDN通过智能技术生成