|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vostok.io.CharBuffer
public class CharBuffer
CharBuffer is an array of char than can grow
Field Summary | |
---|---|
static int |
HUGE
|
static int |
INSANE
|
static int |
MEDIUM
|
static int |
TINY
|
Constructor Summary | |
---|---|
CharBuffer()
create a new GrowablecharBuffer with a default growby of 1024 |
|
CharBuffer(int growby)
create a new GrowablecharBuffer with a specific growing policy. use constant ou specify your own size (char). bigger growby is, faster the buffer is but bigger the memory use is too. |
Method Summary | |
---|---|
char[] |
copy()
return a newly allocated copy of the available data |
char[] |
get()
return a pointer on the current buffer. |
int |
getMaxSize()
return the maximum data this buffer can (currently) hold without resizing |
char[] |
getNew()
return a newly allocated array, reflecting the data of the buffer getNew().length==getSize() |
int |
getSize()
return the data length. |
void |
push(char b)
push a char on top of the buffer, increase buffer size if require |
void |
push(char[] b)
push chars on top of the buffer, increase buffer size if require |
void |
push(char[] b,
int length)
push chars - up to length - on top of the buffer, increase buffer size if require |
void |
truncate(int length)
truncate data to length. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TINY
public static final int MEDIUM
public static final int HUGE
public static final int INSANE
Constructor Detail |
---|
public CharBuffer()
public CharBuffer(int growby)
growby
- Method Detail |
---|
public void push(char b)
b
- public void push(char[] b)
b
- public void push(char[] b, int length)
b
- public char[] copy()
public char[] get()
public char[] getNew()
public void truncate(int length)
public int getSize()
public int getMaxSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |