MCPcopy
hub / github.com/DuGuQiuBai/Java / main

Method main

day20/code/day20_IO/src/cn/itcast_03/CopyFileDemo.java:17–32  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

15 */
16public class CopyFileDemo {
17 public static void main(String[] args) throws IOException {
18 // ��װ����
19 FileInputStream fis = new FileInputStream("a.txt");
20 // ��װĿ�ĵ�
21 FileOutputStream fos = new FileOutputStream("b.txt");
22
23 // �����ݣ�д����
24 int by = 0;
25 while ((by = fis.read()) != -1) {
26 fos.write(by);
27 }
28
29 // �ͷ���Դ
30 fos.close();
31 fis.close();
32 }
33}

Callers

nothing calls this directly

Calls 3

readMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected