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