- java.lang.Object
-
- java.io.Writer
-
- io.helidon.media.common.CharBuffer
-
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
public class CharBuffer extends Writer
A character buffer that acts as aWriter
and uses cachedchar[]
arrays.Instances of this class are not thread-safe.
-
-
Constructor Summary
Constructors Constructor Description CharBuffer()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
ByteBuffer
encode(Charset charset)
Returns the content encoded into the given character set.void
flush()
void
write(char[] cbuf, int off, int len)
-
-
-
Method Detail
-
encode
public ByteBuffer encode(Charset charset)
Returns the content encoded into the given character set.- Parameters:
charset
- The character set.- Returns:
- The encoded content.
-
flush
public void flush()
-
-