private void processHttpResponseMetadata(HttpResponse http, Metadata metadata) {
        metadata.set(WARC_HTTP_STATUS, Integer.toString(http.status()));
        if (!StringUtils.isBlank(http.reason())) {
            metadata.set(WARC_HTTP_STATUS_REASON, http.reason());
        }
        for (Map.Entry<String, List<String>> e : http.headers().map().entrySet()) {
            for (String val : e.getValue()) {
                metadata.add(WARC_HTTP_PREFIX + e.getKey(), val);
            }
        }
    }
This uses jwarc to parse warc files and arc files
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-webarchive-module/src/main/java/org/apache/tika/parser/warc/WARCParser.java