cz.mallat.uasparser
Class OnlineUpdateUASparser

java.lang.Object
  extended by cz.mallat.uasparser.UASparser
      extended by cz.mallat.uasparser.OnlineUpdateUASparser
Direct Known Subclasses:
CachingOnlineUpdateUASparser

public class OnlineUpdateUASparser
extends UASparser

The parser will download the definition file from the internet

Author:
oli

Field Summary
protected  String currentVersion
           
protected static String DATA_RETRIVE_URL
           
protected  long lastUpdateCheck
           
protected static long UPDATE_INTERVAL
           
protected static String VERSION_CHECK_URL
           
 
Constructor Summary
OnlineUpdateUASparser()
           
 
Method Summary
protected  void checkDataMaps()
          Since we've online access to the data file, we check every day for an update
protected  String getVersionFromServer()
          Gets the current version from user-agent-string.info
 
Methods inherited from class cz.mallat.uasparser.UASparser
createInternalDataStructre, loadDataFromFile, loadDataFromFile, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_RETRIVE_URL

protected static final String DATA_RETRIVE_URL
See Also:
Constant Field Values

VERSION_CHECK_URL

protected static final String VERSION_CHECK_URL
See Also:
Constant Field Values

UPDATE_INTERVAL

protected static final long UPDATE_INTERVAL
See Also:
Constant Field Values

lastUpdateCheck

protected long lastUpdateCheck

currentVersion

protected String currentVersion
Constructor Detail

OnlineUpdateUASparser

public OnlineUpdateUASparser()
Method Detail

checkDataMaps

protected void checkDataMaps()
                      throws IOException
Since we've online access to the data file, we check every day for an update

Overrides:
checkDataMaps in class UASparser
Throws:
IOException

getVersionFromServer

protected String getVersionFromServer()
                               throws IOException
Gets the current version from user-agent-string.info

Returns:
Throws:
IOException


Copyright © 2011. All Rights Reserved.