class GetFile extends HttpServlet {

    public static final long serialVersionUID = -1;

    @Override
    protected void service(final HttpServletRequest request, final HttpServletResponse response) throws IOException {<FILL_FUNCTION_BODY>}
}

        PageConfig cfg = PageConfig.get(request);
        cfg.checkSourceRootExistence();

        String redir = cfg.canProcess();
        if (redir == null || redir.length() > 0) {
            if (redir != null) {
                response.sendRedirect(redir);
            } else {
                response.sendError(HttpServletResponse.SC_NOT_FOUND);
            }
            return;
        }

        File f = cfg.getResourceFile();
        String revision = cfg.getRequestedRevision();
        if (revision.length() == 0) {
            revision = null;
        }

        InputStream in;
        try {
            if (revision != null) {
                in = HistoryGuru.getInstance().getRevision(f.getParent(),
                        f.getName(), revision);
            } else {
                long flast = cfg.getLastModified();
                if (request.getDateHeader("If-Modified-Since") >= flast) {
                    response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
                    return;
                }
                response.setContentLength((int) f.length());
                response.setDateHeader("Last-Modified", f.lastModified());
                in = new FileInputStream(f);
            }
        } catch (Exception e) {
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            return;
        }

        try {
            String mimeType = getServletContext().getMimeType(f.getAbsolutePath());
            response.setContentType(mimeType);

            if (cfg.getPrefix() == Prefix.DOWNLOAD_P) {
                response.setHeader("content-disposition", "attachment; filename="
                        + f.getName());
            } else {
                response.setHeader("content-type", "text/plain");
            }
            OutputStream o = response.getOutputStream();
            byte[] buffer = new byte[8192];
            int nr;
            while ((nr = in.read(buffer)) > 0) {
                o.write(buffer, 0, nr);
            }
            o.flush();
            o.close();
        } finally {
            in.close();
        }
    
<no_super_class>