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.

APACHE COMMONS / CATATAN</>
Apache Commons10 Jul 2008

How do I connect to FTP server?

The File Transfer Protocol (FTP) is a standard network protocol used to transfer computer files between a client and server on a computer network. The example below shows you how to connect to an FTP server. In this example we are using the FTPClient class of the Apache Commons Net library. To connect to the […]

Wayan · 2 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons10 Jul 2008

How do I touch a file using Apache Commons IO?

This example demonstrates a touch command just like Unix touch command. If the file to be touched doesn’t exist, a new empty file will be created. package org.kodejava.commons.io; import org.apache.commons.io.FileUtils; import java.io.File; import java.io.IOException; public class TouchFileExample { public static void main(String[] args) { try { File file = new File("Touch.dat"); // Touch the file. […]

Wayan · 1 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons09 Jul 2008

How do I delete directory recursively?

Using the FileUtils.deleteDirectory() from the Apache Commons IO library, we can simplify the process of deleting directory and everything below it recursively. package org.kodejava.commons.io; import org.apache.commons.io.FileUtils; import java.io.File; import java.io.IOException; public class DeleteDirectory { public static void main(String[] args) { try { File directory = new File("F:/Temp"); // Deletes a directory recursively. When a deletion […]

Wayan · 1 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons05 Jul 2008

How do I create a human-readable file size?

This example demonstrates how to create a human-readable file size using the FileUtils class of the Apache Commons IO library. The byteCountToDisplaySize() method take the file size in bytes and return a human-readable display of the file size in bytes, kilobytes, megabytes, gigabytes, etc. package org.kodejava.commons.io; import org.apache.commons.io.FileUtils; import java.io.File; public class ReadableFileSize { public […]

Wayan · 1 menit baca
BASIC / CATATAN</>
Basic03 Jul 2008

What is @SuppressWarnings annotation?

The @SuppressWarnings annotation tells the compiler to suppress the warning messages it normally shows during compilation time. It has some level of suppression to be added to the code, these level including: all, deprecation, fallthrough, finally, path, serial and unchecked. package org.kodejava.basic; import java.util.Calendar; import java.util.Date; public class SuppressWarningsExample { @SuppressWarnings(value={"deprecation"}) public static void main(String[] […]

Wayan · 1 menit baca
BASIC / CATATAN</>
Basic29 Jun 2008

How do I use @Override annotation?

We use the @Override annotation as part of method declaration. The @Override annotation is used when we want to override methods and want to make sure have overridden the correct methods. As the annotation name we know that there should be the same method signature in the parent class to override. That means using this […]

Wayan · 1 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.