Recursively Move a Directory

Jan 09, 2019

This article shows one effective implementation that follows the Visitor Pattern to recursively move a directory using Java NIO library.... Read more

Override Enum Methods with Constant Specific Class Body

Nov 20, 2018

This article shows one advanced technique when using enums - constant specific class body.... Read more

Serialize Timestamp To EpochSecond with Jackson

Nov 09, 2018

Some REST API only takes a `long` as its Date field, such as `esriFieldTypeDate` from ArcGIS Server Rest API. But with the rich functionality, the Java 8 time API provides, it would be silly to use `long` as the type for our object modeling. This tip... Read more

Basic Serialization

Sep 02, 2018

Serialization includes the part that serializes an object to a file and deserializes a file to an object that has the desired same state as it was in. It is typically done by using two high-level classes from the `` package - `ObjectOutputStre... Read more

Useful File Mini API

Aug 29, 2018

Java io is a very extensive library. There are numerous ways and combinations to write/read data on a file. This article summaries some very useful classes in `` package. ... Read more

Load and Store Properties File

Aug 26, 2018

Properties files are usually used to externalize configuration from applications to text files. This article introduces the syntax and usage of properties files.... Read more

Locale and Resource Bundles

Aug 26, 2018

Resource bundles allow you to move locale-specific information out from your main source code to a properties file or a java class. In this article, we will introduce the usage of both implementations of the `ResourceBundle` interface -- `PropertyRes... Read more

Java 8 Time Package and Locale

Aug 26, 2018

Java 8 provides an extensive time computational package - `java.time` that is recommended for any new code to use because it provides so many helper methods to compute time and easily used with `java.util.Locale` class to support localization *(l10n... Read more