Package org.apache.tomcat.util.buf


package org.apache.tomcat.util.buf

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 an ISReader/OSWriter and keep everything allocated to do the conversions in any VM without any garbage.

This package must accommodate future extensions and additional converters.

  • Class
    Description
    Base class for the *Chunk implementation to reduce duplication.
    This class implements some basic ASCII character handling functions.
    This is a very basic ASN.1 parser that provides the limited functionality required by Tomcat.
    Utility class for writing ASN.1 DER-encoded data structures.
    NIO based character decoder.
    Simple wrapper for a ByteBuffer that remembers if the buffer has been flipped or not.
    Utility methods for working with ByteBuffer instances.
    This class is used to represent a chunk of bytes, and utilities to manipulate byte[].
    Exception thrown when a byte chunk buffer overflows.
    Input interface, used when the buffer is empty.
    When we need more space we'll either grow the buffer ( up to the limit ) or send it to a channel.
    NIO based character encoder.
    Utilities to manipulate char chunks.
    Input interface, used when the buffer is empty.
    When we need more space we'll either grow the buffer ( up to the limit ) or send it to a channel.
    Cache for Charset instances.
    Utility methods for charset operations.
    Enumerates the possible handling strategies for encoded solidus characters (%2F) in URI paths.
    Tables useful when converting byte arrays to and from strings of hexadecimal digits.
    This class is used to represent a sub array of bytes in an HTTP message.
    This class implements a String cache for ByteChunk and CharChunk.
    Cache entry for byte chunk to String mapping.
    Cache entry for char chunk to String mapping.
    Utility methods to build a separated list from a given set (not java.util.Set) of inputs and return that list as a string or append it to an existing StringBuilder.
    Utility class used to provide String representations of objects.
    All URL decoding happens here.
    Efficient implementation of a UTF-8 encoder.
    Pre-defined sets of safe characters for URL encoding.
    Utility class for working with URIs and URLs.
    Encodes characters as bytes using UTF-8.