public final class C2BConverter extends Object
Modifier and Type | Field and Description |
---|---|
protected ByteBuffer |
bb |
protected CharBuffer |
cb |
protected CharsetEncoder |
encoder |
protected CharBuffer |
leftovers
Leftover buffer used for multi-characters characters.
|
Constructor and Description |
---|
C2BConverter(String encoding) |
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 CharsetEncoder encoder
protected ByteBuffer bb
protected CharBuffer cb
protected CharBuffer leftovers
public C2BConverter(String encoding) throws IOException
IOException
public void recycle()
public boolean isUndeflow()
public void convert(CharChunk cc, ByteChunk bc) throws IOException
cc
- char inputbc
- byte outputIOException
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.