package com.lic.fussel.foundation.filecabinets.util;
import java.io.*;
/**
* 类名:FileToFile
* 描述:TODO
* 作者:Cruise
* 日期:2020/3/29 下午4:32
* 版本:1.0
**/
public class FileToFile {
private String urlFrom;
private String urlTo;
private FileInputStream fis = null;
private FileOutputStream fos = null;
private BufferedReader reader = null;
private BufferedWriter writer = null;
public FileToFile(String urlFrom, String urlTo) {
this.urlFrom = urlFrom;
this.urlTo = urlTo;
}
public void FileToFile() {
try {
fis = new FileInputStream(new File(urlFrom));
fos = new FileOutputStream(new File(urlTo));
// reader=newBufferedReader(fis);
// writer=newBufferedWriter(fos);
int length;
byte[] buffer = new byte[1024];
while ((length =fis.read(buffer)) !=
java实现文件的复制转移
最新推荐文章于 2024-04-02 10:52:31 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)