public static <T> void mergeFrom(InputStream in, T message, Schema<T> schema,
            XMLInputFactory inFactory) throws IOException
    {
        XMLStreamReader parser = null;
        try
        {
            parser = inFactory.createXMLStreamReader(in, XML_ENCODING);
            mergeFrom(parser, message, schema);
        }
        catch (XMLStreamException e)
        {
            throw new XmlInputException(e);
        }
        finally
        {
            if (parser != null)
            {
                try
                {
                    parser.close();
                }
                catch (XMLStreamException e)
                {
                    // ignore
                }
            }
        }
    }
public static < T > void mergeFrom ( InputStream in , T message , Schema < T > schema , XMLInputFactory inFactory ) throws IOException { XMLStreamReader parser = null ; try { parser = inFactory . createXMLStreamReader ( in , XML_ENCODING ) ; mergeFrom ( parser , message , schema ) ; } catch ( XMLStreamException e ) { throw new XmlInputException ( e ) ; } finally { if ( parser != null ) { try { parser . close ( ) ; } catch ( XMLStreamException e ) { } } } }
Merges the {@code message} from the {@link InputStream} using the given {@code schema}.