fiftyone.device.example.batch
Class UaProcessor.Base
java.lang.Object
fiftyone.device.example.batch.UaProcessor.Base
- All Implemented Interfaces:
- UaProcessor
- Direct Known Subclasses:
- FutureUaProcessor
- Enclosing interface:
- UaProcessor
public abstract static class UaProcessor.Base
- extends Object
- implements UaProcessor
Base implementation of UaProcessor accepting a BufferedReader from which UA Strings can be read
and a Provider to use to do detections
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
limit
protected final int limit
numberOfThreads
protected final int numberOfThreads
useragents
protected final BufferedReader useragents
provider
protected final Provider provider
count
protected int count
start
protected long start
stop
protected long stop
UaProcessor.Base
public UaProcessor.Base(BufferedReader useragents,
Provider provider,
int numberOfThreads,
int limit)
throws IOException
- Throws:
IOException
printStats
public void printStats(PrintWriter output)
- Description copied from interface:
UaProcessor
- Writes timings (overall) of of a detection test
- Specified by:
printStats in interface UaProcessor
- Parameters:
output - a PrintWriter to report the timings on
writeHeaders
protected static void writeHeaders(BufferedWriter writer)
throws IOException
- Utility for descendants to write a set of headers relating to a match
- Parameters:
writer - a writer to write to
- Throws:
IOException - if there was a problem accessing data file.
writeMatch
protected static void writeMatch(BufferedWriter writer,
String s,
long time,
Match match)
throws IOException
- Utility for descendants to write details relating to a match
- Parameters:
writer - a writer to write tos - string to write.time - timestamp.match - Match object with results.
- Throws:
IOException - if there was a problem accessing data file.
Copyright © 2017 51Degrees. All rights reserved.