public class HistogramLogScanner extends Object implements Closeable
Modifier and Type | Class and Description |
---|---|
static interface |
HistogramLogScanner.EncodableHistogramSupplier |
static interface |
HistogramLogScanner.EventHandler
Handles log events, return true to stop processing.
|
Constructor and 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 and 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 Closeable
close
in interface AutoCloseable
public void process(HistogramLogScanner.EventHandler handler)
public boolean hasNextLine()
Copyright © 2019. All rights reserved.