티스토리 뷰
종류별 스트림 1바이트 입출력 형식
1. 콘솔
출력
FileOutputStream fos = new FileOutputStream(FileDescriptor.out);
BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);
DataOutputStream dos = new DataOutputStream(bos);
dos.write()
입력
FieInputStream fis = new FileInputStream(FileDescriptor.in);
BufferedInputStream bis = new BufferedInputStream(fis,1024);
DataInputStream dis = new DataInputStream(bis);
dis.read()
2. 파일
출력
File file = new File("filename");
FileOutputStream fos = new FileOutputStream(file, false);
BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);
DataOutputStream dos = new DataOutputStream(bos);
dos.write()
입력
File file = new File("filename");
FileInputStream fis = new FileInputStream(file);
BufferedInputStream bis = new BufferedInputStream(fis,1024);
DataInputStream dis = new dataInputStream(bis);
dis.read();
3. 네트워크
출력
Socket soc = new Socket();
BufferedOutputStream bos = new BufferedOutputStream(soc.getOutputStream(),1024);
DataOutpputStream dos = new DataOutputStream(bos);
dos.write()
입력
Socket soc = new Socket();
BufferedInoutStream bis = new BufferedInputStream(soc.getInputStream(),1024);
DataInputStream dis = new DataInputStream(bis);
dis.read()
'프로그래밍 언어 > 프로그래밍' 카테고리의 다른 글
[JAVA] 채팅 서버, 클라이언트 예제 (0) | 2016.10.02 |
---|---|
[유니티] 오브젝트 터치좌표로 이동하기 (0) | 2016.06.17 |
유니티 점프 (0) | 2016.06.08 |
해시 테이블 (hash table) (0) | 2009.01.18 |
트리 (0) | 2009.01.18 |
- Total
- Today
- Yesterday
- 신청
- 공연
- 문화
- 청년몽땅정보통
- 고양이 깜놀
- 축제
- 지원금
- Linked List
- 민경훈
- 서울시
- 혁오
- 김광석 코드
- 뜻밖의 샤워
- 임창정
- 서울특별시
- android
- 청년정책
- 안드로이드
- 김광석 기타 코드
- 공모전
- 연결 리스트
- 태풍발생
- 지원
- 버즈
- 김광석
- 발생후
- 아이유
- 유니티
- 유머
- 청년
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |