OutputStream outStream, final UpdateOptions options)
throws IOException, SAXException {
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(inStreamCtx, out, options);