Norconex Crawler V4 is here, in beta. A rewritten crawler with a free visual configurator — give it a try and tell us what you think. Try the beta →

Norconex Commons Lang

Open-Source Generic Java Library

Documentation Download

Commons Lang

Norconex Commons Lang is a generic Java library containing utility classes that complements the Java API and are not found in commonly available libraries. Among other things, it is used by other Norconex open-source projects.


Features

The following gives you an overview of the type of utility classes found in this library.

Configuration

Make configurable classes and XML configuration files more portable, reusable and manageable. Turn your configuration files into templates that can interpret variables defined in text files and include reusable configuration fragments.

Map

Enhanced Maps. Observable maps. and replacement for Properties, adding getter and setting for all kinds of class types (integers, boolean, file, etc).

Time

Time-related utility classes, including:

  • YearMonthDay class for dates without time
  • YearMonthDayInterval class for a date range without time

Data Unit

Provides easy to use conversion of data units (KB, MB, GB, etc) as well as offering human-readable formatting.

Files

Classes dealing with files and directories, such as:

  • getting the "head" or the "tail" of a file
  • converts any strings to OS friendly file names
  • create time-based directory structure
  • recursively browse directories using the visitor pattern
  • stream a file in reverse
  • monitor files for changes

URL

URL-related utility classes offering features such as:

  • Mutable URL
  • QueryString class for easy setting/getting of query parameters
  • URL normalization
  • Several URL streaming options

I/O

Provides features for dealing with I/O streams, such as:

  • caching of input streams so they can be re-read at will
  • caching of output stream
  • filter input streams using input stream filters (e.g. regex-based filter)
  • stream in reverse
  • create listeners that get notified when input stream is being read
  • text reader for reading large text into smaller chunks, cut wisely after a paragraph, sentence, or word.

Many others

  • Sleeper class
  • Ways to test several objects at once for equality
  • Find classes in classpath, directories and jars
  • Percent formatter
  • Pipeline classes
  • EnhancedXMLStreamWriter
  • Long unique ID generator
  • Simple text encryption/decryption
  • Jar copy version conflict resolution
  • Simplifies system command execution

Latest news

Norconex v3 Stack 3.2.0 Released
2026-08-31
The synchronized v3 stack -- 13 modules sharing one version -- is now published to Maven Central, with updated documentation and API docs for every module. More...

Norconex Crawler v4 Beta Is Here
2026-08-30
A rewritten crawler, a free visual configurator, and documentation generated straight from the code. It's feature-complete and we want you to try to break it. More...

Norconex Google Cloud Search Committer in v3 Stack
2026-07-01
Google Cloud Search Committer now has a Norconex-managed 3.x release line in the v3 stack. The legacy 2.x line developed and hosted by Google remains available. More...

Norconex Filesystem Collector joins v3 Stack
2026-07-01
File System Crawler now has a Norconex-managed 3.x release line in the synchronized v3 stack, while the legacy 2.x line remains available. More...

Norconex v3 Stack Coordinates Update
2026-07-01
The v3 train now uses synchronized 3.2.0 versions across the stack under the existing com.norconex.collectors groupId. One exception: the Elasticsearch Committer, previously on its own 5.x numbering, is realigned to 3.2.0 under com.norconex.collectors.v3-align so its new release does not collide with its existing 5.x line. More...