mirror of
https://github.com/Dichgrem/Java.git
synced 2025-12-16 12:41:58 -05:00
18 lines
521 B
Java
18 lines
521 B
Java
package com.study.demo5;
|
|
|
|
public class Main {
|
|
public static void main(String[] args) {
|
|
// 7.1 测试
|
|
FileCopy fc = new FileCopy();
|
|
fc.copy("source.txt", "target.txt");
|
|
// 7.2 测试
|
|
DataIO dataIO = new DataIO();
|
|
dataIO.writeConfig("config.bin");
|
|
dataIO.readConfig("config.bin");
|
|
// 7.3 测试
|
|
FileStat fs = new FileStat();
|
|
long size = fs.countBytes("test3.txt");
|
|
System.out.println("文件大小: " + size + " 字节");
|
|
}
|
|
}
|