Class HistogramLogScanner

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class HistogramLogScanner
    extends java.lang.Object
    implements java.io.Closeable
    • Constructor Detail

      • HistogramLogScanner

        public HistogramLogScanner​(java.lang.String inputFileName)
                            throws java.io.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:
        java.io.FileNotFoundException - when unable to find inputFileName
      • HistogramLogScanner

        public HistogramLogScanner​(java.io.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​(java.io.File inputFile)
                            throws java.io.FileNotFoundException
        Constructs a new HistogramLogReader that produces intervals read from the specified file.
        Parameters:
        inputFile - The File to read from
        Throws:
        java.io.FileNotFoundException - when unable to find inputFile
      • HistogramLogScanner

        private HistogramLogScanner​(java.util.Scanner scanner)
    • Method Detail

      • initScanner

        private void initScanner()
      • close

        public void close()
        Close underlying scanner.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • 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