code: public static XMLEventReader createReader(final InputStream inputStream) throws IOException,
          XMLStreamException {
          final XMLInputFactory factory = XMLInputFactory.newInstance();
          factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
          return factory.createXMLEventReader(inputStream);
      }
docs: This method creates an {@link XMLEventReader} out of an {@link InputStream}.
  
  @param inputStream
  The {@link InputStream} containing the XML file that has to be
  stored.
  @return The {@link XMLStreamReader} object.
  @throws IOException
  The exception occurred.
  @throws XMLStreamException
  The exception occurred.