1. 프로그램 시간 (파일의 크기가 512byte 일때)
    1. 1byte식 받아들임 : 1 받고 511을 버림 (반복)
    2. 512byte식 받아들임 512 받고 0을 버림

적당한 중간 크기로 파일을 받아야 성능이 향상됨

public class ByteIOExam1 {
        public static void main(String[] args){
//메소드가 시작된 시간을 구하기 위함long startTime = System.currentTimeMillis();
            FileInputStream fis = null;
            FileOutputStream fos = null;
            try {
                fis = new FileInputStream("src/javaIO/exam/ByteExam1.java");
                fos = new FileOutputStream("byte.txt");

                int readCount = -1;
                byte[] buffer = new byte[512];
                while((readCount = fis.read(buffer))!= -1){
                    fos.write(buffer,0,readCount);
                }
            } catch (Exception e) {
// TODO Auto-generated catch blocke.printStackTrace();
            }finally{
                try {
                    fos.close();
                } catch (IOException e) {
// TODO Auto-generated catch blocke.printStackTrace();
                }
                try {
                    fis.close();
                } catch (IOException e) {
// TODO Auto-generated catch blocke.printStackTrace();
                }
            }
//메소드가 끝났을때 시간을 구하기 위함.long endTime = System.currentTimeMillis();
//메소드를 수행하는데 걸린 시간을 구할 수 있음.System.out.println(endTime-startTime);
        }
    }