SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
EDITOR’S PICK ↗
Pentesting

Planning Your First Web Application Pentest: Scope, Safety, and Evidence

Build a focused web pentest plan with clear authorization, realistic objectives, controlled testing, and evidence that developers can use.

D Putu Adi Guna Permana · 3 min read
FOR YOUR CURIOSITY

Latest notes.

IO / NOTES</>↗
IO31 Dec 2025

How do I use Files.newBufferedReader() with try-with-resources?

Using Files.newBufferedReader with a try-with-resources block is the best practice for reading files in Java. Since BufferedReader implements AutoCloseable, the try-with-resources statement ensures that the file handle is automatically closed when the block is finished, even if an exception occurs. Here is how you can implement it: Basic Usage This is the simplest way to […]

Wayan · 2 min read
IO / NOTES</>↗
IO31 Dec 2025

How do I read large files with streams?

Reading large files in Java efficiently is best achieved by using Stream-based APIs that process the file line-by-line or chunk-by-chunk. This prevents loading the entire file into memory (preventing OutOfMemoryError). Here are the most common and efficient ways to do this: 1. Using Files.lines() (Recommended) This is the most modern and idiomatic way in Java. […]

Wayan · 3 min read
IO / NOTES</>↗
IO30 Dec 2025

How do I use NIO Path.of() instead of Paths.get()?

In Java 11 and later, Path.of() is the preferred way to create Path instances, effectively replacing Paths.get(). Here is how you can use it: 1. Basic Usage (Replacing Paths.get) The syntax is almost identical. It accepts a string or a sequence of strings to join into a path. package org.kodejava.nio; import java.nio.file.Path; public class PathExample […]

Wayan · 2 min read
IO / NOTES</>↗
IO29 Dec 2025

How do I use Files.mismatch() to compare files?

In Java, java.nio.file.Files.mismatch(Path, Path) is a powerful method introduced in Java 12 that allows you to compare the contents of two files efficiently. It returns the position of the first byte where the two files differ, or -1L if they are identical. How to use Files.mismatch Here is a basic example of how to implement […]

Wayan · 2 min read
IO / NOTES</>↗
IO28 Dec 2025

How do I read and write files with Files.readString() and Files.writeString()?

In Java, Files.readString and Files.writeString (introduced in Java 11) are the most straightforward ways to handle small-to-medium-sized text files. They handle the opening, closing, and encoding for you in a single line of code. Here is how you can use them: 1. Reading a File to a String Files.readString(Path) reads the entire content of a […]

Wayan · 2 min read
CONCURRENCY / NOTES</>↗
Concurrency27 Dec 2025

How do I debug concurrency issues effectively?

Debugging concurrency issues (like deadlocks, race conditions, and thread starvation) can feel like chasing ghosts because they are often non-deterministic. Here’s a strategy to tackle them effectively using both design patterns and tools available in your environment. 1. Give Your Threads Meaningful Names The default pool-1-thread-1 names are useless in a thread dump. By using […]

Wayan · 3 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.