Norconex Commons Lang Project

Release History

Version Date Description
1.15.1-SNAPSHOT 2019-??-?? Bugfix release
1.15.0 2018-06-03 Feature release
1.14.0 2017-11-26 Feature release
1.13.1 2017-05-16 Bugfix release
1.13.0 2017-04-25 Feature release
1.12.3 2016-11-15 Bugfix release
1.12.2 2016-10-07 Bugfix release
1.12.1 2016-09-17 Bugfix release
1.12.0 2016-08-29 Feature release
1.11.0 2016-08-25 Feature release
1.10.0 2016-08-22 Feature release
1.9.1 2016-08-09 Maintenance release
1.9.0 2016-02-27 Feature release
1.8.0 2015-11-01 Feature release
1.7.0 2015-08-07 Feature release
1.6.2 2015-07-21 Maintenance release
1.6.1 2015-06-13 Maintenance release
1.6.0 2015-03-27 Feature release
1.5.0 2014-11-24 Feature release
1.4.0 2014-07-09 Feature release
1.3.2 2014-06-16 Maintenance release
1.3.1 2014-03-06 Maintenance release
1.3.0 2014-03-05 Feature release
1.2.0 2014-01-10 Minor release
1.1.0 2013-08-19 Minor release
1.0.0 2013-06-04 Open Source release

Release 1.15.1-SNAPSHOT - 2019-??-??

Type Changes By
CachedInputStream no longer truncates last character under certain conditions. essiembre

Release 1.15.0 - 2018-06-03

Type Changes By
New EncryptionXMLUtil class offering methods to facilitate integration of EncryptionKey with IXMLConfigurable objects (or other XML objects). davisda4,essiembre
EncryptionUtil now uses AES for encryption and supports custom key size. davisda4
ConfigurationLoader now sets the Velocity character encoding to UTF-8. essiembre
HttpURL now extract protocols before first colon, no longer requiring two forward slash. Also more lenient towards relative URLs. essiembre
QueryString now strips out fragments when part of a URL. essiembre

Release 1.14.0 - 2017-11-26

Type Changes By
Can now store and load Properties file as JSON. essiembre
New StringUtil class with truncation methods replacing the truncated part with a hash code. essiembre
New ResourceLoader class. essiembre
New ProxySettings class. essiembre
New CircularRange class. essiembre
New method variation on EhancedXMLStreamWriter to overwrite the default "writeBlanks" setting. essiembre
New FileUtil#createURLDirs method for creating directories matching URL segments. essiembre
New XMLConfigurationUtil#nullable* methods to consider empty tags/attributes as null whereas not having the tag at all uses the default value. essiembre
New XMLConfigurationUtil#keyExists methods to find if a key exists in XML even if empty. essiembre
New EqualsUtil#equalsMap(...) method for checking if two maps are equal, regardless of entry order. essiembre
It is now possible to pass a Charset where a string was expected for character encoding on a few utility classes. essiembre
Added ZIP constant to ContentType. essiembre
Added ICachedStream#getCacheDirectory(). essiembre
TextReader default maxReadSize is now 10 million characters (from 128,000) and now accepts -1 as the maxReadSize to mean unlimited. essiembre
Properties with multi-values now have their values stored as individual entries by default (as opposed to using a delimiter). Also more storing/loading options are now available. essiembre
TextReader#DEFAULT_MAX_READ_SIZE has been increased from 64 thousand to 10 million characters. essiembre
Dependency updates: Apache Commons Lang 3.6, Apache Commons Text 1.1, Open JSON 1.8. essiembre
ContentType now works better with types with parameters. Added two new related methods: #toBaseTypeString() and #toBaseType(). essiembre
Fixed SystemCommand not handling arguments with spaces when they are properly quoted. essiembre
Fixed CachedInputStream returning -1 or throwing EOF exception when it should not. essiembre
Fixed QueryString setting "UTF-8" as the URL when invoking empty constructor (now blank). essiembre
Fixed DurationParser now returning default value in some cases where the duration was invalid (returning 0 instead). essiembre
Fixed CachedInputStream sometimes returning null when using #getCacheDirectory() method. essiembre
Removed Properties#isCaseSensitiveKeys(), deprecated since 1.8.0. essiembre

Release 1.13.1 - 2017-05-16

Type Changes By
Fixed XMLConfigurationUtil reporting a validation error when encountering attributes from the XML Namespace ("http://www.w3.org/XML/1998/namespace"), such as xml:space="preserve". essiembre

Release 1.13.0 - 2017-04-25

Type Changes By
New "exec" package containing classes moved from Norconex JEF API. Those classes provide ways to easily execute external commands as well as making code execution "retriable" in case of failure. essiembre
IXMLConfigurable classes having XML schemas (XSD) are now validated when loaded (using XML Schema 1.1). essiembre
Now distributed with new command-line scripts for encryption, safe copying of jars, finding jar duplicates, and automating the installation of this library into other projects. essiembre
New CountingConsoleAppender for tracking how many log events of each type were logged (log4j). essiembre
New ListErrorHandler which stores SAX Exceptions that can later be retrieved as lists. essiembre
New ClasspathResourceResolver and ClasspathInput to resolve XSD schema includes/imports relative to each other in classpath. essiembre
New XMLConfigurationUtil class replacing ConfigurationUtil, offering new methods: #getCSVStringArray(...), #getCSVIntArray(...), #validate(...), #loadFromXML(...), #newInstance(Reader), #getDuration(...) essiembre
New IInputStreamListener, InputStreamLineListener, and InputStreamConsumer replacing now deprecated IStreamListener, and StreamGobbler. These new classes allow streaming of binary content, as well as text. essiembre
New DurationParser class to parse plain-English durations into milliseconds (e.g., "5 minutes and 30 seconds" or "5m30s"). essiembre
New URLNormalizer#removeTrailingHash() method. essiembre
New JarFile#isSameVersion(...) and JarFile#isSameVersionAndTime(...) methods. essiembre
New constructor for EnhancedXMLStreamWriter enabling support for indentation (pretty-print). essiembre
ConfigurationLoadedUtil now deprecated in favor of XMLConfigurationUtil. essiembre
JarDuplicateFinder now checks the last modified date when two versions are the same. essiembre
Now relies on Apache Xerces to parse XML Shema 1.1. essiembre
Dependency updates: Apache Commons Lang 3.5, Apache Ant 1.10.1, Apache Collections 3.2.2. essiembre
Removed all classes/methods deprecated since 1.5.0: ConfigurationLoaded#loadXML(Reader in), .io.FileMonitor, .io.FileUtil, .io.IFileChangeListener, .io.IFileVisitor, .file.FileUtil#deleteFile(File), ClassFinder#findImplementors(...). essiembre

Release 1.12.3 - 2016-11-15

Type Changes By
HttpURL no longer sets a null protocol when constructing non HTTP URLs. essiembre
Fixed URLNormalizer#removeSessionIds() not handling cases where the jsessionid is followed by a dot and other word characters. essiembre

Release 1.12.2 - 2016-10-07

Type Changes By
Fixed QueryString removing parameters without equal sign. essiembre

Release 1.12.1 - 2016-09-17

Type Changes By
Fixed URLNormalizer#sortQueryParameters() not handling #fragments properly. essiembre

Release 1.12.0 - 2016-08-29

Type Changes By
New URLNormalizer#addDomainTrailingSlash() method. essiembre
HttpURL now preserves uppercase characters in protocol. essiembre
Fixed HttpURL constructing URLs with null elements when protocol was not lowercase (e.g. HTTP). essiembre

Release 1.11.0 - 2016-08-25

Type Changes By
New URLNormalizer#removeTrailingSlash() method. essiembre
URLNormalizer#addTrailingSlash() has been deprecated in favor of URLNormalizer#addDirectoryTrailingSlash(). essiembre
Dependency updates: Apache Commons Lang 2.6. essiembre

Release 1.10.0 - 2016-08-22

Type Changes By
New Jar-related utility classes for jar file version conflict detection and resolution. essiembre

Release 1.9.1 - 2016-08-09

Type Changes By
Dependency updates: Apache Commons IO 2.5. essiembre
URLStreamer now has two new "streamToString" methods that accept a character encoding argument. Versions without the character encoding argument now assume UTF-8 as opposed to OS default charset. essiembre
ConfigurationLoader#loadString(...) now assumes UTF-8 as opposed to OS default charset for loading variables. essiembre
When case-insensitive, Fixed Properties#addString(...) that was adding values multiple times when a key was previously inserted with a different case and fixed Properties#keySet() that returns the right number of keys now. essiembre

Release 1.9.0 - 2016-02-27

Type Changes By
New EncryptionUtil class to easily encrypt and decrypt any text using a security key. essiembre
Added support for the following BMP variations to ContentType: application/bmp, application/x-bmp, application/x-win-bitmap, image/ms-bmp, image/x-bitmap, image/x-bmp, image/x-ms-bmp, image/x-win-bitmap, image/x-windows-bmp essiembre
ContentType default file extension for image/jpeg is now .jpg to match most frequent usage. essiembre
Dependency updates: Apache Commons Collections 4.1. essiembre
HttpURL#toAbsolute(String, String) now handles relative URLs with no leading slashes properly (e.g. "sample.html"). essiembre
HttpURL#getRoot(String) now returns the proper root even when the URL contains invalid characters. essiembre
Fixed ConfigurationUtils#newInstance(HierarchicalConfiguration, T, boolean) ignoring the "supportXMLConfigurable" argument. essiembre

Release 1.8.0 - 2015-11-01

Type Changes By
New normalization methods on URLNormalizer: #encodeNonURICharacters() and #encodeSpaces(). Spaces are no longer escaped automatically by default. essiembre
New HttpURL#toAbsolute(String, String) method for converting relative URLs to absolute ones, based on another absolute URL. essiembre
New HttpURL#encodeQueryString(String) method for properly encoding the query string portion of a URL. essiembre
New HttpURL#isPortDefault() method to quickly find out if a URL is using a default port for its protocol (http/https). essiembre
New HttpURL#getRoot() and HttpURL#getRoot(String) methods to extract the URL "root" from URLs (left part up to and including, the host name). essiembre
New PropertyMatcher class for easily storing a condition for matching a Properties key value. essiembre
HttpURL now keeps the URL fragment when present, and has accessors for it. essiembre
HttpURL#toString() no longer returns the port when the protocol is https and the port is 443. essiembre
Properties#isCaseSensitiveKeys() is now deprecated in favor of Properties#isCaseInsensitiveKeys() for consistency with constructor caseInsensitiveKeys argument. essiembre
Fixed URLNormalizer#removeDotSegments() is now implemented following RFC3986 prescribed algorithm. essiembre
Fixed URLNormalizer#removeDuplicateSlashes() to no longer consider the two slashes between the protocol and hostname as being duplicates in some cases. essiembre
Fixed URLNormalizer#addTrailingSlash() when the path was already ending with one. Also adds one now when there are none and the path is followed by a question mark or hash character. essiembre
HttpURL now sets the port as 443 when initialized with a secure URL (https). essiembre
Fixed possible URISyntaxException in URLNormalizer for certain URLs. essiembre
UTF-8 unicode values are now used to percent-encode the part portion of a URL. essiembre
When Woodstox factory is used as the XML parser, now disables structure validation which can cause issues when you want to use the xml writer on a stream that already has XML written to it (could cause "multiple roots" error). essiembre

Release 1.7.0 - 2015-08-07

Type Changes By
Added static methods HttpURL#toURL(String), HttpURL#toURI(String) and regular method HttpURL#getEncoding(). Can now specify URL encoding (charset) at construction time. Also added encodePath(String) method for URL-encoding the path portion of a URL. essiembre
Added new method QueryString#getEncoding(). essiembre
URLNormalizer now converts spaces to + instead of %20. In addition, it no longer URL-encodes characters when sorting or removing empty parameters (except for converting spaces to +). essiembre
ConfigurationUtil#newInstance(...) will now log an ERROR instead of DEBUG when a class is specified but not found in classpath. essiembre

Release 1.6.2 - 2015-07-21

Type Changes By
Jar manifest now includes implementation entries and specifications entries (matching Maven pom.xml). essiembre
Javadoc improvements. essiembre

Release 1.6.1 - 2015-06-13

Type Changes By
Added a length() method to CachedInputStream. essiembre
Fix NullPointerException when passing a date array containing null values in Properties#datesToStringArray(Date...). essiembre
Fix TextReader#readText(...) which could sometimes take forever to return (if ever). essiembre
Library update: Apache Commons Lang 3.4. essiembre

Release 1.6.0 - 2015-03-27

Type Changes By
New TimeIdGenerator class for generating time-based unique IDs that are guaranteed to be ordered and unique within a JVM. essiembre
New TextReader class for reading large text files, one chunk at a time, splitting text wisely at paragraphs/sentences/words when possible. essiembre
New ByteArrayOutputStream class derived from the Apache IO class of the same name, modified to offer methods to access subsets of bytes ranging form zero to the total number of bytes written so far. essiembre
New method IOUtil#toBufferedReader(Reader) that ensures to return either a BufferedReader wrapping original reader, or the reader itself if it already implements BufferedReader. essiembre
New method IOUtil#toBufferedInputStream(InputStream) that ensures to return either a BufferedInputStream wrapping original InputStream, or the input stream itself if it already implements BufferedInputStream. essiembre
New method IOUtil#startsWith(InputStream, byte[]) that returns true if given input stream starts the specified bytes array. (must support mark). essiembre
New method IOUtil#borrowBytes(InputStream, int) that gets and resets the specified number of bytes from the input stream (must support mark). essiembre
CachedInputStream now supports mark(int). Mark value is always unlimited (argument is ignored). essiembre
ContentType and ContentFamily now support for BIG2 and Quattro Pro content types. essiembre
ConfigurationUtil#newInstance(...) now throws an ConfigurationExceptions upon error when no default value is supplied. essiembre
Added SonaType snapshot repository to pom.xml. essiembre
Updated several maven plugins and added SonarQube maven plugin. essiembre
Javadoc improvements. essiembre
Upgraded depending libraries to the following: JUnit 4.12, Apache Commons Logging 1.2, Apache Commons Lang 3.3.2, essiembre

Release 1.5.0 - 2014-11-24

Type Changes By
New pipeline-related classes for a very simple pipeline framework for encapsulating executable tasks. essiembre
New CachedInputStream for caching input streams for re-use. Swaps memory overflow to file. essiembre
New CachedOutputStream for caching output streams for re-use as InputStream. Swaps memory overflow to file. essiembre
New ByteBufferInputStream for reading a ByteBuffer as an InputStream. essiembre
New EnhancedXMLStreamWriter class to facilitate writing of primitives and other types. essiembre
New MemoryUtil class to quickly obtain free JVM memory. essiembre
New methods on EqualsUtil for String equality: #equalsAnyIgnoreCase(...) #equalsAllIgnoreCase(...), and #equalsNoneIgnoreCase(...). essiembre
Added content-type mappings for Content Family. essiembre
New #valuesOf(String...) method on ContentType. essiembre
Now licensed under The Apache License, Version 2.0. essiembre
Properties default content delimiter is now more unique. essiembre
Deprecated ConfigurationLoader#loadXML(Reader) in favor of ConfigurationUtil#newXMLConfiguration(Reader). essiembre
FileUtil#deleteEmptyDirs(File) now forces directory deletion using FileUtil#delete(File) essiembre
ConfigurationUtil and ConfigurationLoader now ensure full disabling in all methods of value splitting in attributes and elements. essiembre
FileUtil#head(File, int) now uses UTF-8 as default encoding. essiembre
FilteredInputStream now uses UTF-8 as default encoding, and now offers an additional constructor accepting a character encoding. essiembre
StreamGobbler now uses UTF-8 as default encoding, and now offers an additional constructor accepting a character encoding. Also added #getType(), #getEncoding(), and #getStreamListeners() essiembre
IOUtil#tail(InputStream, lineQty) now uses UTF-8 as default encoding, and now offers an overloaded method accepting a character encoding: IOUtil#tail(InputStream, String, lineQty) essiembre
IOUtil#head(InputStream, lineQty) now uses UTF-8 as default encoding, and now offers an overloaded method accepting a character encoding: IOUtil#head(InputStream, String, lineQty) essiembre
IXMLConfigurable no longer extends Serializable. essiembre
Fixed content type display name for application/ccxml+xml not being mapped properly. essiembre
FileUtil#visitAllFiles(...) method now goes beyond 1 level deep when browsing recursively. essiembre

