io.BufferedWriter: practical reference
io.BufferedWriter: practical reference: BufferedWriter buffers characters before forwarding them to a Writer; flush or close is required when downstream visibility matters.
CKTIS / Java
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
io.BufferedWriter: practical reference: BufferedWriter buffers characters before forwarding them to a Writer; flush or close is required when downstream visibility matters.
ByteArrayInputStream exposes a byte array as an input stream. Its close() does not prevent further reads.
ByteArrayOutputStream collects bytes in memory. Learn writing, independent data snapshots, and why close() has no effect.
io.InputStream: practical reference: InputStream is the base byte-input abstraction; read returns 0..255 or -1 at end of stream, and bulk reads may be partial.
io.IOException: practical reference: IOException is the checked base exception for failed or interrupted I/O operations.
ObjectInputStream reconstructs objects from Java's binary serialization stream. Learn readObject(), exception handling, and closure through close(), while recognizing that deserializing untrusted data is dangerous.
ObjectOutputStream writes objects as a Java serialization byte stream. Learn writeObject, the distinction between flush and close, and automatic closure with try-with-resources.
io.OutputStream: practical reference: OutputStream is the base byte-output abstraction; close can release external resources and flush pushes buffered bytes.
io.Reader: practical reference: Reader is the base character-input abstraction; read returns UTF-16 code units or -1 and does not itself select a byte encoding.
io.Serializable: practical reference: Serializable is a marker enabling Java object serialization, but it does not promise a stable or safe cross-version format.
io.StringReader: practical reference: StringReader presents a String as a character Reader without external I/O.
io.StringWriter: practical reference: StringWriter collects characters in a StringBuffer; close has no effect and getBuffer exposes mutable backing storage.
io.Writer: practical reference: Writer is the base character-output abstraction and may buffer data that must be flushed or closed.
lang.ArithmeticException: practical reference: ArithmeticException signals an exceptional arithmetic condition such as integral division by zero; floating-point division follows IEEE 754.
ArrayIndexOutOfBoundsException signals array access with a negative index or an index greater than or equal to the array length. A valid index satisfies 0 <= index && index < array.length.
lang.AssertionError: practical reference: AssertionError is thrown when an enabled assert statement fails and should not replace validation of external input.
java.lang.AutoCloseable defines a resource-closing contract through close(). In try-with-resources, Java calls this method when leaving the block, including because of an exception, and closes multiple resources in reverse order.
Class<T> represents a type in a running program. It supports object checks and casts, plus inspection of names, member declarations, generic supertypes, and annotations. This entry targets Java SE 21; the repository runtime does not attest the production runtime.
lang.ClassCastException: practical reference: ClassCastException signals a run-time cast whose object is incompatible with the requested reference type.
lang.Cloneable: practical reference: Cloneable is a marker checked by Object.clone; it provides no public clone method and default cloning is shallow.
java.lang.Comparable<T> defines objects' natural ordering through compareTo(T o). Its result indicates order, not the distance between values.
java.lang.Enum is the base class of enumeration types. Learn how the overridable toString() method differs from name(), which returns a constant's exact declared name.
lang.Error: practical reference: Error is the base for serious VM or linkage conditions that applications ordinarily should not catch for recovery.
java.lang.Exception represents conditions an application may want to handle. Learn the distinction between checked and unchecked exceptions and the roles of throw, throws, and catch.