DIUASparser

User Agent parser library for use with the database provided by http://udger.com/

License

License

GroupId

GroupId

me.atlis
ArtifactId

ArtifactId

decibelinsight-uasparser
Last Version

Last Version

1.0.12
Release Date

Release Date

Type

Type

jar
Description

Description

DIUASparser
User Agent parser library for use with the database provided by http://udger.com/
Project URL

Project URL

https://github.com/AtlisInc/DIUASparser
Source Code Management

Source Code Management

http://github.com/AtlisInc/DIUASparser

Download decibelinsight-uasparser

How to add to project

<!-- https://jarcasting.com/artifacts/me.atlis/decibelinsight-uasparser/ -->
<dependency>
    <groupId>me.atlis</groupId>
    <artifactId>decibelinsight-uasparser</artifactId>
    <version>1.0.12</version>
</dependency>
// https://jarcasting.com/artifacts/me.atlis/decibelinsight-uasparser/
implementation 'me.atlis:decibelinsight-uasparser:1.0.12'
// https://jarcasting.com/artifacts/me.atlis/decibelinsight-uasparser/
implementation ("me.atlis:decibelinsight-uasparser:1.0.12")
'me.atlis:decibelinsight-uasparser:jar:1.0.12'
<dependency org="me.atlis" name="decibelinsight-uasparser" rev="1.0.12">
  <artifact name="decibelinsight-uasparser" type="jar" />
</dependency>
@Grapes(
@Grab(group='me.atlis', module='decibelinsight-uasparser', version='1.0.12')
)
libraryDependencies += "me.atlis" % "decibelinsight-uasparser" % "1.0.12"
[me.atlis/decibelinsight-uasparser "1.0.12"]

Dependencies

compile (1)

Group / Artifact Type Version
net.sourceforge.jregex : jregex jar 1.2_01

Project Modules

There are no modules declared in this project.

DIUASparser

A fast User Agent parser library, using data from udger.com

Maven Dependency

<dependency>
  <groupId>me.atlis</groupId>
  <artifactId>decibelinsight-uasparser</artifactId>
  <version>RELEASE</version>
</dependency>

Usage

Simply use DIUASparser or any of its subclasses like so:

UASparser parser = new UASparser();
String key = ""; // udger license key
OnlineUpdater updater = new OnlineUpdater(parser, key);
UserAgentInfo info = parser.parse("Mozilla/4.0 (compatible; MSIE 7.0;Windows NT 5.1; )");

This will create a new parser and initialize it with a bundled copy of the database. The OnlineUpdater will then asynchronously fetch the latest database in the background, making it available after a few seconds and caching it locally as well. See it's source for more on how it works.

In addition, there are a few different parser classes available:

  • UASparser - Default parser, thread-safe
  • MultithreadedUASparser - A faster variant of UASparser, uses a bit more memory
  • SingleThreadedUASparser - Non-threadsafe variant, ideal for Hadoop and similar use cases
  • BrowserFamilyParser - UASparser subclass which only returns the browser family string

Dependencies

License

LGPL. See LICENSE file for details.

me.atlis

Atlis

Discover better. Together.

Versions

Version
1.0.12
1.0.11
1.0.10