|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.commons.lang.ByteBuffer
public class ByteBuffer
class to handle characters, similar to StringBuffer, but dont copy big blocks of char arrays.
Constructor Summary | |
---|---|
ByteBuffer(String charset)
default constructor |
|
ByteBuffer(String charset,
int size)
constructor with size of the buffer |
Method Summary | |
---|---|
void |
append(byte[] c)
|
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()
|
static void |
main(String[] args)
|
int |
size()
|
String |
toString()
|
void |
writeOut(OutputStream os)
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 ByteBuffer(String charset)
public ByteBuffer(String charset, int size)
size
- Method Detail |
---|
public void append(char c) throws IOException
IOException
public void append(char[] c) throws IOException
c
- char array to append
IOException
public void append(byte[] c)
public void append(char[] c, int off, int len) throws IOException
c
- char array to get part fromoff
- start index on the char arraylen
- length of the sequenz to get from array
IOException
public void append(String str) throws IOException
str
- String to append
IOException
public void append(String str, int off, int len) throws IOException
str
- string to get part fromoff
- start index on the stringlen
- length of the sequenz to get from string
IOException
public void writeOut(OutputStream os) throws IOException
writer
- writer to write inside
IOException
public String toString()
toString
in class Object
public void clear()
public int size()
public byte[] getBytes()
public static void main(String[] args) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |