8307409: Refactor usage examples to use @snippet in the java.nio packages

Reviewed-by: alanb, rriggs
This commit is contained in:
Brian Burkhalter 2023-05-12 15:17:22 +00:00
parent e512a20679
commit 9fa8b9a4a6
33 changed files with 433 additions and 386 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -255,10 +255,10 @@ public final class FileSystems {
* <p> <b>Usage Example:</b>
* Suppose there is a provider identified by the scheme {@code "memory"}
* installed:
* <pre>
* FileSystem fs = FileSystems.newFileSystem(URI.create("memory:///?name=logfs"),
* Map.of("capacity", "16G", "blockSize", "4k"));
* </pre>
* {@snippet lang=java :
* FileSystem fs = FileSystems.newFileSystem(URI.create("memory:///?name=logfs"),
* Map.of("capacity", "16G", "blockSize", "4k"));
* }
*
* @param uri
* the URI identifying the file system