public void write(DocumentType docType) throws IOException {
        writeDocType(docType);

        if ( autoFlush ) {
            flush();
        }
    }
Writes the given {@link DocumentType}.

@param docType <code>DocumentType</code> to output.
@throws IOException if the docType could not be written
xmppserver/src/main/java/org/jivesoftware/util/XMLWriter.java