Download 1.15.1

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


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.

Classes: com.norconex.commons.lang.config.*


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



Time-related utility classes, including:

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

Classes: com.norconex.commons.lang.time.*

Data Unit

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

Classes: com.norconex.commons.lang.unit.*


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

Classes: com.norconex.commons.lang.file.*


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

Classes: com.norconex.commons.lang.url.*


Provides features for dealing with 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.



Other classes not fitting anyhere. Includes:

  • 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

Classes: com.norconex.commons.lang.*

Back to top