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
                }
            }
        }
    }
Merges the {@code message} from the {@link InputStream} using the given {@code schema}.
protostuff-xml/src/main/java/io/protostuff/XmlIOUtil.java