public final class StringBuffer
extends AbstractStringBuilder
implements java.io.Serializable, CharSequence
extends AbstractStringBuilder
implements java.io.Serializable, CharSequence
{
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
s.defaultWriteObject();
s.writeInt(count);
s.writeObject(value);
}
/**
* readObject is called to restore the state of the StringBuffer from
* a stream.
*/
private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
count = s.readInt();
value = (char[]) s.readObject();
}
}
其它方法继承了它的父类,public +返回值类型+方法名,不是同步的。