org.apache.tomcat.util.buf
Class C2BConverter
java.lang.Object
org.apache.tomcat.util.buf.C2BConverter
public class C2BConverter
- extends java.lang.Object
NIO based character encoder.
- Author:
- Remy Maucherat
Field Summary |
protected java.nio.ByteBuffer |
bb
|
protected java.nio.CharBuffer |
cb
|
protected java.nio.charset.CharsetEncoder |
encoder
|
protected static org.jboss.logging.Logger |
log
|
Constructor Summary |
C2BConverter(java.lang.String charset)
Create an encoder for the specified charset. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static org.jboss.logging.Logger log
encoder
protected java.nio.charset.CharsetEncoder encoder
bb
protected java.nio.ByteBuffer bb
cb
protected java.nio.CharBuffer cb
C2BConverter
public C2BConverter(java.lang.String charset)
throws java.io.IOException
- Create an encoder for the specified charset.
- Throws:
java.io.IOException
recycle
public void recycle()
- Reset the encoder state.
convert
public void convert(CharChunk cc,
ByteChunk bc)
throws java.io.IOException
- Convert the given characters to bytes.
- Parameters:
cc
- char inputbc
- byte output
- Throws:
java.io.IOException
Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.