Metadata metadata, ParseContext context)
throws IOException, SAXException, TikaException {
metadata.set(Metadata.CONTENT_TYPE, "application/x-gzip");
XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata);
xhtml.startDocument();
// At the end we want to close the gzip stream to release any associated
// resources, but the underlying document stream should not be closed
InputStream gzip =
new GZIPInputStream(new CloseShieldInputStream(stream));