Class HistogramLogScanner

java.lang.Object
org.HdrHistogram.HistogramLogScanner
All Implemented Interfaces:
Closeable, AutoCloseable

public class HistogramLogScanner extends Object implements Closeable
  • Field Details

    • scanner

      protected final Scanner scanner
  • Constructor Details

    • HistogramLogScanner

      public HistogramLogScanner(String inputFileName) throws FileNotFoundException
      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

      public HistogramLogScanner(InputStream inputStream)
      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 on close().
      Parameters:
      inputStream - The InputStream to read from
    • HistogramLogScanner

      public HistogramLogScanner(File inputFile) throws FileNotFoundException
      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:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • process

      public void process(HistogramLogScanner.EventHandler handler)
    • 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