code: @Override
      public void write(ZooPC obj) {
          if (obj.getClass() == GenericObject.class) {
          	writeGeneric((GenericObject) obj);
          	return;
          }
          preWrite();
  
          //write object
          ds.writeObject(obj, cls);
  
          //updated index
          //This is buffered to reduce look-ups to find field indices.
          buffer[bufferCnt++] = obj;
          if (bufferCnt == BUFFER_SIZE) {
              flushBuffer();
          }
      }
docs: /* (non-Javadoc)
  @see org.zoodb.internal.model1p.DataSink#write(org.zoodb.api.impl.ZooPC)