In Tutorials > The Java I/O API > File Operations Basics > Decorating I/O Streams, section "Writing Characters using an OutputStreamWriter", the example code has the line long size = Files.size(path);.
This code should be within a try-catch block of it's own as it throws IOException.
Same applies to first code snippet in "Handling Compressed Binary Streams" section later in the article.
In Tutorials > The Java I/O API > File Operations Basics > Decorating I/O Streams, section "Writing Characters using an OutputStreamWriter", the example code has the line
long size = Files.size(path);.This code should be within a try-catch block of it's own as it throws
IOException.Same applies to first code snippet in "Handling Compressed Binary Streams" section later in the article.