Skip to content

Commit

Permalink
Fixed FileChannel.open
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Paulsen committed Dec 6, 2024
1 parent 0698d5e commit 8127354
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public static void accessFileSystemViaInputStreamReader() throws IOException {
* Access the file system using the {@link FileChannel} class for reading.
*/
public static void accessFileSystemViaFileChannelRead() throws IOException {
FileChannel fileChannel = FileChannel.open(Path.of("pom123.xml"));
FileChannel fileChannel = FileChannel.open(Path.of("pom123.xml"), StandardOpenOption.READ);
fileChannel.read(ByteBuffer.allocate(10));
}

Expand Down

0 comments on commit 8127354

Please sign in to comment.