public class ByteBuffer extends Object
Constructor and Description |
---|
ByteBuffer(String charset)
default constructor
|
ByteBuffer(String charset,
int size)
constructor with size of the buffer
|
Modifier and Type | Method and Description |
---|---|
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() |
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.
|
public ByteBuffer(String charset)
public ByteBuffer(String charset, int size)
size
- public void append(char c) throws IOException
IOException
public void append(char[] c) throws IOException
c
- char array to appendIOException
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 arrayIOException
public void append(String str) throws IOException
str
- String to appendIOException
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 stringIOException
public void writeOut(OutputStream os) throws IOException
writer
- writer to write insideIOException
public void clear()
public int size()
public byte[] getBytes()
Copyright © 2015 Lucee