Class PrependingStringBuffer


  • public class PrependingStringBuffer
    extends Object
    This is a prepending stringbuffer optimized for constantly prepending strings to the front of the buffer.
    Author:
    jcompagner
    • Constructor Detail

      • PrependingStringBuffer

        public PrependingStringBuffer()
        Default constructor, the internal initial buffer size will be 16
      • PrependingStringBuffer

        public PrependingStringBuffer​(int size)
        Constructs this PrependingStringBuffer with the given buffer size.
        Parameters:
        size - The initial size of the buffer.
      • PrependingStringBuffer

        public PrependingStringBuffer​(String start)
        Constructs and direct inserts the given string. The buffer size will be string.length+16
        Parameters:
        start - The string that is directly inserted.