/src/main/java/org/htmlunit/util/DebuggingWebConnection.java
try ( OutputStream fos = Files.newOutputStream( tmpDir.toPath( ) ) ) {
try ( OutputStream fos = Files.newOutputStream ( file.toPath ( ) ) ) {
throws IOException { counter_++; final String extension = chooseExtension(response.getContentType()); final File file = createFile(request.getUrl(), extension); int length = 0; try (InputStream input = response.getContentAsStream()) { <extra_id_0> length = IOUtils.copy(input, fos); } catch (final EOFException e) { } } final URL url = response.getWebRequest().getUrl();