Package org.HdrHistogram
Class HistogramLogScanner
java.lang.Object
org.HdrHistogram.HistogramLogScanner
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfaceHandles log events, return true to stop processing. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHistogramLogScanner(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. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close underlying scanner.booleanIndicates whether or not additional intervals may exist in the logvoidprocess(HistogramLogScanner.EventHandler handler)
-
Field Details
-
scanner
-
-
Constructor Details
-
HistogramLogScanner
Constructs a new HistogramLogReader that produces intervals read from the specified file name.- Parameters:
inputFileName- The name of the file to read from- Throws:
FileNotFoundException- when unable to find inputFileName
-
HistogramLogScanner
Constructs a new HistogramLogReader that produces intervals read from the specified InputStream. Note that log readers constructed through this constructor do not assume ownership of stream and will not close it onclose().- Parameters:
inputStream- The InputStream to read from
-
HistogramLogScanner
Constructs a new HistogramLogReader that produces intervals read from the specified file.- Parameters:
inputFile- The File to read from- Throws:
FileNotFoundException- when unable to find inputFile
-
-
Method Details
-
close
public void close()Close underlying scanner.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
process
-
hasNextLine
public boolean hasNextLine()Indicates whether or not additional intervals may exist in the log- Returns:
- true if additional intervals may exist in the log
-