Class LockingStringBuilderEncoder

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

public class LockingStringBuilderEncoder extends Object implements Encoder<StringBuilder>
Encoder for StringBuilders that locks on the ByteBufferDestination.
  • Constructor Details

    • LockingStringBuilderEncoder

      public LockingStringBuilderEncoder(Charset charset)
    • LockingStringBuilderEncoder

      public LockingStringBuilderEncoder(Charset charset, int charBufferSize)
  • 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.