| | |
| | | * @throws IOException falls etwas schief geht entsteht dieser Fehler |
| | | */ |
| | | public void sendNotFound(HttpExchange e, String fname) throws IOException { |
| | | OutputStream os = e.getResponseBody(); |
| | | String response = fname + STR_NOT_FOUND; |
| | | byte[] bytes = response.getBytes(StandardCharsets.UTF_8); |
| | | e.sendResponseHeaders(SC_NOT_FOUND, bytes.length); |
| | | os.write(bytes); |
| | | os.flush(); |
| | | os.close(); |
| | | antwortSenden(e, SC_NOT_FOUND, fname + STR_NOT_FOUND); |
| | | } |
| | | |
| | | public void antwortSenden(HttpExchange exchange, int code, String antwort) throws IOException { |