(String[] args)
| 10 | |
| 11 | public class SimpleHttpServer { |
| 12 | public static void main(String[] args) throws IOException { |
| 13 | int port = 8080; |
| 14 | HttpServer server = HttpServer.create(new InetSocketAddress(port), 0); |
| 15 | server.createContext("/", new FileHandler()); |
| 16 | server.setExecutor(null); |
| 17 | server.start(); |
| 18 | System.out.println("Server started on port " + port); |
| 19 | } |
| 20 | |
| 21 | static class FileHandler implements HttpHandler { |
| 22 | @Override |
nothing calls this directly
no outgoing calls
no test coverage detected