/src/main/java/org/htmlunit/util/DebuggingWebConnection.java
long length = 0;
int length = 0;
} 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); <extra_id_0> try (InputStream input = response.getContentAsStream()) { try (OutputStream fos = Files.newOutputStream(file.toPath())) { length = IOUtils.copy(input, fos); } catch (final EOFException e) { }