Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

HTTPCLIENT / CATATAN</>
HttpClient06 Jan 2026

How do I use HttpClient with JSON parsing?

To use HttpClient with JSON parsing in Java, the most common approach is to combine the standard java.net.http.HttpClient with a JSON library like Jackson or Gson. While HttpClient doesn’t have a built-in JSON parser, you can map the response body string to a Java object. Using Jackson (Recommended) Jackson is a powerful and widely-used library […]

Wayan · 3 menit baca
HTTPCLIENT / CATATAN</>
HttpClient06 Jan 2026

How do I send async HTTP requests with HttpClient?

To send asynchronous HTTP requests in Java using the java.net.http.HttpClient, you use the sendAsync() method. This method returns a CompletableFuture<HttpResponse<T>>, allowing you to handle the response without blocking the main thread. Here is a step-by-step example of how to implement this: 1. Basic Asynchronous GET Request This example demonstrates how to fire a request and […]

Wayan · 3 menit baca
IO / CATATAN</>
IO05 Jan 2026

How do I use memory mapped files with FileChannel.map()?

Using FileChannel.map() allows you to map a region of a file directly into memory. This creates a MappedByteBuffer, which acts like a bridge between your application’s memory and the file on disk. The operating system handles the actual reading and writing in the background, making it extremely efficient for large files. Here is how you […]

Wayan · 3 menit baca
IO / CATATAN</>
IO05 Jan 2026

How do I use ObjectOutputStream with record?

To use ObjectOutputStream with a Java record, you need to make the record implement the java.io.Serializable interface. One of the great things about records is that they are designed to be “data carriers,” and Java’s serialization mechanism handles them more robustly and securely than regular classes. Specifically, records are serialized using only their components (the […]

Wayan · 2 menit baca
IO / CATATAN</>
IO04 Jan 2026

How do I serialize and deserialize objects safely?

In a modern Java environment, “safely” means avoiding the pitfalls of standard Java Serialization, which is often vulnerable to gadget attacks and remote code execution. Here are the best practices for safe serialization and deserialization: 1. Prefer Data-Only Formats (JSON/XML) Instead of standard Java serialization, use JSON with a library like Jackson (already common in […]

Wayan · 3 menit baca
IO / CATATAN</>
IO04 Jan 2026

How do I use ByteBuffer to process binary files?

Using ByteBuffer to process binary files is a core part of Java NIO (New I/O). It provides a more efficient way to handle raw bytes compared to traditional stream-based I/O by allowing direct interaction with memory and OS-level optimizations. Here is a guide on how to effectively use ByteBuffer for binary file processing. 1. The […]

Wayan · 3 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

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

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.