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 Web Crawler 3.0.2 Released
2023-07-09
Maintenance release. More...

Norconex Web Crawler 3.0.1 Released
2022-08-30
Maintenance release. More...

Norconex Web Crawler 3.0.0 Released!
2022-01-05
The new major release of Norconex HTTP Collector it is finally here. Check out what's new. More...

Norconex HTTP Collector 3.0.0 Release Candidate 1
2021-10-10
Is this the last pre-release? Put it to the test and let us know! Includes applicable release candidates of core dependencies as well. More...

Norconex HTTP Collector 3.0.0 Milestone 2
2021-07-28
3.0.0 second milestone release. Includes applicable milestone releases of core dependencies as well. More...