public class B2CConverter extends Object
Modifier and Type | Field and Description |
---|---|
protected ByteBuffer |
bb |
protected CharBuffer |
cb |
protected CharsetDecoder |
decoder |
protected ByteBuffer |
leftovers
Leftover buffer used for incomplete characters.
|
Constructor and Description |
---|
B2CConverter(String charset)
Create a decoder for the specified charset.
|
Modifier and Type | Method and Description |
---|---|
void |
convert(ByteChunk bc,
CharChunk cc)
Convert the given bytes to characters.
|
boolean |
isUndeflow() |
void |
recycle()
Reset the decoder state, and empty the leftover buffer.
|
protected CharsetDecoder decoder
protected ByteBuffer bb
protected CharBuffer cb
protected ByteBuffer leftovers
public B2CConverter(String charset) throws IOException
IOException
public void recycle()
public boolean isUndeflow()
public void convert(ByteChunk bc, CharChunk cc) throws IOException
bc
- byte inputcc
- char outputIOException
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.