public class CharBuffer extends Object implements CharWriter
CharWriter interface| Modifier and Type | Field and Description |
|---|---|
protected char[] |
buffer
.
|
protected int |
length
.
|
| Constructor and Description |
|---|
CharBuffer() |
CharBuffer(int size) |
| Modifier and Type | Method and Description |
|---|---|
CharWriter |
append(char c) |
CharWriter |
append(char[] chars) |
CharWriter |
append(char[] chars,
int off,
int len) |
CharWriter |
append(CharSequence s) |
CharBuffer |
append(String s,
CharEncoder encoder) |
protected void |
appendNoCheck(char[] chars,
int off,
int len) |
protected void |
appendNoCheck(CharSequence s) |
String |
asString() |
String |
asString(boolean reset) |
protected void |
ensureCapacity(int minimumCapacity) |
int |
getCapacity() |
int |
getLength() |
void |
reset() |
void |
setLength(int length) |
public CharBuffer(int size)
throws IllegalArgumentException
size - the initial sizeIllegalArgumentException - if the initial size is not a positive value.public CharBuffer()
public CharBuffer append(String s, CharEncoder encoder)
public CharWriter append(CharSequence s)
append in interface CharWriterpublic CharWriter append(char[] chars, int off, int len)
append in interface CharWriterpublic CharWriter append(char c)
append in interface CharWriterpublic CharWriter append(char[] chars)
append in interface CharWriterpublic String asString()
public String asString(boolean reset)
public int getCapacity()
public int getLength()
public void setLength(int length)
public void reset()
protected final void appendNoCheck(char[] chars,
int off,
int len)
protected final void appendNoCheck(CharSequence s)
protected final void ensureCapacity(int minimumCapacity)
Copyright © 2025 JBoss by Red Hat. All Rights Reserved.