Release 1.4.0 - 2014-07-09

Type Changes By
New ClassFinder#findSubTypes(Class) method for finding subtypes in classpath using classpath roots. essiembre
New DataUnit class to perform data unit (KB, MB, GB, etc) conversions much like Java TimeUnit class. essiembre
New PercentFormatter to format fraction values as percentage string. essiembre
New DataUnitFormatter to format any data unit ot a human-readable format taking into account locale and decimals. essiembre
New ContentType class to represent a file media/MIME type and obtain its usual name, content family, and file extension(s). essiembre
New ContentFamily class to represent a group of files of similar content types. Useful for content categorization. essiembre
Added new classes for listening to java.util.Map changes: ObservableMap, MapChangeSupport, IMapChangeListener, and MapChangeEvent. essiembre
Deprecation of FileUtil#deleteFile(File) in favour of FileUtil#delete(File). essiembre
FileUtil#delete(File) now invokes System.gc() upon deletion failure to fix a known java bug when trying to delete files on windows. essiembre
Properties now uses UTF-8 to load and store itself. essiembre
FileMonitor, FileUtil, IFileChangeListener, IFileVisitor are now found under the com.norconex.commons.lang.file package. Classes have been deprecated in former location. essiembre
Now requires Java 7 or higher. essiembre
Refactored Properties to extend ObservableMap so changes can optionally be tracked. essiembre
URLNormalizer no longer rejects URLs with spaces in them. It will now convert spaces to %20 and log a warning. essiembre
Deprecation of ClassFinder#findImplementors(XXX) in favour of ClassFinder#findSubTypes(XXX). essiembre
Fix FileUtil#tail(...) method when the file has less lines than the amount requested. essiembre
Fix junit Properties.load to use the whole delimiter. dimassip
Fix Properties.remove to return null if key is non existent. dimassip
Fix junit test for converting IP to domain. Was failing due to wikipedia IP change. essiembre

Release 1.3.2 - 2014-06-16

Type Changes By
URLNormalizer no longer rejects URLs with spaces in them. It will now convert spaces to %20 and log a warning. essiembre
Fix junit test for converting IP to domain. Was failing due to wikipedia IP change. essiembre

Release 1.3.1 - 2014-03-06

Type Changes By
Fixed missing localized text for DurationUtil. essiembre

Release 1.3.0 - 2014-03-05

Type Changes By
New YearMonthDay class for a local date without time. essiembre
New YearMonthDayInterval (and unit test) class for a local date range without time. essiembre
New FileMonitor and IFileChangeListener to be notified of file changes. essiembre
New methods on FileUtil: #visitEmptyDirs(File, IFileVisitor) #visitEmptyDirs(File, IFileVisitor, FileFilter) #visitAllDirs(File, IFileVisitor, FileFilter) #deleteEmptyDirs(File, Date) essiembre
Upgraded Apache HttpClient to version 4.3.2, Apache Commons Configuration to 1.10, and Apache Commons Lang to 3.2.1. Refactored affected code. essiembre

Release 1.2.0 - 2014-01-10

Type Changes By
New getter and setter for URL "path" on HttpURL. essiembre
Javadoc improvements. essiembre
HttpURL#getLastPathSegment() no longer returns the query string with it. essiembre
Jars are now closed properly in ClassFinder. essiembre
ClassFinder#findImplementors(...) now only returns concrete classes. essiembre

Release 1.1.0 - 2013-08-19

Type Changes By
New #toSafeFileName and #fromSafeFileName method on FileUtil for creating OS friendly file names out of any strings. essiembre
New DurationUtil class for nice and easy formatting of time durations. essiembre
Fixed NullPointerException in FileUtil when deleting empty directories. essiembre

Release 1.0.0 - 2013-06-04

Type Changes By
Starting with this release, Norconex Commons Lang is open-source under GPL3. essiembre

Back to top