These actions are performed when write() is called on this object.
174750
public function onBeforeWrite()
    {
        // save submitter if a Member is logged in
        $currentMember = Security::getCurrentUser();
        if (!$this->SubmitterID && $currentMember) {
            $this->SubmitterID = $currentMember->ID;
        }

        parent::onBeforeWrite();
    }
427734
@Override
	public void writeBlock(Buffer buffer) throws IOException {
		try {
			// if successfully added, the buffer will be recycled after the write operation
			addRequest(new BufferWriteRequest(this, buffer));
		} catch (Throwable e) {
			// if not added, we need to recycle here
			buffer.recycleBuffer();
			ExceptionUtils.rethrowIOException(e);
		}

	}
1322396
def do_write(self):
        
        while True:
            try:
                written = 0

                if hasattr(self.fd, 'send'):
                    written = self.fd.send(self.buffer)
                else:
                    written = os.write(self.fd.fileno(), self.buffer)

                self.buffer = self.buffer[written:]

                # try to close after writes if a close was requested
                if self.close_requested and len(self.buffer) == 0:
                    self.close()

                return written
            except EnvironmentError as e:
                if e.errno not in Stream.ERRNO_RECOVERABLE:
                    raise e
1296163
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
        // Write out capacity and any hidden stuff
        s.defaultWriteObject();
    }
567710
public function onAfterWrite()
    {
        parent::onAfterWrite();
        // Update all pages of this page type.
        foreach ($this->Pages() as $page){;
            $page->forceChange()->setPresets($this->Regions()->sort('Sort ASC'))->write();
        }
    }
1057348
public void writeObject (ObjectOutputStream out)
        throws IOException
    {
        int ecount = size();
        out.writeInt(ecount);
        for (IntEntry<V> entry : intEntrySet()) {
            out.writeInt(entry.getIntKey());
            out.writeObject(entry.getValue());
        }
    }
355229
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);
    }
278117
function () {
            this.writeToInput();

            if (this.options.onStart && typeof this.options.onStart === "function") {
                if (this.options.scope) {
                    this.options.onStart.call(this.options.scope, this.result);
                } else {
                    this.options.onStart(this.result);
                }
            }
        }
532928
public void write(PrintWriter out, boolean includeDoc) {
        // getValue() will update the timestamp (if relevant)
        T localValue = getValue();
        if (includeDoc) {
            out.println();
            Long lastUpdate = getLastUpdated();
            if (hasDoc() || lastUpdate != null) {
                out.print("# ");
                if (hasDoc()) {
                    out.print(makePropertiesSafe(getDoc(), null));
                }
                if (lastUpdate != null) {
                    out.print(" (last update: " + lastUpdate + ")");
                }
                out.println();
            }
        }
        out.println(toString());
    }
458899
public void onWrite(final SelectionKey key) {
    if (this.writeEventDispatcher == null) {
      dispatchWriteEvent(key);
    } else {
      this.writeEventDispatcher.dispatch(new WriteTask(key));
    }
  }
71460
public function onAfterWrite()
    {
        parent::onAfterWrite();

        //creation will only be considered if the object has no folder relation
        if ($this->owner->AssetsFolderID == 0) {
            $url = $this->owner->assetsFolderUrlToBeWritten();

            if ($url) {
                //this creates the directory, and attaches it to the page,
                //as well as saving the object one more time - with the attached folder
                $this->findOrMakeAssetsFolder($url, true);
            }
        }
    }
1305257
private void tryWriteBytes() throws IOException {
        lock.lock();
        try {
            // Iterate through the outbound ByteBuff queue, pushing as much as possible into the OS' network buffer.
            Iterator<ByteBuffer> bytesIterator = bytesToWrite.iterator();
            while (bytesIterator.hasNext()) {
                ByteBuffer buff = bytesIterator.next();
                bytesToWriteRemaining -= channel.write(buff);
                if (!buff.hasRemaining())
                    bytesIterator.remove();
                else {
                    setWriteOps();
                    break;
                }
            }
            // If we are done writing, clear the OP_WRITE interestOps
            if (bytesToWrite.isEmpty())
                key.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE);
            // Don't bother waking up the selector here, since we're just removing an op, not adding
        } finally {
            lock.unlock();
        }
    }
962318
public function onAfterWrite() {
		parent::onAfterWrite();
		if($this->_isCreating === true) {
			$this->_isCreating = false;
			$this->extend('onAfterCreate');
		}
	}
75042
public function onAfterWrite()
    {
        parent::onAfterWrite();

        if ($this->Default) {
            foreach ($this->Contact()->Locations() as $location) {
                if ($location->ID != $this->ID && $location->Default) {
                    $location->Default = false;
                    $location->write();
                }
            }
        }
    }
210562
public void writeOut(Writer writer) throws IOException {

	Entity e = root;
	while (e.next != null) {
	    e = e.next;
	    writer.write(e.data);
	}
	writer.write(buffer, 0, pos);
    }
989045
def _write(self, to_write):
        
        self._file.write(to_write.encode(self._encoding or
                                         self._default_encoding))
317968
@Override
    protected void write(EncodingState encodingState, String str, int off, int len) throws IOException {
        target.write(str, off, len);
    }