docs: private void write(ManagedObject managedObject)
                      throws ObjectManagerException
      {
          final String methodName = "write";
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.entry(this,
                          cclass,
                          methodName,
                          new Object[] { managedObject });
  
          // Pick up and write the latest serialized bytes.
          ObjectManagerByteArrayOutputStream serializedBytes = null;
          if (usesSerializedForm) {
              // Pick up and write the latest serialized bytes.
  
              // It is possible that several threads requested a write one after the
              // other each getting the request added to a different managedObjetsToWrite table,
              // however the first of these through here will clear serializedBytes.
              // It is also possible that the transaction state of the managed object
              // was restored from a checkpoint, in which case the serialized object
              // may already be in the ObjectStore, and the serializedBytes will again be null.
  
              // Is the Object deleted? It may have got deleted after we release the
              // synchronize lock when we
              // captured the tokensToWrite hashtable but before we actually try to write it.
              if (managedObject.state != ManagedObject.stateDeleted)
                  serializedBytes = managedObject.freeLatestSerializedBytes();
  
          } else {
              // Not logged so use the current serialized bytes, as long as its not part of a transaction.
              // If it is part of a transaction then the transaction will hold the ManagedObject in memory.
              // Not locked because this is only used by SAVE_ONLY_ON_SHUTDOWN stores at shutdown
              // when no appliaction threads are active.
              if (managedObject.state == ManagedObject.stateReady)
                  serializedBytes = managedObject.getSerializedBytes();
          } // if ( usesSerializedForm ).
  
          // It is possible that several threads requested a write one after the other each getting the request added
          // to a different tokensToWrite table, however the first of these through here will clear serializedBytes.
          if (serializedBytes != null) { // Already done by another thread?
              try {
                  java.io.FileOutputStream storeFileOutputStream = new java.io.FileOutputStream(storeDirectoryName
                                                                                                + java.io.File.separator
                                                                                                + managedObject.owningToken.storedObjectIdentifier);
                  storeFileOutputStream.write(serializedBytes.getBuffer(), 0, serializedBytes.getCount());
                  storeFileOutputStream.flush();
                  storeFileOutputStream.close();
  
              } catch (java.io.IOException exception) {
                  // No FFDC Code Needed.
                  ObjectManager.ffdc.processException(this,
                                                      cclass,
                                                      methodName,
                                                      exception,
                                                      "1:656:1.17");
  
                  if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                      trace.exit(this,
                                 cclass,
                                 methodName,
                                 new Object[] { exception });
                  throw new PermanentIOException(this,
                                                 exception);
              } // catch java.io.IOException.
  
              managedObjectsOnDisk.add(new Long(managedObject.owningToken.storedObjectIdentifier));
          } // if (serializedBytes != null ).
  
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.exit(this,
                         cclass,
                         methodName);
      }