Class StringBuffer


  • public class StringBuffer
    extends DataBuffer<String>
    Represent a buffer of String.
    • Method Detail

      • allocate

        public static StringBuffer allocate​(int size)
        Allocate a StringBuffer with fixed size
        Parameters:
        size - the target buffer size
        Returns:
        a StringBuffer with fixed size
      • flip

        public void flip()
        Description copied from class: DataBuffer
        Flip all the buffers. Make them all readable.
        Specified by:
        flip in class DataBuffer<String>
      • put

        public void put​(String s)
        Description copied from class: DataBuffer
        Put the element into the buffer
        Specified by:
        put in class DataBuffer<String>
        Parameters:
        s - the element need to be put in the buffer
      • get

        public String get()
        Description copied from class: DataBuffer
        Get element in the buffer in order
        Specified by:
        get in class DataBuffer<String>
        Returns:
        element in the buffer in order
      • get

        public String get​(int index)
        Description copied from class: DataBuffer
        Get element in the buffer by index
        Specified by:
        get in class DataBuffer<String>
        Parameters:
        index - the element index
        Returns:
        element in the index of the buffer