[์ดํํฐ๋ธ ์๋ฐ] Item09 ์๋ฒฝ๊ณต๋ต.
item09. try-finally๋ณด๋ค try-with-resources ๋ฅผ ์ฌ์ฉํ๋ผ. " p48. ์๋ฐ ํผ์ฆ๋ฌ ์์ธ ์ฒ๋ฆฌ ์ฝ๋์ ์ค์" package chapter01.item09.puzzler; import java.io.*; /** * item09. try-finally ๋ณด๋ค๋ try-with-resources๋ฅผ ์ฌ์ฉํ๋ผ. * ์๋ฐ Puzzler ์ฑ
์ ์ธ๊ธํ ์์ธ ์ฒ๋ฆฌ ์ฝ๋์ ์ค์ */ public class Copy { private static final int BUFFER_SIZE = 8 * 1024; static void copy(String src, String dst) throws IOException { InputStream in = new FileInputStream(src); Out..
2023.01.25