currentPutField = null;
  public void writeFields() throws IOException  {    if (currentPutField == null)      throw new NotActiveException("writeFields can only be called after putFields has been called");    // putFields may be called more than once, but not writeFields.    markFieldsWritten();    currentPutField.write(this);    currentPutField = null;  }