code: public static AutoCloseableXMLStreamWriter writer(
  		final OutputStream output,
  		final String indent
  	)
  		throws XMLStreamException
  	{
  		requireNonNull(output);
  
  		final XMLOutputFactory factory = XMLOutputFactory.newFactory();
  		return indent != null
  			? new IndentingXMLWriter(
  				factory.createXMLStreamWriter(output, "UTF-8"), indent)
  			: new XMLWriterProxy(
  				factory.createXMLStreamWriter(output, "UTF-8"));
  	}
docs: Create a new {@code XMLStreamWriter} from the given output stream.
  <em>
  The caller is responsible for closing the returned {@code XMLStreamWriter}.
  </em>
  
  <pre>{@code
  try (AutoCloseableXMLStreamWriter xml = XML.writer(out, "    ")) {
  writer.write(value, xml);
  }
  }</pre>
  
  @param output the underlying output stream
  @param indent the element indent used for the XML output
  @return a new {@code XMLStreamWriter} instance
  @throws XMLStreamException if an error occurs while creating the XML
  stream writer
  @throws NullPointerException if the given {@code output} stream is
  {@code null}