|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.commons.lang.CharBuffer
public class CharBuffer
class to handle characters, similar to StringBuffer, but dont copy big blocks of char arrays.
Constructor Summary | |
---|---|
CharBuffer()
default constructor |
|
CharBuffer(int size)
constructor with size of the buffer |
Method Summary | |
---|---|
void |
append(char c)
|
void |
append(char[] c)
method to appennd a charr array to the buffer |
void |
append(char[] c,
int off,
int len)
method to append a part of a char array |
void |
append(String str)
Method to append a string to char buffer |
void |
append(String str,
int off,
int len)
method to append a part of a String |
void |
clear()
clear the content of the buffer |
byte[] |
getBytes(String characterEncoding)
|
int |
size()
|
char[] |
toCharArray()
return content of the Char Buffer as char array |
String |
toString()
|
void |
writeOut(OutputStream os,
String charset)
|
void |
writeOut(Writer writer)
method to writeout content of the char buffer in a writer, this is faster than get char array with (toCharArray()) and write this in writer. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CharBuffer()
public CharBuffer(int size)
size
- Method Detail |
---|
public void append(char c)
public void append(char[] c)
c
- char array to appendpublic void append(char[] c, int off, int len)
c
- char array to get part fromoff
- start index on the char arraylen
- length of the sequenz to get from arraypublic void append(String str)
str
- String to appendpublic void append(String str, int off, int len)
str
- string to get part fromoff
- start index on the stringlen
- length of the sequenz to get from stringpublic void writeOut(Writer writer) throws IOException
writer
- writer to write inside
IOException
public void writeOut(OutputStream os, String charset) throws IOException
IOException
public char[] toCharArray()
public String toString()
toString
in class Object
public void clear()
public int size()
public byte[] getBytes(String characterEncoding) throws UnsupportedEncodingException
UnsupportedEncodingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |