public class B2CConverter extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
LEFTOVER_SIZE |
Constructor and Description |
---|
B2CConverter(Charset charset) |
B2CConverter(Charset charset,
boolean replaceOnError) |
Modifier and Type | Method and Description |
---|---|
void |
convert(ByteBuffer bc,
CharBuffer cc,
ByteChunk.ByteInputChannel ic,
boolean endOfInput)
Convert the given bytes to characters.
|
void |
convert(ByteChunk bc,
CharChunk cc,
boolean endOfInput)
Convert the given bytes to characters.
|
Charset |
getCharset() |
static Charset |
getCharset(String enc)
Obtain the Charset for the given encoding
|
static Charset |
getCharsetLower(String lowerCaseEnc)
Deprecated.
Will be removed in Tomcat 9.0.x
|
void |
recycle()
Reset the decoder state.
|
protected static final int LEFTOVER_SIZE
public B2CConverter(Charset charset)
public B2CConverter(Charset charset, boolean replaceOnError)
public static Charset getCharset(String enc) throws UnsupportedEncodingException
enc
- The name of the encoding for the required charsetUnsupportedEncodingException
- If the requested Charset is not
available@Deprecated 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 completedpublic void convert(ByteBuffer bc, CharBuffer cc, ByteChunk.ByteInputChannel ic, boolean endOfInput) throws IOException
bc
- byte inputcc
- char outputic
- byte input channelendOfInput
- Is this all of the available dataIOException
- If the conversion can not be completedpublic Charset getCharset()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.