public class

FileHistory

extends MemoryHistory
implements Flushable PersistentHistory
java.lang.Object
   ↳ jline.console.history.MemoryHistory
     ↳ jline.console.history.FileHistory

Class Overview

History using a file for persistent backing.

Implementers should install shutdown hook to call flush() to save history to disk.

Summary

[Expand]
Inherited Constants
From class jline.console.history.MemoryHistory
Public Constructors
FileHistory(File file)
Public Methods
void flush()
Flush all items to persistent storage.
File getFile()
void load(InputStream input)
void load(File file)
void load(Reader reader)
void purge()
Purge persistent storage and clear().
[Expand]
Inherited Methods
From class jline.console.history.MemoryHistory
From class java.lang.Object
From interface java.io.Flushable
From interface java.lang.Iterable
From interface jline.console.history.History
From interface jline.console.history.PersistentHistory

Public Constructors

public FileHistory (File file)

Throws
IOException

Public Methods

public void flush ()

Flush all items to persistent storage.

Throws
IOException

public File getFile ()

public void load (InputStream input)

Throws
IOException

public void load (File file)

Throws
IOException

public void load (Reader reader)

Throws
IOException

public void purge ()

Purge persistent storage and clear().

Throws
IOException