Class OpenStringBuilder

  • All Implemented Interfaces:
    java.lang.Appendable, java.lang.CharSequence

    public class OpenStringBuilder
    extends java.lang.Object
    implements java.lang.Appendable, java.lang.CharSequence
    A StringBuilder that allows one to access the array.
    • Constructor Detail

      • OpenStringBuilder

        public OpenStringBuilder()
      • OpenStringBuilder

        public OpenStringBuilder​(int size)
      • OpenStringBuilder

        public OpenStringBuilder​(char[] arr,
                                 int len)
    • Method Detail

      • setLength

        public void setLength​(int len)
      • set

        public void set​(char[] arr,
                        int end)
      • getArray

        public char[] getArray()
      • size

        public int size()
      • length

        public int length()
        Specified by:
        length in interface java.lang.CharSequence
      • capacity

        public int capacity()
      • append

        public java.lang.Appendable append​(java.lang.CharSequence csq)
        Specified by:
        append in interface java.lang.Appendable
      • append

        public java.lang.Appendable append​(java.lang.CharSequence csq,
                                           int start,
                                           int end)
        Specified by:
        append in interface java.lang.Appendable
      • append

        public java.lang.Appendable append​(char c)
        Specified by:
        append in interface java.lang.Appendable
      • charAt

        public char charAt​(int index)
        Specified by:
        charAt in interface java.lang.CharSequence
      • setCharAt

        public void setCharAt​(int index,
                              char ch)
      • subSequence

        public java.lang.CharSequence subSequence​(int start,
                                                  int end)
        Specified by:
        subSequence in interface java.lang.CharSequence
      • unsafeWrite

        public void unsafeWrite​(char b)
      • unsafeWrite

        public void unsafeWrite​(int b)
      • unsafeWrite

        public void unsafeWrite​(char[] b,
                                int off,
                                int len)
      • reserve

        public void reserve​(int num)
      • write

        public void write​(char b)
      • write

        public void write​(int b)
      • write

        public final void write​(char[] b)
      • write

        public void write​(char[] b,
                          int off,
                          int len)
      • write

        public void write​(java.lang.String s)
      • flush

        public void flush()
      • reset

        public final void reset()
      • toCharArray

        public char[] toCharArray()
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface java.lang.CharSequence
        Overrides:
        toString in class java.lang.Object