public class C2BConverter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.nio.ByteBuffer |
bb |
protected java.nio.CharBuffer |
cb |
protected java.nio.charset.CharsetEncoder |
encoder |
protected java.nio.CharBuffer |
leftovers
Leftover buffer used for multi-characters characters.
|
protected static Logger |
log |
Constructor and Description |
---|
C2BConverter(java.lang.String charset)
Create an encoder for the specified charset.
|
Modifier and Type | Method and Description |
---|---|
void |
convert(CharChunk cc,
ByteChunk bc)
Convert the given characters to bytes.
|
boolean |
isUndeflow() |
void |
recycle()
Reset the encoder state.
|
protected static Logger log
protected java.nio.charset.CharsetEncoder encoder
protected java.nio.ByteBuffer bb
protected java.nio.CharBuffer cb
protected java.nio.CharBuffer leftovers
public C2BConverter(java.lang.String charset) throws java.io.IOException
java.io.IOException