title: How to convert InputStream into Source?
body: <p>I want to validate <em>xml</em> document using <em>xsd</em> schema file stored on my device.
  Here is my example code:</p>
  
  <pre><code>SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
  
  // schema file on my device
  InputStream isSchema = context.getResources().openRawResource(xsd_file);
  // InputStream =&gt; Source conversion
  Source schemaSource = ????
  Schema schema = factory.newSchema(schemaSource);
  
  Validator validator = schema.newValidator();
  validator.validate(new DOMSource(document));
  </code></pre>
  
  <p><strong>Question:</strong> How can I convert InputStream into Source required by SchemaFactory::newSchema method ? </p>