public void write(char b) {
    if (len >= buf.length) {
      resize(len +1);
    }
    unsafeWrite(b);
  }
A StringBuilder that allows one to access the array.
linguistics/src/main/java/com/yahoo/language/simple/kstem/OpenStringBuilder.java