SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
FOR YOUR CURIOSITY

Latest notes.

APACHE COMMONS / NOTES</>↗
Apache Commons06 Feb 2019

How do I generate random alphanumeric strings?

The following code snippet demonstrates how to use RandomStringGenerator class from the Apache Commons Text library to generate random strings. To create an instance of the generator we can use the RandomStringGenerator.Builder() class build() method. The builder class also helps us to configure the properties of the generator. Before calling the build() method we can […]

Wayan · 2 min read
APACHE COMMONS / NOTES</>↗
Apache Commons02 Jan 2017

How do I sort file names by their extension?

To sort file names by their extension, we can use the ExtensionFileComparator class from the Apache Commons IO library. This class provides a couple instances of comparator such as: Comparator Description EXTENSION_COMPARATOR Case sensitive extension comparator EXTENSION_REVERSE Reverse case sensitive extension comparator EXTENSION_INSENSITIVE_COMPARATOR Case insensitive extension comparator EXTENSION_INSENSITIVE_REVERSE Reverse case insensitive extension comparator EXTENSION...

Wayan · 2 min read
APACHE COMMONS / NOTES</>↗
Apache Commons02 Jan 2017

How do I sort files and directories based on their size?

In this example, you will learn how to sort files and directories based on their size. Using the Apache Commons IO, we can utilize the SizeFileComparator class. This class provides some instances to sort file size such as: Comparator Description SIZE_COMPARATOR Size comparator instance – directories are treated as zero size SIZE_REVERSE Reverse size comparator […]

Wayan · 3 min read
APACHE COMMONS / NOTES</>↗
Apache Commons19 Jul 2013

Using DigestUtils.sha1hex() method to generate SHA-1 digest

In this example you’ll learn how to generate an SHA-1 digest using the Apache Commons Codec DigestUtils class. In the last two examples you’ve already seen how to generate the MD5 digest using the same library. Compared to the MD5 version the SHA-1 digest is known to be stronger to brute force attacks, but it […]

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