MCPcopy Create free account
hub / github.com/DuGuQiuBai/Java / main

Method main

day21/code/day21_IO2/src/cn/itcast_04/CopyFileDemo.java:16–38  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

14 */
15public class CopyFileDemo {
16 public static void main(String[] args) throws IOException {
17 // ���ַ������������й���ʵ��
18
19 // һ�ζ�ȡһ��
20
21 // ��װ����Դ
22 BufferedReader br = new BufferedReader(new FileReader(
23 "InputStreamReaderDemo.java"));
24 // ��װĿ�ĵ�
25 BufferedWriter bw = new BufferedWriter(new FileWriter("Demo.java"));
26
27 // ��дһ��
28 String line = null;
29 while ((line = br.readLine()) != null) {
30 bw.write(line);
31 bw.newLine();
32 bw.flush();
33 }
34
35 // �ͷ���Դ
36 bw.close();
37 br.close();
38 }
39}

Callers

nothing calls this directly

Calls 3

readLineMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected