Writes out all objects since last flush to the output stream.
<p>
The implementation write the XML header first if it has not been written. Then all pending objects since last flush are written.
</p>
17426
@SuppressWarnings("nls")
	public void flush()
	{
		synchronized (this)
		{
			// write xml header
			if (!hasXmlHeader)
			{
				out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?> ");
				out.println("<java version=\"" + System.getProperty("java.version") + "\" class=\"com.googlecode.openbeans.XMLDecoder\"> ");
				hasXmlHeader = true;
			}

			// preprocess pending objects
			for (Iterator<Object> iter = flushPending.iterator(); iter.hasNext();)
			{
				Object o = iter.next();
				Record rec = objRecordMap.get(o);
				if (rec != null)
				{
					preprocess(o, rec);
				}
			}

			// flush pending objects
			for (Iterator<Object> iter = flushPending.iterator(); iter.hasNext();)
			{
				Object o = iter.next();
				flushObject(o, INDENT_UNIT);
				// remove flushed obj
				iter.remove();
			}

			// clear statement records
			objRecordMap.clear();
			flushPendingStat.clear();
			objPrePendingCache.clear();
			clazzCounterMap.clear();

			// remove all old->new mappings
			super.clear();
		}
	}
1296163
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
        // Write out capacity and any hidden stuff
        s.defaultWriteObject();
    }
1303622
public void flushBuffer()
  {
    Writer out = this.out;
    if (out == null)
      return;

    try {
      if (out instanceof FlushBuffer)
        ((FlushBuffer) out).flushBuffer();
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    }
  }
550553
@Override
    public void flushBuffer() throws IOException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Flushing buffers: " + this);
        }
        if (null != this.outWriter) {
            this.outWriter.flush();
        } else {
            this.outStream.flush();
        }
    }
289162
private void writeObject(java.io.ObjectOutputStream s)
            throws java.io.IOException {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            // Write out capacity and any hidden stuff
            s.defaultWriteObject();
            // Write out all elements in the proper order.
            for (Node<E> p = first; p != null; p = p.next)
                s.writeObject(p.item);
            // Use trailing null as sentinel
            s.writeObject(null);
        } finally {
            lock.unlock();
        }
    }
19917
private void writeObject(java.io.ObjectOutputStream out) throws IOException
	{
		if (delegateMethods != null)
		{
			delegateMethods.clear();
		}

		out.defaultWriteObject();
	}
352231
public void write(Bean bean, OutputStream output) throws IOException {
        write(bean, true, output);
    }
279810
@Override
    public void writeXML(XMLOutput xmlOutput) throws IOException {
        xmlOutput.openTag(ELEMENT_NAME, new XMLAttributeList().addAttribute("class", className));
        for (Iterator<String> i = featureIterator(); i.hasNext();) {
            String feature = i.next();
            xmlOutput.openCloseTag(FEATURE_ELEMENT_NAME, new XMLAttributeList().addAttribute("value", feature));
        }
        xmlOutput.closeTag(ELEMENT_NAME);
    }
1209829
public void write(XMLStreamWriter writer, String xmlElementName) throws XMLStreamException {
      if (isModified()) {
         writer.writeStartElement(xmlElementName);
         write(writer);
         writer.writeEndElement();
      }
   }
236729
@Override
    public void flush() throws IOException {
        PipedInputStream stream = target;
        if (stream == null) {
            return;
        }

        synchronized (stream) {
            stream.notifyAll();
        }
    }
719943
public void write()
        throws IOException
    {
        BufferedWriter writer = new BufferedWriter( new OutputStreamWriter( m_outputStream ) );
        for( String line : m_content )
        {
            writer.write( line );
            writer.newLine();
        }
        writer.flush();
        writer.close();
    }
1250350
@Override
    public final void xmlRequestWriteOnSystemOut() throws IOException
    {
        FormattedWriter writer = new FormattedWriter(new OutputStreamWriter(System.out));
        xmlWriteOn(writer);
        writer.flush();
    }
785399
@Override
    public void flush() throws IOException {

        if (_callback != null) {
            if (!this._isReady) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Cannot flush stream , output not ready: " + this);
                }
                return;
            }
            else {
                validate();
                flushBuffers();
            }
        }
        else {
            super.flush();
        }

    }
318048
public void save(Writer stream) throws IOException {
        final PrintWriter out = new PrintWriter(new BufferedWriter(stream));
        try {
            out.println("<?xml version='1.0' encoding='UTF-8'?>");
            toStringRep("", new HashMap<String, String>(), new XNAppender() {
                @Override
                public XNAppender append(Object o) {
                    out.print(o);
                    return this;
                }
                @Override
                public int length() {
                    return 0; // Not used here
                }
            }, null);
        } finally {
            out.flush();
        }
    }
349325
public function flush(): void
    {
        if ($this->writeDocument === true) {
            $this->write($this->getXML());
        }

        parent::flush();
    }
197822
private void writeObject(java.io.ObjectOutputStream s)
                    throws java.io.IOException {

        s.defaultWriteObject();

        Object[] elements = getArray();
        // Write out array length
        s.writeInt(elements.length);

        // Write out all elements in the proper order.
        for (Object element : elements)
            s.writeObject(element);
    }
809663
public void write(XMLStreamWriter writer) throws XMLStreamException {
      for (Attribute<?> attr : attributes.values()) {
         if (attr.isPersistent())
            attr.write(writer, attr.getAttributeDefinition().xmlName());
      }
   }