mirror of
https://github.com/Dichgrem/Java.git
synced 2025-12-17 04:51:58 -05:00
update:demo5
This commit is contained in:
17
com/study/demo5/Main.java
Normal file
17
com/study/demo5/Main.java
Normal file
@@ -0,0 +1,17 @@
|
||||
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 + " 字节");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user