public void defaultWriteObject(Object toWrite, FSTClazzInfo serializationInfo)
     throws IOException {
   if (serializationInfo.isExternalizable()) {
     codec.ensureFree(writeExternalWriteAhead);
     ((Externalizable) toWrite).writeExternal(this);
   } else {
     FSTClazzInfo.FSTFieldInfo[] fieldInfo = serializationInfo.getFieldInfo();
     writeObjectFields(toWrite, serializationInfo, fieldInfo, 0, 0);
   }
 }
 public void ensureFree(int bytes) throws IOException {
   codec.ensureFree(bytes);
 }