com.sshtools.daemon.terminal
Class CharBuffer

java.lang.Object
  extended by com.sshtools.daemon.terminal.CharBuffer
Direct Known Subclasses:
Editline.Buffer, UserInput.Buffer

 class CharBuffer
extends java.lang.Object


Field Summary
private  java.util.Vector myBuffer
           
private  int mySize
           
 
Constructor Summary
CharBuffer(int size)
          Creates a new CharBuffer object.
 
Method Summary
 void append(char aChar)
           
 void clear()
           
 void ensureSpace(int chars)
           
 char getCharAt(int pos)
           
 void insertCharAt(int pos, char ch)
           
 void removeCharAt(int pos)
           
 void setCharAt(int pos, char ch)
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myBuffer

private java.util.Vector myBuffer

mySize

private int mySize
Constructor Detail

CharBuffer

public CharBuffer(int size)
Creates a new CharBuffer object.

Parameters:
size -
Method Detail

getCharAt

public char getCharAt(int pos)
               throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

setCharAt

public void setCharAt(int pos,
                      char ch)
               throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

insertCharAt

public void insertCharAt(int pos,
                         char ch)
                  throws BufferOverflowException,
                         java.lang.IndexOutOfBoundsException
Throws:
BufferOverflowException
java.lang.IndexOutOfBoundsException

append

public void append(char aChar)
            throws BufferOverflowException
Throws:
BufferOverflowException

removeCharAt

public void removeCharAt(int pos)
                  throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

clear

public void clear()

size

public int size()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

ensureSpace

public void ensureSpace(int chars)
                 throws BufferOverflowException
Throws:
BufferOverflowException