jline
Class CursorBuffer
public class CursorBuffer
extends java.lang.Object
A CursorBuffer is a holder for a StringBuffer
that also contains the
current cursor position.
buffer
(package private) StringBuffer buffer
overtyping
private boolean overtyping
clearBuffer
public boolean clearBuffer()
current
public char current()
getBuffer
public StringBuffer getBuffer()
isOvertyping
public boolean isOvertyping()
length
public int length()
setBuffer
public void setBuffer(StringBuffer buffer)
setOvertyping
public void setOvertyping(boolean b)
toString
public String toString()
write
public void write(String str)
Insert the specified String
into the buffer, setting the cursor
to the end of the insertion point.
str
- the String to insert. Must not be null.
write
public void write(char c)
Write the specific character into the buffer, setting the cursor position
ahead one. The text may overwrite or insert based on the current setting
of isOvertyping().
c
- the character to insert