자바 (30) 데이터다오
■ 출력 데이터(프로그램 => 외부 미디어(파일)) public void fileSave() { try (DataOutputStream dos = new DataOutputStream(new FileOutputStream(“d_data.txt”))) { // 자바 자료형별로 작성이 가능하다. dos.writeBoolean(true); dos.writeInt(300); dos.writeDouble(5.0); dos.writeChar(‘하’); dos.writeChar(‘2’); dos.writeUTF(“자바~~”); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } ■ 입력 시도(프로그램