public class FutureUaProcessor extends UaProcessor.Base
All results are stored in memory, so while this class is fast to execute it cannot carry out large numbers of detections. It's fine for the 20k HTTP User-Agents distributed as a sample.
UaProcessor.Basecount, limit, numberOfThreads, provider, start, stop, useragents| Constructor and Description |
|---|
FutureUaProcessor(BufferedReader useragents,
Provider provider,
int numberOfThreads,
int limit) |
| Modifier and Type | Method and Description |
|---|---|
static long |
getCpuTime()
Get CPU time in nanoseconds.
|
void |
printStats(PrintWriter output)
Writes timings (overall) of of a detection test
|
void |
process()
Process the set of UA Headers
|
void |
writeResults(BufferedWriter writer)
Writes results (for each UA string) of detection test
|
writeHeaders, writeMatchpublic FutureUaProcessor(BufferedReader useragents, Provider provider, int numberOfThreads, int limit) throws IOException
IOExceptionpublic static long getCpuTime()
public void process()
throws Exception
UaProcessorException - if there was a problem accessing data file.public void printStats(PrintWriter output)
UaProcessorprintStats in interface UaProcessorprintStats in class UaProcessor.Baseoutput - a PrintWriter to report the timings onpublic void writeResults(BufferedWriter writer) throws IOException
UaProcessorwriter - a BufferedWriter to write the results toIOException - if there was a problem accessing data file.Copyright © 2017 51Degrees. All rights reserved.