io
14 tutorials tagged “io”.
- Buffered Streams in JavaBuffered streams cut disk access by reading and writing in large blocks. Learn BufferedReader, BufferedWriter and friends, and measure the speed-up.
- Console Class in JavaThe Console class reads lines and hidden passwords from the terminal. Learn readLine, readPassword, printf and why System.console() can be null.
- DataInputStream and DataOutputStreamData streams read and write Java primitives and strings in a portable binary form. Learn writeInt, readDouble, writeUTF and the order rule.
- The Decorator Pattern in Java I/Ojava.io adds features by wrapping streams inside other streams. Learn how the decorator pattern works there and how to write your own filter stream.
- File Streams in JavaFileInputStream, FileOutputStream, FileReader and FileWriter read and write files. Learn their constructors, append mode and character encodings.
- In-Memory Streams in JavaByteArrayInputStream, ByteArrayOutputStream, StringReader, StringWriter, CharArrayReader and CharArrayWriter treat memory as a stream source or destination.
- InputStreamReader and OutputStreamWriterInputStreamReader and OutputStreamWriter bridge byte streams and character streams using a charset. Learn how encodings work and why UTF-8 matters.
- Java I/O Class HierarchyThe four abstract base classes of java.io, InputStream, OutputStream, Reader and Writer, their key methods, and the main subclasses of each.
- Java I/O StreamsJava I/O moves data in and out of a program through streams. Learn what a stream is, byte streams vs character streams, and the four base classes.
- ObjectInputStream and ObjectOutputStreamObject streams write whole Java objects to a stream and read them back. Learn writeObject and readObject, the Serializable requirement, and the risks.