class LogFileHandler {

    public void writeFileNamesToResponse(final HttpServletResponse resp, final Path path) throws IOException {
        PrintWriter out = resp.getWriter();
        resp.setContentType(APPLICATION_JSON);
        out.write(messageFileJsonBuilder.buildLogFileListJson(path.toFile()));
        out.flush();
        out.close();
    }

}