public class HistogramLogScanner
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Class and Description |
|---|---|
static interface |
HistogramLogScanner.EncodableHistogramSupplier |
static interface |
HistogramLogScanner.EventHandler
Handles log events, return true to stop processing.
|
private static class |
HistogramLogScanner.LazyHistogramReader |
| Modifier and Type | Field and Description |
|---|---|
private HistogramLogScanner.LazyHistogramReader |
lazyReader |
protected java.util.Scanner |
scanner |
| Modifier | Constructor and Description |
|---|---|
|
HistogramLogScanner(java.io.File inputFile)
Constructs a new HistogramLogReader that produces intervals read from the specified file.
|
|
HistogramLogScanner(java.io.InputStream inputStream)
Constructs a new HistogramLogReader that produces intervals read from the specified InputStream.
|
private |
HistogramLogScanner(java.util.Scanner scanner) |
|
HistogramLogScanner(java.lang.String inputFileName)
Constructs a new HistogramLogReader that produces intervals read from the specified file name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close underlying scanner.
|
boolean |
hasNextLine()
Indicates whether or not additional intervals may exist in the log
|
private void |
initScanner() |
void |
process(HistogramLogScanner.EventHandler handler) |
private final HistogramLogScanner.LazyHistogramReader lazyReader
protected final java.util.Scanner scanner
public HistogramLogScanner(java.lang.String inputFileName)
throws java.io.FileNotFoundException
inputFileName - The name of the file to read fromjava.io.FileNotFoundException - when unable to find inputFileNamepublic HistogramLogScanner(java.io.InputStream inputStream)
close().inputStream - The InputStream to read frompublic HistogramLogScanner(java.io.File inputFile)
throws java.io.FileNotFoundException
inputFile - The File to read fromjava.io.FileNotFoundException - when unable to find inputFileprivate HistogramLogScanner(java.util.Scanner scanner)
private void initScanner()
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic void process(HistogramLogScanner.EventHandler handler)
public boolean hasNextLine()