I have managed to read a file by
Files.copy(Paths.get(file.toURI()), System.out);
How do I write a sequence of characters to a file? I see no effect from
Files.copy(new ByteArrayInputStream(content.getBytes()), Paths.get(file.getName()))
and it looks ugly.