}
private FileAnalyzer fa;
@Override
public void analyze(Document doc, StreamSource src, Writer xrefOut) throws IOException {
StreamSource gzSrc = wrap(src);
String path = doc.get("path");
if (path != null
&& (path.endsWith(".gz") || path.endsWith(".GZ") || path.endsWith(".Gz"))) {
String newname = path.substring(0, path.length() - 3);
//System.err.println("GZIPPED OF = " + newname);
try (InputStream gzis = gzSrc.getStream()) {
fa = AnalyzerGuru.getAnalyzer(gzis, newname);
}
if (fa == null) {
this.g = Genre.DATA;
OpenGrokLogger.getLogger().log(Level.WARNING, "Did not analyze {0}, detected as data.", newname);