You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In Decorating I/O Streams, Files.size(path) should be inside a try-catch statement #275
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.
Activity
authentictech commentedon Aug 21, 2026
Same issue also occurs in Handling Streams of Primitive Types