boolean capped = false;
int lineCount = 0;
try {
RandomAccessFile raf = new RandomAccessFile(file, "r");
FileChannel fc = raf.getChannel();
MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
CharBuffer cb = Charset.forName("US-ASCII").decode(bb); //todo: does Jetty use a different charset on a foreign PC?
Matcher lines = FULL_LINE_PATTERN.matcher(cb);
Matcher target = ACCESS_LOG_PATTERN.matcher("");
long start = startDate == null ? 0 : startDate.getTime();
long end = endDate == null ? 0 : endDate.getTime();