public 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 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 CharsetEncoder encoder
protected ByteBuffer bb
protected CharBuffer cb
protected CharBuffer leftovers
public C2BConverter(String charset) throws IOException
IOException
public void recycle()
public boolean isUndeflow()
public void convert(CharChunk cc, ByteChunk bc) throws IOException
cc
- char inputbc
- byte outputIOException
Copyright © 2013 JBoss by Red Hat. All rights reserved.