mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
21 lines
573 B
Java
21 lines
573 B
Java
// "Fix all ''Files.readString()' or 'Files.writeString()' can be used' problems in file" "true"
|
|
import java.io.IOException;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.nio.file.Files;
|
|
import java.nio.file.Paths;
|
|
|
|
public class Example {
|
|
void testRead1() throws IOException {
|
|
String s = Files.readString(Paths.get("/etc/passwd"), StandardCharsets.ISO_8859_1);
|
|
}
|
|
|
|
void testRead2() throws IOException {
|
|
/*3*/
|
|
/*4*/
|
|
/*8*/
|
|
/*9*/
|
|
/*1*/
|
|
/*2*/
|
|
String s = Files/*5*/./*6*/readString(/*7*/Paths.get("/etc/passwd"));
|
|
}
|
|
} |