Norconex Commons Lang

Open-Source Generic Java Library

Documentation Download 1.15.1

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 HTTP Collector 3.0.0 snapshots available
2020-09-07
Development builds of upcoming version 3 now available to experiment with. More...

opensource.norconex.com
2020-09-07
All Norconex open-source projects are now grouped under the same domain. More...

Norconex HTTP and FileSystem Collectors 2.9.0 released
2019-12-22
New URL normalization rules, support for CMIS protocol, ACL extraction from more sources, etc. More...

Norconex Collector Core 1.10.0 released
2019-12-22
Unmanaged logs, max parallel crawlers, etc. More...

Norconex Importer 2.10.0 released
2019-12-22
New FieldReportTagger, Tika upgrade, fixes, etc. More...