org.jboss.portal.common.text
Class CharBuffer
java.lang.Object
org.jboss.portal.common.text.CharBuffer
- All Implemented Interfaces:
- CharWriter
- Direct Known Subclasses:
- ServerInvocationContextImpl.Buffer
public class CharBuffer
- extends java.lang.Object
- implements CharWriter
A simple char buffer.
- Version:
- $Revision: 7228 $
- Author:
- Julien Viet
Field Summary |
protected char[] |
buffer
. |
protected int |
length
. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffer
protected char[] buffer
- .
length
protected int length
- .
CharBuffer
public CharBuffer(int size)
throws java.lang.IllegalArgumentException
- Parameters:
size
- the initial size
- Throws:
java.lang.IllegalArgumentException
- if the initial size is not a positive value.
CharBuffer
public CharBuffer()
append
public CharBuffer append(java.lang.String s,
CharEncoder encoder)
append
public CharWriter append(java.lang.CharSequence s)
- Specified by:
append
in interface CharWriter
append
public CharWriter append(char[] chars,
int off,
int len)
- Specified by:
append
in interface CharWriter
append
public CharWriter append(char c)
- Specified by:
append
in interface CharWriter
append
public CharWriter append(char[] chars)
- Specified by:
append
in interface CharWriter
asString
public java.lang.String asString()
asString
public java.lang.String asString(boolean reset)
getCapacity
public int getCapacity()
getLength
public int getLength()
setLength
public void setLength(int length)
reset
public void reset()
appendNoCheck
protected final void appendNoCheck(char[] chars,
int off,
int len)
appendNoCheck
protected final void appendNoCheck(java.lang.CharSequence s)
ensureCapacity
protected final void ensureCapacity(int minimumCapacity)