Home » apache-tomcat-6.0.26-src » org.apache » tomcat » util » buf » [javadoc | source]
public class: B2CConverter [javadoc | source]

Direct Known Subclasses:

Efficient conversion of bytes to character . This uses the standard JDK mechansim - a reader - but provides mechanisms to recycle all the objects that are used. It is compatible with JDK1.1 and up, ( nio is better, but it's not available even in 1.2 or 1.3 ) Not used in the current code, the performance gain is not very big in the current case ( since String is created anyway ), but it will be used in a later version or after the remaining optimizations.
Field Summary
static final  int BUFFER_SIZE     
 char[] result     
 protected B2CConverter() 
 public B2CConverter(String encoding) throws IOException 
    Create a converter, with bytes going to a byte buffer
Method from org.apache.tomcat.util.buf.B2CConverter Summary:
convert,   convert,   log,   recycle,   reset
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tomcat.util.buf.B2CConverter Detail:
 public  void convert(ByteChunk bb,
    CharChunk cb) throws IOException 
    Convert a buffer of bytes into a chars
 public  void convert(ByteChunk bb,
    CharChunk cb,
    int limit) throws IOException 
  void log(String s) 
 public  void recycle() 
    Reset the internal state, empty the buffers. The encoding remain in effect, the internal buffers remain allocated.
 public  void reset() throws IOException