Interface CharsetStringBuilder

All Known Implementing Classes:
CharsetStringBuilder.DecoderStringBuilder, CharsetStringBuilder.Iso88591StringBuilder, CharsetStringBuilder.UsAsciiStringBuilder

public interface CharsetStringBuilder

Build a string from a sequence of bytes and/or characters.

Implementations of this interface are optimized for processing a mix of calls to already decoded character based appends (e.g. append(char) and calls to undecoded byte methods (e.g. append(byte). This is particularly useful for decoding % encoded strings that are mostly already decoded but may contain escaped byte sequences that are not decoded. The standard CharsetDecoder API is not well suited for this use-case.

Any coding errors in the string will be reported by a CharacterCodingException thrown from the build() method.

See Also: