Closeable, AutoCloseablepublic class HistogramLogScanner extends Object implements Closeable
| Modifier and Type | Class | Description |
|---|---|---|
static interface |
HistogramLogScanner.EncodableHistogramSupplier |
|
static interface |
HistogramLogScanner.EventHandler |
Handles log events, return true to stop processing.
|
| Constructor | Description |
|---|---|
HistogramLogScanner(File inputFile) |
Constructs a new HistogramLogReader that produces intervals read from the specified file.
|
HistogramLogScanner(InputStream inputStream) |
Constructs a new HistogramLogReader that produces intervals read from the specified InputStream.
|
HistogramLogScanner(String inputFileName) |
Constructs a new HistogramLogReader that produces intervals read from the specified file name.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Close underlying scanner.
|
boolean |
hasNextLine() |
Indicates whether or not additional intervals may exist in the log
|
void |
process(HistogramLogScanner.EventHandler handler) |
protected final Scanner scanner
public HistogramLogScanner(String inputFileName) throws FileNotFoundException
inputFileName - The name of the file to read fromFileNotFoundException - when unable to find inputFileNamepublic HistogramLogScanner(InputStream inputStream)
close().inputStream - The InputStream to read frompublic HistogramLogScanner(File inputFile) throws FileNotFoundException
inputFile - The File to read fromFileNotFoundException - when unable to find inputFilepublic void close()
close in interface AutoCloseableclose in interface Closeablepublic void process(HistogramLogScanner.EventHandler handler)
public boolean hasNextLine()
Copyright © 2019. All rights reserved.