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 POI / CATATAN</>
Apache POI24 Mar 2009

How do I obtain Excel’s cell data type?

In this example we try to obtain the Excel’s cell data type so that we can read the value using the right method. The data to be read is in a file named celltype.xls. The matrix below depict how the file is. | COL ROW | 0 1 2 3 4 —-|————————- 0 | 1 […]

Wayan · 2 menit baca
APACHE POI / CATATAN</>
Apache POI20 Mar 2009

How do I read Excel file?

In this example we demonstrate how to read data from an Excel file. In this example we limit to read a string data only. After reading the data, iterating each row and cells of the Excel file we display the content to the program console. package org.kodejava.poi; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; […]

Wayan · 3 menit baca
LOGGING / CATATAN</>
Logging17 Mar 2009

How do I create a rolling log files?

In this example we create a rolling or a sequenced of log files. Instead of just limiting the file size (see. How do I limit the size of log file) we can also make the log file to roll. This will prevent a lost to an important log message if we use a single log […]

Wayan · 2 menit baca
LOGGING / CATATAN</>
Logging16 Mar 2009

How do I limit the size of log file?

In this example you learn how to limit the size of a log file when using a FileHandler handler. Limiting the log file will prevent the log file to grow wildly without limit. package org.kodejava.util.logging; import java.util.logging.Logger; import java.util.logging.FileHandler; import java.io.IOException; public class LogFileLimit { // The log file size is set to 1 MB. […]

Wayan · 1 menit baca
LOGGING / CATATAN</>
Logging12 Mar 2009

How do I create a custom logger Formatter?

To create a custom Formatter we need to extend the java.util.logging.Formatter abstract class and implements the format(LogRecord) method. In the method then we can format the log message stored in the LogRecord to match our need. The java.util.logging.Formatter class also have the getHead(Handler) and getTail(Handler) which can be overridden to add a head and a […]

Wayan · 2 menit baca
LOGGING / CATATAN</>
Logging08 Mar 2009

How do I prevent the logger send log messages to its parent logger?

To prevent log records being forwarded to the logger’s parent handlers we can set false the useParentHandlers field using the Logger.setUserParentHandlers(boolean useParentHandlers) method. package org.kodejava.util.logging; import java.util.logging.Logger; import java.util.logging.ConsoleHandler; public class NoParentLogger { public static void main(String[] args) { Logger logger = Logger.getLogger(NoParentLogger.class.getName()); // Do not forward any log messages the logge...

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.