Package org.apache.tomcat.util.buf
Class B2CConverter
- java.lang.Object
- 
- org.apache.tomcat.util.buf.B2CConverter
 
- 
 public class B2CConverter extends java.lang.ObjectNIO based character decoder.
- 
- 
Field SummaryFields Modifier and Type Field Description protected static intLEFTOVER_SIZE
 - 
Constructor SummaryConstructors Constructor Description B2CConverter(java.nio.charset.Charset charset)B2CConverter(java.nio.charset.Charset charset, boolean replaceOnError)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconvert(java.nio.ByteBuffer bc, java.nio.CharBuffer cc, ByteChunk.ByteInputChannel ic, boolean endOfInput)Convert the given bytes to characters.voidconvert(ByteChunk bc, CharChunk cc, boolean endOfInput)Convert the given bytes to characters.java.nio.charset.CharsetgetCharset()static java.nio.charset.CharsetgetCharset(java.lang.String enc)Obtain the Charset for the given encodingvoidrecycle()Reset the decoder state.
 
- 
- 
- 
Field Detail- 
LEFTOVER_SIZEprotected static final int LEFTOVER_SIZE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getCharsetpublic static java.nio.charset.Charset getCharset(java.lang.String enc) throws java.io.UnsupportedEncodingExceptionObtain 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:
- java.io.UnsupportedEncodingException- If the requested Charset is not available
 
 - 
recyclepublic void recycle() Reset the decoder state.
 - 
convertpublic void convert(ByteChunk bc, CharChunk cc, boolean endOfInput) throws java.io.IOException Convert the given bytes to characters.- Parameters:
- bc- byte input
- cc- char output
- endOfInput- Is this all of the available data
- Throws:
- java.io.IOException- If the conversion can not be completed
 
 - 
convertpublic void convert(java.nio.ByteBuffer bc, java.nio.CharBuffer cc, ByteChunk.ByteInputChannel ic, boolean endOfInput) throws java.io.IOExceptionConvert 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:
- java.io.IOException- If the conversion can not be completed
 
 - 
getCharsetpublic java.nio.charset.Charset getCharset() 
 
- 
 
-