Class StringBuilderEncoder

  • All Implemented Interfaces:
    Encoder<java.lang.StringBuilder>

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

      Constructors 
      Constructor Description
      StringBuilderEncoder​(java.nio.charset.Charset charset)  
      StringBuilderEncoder​(java.nio.charset.Charset charset, int charBufferSize, int byteBufferSize)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void encode​(java.lang.StringBuilder source, ByteBufferDestination destination)
      Encodes the specified source object to some binary representation and writes the result to the specified destination.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StringBuilderEncoder

        public StringBuilderEncoder​(java.nio.charset.Charset charset)
      • StringBuilderEncoder

        public StringBuilderEncoder​(java.nio.charset.Charset charset,
                                    int charBufferSize,
                                    int byteBufferSize)
    • Method Detail

      • encode

        public void encode​(java.lang.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<java.lang.StringBuilder>
        Parameters:
        source - the object to encode.
        destination - holds the ByteBuffer to write into.