<commit_before>package io.quarkus.vertx.http.runtime.devmode;

import java.io.Closeable;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.locks.ReentrantLock;

import io.quarkus.fs.util.ZipUtils;
import io.vertx.core.Handler;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.http.HttpHeaders;
import io.vertx.core.http.HttpMethod;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.core.http.impl.HttpUtils;
import io.vertx.core.http.impl.MimeMapping;
import io.vertx.core.net.impl.URIDecoder;
import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.impl.Utils;

/**
 * A Handler to serve static files from jar files or from a local directory.
 */
public class FileSystemStaticHandler implements Handler<RoutingContext>, Closeable {

    private static final String DEFAULT_CONTENT_ENCODING = Charset.defaultCharset().name();

    private static final ReentrantLock ROOT_CREATION_LOCK = new ReentrantLock();

    /**
     * Resolved web roots based on the configured web roots.
     */
    private List<Path> resolvedWebRoots;

    /**
     * Web roots that are used to serve files from. File resolving is tried in the order of configurations.
     */
    private List<StaticWebRootConfiguration> webRootConfigurations;
<commit_msg>Don't use system dependent charset<commit_after>package io.quarkus.vertx.http.runtime.devmode;

import java.io.Closeable;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.locks.ReentrantLock;

import io.quarkus.fs.util.ZipUtils;
import io.vertx.core.Handler;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.http.HttpHeaders;
import io.vertx.core.http.HttpMethod;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.core.http.impl.HttpUtils;
import io.vertx.core.http.impl.MimeMapping;
import io.vertx.core.net.impl.URIDecoder;
import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.impl.Utils;

/**
 * A Handler to serve static files from jar files or from a local directory.
 */
public class FileSystemStaticHandler implements Handler<RoutingContext>, Closeable {

    private static final String DEFAULT_CONTENT_ENCODING = StandardCharsets.UTF_8.name();

    private static final ReentrantLock ROOT_CREATION_LOCK = new ReentrantLock();

    /**
     * Resolved web roots based on the configured web roots.
     */
    private List<Path> resolvedWebRoots;

    /**
     * Web roots that are used to serve files from. File resolving is tried in the order of configurations.
     */
    private List<StaticWebRootConfiguration> webRootConfigurations;

{'fraction_non_alphanumeric': 0.10024829298572316, 'fraction_numerical': 0.00031036623215394165, 'mean_word_length': 4.644483362521892, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '382687', 'n_tokens_mistral': 1016, 'n_tokens_neox': 990, 'n_words': 236}