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.

CORE API / CATATAN</>
Core API23 Jul 2008

How do I compare two dates?

In this example you’ll see the utilization of SimpleDateFormat class for comparing two dates for equality. We convert the date object into string using the DateFormat instance and then compare it using String.equals() method. package org.kodejava.util; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class ComparingDate { public static void main(String[] args) { // […]

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

How do I search for files recursively using Apache Commons IO?

This example demonstrates how we can use the FileUtils class listFiles() method to search for a file specified by their extensions. We can also define to find the file recursively deep down into the subdirectories. package org.kodejava.commons.io; import org.apache.commons.io.FileUtils; import java.io.File; import java.util.Collection; public class SearchFileRecursive { public static void main(String[] args) { File root […]

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

How do I delete file from FTP server?

This example demonstrates how to delete file from FTP server. package org.kodejava.commons.net; import org.apache.commons.net.ftp.FTPClient; import java.io.IOException; public class FTPDeleteDemo { public static void main(String[] args) { FTPClient client = new FTPClient(); try { client.connect("ftp.example.com"); client.login("demo", "password"); // Delete file on the FTP server. When the FTP delete // process completes, it returns true. String filename […]

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

How do I get a list of files from FTP server?

This example demonstrates how to retrieve a list of files from FTP server. First we create an instance of org.apache.commons.net.ftp.FTPClient. Connect to the FTP server and login with your username and password. The listFiles() method of the FTPClient return the list of filenames contained in the current working directory. null if the list could not […]

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

How do I upload file to FTP server?

This example demonstrates how to upload file to FTP server. package org.kodejava.commons.net; import org.apache.commons.net.ftp.FTPClient; import java.io.IOException; import java.io.InputStream; public class FTPUploadDemo { public static void main(String[] args) { FTPClient client = new FTPClient(); String filename = "data.txt"; // Read the file from the resources folder. ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); try (InputStream is = classLoad...

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

How do I download file from FTP server?

This example demonstrates how to download a file from FTP server. To download a file, we first connect to the FTP server and then login by supplying the username and password. To download the file we call retrieveFile() method of the FTPClient object. This method takes two parameters, the remote filename and an OutputStream of […]

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