|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ajax4jsf.io.CharBuffer
public class CharBuffer
A single link in chain of char arrays.
Constructor Summary | |
---|---|
CharBuffer(char[] chars)
Creates instance of CharBuffer already filled by chars. |
|
CharBuffer(int cacheSize)
Creates instance of CharBuffer with char array of required length. |
Method Summary | |
---|---|
CharBuffer |
append(char c)
Appends character to array chars if there are unfilled positions in it. |
CharBuffer |
append(char[] cs,
int off,
int len)
Appends segment of a char array to array if there are unfilled positions in it. |
void |
compact()
|
int |
getCacheSize()
Returns capacity of this link. |
char |
getCharAt(int index)
Returns character at index. |
char[] |
getChars()
Returns stored char array. |
CharBuffer |
getNext()
Returns the next link in the chain. |
CharBuffer |
getPrevious()
Returns the previous link in the chain. |
int |
getTotalSize()
Returns total number of characters stored in this link and all its predecessors. |
int |
getUsedSize()
Returns actual number of characters stored in this link. |
void |
reset()
Resets this char buffer to empty state |
void |
setNext(CharBuffer b)
Sets the next link in the chain. |
ByteBuffer |
toByteBuffer()
Transforms this instance to instance of ByteBuffer (a link of chain of byte arrays). |
ByteBuffer |
toByteBuffer(String encoding)
Transforms this instance to instance of ByteBuffer (a link of chain of byte arrays). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CharBuffer(char[] chars)
bytes
- public CharBuffer(int cacheSize)
cacheSize
- length of char arrayMethod Detail |
---|
public CharBuffer append(char c)
c
-
public CharBuffer append(char[] cs, int off, int len)
c
-
public char[] getChars()
public char getCharAt(int index)
index
-
public int getUsedSize()
public int getCacheSize()
public int getTotalSize()
public CharBuffer getPrevious()
public CharBuffer getNext()
public void setNext(CharBuffer b)
b
- public ByteBuffer toByteBuffer(String encoding) throws UnsupportedEncodingException
encoding
-
UnsupportedEncodingException
public ByteBuffer toByteBuffer()
public void reset()
public void compact()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |