org.apache.karaf.shell.console.jline
Class KarafFileHistory

java.lang.Object
  extended by jline.console.history.MemoryHistory
      extended by jline.console.history.FileHistory
          extended by org.apache.karaf.shell.console.jline.KarafFileHistory
All Implemented Interfaces:
Flushable, Iterable<jline.console.history.History.Entry>, jline.console.history.History, jline.console.history.PersistentHistory

public final class KarafFileHistory
extends jline.console.history.FileHistory

Override the FileHistory impl to trap failures due to the user does not having write access to the history file.


Nested Class Summary
 
Nested classes/interfaces inherited from interface jline.console.history.History
jline.console.history.History.Entry
 
Field Summary
 
Fields inherited from class jline.console.history.MemoryHistory
DEFAULT_MAX_SIZE
 
Constructor Summary
KarafFileHistory(File file)
           
 
Method Summary
 void add(CharSequence item)
           
 void flush()
           
 void load(Reader reader)
           
 void purge()
           
 
Methods inherited from class jline.console.history.FileHistory
getFile, load, load
 
Methods inherited from class jline.console.history.MemoryHistory
clear, current, entries, entries, get, getMaxSize, index, internalAdd, isAutoTrim, isEmpty, isIgnoreDuplicates, iterator, moveTo, moveToEnd, moveToFirst, moveToLast, next, previous, remove, removeFirst, removeLast, replace, set, setAutoTrim, setIgnoreDuplicates, setMaxSize, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jline.console.history.History
clear, current, entries, entries, get, index, isEmpty, iterator, moveTo, moveToEnd, moveToFirst, moveToLast, next, previous, remove, removeFirst, removeLast, replace, set, size
 

Constructor Detail

KarafFileHistory

public KarafFileHistory(File file)
                 throws IOException
Throws:
IOException
Method Detail

add

public void add(CharSequence item)
Specified by:
add in interface jline.console.history.History
Overrides:
add in class jline.console.history.MemoryHistory

load

public void load(Reader reader)
          throws IOException
Overrides:
load in class jline.console.history.FileHistory
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Specified by:
flush in interface jline.console.history.PersistentHistory
Overrides:
flush in class jline.console.history.FileHistory
Throws:
IOException

purge

public void purge()
           throws IOException
Specified by:
purge in interface jline.console.history.PersistentHistory
Overrides:
purge in class jline.console.history.FileHistory
Throws:
IOException


Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.