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.
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.
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
Provides easy to use conversion of data units (KB, MB, GB, etc) as well as
offering human-readable formatting.
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-related utility classes offering features such as:
- Mutable URL
- QueryString class for easy setting/getting of query parameters
- URL normalization
- Several URL streaming options
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.
- 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