Back to feed
Renewal·서른의 생활코딩

Java Notes _2012.03.05

NS
normalstory
cover image

Java I/O Stream Notes (2012.03.05)


java.io.* : Input/Output related classes


Stream: A logical connection between two devices for data flow

- Unidirectional: separate streams needed for input and output

- FIFO (First In First Out) structure


Classification by data unit:

- Byte stream: handles all types of data (images, video, etc.)

  InputStream / OutputStream

- Character stream: handles text data only

  Reader / Writer


Classification by function:

- Node stream: directly connected to the data source

- Filter stream: wraps node stream to add functionality (buffering, etc.)


Key classes:

- FileInputStream / FileOutputStream: file byte I/O

- FileReader / FileWriter: file character I/O

- BufferedReader / BufferedWriter: buffered character I/O

- DataInputStream / DataOutputStream: primitive type I/O

- ObjectInputStream / ObjectOutputStream: object serialization I/O


* System.in: standard input (keyboard)

* System.out: standard output (monitor)

* read() returns -1 at end of stream

This English version was translated by Claude.

친절한 찰쓰씨
Written by
친절한 찰쓰씨

Pleasant Charles — UI/UX researcher at AIT. Keeping notes on design, planning, and slow days here since 2010.

More on the author's page

Keep reading

Renewal

Steadily, for the long haul, without burning out

Mar 31, 2026·9 min
Renewal

Tech-life balance

Feb 7, 2026·3 min
Renewal

Humanality, by Park Jeong-ryeol

Feb 7, 2026·11 min