A fast User Agent parser library
UASparser is available via Maven Central under the group ID cz.mallat.uasparser
and artifact ID uasparser
.
View the latest pom.xml.
Simply use UASparser or any of its subclasses like so:
UASparser parser = new UASparser("uas.ini");
OnlineUpdater updater = new OnlineUpdater(parser);
UserAgentInfo info = parser.parse("Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1; )");
Building requires Apache buildr:
$ [sudo] gem install buildr
To build UASparser:
$ git clone https://github.com/chetan/UASparser.git
$ cd UASparser
$ buildr package
Binaries will be placed in target
.
- Now available via Maven Central
- added support for the [device] and [device_reg] sections
- Handle version API errors (issue #3)
- Defer initial update on startup (don't block)
- Apply jitter after every update
-
Added UserAgentInfo#getBrowserVersionInfo() method
-
Documented all UserAgentInfo reader methods
-
Added a new, fast, thread-safe MultithreadedUASparser (thanks to Michael Remme)
-
New OnlineUpdater class replaces the old OnlineUpdateUASparser and CachingOnlineUpdateUASparser classes which are now deprecated
-
OnlineUpdater will fallback to a vendored copy if no cached version exists and update fails
-
Minor bugfixes
LGPL. See LICENSE file for details.