Package org.apache.tomcat.util.buf
Class B2CConverter
java.lang.Object
org.apache.tomcat.util.buf.B2CConverter
NIO based character decoder.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionB2CConverter(Charset charset) B2CConverter(Charset charset, boolean replaceOnError) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidconvert(ByteBuffer bc, CharBuffer cc, ByteChunk.ByteInputChannel ic, boolean endOfInput) Convert the given bytes to characters.voidConvert the given bytes to characters.static CharsetgetCharset(String enc) Obtain the Charset for the given encodingvoidrecycle()Reset the decoder state.
- 
Field Details- 
LEFTOVER_SIZEprotected static final int LEFTOVER_SIZE- See Also:
 
 
- 
- 
Constructor Details- 
B2CConverter
- 
B2CConverter
 
- 
- 
Method Details- 
getCharsetObtain the Charset for the given encoding- Parameters:
- enc- The name of the encoding for the required charset
- Returns:
- The Charset corresponding to the requested encoding
- Throws:
- UnsupportedEncodingException- If the requested Charset is not available
 
- 
recyclepublic void recycle()Reset the decoder state.
- 
convertConvert the given bytes to characters.- Parameters:
- bc- byte input
- cc- char output
- endOfInput- Is this all of the available data
- Throws:
- IOException- If the conversion can not be completed
 
- 
convertpublic void convert(ByteBuffer bc, CharBuffer cc, ByteChunk.ByteInputChannel ic, boolean endOfInput) throws IOException Convert the given bytes to characters.- Parameters:
- bc- byte input
- cc- char output
- ic- byte input channel
- endOfInput- Is this all of the available data
- Throws:
- IOException- If the conversion can not be completed
 
- 
getCharset
 
-