public class B2CConverter extends Object
Modifier and Type | Field and Description |
---|---|
static Charset |
ISO_8859_1 |
protected static int |
LEFTOVER_SIZE |
static Charset |
UTF_8 |
Constructor and Description |
---|
B2CConverter(String encoding) |
B2CConverter(String encoding,
boolean replaceOnError) |
Modifier and Type | Method and Description |
---|---|
void |
convert(ByteChunk bc,
CharChunk cc,
boolean endOfInput)
Convert the given bytes to characters.
|
static Charset |
getCharset(String enc) |
static Charset |
getCharsetLower(String lowerCaseEnc)
Only to be used when it is known that the encoding name is in lower case.
|
void |
recycle()
Reset the decoder state.
|
public static final Charset ISO_8859_1
public static final Charset UTF_8
protected static final int LEFTOVER_SIZE
public B2CConverter(String encoding) throws IOException
IOException
public B2CConverter(String encoding, boolean replaceOnError) throws IOException
IOException
public static Charset getCharset(String enc) throws UnsupportedEncodingException
UnsupportedEncodingException
public static Charset getCharsetLower(String lowerCaseEnc) throws UnsupportedEncodingException
lowerCaseEnc
- The name of the encoding for the required charset in
lower caseUnsupportedEncodingException
- If the requested Charset is not
availablepublic void recycle()
public void convert(ByteChunk bc, CharChunk cc, boolean endOfInput) throws IOException
bc
- byte inputcc
- char outputendOfInput
- Is this all of the available dataIOException
- If the conversion can not be completedCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.