private static InputStream getConfigInputStream(String config, ServiceLoader serviceLoader)
            throws TikaException, IOException {
        InputStream stream = null;
        try {
            stream = new URI(config).toURL().openStream();
        } catch (IOException | URISyntaxException ignore) {
        }
        if (stream == null) {
            stream = serviceLoader.getResourceAsStream(config);
        }
        if (stream == null) {
            Path file = Paths.get(config);
            if (Files.isRegularFile(file)) {
                stream = Files.newInputStream(file);
            }
        }
        if (stream == null) {
            throw new TikaException("Specified Tika configuration not found: " + config);
        }
        return stream;
    }
@return maximum field length when serializing String fields in Tika's metadata or metadata
list into JSON
tika-core/src/main/java/org/apache/tika/config/TikaConfig.java