code: private void readObject(java.io.ObjectInputStream s)
          throws java.io.IOException, ClassNotFoundException {
          s.defaultReadObject();
          int count = s.readInt();
          char[] value = (char[]) s.readObject();
          append(value, 0, count);
      }
docs: readObject is called to restore the state of the StringBuffer from
  a stream.