Class StringBuilderEncoder

java.lang.Object
org.apache.logging.log4j.core.layout.StringBuilderEncoder
All Implemented Interfaces:
Encoder<StringBuilder>

public class StringBuilderEncoder extends Object implements Encoder<StringBuilder>
Encoder for StringBuilders that uses ThreadLocals to avoid locking as much as possible.
  • Constructor Details

    • StringBuilderEncoder

      public StringBuilderEncoder(Charset charset)
    • StringBuilderEncoder

      public StringBuilderEncoder(Charset charset, int charBufferSize, int byteBufferSize)
  • Method Details

    • encode

      public void encode(StringBuilder source, ByteBufferDestination destination)
      Description copied from interface: Encoder
      Encodes the specified source object to some binary representation and writes the result to the specified destination.
      Specified by:
      encode in interface Encoder<StringBuilder>
      Parameters:
      source - the object to encode.
      destination - holds the ByteBuffer to write into.