IO
Java · 18 notes
- 3.1 Comparison of the Three I/O Modelshistorical
Relationship between Java I/O and system calls, BIO/NIO/AIO classification, comparison, and references.
- 3.2 Multithreaded Server Implemented with BIOhistorical
Traditional server-side programming with BIO and its blocking points.
- AIOhistorical
Asynchronous NIO classes and AsynchronousFileChannel examples for reading and writing with Future polling and CompletionHandler callbacks.
- 3.6 Server Implemented with NIOhistorical
NIO vs BIO and common questions about channel reads, selector.select, and SelectionKey.OP_WRITE.
- Basic Streamshistorical
Byte streams with InputStream and OutputStream, and character streams with Reader and Writer.
- 3.10 Serialization Protocolhistorical
What serialization is, a custom ByteBuffer-based serialization rule, and a complete custom Serializer example.
- Fileshistorical
Check whether a file exists, create directories, copy files, move or rename files, delete files, and recursively traverse files.
- Heartbeat Mechanismhistorical
For servers, periodically clear idle channels; for clients, detect disconnected sessions and whether to reconnect.
- Packet Protocolhistorical
What sticky packets and split packets are, why the phenomenon appears with TCP byte streams, and how application-layer framing solves it.