Java
229 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- Bufferhistorical
Buffer usage commonly follows writing, flip, reading, and clear or compact. These notes use its internal properties to explain state changes.
- 3.6 Server Implemented with NIOhistorical
NIO server examples cover read and write events and connection closure, including how read return values indicate connection state.
- AIO Serverhistorical
Server and client examples demonstrate Java asynchronous-I/O server programming and how connections and reads and writes complete.
- Basic Streamshistorical
InputStream.read reads bytes and returns -1 at the end of the stream. These notes examine basic stream behavior through single-byte and bulk reads.
- Channelhistorical
Data can both be read from a channel and written to a channel, while stream reading and writing are usually one-way.
- 3.10 Serialization Protocolhistorical
Serialization converts objects or data structures into bytes for storage or transmission. These notes use examples such as ByteBuffer to examine protocol organization.
- File Streamshistorical
Files can be read and written through byte or character streams. Examples with FileOutputStream, FileWriter, and related APIs cover writing, reading, and metadata access.
- Fileshistorical
Files provides operations for existence checks, directory creation, copying, moving, deletion, and recursive traversal. These notes record them through code examples.
- Heartbeat Mechanismhistorical
Heartbeats help servers clear idle channels and clients detect disconnections and decide whether to reconnect. These notes record both sides' handling.
- BIO Serverhistorical
Server and client examples demonstrate BIO programming and the organization of blocking connections, reads, and writes.