怎么用JAVA实现大文件分段传输

来源:百度知道 编辑:UC知道 时间:2024/05/29 19:07:50

InputStream is = 获得输入流;(里面是大文件)
OutputStream os = new FileOutputStream("保存路径",true);
int c;
while((c = rd.read()) != -1){
wt.write(整型分段长度);
}
is.close();
os.close();