public static AutoCloseableXMLStreamReader reader(final InputStream input)
		throws XMLStreamException
	{
		requireNonNull(input);

		//final XMLInputFactory factory = XMLInputFactory
		//	.newFactory(XMLInputFactory.class.getName(), null);
		final XMLInputFactory factory = XMLInputFactory.newFactory();
		return new XMLReaderProxy(
			factory.createXMLStreamReader(input, "UTF-8"));
	}
Create a new XML stream reader from the given {@code input} stream.
<em>
The caller is responsible for closing the returned {@code XMLStreamReader}.
</em>

{@snippet lang="java":
try (AutoCloseableXMLStreamReader xml = XML.reader(in)) {
    // Move XML stream to first element.
    xml.next();
    return reader.read(xml);
}
}

@param input the input stream
@return a new {@code Closeable} XML stream reader
@throws XMLStreamException if the creation of the XML stream reader fails
@throws NullPointerException if the given {@code input} stream is
        {@code null}
jenetics.xml/src/main/java/io/jenetics/xml/stream/XML.java