code: public ISynchronizationPoint<IOException> end() {
  		while (!context.isEmpty())
  			closeElement();
  		ISynchronizationPoint<IOException> write = writer.flush();
  		if (!write.isUnblocked()) {
  			SynchronizationPoint<IOException> sp = new SynchronizationPoint<>();
  			write.listenInline(() -> { output.flush().listenInline(sp); }, sp);
  			return sp;
  		}
  		if (write.hasError())
  			return write;
  		return output.flush();
  	}
docs: End the document, close any open element, and flush the output stream.