user agent parser
I have a user agent:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
I am using nl.bitwalker
(http://user-agent-utils.java.net/) as a library in order to parse information from the user agent.
The problem is that I don't know how to use nl.bitwalker
to get the information I want.
If you know please let me know.
[EDITED] How c开发者_如何学编程an I get the device type using this library??
That's seems simple to use from the Javadoc
UserAgent agent = UserAgent.parseUserAgentString(userAgentString);
Browser browser = agent.getBrowser();
Version version = agent.getBrowserVersion();
OperatingSystem os = agent.getOperatingSystem();
What do you need if it's not that ?
精彩评论