⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 copyfile.java

📁 此为图书管理系统
💻 JAVA
字号:
package   com.bean;
import java.io.* ;
public class copyFile
{
    public copyFile(){}
    public String copyFl(String oldFile,String newFile) { 
        int b = 0 ;
        String str="";
        FileInputStream fin = null ;
        FileOutputStream fout = null ;
        try{
            fin = new FileInputStream(oldFile) ;
            fout = new FileOutputStream(newFile) ;
            while((b = fin.read()) != -1) {
                fout.write(b) ;
            } 
            fin.close() ;
            fout.close() ;
        }
        catch(FileNotFoundException ef) {
            str= "找不到数据库!";
        }
        catch(IOException eio) {
            str= "数据库备份错误!";
        }
        str= "数据库备份完成!";
        return str;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -