dev.mccue.jdk.httpserver.regexrouter.NotFoundHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdk-httpserver-regexrouter Show documentation
Show all versions of jdk-httpserver-regexrouter Show documentation
Request router and dispatcher for the JDK's built-in HTTP server
The newest version!
package dev.mccue.jdk.httpserver.regexrouter;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import java.io.IOException;
final class NotFoundHandler implements HttpHandler {
@Override
public void handle(HttpExchange exchange) throws IOException {
exchange.sendResponseHeaders(404, -1);
exchange.close();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy