Class FileHistory

    • Constructor Detail

      • FileHistory

        public FileHistory​(java.io.File file)
                    throws java.io.IOException
        Load a history file into memory, truncating to default max size.
        Throws:
        java.io.IOException
      • FileHistory

        public FileHistory​(java.io.File file,
                           boolean doInit)
                    throws java.io.IOException
        Create a FileHistory, but only initialize if doInit is true. This allows setting maxSize or other settings; call load() before using if doInit is false.
        Throws:
        java.io.IOException
    • Method Detail

      • load

        public void load()
                  throws java.io.IOException
        Load history from file, e.g. if using delayed init.
        Throws:
        java.io.IOException
      • getFile

        public java.io.File getFile()
      • load

        public void load​(java.io.File file)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • load

        public void load​(java.io.InputStream input)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • load

        public void load​(java.io.Reader reader)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Description copied from interface: PersistentHistory
        Flush all items to persistent storage.
        Specified by:
        flush in interface java.io.Flushable
        Specified by:
        flush in interface PersistentHistory
        Throws:
        java.io.IOException - Flush failed