Basisklassen zum Modul jdk.httpserver
ulrich
2024-01-24 9d3717abd59e1672f5d8d7888ce613afdc7fb3c5
HttpResponder.finish aufgeteilt
1 files modified
7 ■■■■ changed files
src/de/uhilger/httpserver/base/HttpResponder.java 7 ●●●● patch | view | raw | blame | history
src/de/uhilger/httpserver/base/HttpResponder.java
@@ -89,6 +89,10 @@
  
  public void finish(InputStream in, OutputStream out) throws IOException {
    in.close();
    finish(out);
  }
  public void finish(OutputStream out) throws IOException {
    out.flush();
    out.close();
  }
@@ -132,8 +136,7 @@
    exchange.sendResponseHeaders(code, bytes.length);
    OutputStream os = exchange.getResponseBody();
    os.write(bytes);
    os.flush();
    os.close();
    finish(os);
  }