Skip to content

Commit

Permalink
demo: Remove "kohlschutter-util" dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
kohlschuetter committed Nov 13, 2023
1 parent 684f56e commit 563a1e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
import org.newsclub.net.unix.demo.DemoHelper;
import org.newsclub.net.unix.demo.nanohttpd.NanoHttpdServerDemo;

import com.kohlschutter.util.IOUtil;

import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
Expand Down Expand Up @@ -62,7 +60,7 @@ public static void main(String[] args) throws IOException {
ResponseBody body = response.body();
if (body != null) {
try (InputStream in = body.byteStream()) { // NOPMD.UseTryWithResources
IOUtil.transferAllBytes(in, System.out);
in.transferTo(System.out);
} finally {
body.close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
import org.newsclub.net.unix.demo.DemoHelper;
import org.newsclub.net.unix.demo.nanohttpd.NanoHttpdServerDemo;

import com.kohlschutter.util.IOUtil;

import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
Expand Down Expand Up @@ -76,7 +74,7 @@ public static void main(String[] args) throws IOException, InterruptedException
ResponseBody body = response.body();
if (body != null) {
try (InputStream in = body.byteStream()) { // NOPMD.UseTryWithResources
IOUtil.transferAllBytes(in, System.out);
in.transferTo(System.out);
} finally {
body.close();
}
Expand Down

0 comments on commit 563a1e7

Please sign in to comment.