/src/main/java/org/htmlunit/TextPage.java
final Path savePath = file.toPath ( ) ; final String text = getContent ( ) ;
super(webResponse, enclosingWindow); } public String getContent() { return getWebResponse().getContentAsString(); } public void save(final File file) throws IOException { <extra_id_0> final Charset charset = getWebResponse().getContentCharset(); Files.write(savePath, text.getBytes(charset)); } }