Class CharacterBuffer


  • public class CharacterBuffer
    extends java.lang.Object
    This class represents a variable-length buffer for characters.
    • Constructor Summary

      Constructors 
      Constructor Description
      CharacterBuffer()
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendChar​(char b)
      Add a char to the buffer at the end.
      void clear()
      Clear the buffer.
      char readChar​(int position)
      Read a byte from the buffer from the specified place.
      int size()
      Get the current buffer length.
      • Methods inherited from class java.lang.Object

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

      • arrayOfArrays

        protected final java.util.List<char[]> arrayOfArrays
      • totalChars

        protected int totalChars
      • currentIndex

        protected int currentIndex
      • currentBuffer

        protected char[] currentBuffer
    • Constructor Detail

      • CharacterBuffer

        public CharacterBuffer()
        Constructor
    • Method Detail

      • clear

        public void clear()
        Clear the buffer.
      • size

        public int size()
        Get the current buffer length.
      • appendChar

        public void appendChar​(char b)
        Add a char to the buffer at the end.
      • readChar

        public char readChar​(int position)
        Read a byte from the buffer from the specified place.