Package org.apache.http.util
Class CharArrayBuffer
java.lang.Object
org.apache.http.util.CharArrayBuffer
public final class CharArrayBuffer extends Object
A resizable char array.
- Since:
- 4.0
- Version:
- $Revision: 496070 $
- Author:
- Oleg Kalnichevski
-
Constructor Summary
Constructors Constructor Description CharArrayBuffer(int capacity) -
Method Summary
Modifier and Type Method Description voidappend(byte[] b, int off, int len)voidappend(char ch)voidappend(char[] b, int off, int len)voidappend(Object obj)voidappend(String str)voidappend(ByteArrayBuffer b, int off, int len)voidappend(CharArrayBuffer b)voidappend(CharArrayBuffer b, int off, int len)char[]buffer()intcapacity()charcharAt(int i)voidclear()voidensureCapacity(int required)intindexOf(int ch)intindexOf(int ch, int beginIndex, int endIndex)booleanisEmpty()booleanisFull()intlength()voidsetLength(int len)Stringsubstring(int beginIndex, int endIndex)StringsubstringTrimmed(int beginIndex, int endIndex)char[]toCharArray()StringtoString()Returns a string containing a concise, human-readable description of this object.
-
Constructor Details
-
CharArrayBuffer
public CharArrayBuffer(int capacity)
-
-
Method Details
-
append
public void append(char[] b, int off, int len) -
append
-
append
-
append
-
append
public void append(char ch) -
append
public void append(byte[] b, int off, int len) -
append
-
append
-
clear
public void clear() -
toCharArray
public char[] toCharArray() -
charAt
public char charAt(int i) -
buffer
public char[] buffer() -
capacity
public int capacity() -
length
public int length() -
ensureCapacity
public void ensureCapacity(int required) -
setLength
public void setLength(int len) -
isEmpty
public boolean isEmpty() -
isFull
public boolean isFull() -
indexOf
public int indexOf(int ch, int beginIndex, int endIndex) -
indexOf
public int indexOf(int ch) -
substring
-
substringTrimmed
-
toString
Description copied from class:ObjectReturns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toStringmethod if you intend implementing your owntoStringmethod.
-