org.apache.tomcat.util.buf

Class UTF8Decoder


public final class UTF8Decoder
extends B2CConverter

Moved from ByteChunk - code to convert from UTF8 bytes to chars. Not used in the current tomcat3.3 : the performance gain is not very big if the String is created, only if we avoid that and work only on char[]. Until than, it's better to be safe. ( I tested this code with 2 and 3 bytes chars, and it works fine in xerces ) Cut from xerces' UTF8Reader.copyMultiByteCharData()

Authors:
Costin Manolache
( Xml-Xerces )

Constructor Summary

UTF8Decoder()

Method Summary

void
convert(ByteChunk mb, CharChunk cb)
void
recycle()

Methods inherited from class org.apache.tomcat.util.buf.B2CConverter

convert, recycle, reset

Constructor Details

UTF8Decoder

public UTF8Decoder()

Method Details

convert

public void convert(ByteChunk mb,
                    CharChunk cb)
            throws IOException
Overrides:
convert in interface B2CConverter


recycle

public void recycle()
Overrides:
recycle in interface B2CConverter


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.