Class LogfileCreator


  • public class LogfileCreator
    extends java.lang.Object
    A class for creating log files of random data.
    Version:
    2016.02.29
    Author:
    David J. Barnes and Michael Kölling
    • Constructor Summary

      Constructors 
      Constructor Description
      LogfileCreator()
      Create log files.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      LogEntry createEntry()
      Create a single (random) entry for a log file.
      boolean createFile​(java.lang.String filename, int numEntries)
      Create a file of random log entries.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LogfileCreator

        public LogfileCreator()
        Create log files.
    • Method Detail

      • createFile

        public boolean createFile​(java.lang.String filename,
                                  int numEntries)
        Create a file of random log entries.
        Parameters:
        filename - The file to write.
        numEntries - How many entries.
        Returns:
        true if successful, false otherwise.
      • createEntry

        public LogEntry createEntry()
        Create a single (random) entry for a log file.
        Returns:
        A log entry containing random data.