Package org.apache.tomcat.util.buf
Buffers and Encodings
This package contains buffers and utils to perform encoding/decoding of buffers.
Ascii | This class implements some basic ASCII character handling functions. |
B2CConverter | Efficient conversion of bytes to character . |
Base64 | This class provides encode/decode for RFC 2045 Base64 as
defined by RFC 2045, N. |
ByteChunk | This class is used to represent a chunk of bytes, and
utilities to manipulate byte[]. |
C2BConverter | Efficient conversion of character to bytes. |
CharChunk | Utilities to manipluate char chunks. |
DateTool | Common place for date utils. |
HexUtils | Library of utility methods useful in dealing with converting byte arrays
to and from strings of hexadecimal digits. |
MessageBytes | This class is used to represent a subarray of bytes in an HTTP message. |
MessageBytes.MessageBytesFactory | |
TimeStamp | Main tool for object expiry. |
UDecoder | All URL decoding happens here. |
UEncoder | Efficient implementation for encoders. |
UTF8Decoder | Moved from ByteChunk - code to convert from UTF8 bytes to chars. |
Buffers and Encodings
This package contains buffers and utils to perform encoding/decoding of buffers. That includes byte to char
conversions, URL encodings, etc.
Encoding is a critical operation for performance. There are few tricks in this package - the C2B and
B2C converters are caching a ISReader/OSWriter and keep everything allocated to do the conversions
in any VM without any garbage.
This package must accomodate future extensions and additional converters ( most imporant: the nio.charset,
which should be detected and used if available ). Also, we do have one hand-written UTF8Decoder, and
other tuned encoders could be added.
My benchmarks ( I'm costin :-) show only small differences between C2B, B2C and hand-written codders/decoders,
so UTF8Decoder may be disabled.
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.