类 UserAgentService
java.lang.Object
com.walker.web.agent.UserAgentService
-
字段概要
字段 -
构造器概要
构造器构造器说明UserAgentService(InputStream zipFileStream) Creates a user agent service based on the Browscap CSV file in the given ZIP InputStreamUserAgentService(String zipFilePath) Creates a user agent service based on the Browscap CSV file in the given ZIP file -
方法概要
修饰符和类型方法说明static StringReturns the bundled ZIP file nameReturns a parser based on the bundled BrowsCap versionloadParser(Collection<BrowsCapField> fields) Returns a parser based on the bundled BrowsCap version
-
字段详细资料
-
BUNDLED_BROWSCAP_VERSION
public static final int BUNDLED_BROWSCAP_VERSION- 另请参阅:
-
-
构造器详细资料
-
UserAgentService
public UserAgentService() -
UserAgentService
Creates a user agent service based on the Browscap CSV file in the given ZIP file- 参数:
zipFilePath- the zip file should contain the csv file. It will load the given zip file instead of the bundled one
-
UserAgentService
Creates a user agent service based on the Browscap CSV file in the given ZIP InputStream- 参数:
zipFileStream- the zip InputStream should contain the csv file. It will load the given zip InputStream instead of the bundled zip file
-
-
方法详细资料
-
loadParser
Returns a parser based on the bundled BrowsCap version- 返回:
- the user agent parser
- 抛出:
IOExceptionParseException
-
loadParser
public UserAgentParser loadParser(Collection<BrowsCapField> fields) throws IOException, ParseException Returns a parser based on the bundled BrowsCap version- 参数:
fields- list- 返回:
- the user agent parser
- 抛出:
IOExceptionParseException
-
getBundledCsvFileName
Returns the bundled ZIP file name- 返回:
- CSV file name
-