Code example for FileEntity

0
                System.out.println("Cannot read file " + file.getPath()); 
                 
            } else { 
                 
                response.setStatusCode(HttpStatus.SC_OK); 
                FileEntity body = new FileEntity(file, "text/html");
                response.setEntity(body); 
                System.out.println("Serving file " + file.getPath()); 
                 
            } 
        } 
         
    } 
     
    static class RequestListenerThread extends Thread {
 
        private final ServerSocket serversocket;
        private final HttpParams params; 
        private final HttpService httpService;
         
        public RequestListenerThread(int port, final String docroot) throws IOException {