final PrintWriter out = new PrintWriter(new OutputStreamWriter(outStream, "UTF-8"));
final BufferedInputStream in = new BufferedInputStream(inStream);
in.mark(MAX_HEADER_LENGTH); // assume the header is never larger than 10000 bytes.
copyHeader(in, out);
in.reset(); // reposition the stream at the beginning
try {
UpdaterHandler updaterHandler = new UpdaterHandler(settings, out, resolvedRevisions,
status, revision, pubdate, ns, replaceInclude, confsToExclude, inStreamCtx);
XMLHelper.parse(in, null, updaterHandler, updaterHandler);