src/share/classes/java/nio/file/Path.java

Print this page
rev 4099 : 7041612: Rename StandardCharset to StandardCharsets
Reviewed-by: alanb, mr, darcy

*** 70,80 **** * java.io.BufferedReader} to read text from a file "{@code access.log}". The * file is located in a directory "{@code logs}" relative to the current working * directory and is UTF-8 encoded. * <pre> * Path path = FileSystems.getDefault().getPath("logs", "access.log"); ! * BufferReader reader = Files.newBufferedReader(path, StandardCharset.UTF_8); * </pre> * * <a name="interop"><h4>Interoperability</h4></a> * <p> Paths associated with the default {@link * java.nio.file.spi.FileSystemProvider provider} are generally interoperable --- 70,80 ---- * java.io.BufferedReader} to read text from a file "{@code access.log}". The * file is located in a directory "{@code logs}" relative to the current working * directory and is UTF-8 encoded. * <pre> * Path path = FileSystems.getDefault().getPath("logs", "access.log"); ! * BufferReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8); * </pre> * * <a name="interop"><h4>Interoperability</h4></a> * <p> Paths associated with the default {@link * java.nio.file.spi.FileSystemProvider provider} are generally interoperable