private void setNotNull(Property key, org.netpreserve.jwarc.MediaType contentType,
                            Metadata metadata) {
        if (contentType == null) {
            return;
        }
        metadata.set(key, contentType.toString());
    }
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