SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

CORE API / NOTES</>↗
Core API13 Aug 2008

How do I create a multithreaded program?

Java language which was there when the language was created. This multithreading capabilities can be said like running each program on their on CPU, although the machine only has a single CPU installed. To create a Thread program in Java we can extend the java.lang.Thread class and override the run() method. But as we know […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API13 Aug 2008

How do I get the list of file system root?

The code below demonstrates how to obtain file system root available on your system. In Linux, you will have a single root (/) while on Windows you could get C:\ or D:\ that represent the root drives. package org.kodejava.io; import java.io.File; public class FileSystemRoot { public static void main(String[] args) { // List the available […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API08 Aug 2008

How do I check if a directory is not empty?

package org.kodejava.io; import java.io.File; public class EmptyDirCheck { public static void main(String[] args) { File file = new File("D:/Downloads"); // Check to see if the object represent a directory. if (file.isDirectory()) { // Get list of file in the directory. When its length is not zero // the folder is not empty. String[] files = […]

Wayan · 1 min read
TAGLIB / NOTES</>↗
Taglib08 Aug 2008

How do I format a date in a JSP page?

This example show how to format date in JSP using format tag library. We create a date object using the <jsp:useBean> taglib. To format the date we use the <fmt:formatDate> taglib. We assign the value attribute to the date object, set the type attribute as date and define the pattern how the date will be […]

Wayan · 2 min read
SECURITY / NOTES</>↗
Security04 Aug 2008

How do I get cryptographic security providers?

package org.kodejava.security; import java.security.Provider; import java.security.Security; import java.util.Set; import java.util.HashSet; public class SecurityProvider { public static void main(String[] args) { // Create a set so that we can have a unique results. Set<String> results = new HashSet<>(); // Returns an array containing all the installed providers. Provider[] providers = Security.getProviders(); for (Provider provider : providers) […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API03 Aug 2008

How do I decrypt an object with DES?

On the previous example How do I encrypt an object with DES? we encrypt an object. In this example we will decrypt the stored object. package org.kodejava.crypto; import java.io.*; import javax.crypto.SecretKey; import javax.crypto.Cipher; import javax.crypto.SealedObject; public class ObjectDecrypt { public static void main(String[] args) throws Exception { // Read the previously stored SecretKey. SecretKey key […]

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